/************************************* CSS Wikini original ****************************************/

/* Default color, in case someone use these variable outside of margot template */
:root {
  --primary-color: #0c5d6a;
  --secondary-color-1: #d8604c;
  --secondary-color-2: #d78958;
  --neutral-color: #4e5056;
  --neutral-soft-color: #57575c;
  --neutral-light-color: #f2f2f2;
  --main-text-fontsize: 17px;
  --main-text-fontfamily: 'Nunito', sans-serif;
  --main-title-fontfamily: 'Nunito', sans-serif;
  --success-color: #3cab3b;
  --danger-color: #d8604c;
  --warning-color: #d78958;
}

html {
  font-size: 15px !important; /* override bootstrap 10px which make rem unit very small */
}

/* Mise en forme */
.indent {
  margin-left: 40px;
}

ul.fake-ul {
  list-style: none;
  padding-left: 0;
}

.additions {
  color: var(--success-color);
}

.deletions {
  color: var(--danger-color);
}

.add,
.add * {
  color: white !important;
  background-color: var(--success-color) !important;
}

.del,
.del * {
  color: white !important;
  background-color: var(--danger-color) !important;
  text-decoration: line-through !important;
}

/* Navigation par table des matieres */
.trail_table {
  line-height: 30px;
}

.trail_button {
  color: var(--secondary-color-1);
}

/* Adds edit icon after link tag */
a[data-missing-tag]::after {
  content: '\f303';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-left: 0.4em;
  font-size: 0.8em;
}

/* Page absentes */
span.missingpage,
.list-inline,
.list-inline li {
  display: inline;
}

/* previsualisation page */
.page_preview {
  background-color: #ffffbf;
  padding-bottom: 30px;
  border-bottom: 5px solid grey;
  margin-bottom: 30px;
}

.prev_alert {
  background-color: var(--danger-color);
  color: white;
  font-size: 1.7em;
  font-weight: bold;
  margin-bottom: 5px;
}

#form_graphical_options .preset-settings-container {
  display: none;
}

/* Divers mise en forme */
.code {
  margin: 3px 0;
  display: flex;
}

.code pre.hljs {
  width: 200px; /* fake width overwrittent by flex: 1 auto; but needed for flexbox to work correctly */
  flex: 1 auto;
  padding: 0.5em 0.5em 0.3em;
}

.revisioninfo {
  color: #aaa;
  padding-bottom: 20px;
}

.searchbox {
  background: #fffff8;
  border: 0;
  border-bottom: 1px solid #cca;
  padding: 0;
  margin: 0;
}

.debug {
  font-size: 0.9em;
  color: var(--neutral-color);
  background: #fff;
  border: 1px dotted var(--neutral-color);
  padding: 1em;
  margin: 0 auto;
}

/* Fin divers mise en forme */

/* Les 3 colonnes potentielles de la page centrale */
.page,
.menupage,
.rightcolumnpage {
  position: relative;
  margin: 0;
  min-height: 100px;
}

.footer {
  margin: 18px 0;
  padding: 0;
  text-align: center;
}

.footer a,
.footer-hidden a {
  color: #333;
  padding: 2px 5px;
  text-decoration: none;
  display: inline-block;
  margin: 0;
}

.footer-hidden {
  float: right;
}

.footer .dropdown-menu a {
  display: block;
  text-align: left;
}

/* Ajustements mode édition */
#ACEditor .form-actions {
  margin: 15px 0;
}

.img-responsive img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Sélecteur de fond d'écran */
#graphical_options {
  display: none;
}

#bgCarousel {
  margin-bottom: 20px;
}

#bgCarousel img.bgimg,
#bgCarousel div.mozaicimg {
  float: left;
  margin: 2px;
  border: 1px solid #ccc;
  width: 100px;
  height: 75px;
  border-radius: 4px;
}

#bgCarousel .choosen {
  box-shadow: 0 0 2px 3px #ffff21;
}

#bgCarousel .item {
  display: block;
  height: 162px;
  margin: 0 53px;
}

/* lanceur d'accordéon */
.accordion-trigger,
.panel-heading[data-toggle='collapse'] {
  cursor: pointer;
}

/* table des matieres */
.toc {
  position: absolute;
  right: 0;
  z-index: 10000;
  top: 50px;
  width: 300px;
}

li.toc1 {
  padding-left: 0;
}

li.toc2 {
  padding-left: 10px;
}

li.toc3 {
  padding-left: 20px;
}

li.toc4 {
  padding-left: 30px;
}

li.toc5 {
  padding-left: 40px;
}

.toc-menu {
  max-height: 400px;
  overflow: auto;
}

.toc-menu ul.unstyled {
  list-style-type: none;
  padding-left: 0;
}

/* barres de progression */
.progressbar {
  margin: -5px 5px 0 0;
}

/* page wiki en format boite modale */
#YesWikiModal .page {
  min-height: auto;
}

#yw-modal-loading {
  position: absolute;
  top: 30vh;
  left: 48%;
}

#yw-modal-iframe {
  width: 100%;
  height: 70vh;
  border: 0;
}

#YesWikiModal .modal-dialog .no-header-btn-close {
  display: none;
}

#YesWikiModal .modal-dialog.no-header .no-header-btn-close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -1rem;
  right: -1rem;
  background-color: #4e5056;
  background-color: var(--neutral-color);
  color: white;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 2rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

#YesWikiModal .modal-dialog.no-header .modal-header {
  visibility: hidden;
  height: 1rem;
  max-height: 1rem;
  overflow: hidden;
  padding: 0;
}

/* remove first column of revisions */
#YesWikiModal .first-revisions-selector,
#YesWikiModal .current-page-revision,
body > :not(#YesWikiModal) .current-revision-text {
  display: none;
}

/* menu du haut fixe */
#yw-topnav.fixable {
  position: sticky;
  top: 0;
}

/* retour à la ligne pour les éléments flottants */
.clear,
.hr_clear {
  clear: both;
  margin: 0;
  padding: 0;
  border: 0;
  height: 0;
  visibility: hidden;
  background: transparent;
}

.topbarpage .btn-toolbar,
.topbarpage .btn-toolbar a {
  margin: 0;
}

.topbarpage .btn-toolbar a:hover {
  text-decoration: none;
}

.topbarpage .form-search {
  margin: 0;
}

.topbarpage .dropdown-menu a {
  display: block;
}

.topbarpage ul ul {
  display: none;
}

.dropdown-menu .login-form {
  margin: 0;
  padding: 18px;
}

.form-search {
  margin: 0;
}

.yeswiki-textarea-full {
  width: 100% !important;
  height: 500px !important;
}

.accordion-group {
  cursor: pointer;
}

.accordion-group .panel-title {
  position: relative;
}

.accordion-group .panel-heading {
  position: relative;
}

.accordion-group .panel-heading .icon-chevron {
  display: none;
  position: absolute;
  top: 20px;
  right: 15px;
}

.accordion-group .panel-heading.collapsed .chevron-down {
  display: inline-block;
}

.accordion-group .panel-heading:not(.collapsed) .chevron-up {
  display: inline-block;
}

.panel-heading > i {
  margin-right: 8px;
}

/* dropdown menu in modal */
#page_options .typeahead.dropdown-menu {
  z-index: 200000;
}

#form_page_options .control-label {
  width: 200px;
}

#form_page_options .controls {
  margin-left: 210px;
}

.topbarpage .yeswiki-search-form .input-append,
.topbarpage .yeswiki-search-form .input-prepend {
  margin-top: 0 !important;
}

/* on /iframe page, we use white background, can be overwritten in the theme */
.yeswiki-page-widget {
  padding: 0;
  background: #fff;
  background-image: none;
}

.cols2 {
  /* Chrome, Safari, Opera */ /* Firefox */
  column-count: 2;
}

.cols3 {
  /* Chrome, Safari, Opera */ /* Firefox */
  column-count: 3;
}

.cols4 {
  /* Chrome, Safari, Opera */ /* Firefox */
  column-count: 4;
}

.full-width {
  width: 100vw !important;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

body {
  overflow-x: hidden;
} /* hack pour cacher l'ascenseur horizontal */

.popover .page {
  /* gestion des popup au survol modalbox-hover */
  min-height: auto;
}

.popover .BAZ_label {
  display: none;
} /* enlever les label des fiches bazar quand on utilise la fonction glossaire */

.btn-glossaire {
  /* enlève le padding trop grand qui s'applique sur les boutons en général */
  padding: 0 !important;
  font-size: inherit !important;
  vertical-align: inherit !important;
}

/* stuff for iframes */
.iframe-body {
  background-color: transparent;
  background-image: none;
  width: auto;
  min-width: 0;
  padding-top: 0;
}

.yeswiki-page-widget {
  min-height: auto !important;
}

.control-label::after {
  content: ':';
  margin: 0 0.25em;
}

.symbole_obligatoire::after {
  content: '*';
  margin-right: 0.25em;
}

.default-right {
  font-weight: bold;
  color: orange;
}

.acl-advanced {
  display: none;
}

.acl-single-container {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.acl-single-container label {
  width: 180px;
}

.acl-single-container input {
  width: calc(100% - 185px) !important;
}

.edit-acl-container label {
  font-weight: normal;
}

/* Materialize Switch
   ========================================================================== */
.switch,
.switch * {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.switch label {
  cursor: pointer;
}

.switch label input[type='checkbox'] {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch label input[type='checkbox']:checked + .lever {
  background-color: #84c7c1;
}

.switch label input[type='checkbox']:checked + .lever::before,
.switch label input[type='checkbox']:checked + .lever::after {
  left: 18px;
}

.switch label input[type='checkbox']:checked + .lever::after {
  background-color: #26a69a;
}

.switch label .lever {
  content: '';
  display: inline-block;
  position: relative;
  width: 36px;
  height: 14px;
  background-color: rgb(0 0 0 / 38%);
  border-radius: 15px;
  margin-right: 10px;
  transition: background 0.3s ease;
  vertical-align: middle;
  margin: 0 16px;
}

.switch label .lever::before,
.switch label .lever::after {
  content: '';
  position: absolute;
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  left: 0;
  top: -3px;
  transition:
    left 0.3s ease,
    background 0.3s ease,
    -webkit-box-shadow 0.1s ease,
    -webkit-transform 0.1s ease;
  transition:
    left 0.3s ease,
    background 0.3s ease,
    box-shadow 0.1s ease,
    transform 0.1s ease;
  transition:
    left 0.3s ease,
    background 0.3s ease,
    box-shadow 0.1s ease,
    transform 0.1s ease,
    -webkit-box-shadow 0.1s ease,
    -webkit-transform 0.1s ease;
}

.switch label .lever::before {
  background-color: rgb(38 166 154 / 15%);
}

.switch label .lever::after {
  background-color: #f1f1f1;
  box-shadow:
    0 3px 1px -2px rgb(0 0 0 / 20%),
    0 2px 2px 0 rgb(0 0 0 / 14%),
    0 1px 5px 0 rgb(0 0 0 / 12%);
}

.form-control[type='checkbox'] {
  border: none;
  height: auto;
  display: inline-block;
  width: auto;
  box-shadow: none;
}

.login-form-dropdown {
  padding: 5px 15px 10px;
  width: 300px;
}

.switch input[type='checkbox'][disabled] + .lever {
  cursor: default;
  background-color: rgb(0 0 0 / 12%);
}

.switch label input[type='checkbox'][disabled] + .lever::after,
.switch label input[type='checkbox'][disabled]:checked + .lever::after {
  background-color: #949494;
}

#search {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  background-color: rgb(0 0 0 / 70%);
  transition: all 0.3s ease-in-out;
  transform: translate(0, -100%) scale(0, 0);
  opacity: 0;
  overflow: hidden;
}

#search.open {
  transform: translate(0, 0) scale(1, 1);
  opacity: 1;
  z-index: 10000;
  width: 100%;
  height: 100%;
  display: block !important;
}

#search .yeswiki-search-form {
  position: relative;
  top: 50%;
  width: 100%;
  color: rgb(255 255 255);
  background: rgb(0 0 0 / 0%);
  font-weight: 300;
  text-align: center;
  border: 0;
  margin: 0 auto;
  margin-top: -51px;
  padding: 0 1rem;
  outline: none;
  box-shadow: none;
}

#search .btn-search,
#search .search-query {
  font-size: 1.8rem;
  height: auto !important;
  line-height: 1em;
}

#search .close-search {
  position: fixed;
  top: 15px;
  right: 15px;
  opacity: 1;
  padding: 0 15px;
  font-size: 30px;
  font-weight: bold;
}

.toast-message {
  position: fixed;
  top: -5rem;
  transition:
    top 0.5s,
    opacity 0.3s;
  left: 0;
  right: 0;
  z-index: 5000;
  text-align: center;
}

.toast-message .alert {
  display: inline-block;
  box-shadow: 0 0 9px 1px rgb(0 0 0 / 42%);
}

.yeswiki-iframe-body > .container {
  margin: 0 !important;
  padding: 0;
  width: 100% !important;
}

.remove-this-div-on-page-load {
  display: none !important;
}

.update-hint {
  font-size: 0.9rem;
  margin-bottom: 5px;
  margin-top: 5px;
  opacity: 0.9;
  font-style: italic;
  line-height: 1rem;
  text-align: justify;
}

/* VUE SELECT */
.v-select {
  border: 2px solid var(--primary-color);
  border-radius: 3px !important;
}

.v-select .vs__dropdown-toggle {
  border: none;
}

.spinner-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.1;
}

.spinner-loader.overlay {
  height: auto !important;
  position: absolute;
  inset: 0;
  background-color: #ececec;
  border-radius: 0.5rem;
  opacity: 0.3;
}

.spinner-loader.overlay.super-overlay {
  z-index: 1000;
}

section.pattern-border {
  border-width: 4px;
  border-style: solid;
  padding: 2rem;
}

section.pattern-border-dashed {
  border-style: dashed;
}

section.pattern-border-dotted {
  border-style: dotted;
}

section.shape-rounded {
  border-radius: 0.5rem;
  padding: 2rem;
}

section.shape-circle {
  border-radius: 50%;
  padding: 4rem;
}

section.shape-blob1 {
  border-radius: 50% 50% 59% 41% / 35% 50% 50% 65%;
  padding: 4rem;
}

section.shape-blob2 {
  border-radius: 33% 67% 50% 50% / 25% 19% 81% 75%;
  padding: 4rem;
}

section.shape-blob3 {
  border-radius: 33% 67% 50% 50% / 65% 73% 27% 35%;
  padding: 4rem;
}

section.shape-blob4 {
  border-radius: 23% 77% 27% 73% / 41% 31% 69% 59%;
  padding: 4rem;
}

section.shape-blob5 {
  border-radius: 75% 25% 76% 24% / 50% 50% 50% 50%;
  padding: 4rem;
}

section.full-width:not(.with-bg-pattern) {
  padding: 2rem 0;
}

/* for datatables bootstrap */
.dataTables_footer .dataTables_info {
  white-space: normal !important; /* more responsive */
}

.dropup:hover {
  cursor: pointer;
}

.yeswiki-page-comments {
  margin-top: 2em;
}

.yw-comment {
  margin: 1em 0 3em;
}

.yw-comment .comment-info {
  font-size: 0.8rem;
  margin-bottom: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.yw-comment .user-pic {
  width: 32px;
  height: 32px;
  margin: 0 1em 0 0;
}

.yw-comment .comment-date {
  color: var(--neutral-color);
}

.yw-comment .comment-html {
  margin-bottom: 0;
}

.yw-comment .comment-links {
  font-size: 0.8rem;
}

.comment-reponses {
  margin-left: 3em;
}

.api-container code {
  font-weight: normal;
}

.comment-reponses .yw-comment {
  margin: 1em 0;
}

/* === trick to manage lists'translation === */

html[lang='ca'] [lang]:not([lang='ca']),
html[lang='en'] [lang]:not([lang='en']),
html[lang='es'] [lang]:not([lang='es']),
html[lang='fr'] [lang]:not([lang='fr']),
html[lang='nl'] [lang]:not([lang='nl']),
html[lang='pt'] [lang]:not([lang='pt']) {
  display: none;
}

/* comment-table */
#comments-table-action .comments-table-break-word-column {
  overflow-wrap: break-word;
  max-width: 170px;
}

@media (width <= 801px) {
  #comments-table-action .comments-table-break-word-column {
    max-width: 120px;
  }
}

/* === === */

/* reactions */
.reactions-container {
  margin: 2em 0;
}

.reactions-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
}

.reaction-img {
  width: 80%;
}

.reaction-emoji,
.reaction-fa-icons {
  font-size: 3em;
}

.mini-react {
  font-weight: bold;
  color: var(--primary-color);
}

.mini-react > img {
  max-height: 2.5em;
  display: inline-block;
}

.mini-react > img.reaction-img {
  max-width: 2em;
}

.mini-react .reaction-emoji,
.mini-react .reaction-fa-icons {
  font-size: 1.5em;
}

.reaction-content {
  width: 9em;
  text-align: center;
  margin: 0 1em 1em 0;
  padding: 0;
  font-size: 0.9em;
}

.reaction-title {
  color: var(--neutral-color);
  text-transform: uppercase;
  font-size: 12px;
  margin-top: 1em;
  word-wrap: anywhere;
}

.reaction-numbers {
  color: var(--neutral-color);
  font-size: 1.1em;
  font-weight: bold;
}

.link-reaction {
  display: flex;
  align-items: center;
  flex-direction: column;
  place-content: center space-between;
  height: 100%;
  border: 1px solid rgb(0 0 0 / 20%);
  border-radius: 0.5em;
  padding: 1em 0.5em;
  transition: all 200ms ease-in;
  box-shadow: none;
}

.link-reaction:hover {
  border: 1px solid rgb(0 0 0 / 50%);
  box-shadow: 0 0 3px rgb(0 0 0 / 30%);
  text-decoration: none;
}

.link-reaction:focus,
.link-reaction:active,
.link-reaction:visited {
  text-decoration: none;
}

.disabled,
.disabled:hover {
  cursor: not-allowed !important;
}

.user-reaction {
  border: 3px solid var(--primary-color);
}

.user-reaction:hover {
  border: 3px solid rgb(0 0 0 / 50%);
  box-shadow: 0 0 3px rgb(0 0 0 / 30%);
  text-decoration: none;
}

.update-hint {
  font-size: 0.9rem;
  margin-bottom: 5px;
  margin-top: 5px;
  opacity: 0.9;
  font-style: italic;
  line-height: 1rem;
  text-align: justify;
}

/* favorites */
.favorites {
  transition: all 200ms ease-in;
  box-shadow: none;
}

.favorites:focus,
.favorites:active,
.favorites:visited {
  text-decoration: none;
}

.favorites > i {
  margin-right: 0 !important;
}

/* users-table.twig */
@media (width <= 1200px) {
  #users-table-action {
    overflow-x: auto;
  }
}

td.users-table-break-word {
  overflow-wrap: break-word;
  max-width: 250px;
}

.yeswiki-tab .yeswiki-tab-btnnav {
  margin-top: 0.6rem;
}

/* hide login text on navbar, but show it in dropdown menu */
.login-text {
  display: none;
}

.dropdown-menu .login-text {
  display: inline;
}

.panel button.panel-heading {
  width: 100%;
  text-align: left;
  border: none;
  width: 100%;
  text-align: left;
}
