@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&family=Oswald&family=Poppins:wght@300;400&family=Montserrat:ital@0;1&display=swap');

div.notice-container {
  margin-bottom: 1em;

  .notice-reformation {
    width: 100%;
    padding: .1em .5em;
    border-radius: .5em;
    border: .7em solid #cde7ec;
    font-size: .9em;

    .title {
      font-weight: bold;
      font-size: 1.1em;
    }

    .line {
      p {
        padding-bottom: 0;
        padding-left: 2em;
        line-height: 1.25em;

        &:first-child {
          padding-left: 0;
        }
      }
    }
  }

  &:nth-child(5n+1) .notice-reformation {
    border-color: #cde7ec
  }

  &:nth-child(5n+2) .notice-reformation {
    border-color: #c7ecbe
  }

  &:nth-child(5n+3) .notice-reformation {
    border-color: #f9f4b5
  }

  &:nth-child(5n+4) .notice-reformation {
    border-color: #eccec9
  }

  &:nth-child(5n) .notice-reformation {
    border-color: #e9e9e9
  }

  div.filiationCSS {
    padding-left: 3.5em;
    p {
      text-indent: -1.5em;
      padding-bottom: 0;
    }
    p.deg0 {
      padding-left: 0;
      &:not(:first-of-type) {
        margin-top: 1.3em;
      }
    }
    p.deg1 { padding-left: .7em; }
    p.deg2 { padding-left: 1.4em; }
    p.deg3 { padding-left: 2.1em; }
    p.deg4 { padding-left: 2.8em; }
    p.deg5 { padding-left: 3.5em; }
    p.deg6 { padding-left: 4.2em; }
    p.deg7 { padding-left: 4.8em; }
    p.deg8 { padding-left: 5.4em; }
    p.deg9 { padding-left: 6em; }
    p.deg10 { padding-left: 6.6em; }
    p.deg11 { padding-left: 7.2em; }
    p.deg12 { padding-left: 7.7em; }
    p.deg13 { padding-left: 8.2em; }
    p.deg14 { padding-left: 8.7em; }
    p.deg15 { padding-left: 9.1em; }
    p.deg16 { padding-left: 9.5em; }
    p.deg17 { padding-left: 9.9em; }
    p.deg18 { padding-left: 10.3em; }
    p.deg19 { padding-left: 10.7em; }
    p.deg20 { padding-left: 11.1em; }
    p.deg21 { padding-left: 11.5em; }
    p.deg22 { padding-left: 11.9em; }
    p.deg23 { padding-left: 12.3em; }
    p.deg24 { padding-left: 12.7em; }
    p.deg25 { padding-left: 13.1em; }
    p.deg26 { padding-left: 13.5em; }
    p.deg27 { padding-left: 13.9em; }
    p.deg28 { padding-left: 14.3em; }
    p.deg29 { padding-left: 14.7em; }
    p.deg30 { padding-left: 15em; }
    p.deg31 { padding-left: 15.3em; }
    p.deg32 { padding-left: 15.6em; }
    p.deg33 { padding-left: 15.9em; }
    p.deg34 { padding-left: 16.2em; }
    p.deg35 { padding-left: 16.5em; }
    p.deg36 { padding-left: 16.8em; }
    p.deg37 { padding-left: 17.1em; }
    p.deg38 { padding-left: 17.4em; }
    p.deg39 { padding-left: 17.7em; }
    p.deg40 { padding-left: 18em; }
  }
}

span:lang(la) {
  font-family: Montserrat, sans-serif;
  font-style: italic;
  font-size: .95em;
  em {
    font-style: normal;
  }
}

span:lang(blason) {
  font-style: italic;
  color: #557A95;
}

.cke_button__leborgneshortcut .cke_button_icon { display: none; }
.cke_button__leborgneshortcut .cke_button_label { display: inline-block; }

.cke_button__hoziershortcut .cke_button_icon { display: none; }
.cke_button__hoziershortcut .cke_button_label { display: inline-block; }

.cke_button__familyshortcut .cke_button_icon { display: none; }
.cke_button__familyshortcut .cke_button_label { display: inline-block; }

.cke_button__sourceshortcut .cke_button_icon { display: none; }
.cke_button__sourceshortcut .cke_button_label { display: inline-block; }

.cke_button__latinshortcut .cke_button_icon { display: none; }
.cke_button__latinshortcut .cke_button_label { display: inline-block; }

.cke_button__blasonshortcut .cke_button_icon { display: none; }
.cke_button__blasonshortcut .cke_button_label { display: inline-block; }

section.footnotes {
  padding-bottom: 0;

  header {
    background-color: transparent;
    color: #557A95;
    font-size: 1.5rem;
    padding: 0 0 .5em;
    font-family: 'Century Gothic', sans-serif;
    font-weight: 300;
  }
  ol {
    border-bottom: 2px solid #557A95;
    margin: 0 2em 2em 2em;
    padding-bottom: 1em;
    li {
      cite {
        font-style: normal;
      }
    }
  }
}

p {
  &.special1 {
    background-color: #fbdea355;
  }

  &.special2 {
    background-color: rgba(119, 177, 220, 0.25);
  }

  &.special1, &.special2 {
    border-radius: .3em;
    padding: .3em;
    position: relative;
    font-family: 'Vollkorn regular', sans-serif;

    p {
      font-size: .8em;
      font-style: italic;
      text-align: right;
      color: rgba(0, 0, 0, .8);
    }
  }
}

.container.reformation .famille article p {
  &.special1, &.special2 {
    p {
      margin: 0;
    }
  }
}

.tags-container {
  button {
    background-color: lightgrey;
    border: 1px solid darkgrey;
    border-radius: 1em;
    padding: .2em .5em;
    font-size: 0.8em;
    cursor: pointer;
    box-shadow: inset 0.1em 0.1em 0.05em darkgray;
    margin: 0 1em .5em 0;

    &.selected {
      background-color: #c6e7c6;
      color: darkgreen;
      border-color: darkgreen;
      box-shadow: inset -0.1em -0.1em 0.05em darkgreen;
    }
  }
}

h2, h3 {
  font-family: 'Century Gothic', sans-serif;
  font-weight: 300;
  color: #557A95;
  margin-top: 1.3em;
  margin-bottom: .7em;
  text-align: left;

  a.display-on-hoover {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s;
    margin-left: 1em;
  }
  &:hover a.display-on-hoover {
    opacity: 1;
    visibility: visible;
  }
}
h2 {
  font-weight: 400;
  font-size: 1.9em;
  font-family: 'Poppins', sans-serif;
  @media (min-width: 576px) {
    font-size: 2.2em;
  }
}

h3 {
  font-size: 1.5rem;
}

nav {
  color: #fbdea3;
  background-color: #557A95;
  @media (min-width: 1420px) {
    font-size: 1.2em;
  }

  a {
    color: #fbdea3;
  }

  ul {
    padding: 0 85px;
    @media (max-width: 767px) {
      padding: 0;
    }
  }

  ul li {
    padding: 0 20px 5px 20px;

    &.search {
      padding-left: 15px;
      padding-right: 15px;
    }

    &:hover {
      background-color: #fbdea3;
      color: #557A95;

      a {
        color: #557A95;
        text-decoration: none;
      }
    }
  }

  &.submenu {
    color: #557A95;
    background-color: #fbdea3;

    a {
      color: #557A95;
    }

    ul li {
      padding: 0 9px 5px 9px;
      @media (min-width: 768px) {
        padding: 0 7px 5px 7px;
      }

      &:hover {
        background-color: #557A95;
        color: #fbdea3;

        a {
          color: #fbdea3;
        }
      }

      &.search:hover {
        background-color: #fbdea3;
        color: #557A95;
      }
    }
  }

  li.search {
    /* Le sélecteur [type] bat form.form-search-nav input[type="search"] de _forms.css */
    input[type="search"] {
      border: 2px inset #767676;
      border-radius: 10px;
      padding: 0 10px;
      font-size: 0.9em;
      line-height: 1.5em;
      background-color: #f9f0d8;
      margin: 2px 5px 0 0;
      color: #3d3019cc;
      width: 250px;
      @media (min-width: 768px) {
        margin: 2px 3px 0 20px;
      }
    }

    button {
      background-color: transparent;
      border: none;
      color: #557A95;
      padding: 1px 6px;
      margin: 0;
    }
  }
}

/* Icône hors flux dans la marge gauche (ex-fa-ul de Font Awesome) */
ul.evenements {
  margin-left: 2.5em;
  padding-left: 0;

  > li {
    position: relative;
  }

  .li-icon {
    position: absolute;
    left: -2em;
    width: 2em;
    text-align: center;
    line-height: inherit;
  }
}

.container.reformation {
  @media (min-width: 576px) {
    max-width: 565px;
  }
  @media (min-width: 768px) {
    max-width: 765px;
  }
  @media (min-width: 1024px) {
    max-width: 1000px;
  }
  @media (min-width: 1420px) {
    max-width: 1400px;
  }
  @media (min-width: 1880px) {
    max-width: 1840px;
    font-size: 1.05em;
  }

  margin: 10px auto;

  ul {
    list-style-type: none;

    li span.icon {
      width: 40px;
    }
  }

  .famille {
    margin: 2em;
    @media (max-width: 767px) {
      margin: 0;
    }

    & > blockquote {
      margin-left: 2em;
      & > p {
        font-style: italic;
        color: #5d482d;
      }
    }

    h3 {
      margin-bottom: 0;
    }

    a {
      color: steelblue;
      transition: color .3s, text-shadow .3s;
      text-decoration: none;

      &:hover {
        color: royalblue;
      }
    }

    article {
      padding: .5em 1em;
      position: relative;

      &.reformation {
        border: 5px solid #fbdea3;
        margin-top: .5em;
        font-size: .85em;
        div {
          margin-top: 0;
        }
      }

      h3 {
        margin-bottom: 0;
        margin-left: -1rem;

        & + div {
          margin-top: .5em;
        }
      }

      div + div {
        margin-top: 1.5em;
      }

      &.extrait {
        & > div h4 {
        }
        div.extrait {
          font-size: 0.85em;
          padding-left: 1.5em;
          border-left: 5px solid #fbdea3;
          section.footnotes {
            header {
              padding: 0;
              font-size: 1.2rem;
              p {
                margin-bottom: 0;
              }
            }
            ol {
              margin: 0 0 0.5em 0;
              padding-left: 2em;
            }
          }
        }

        div.source {
          font-style: italic;
          margin-top: .25em;
        }
      }

      &.reference {
        & > div {
        }
        div.source {
          margin-top: .25em;
        }
      }

      @media (max-width: 767px) {
        padding: .25em .5em;
      }

      h4 {
        font-size: 1.2em;
      }

      p {
        margin: .3em 0;
      }

      & > p {
        font-size: 0.9em;
      }

      blockquote {
        margin: 1em .5em 1.5em .5em;
        padding-left: 1em;
        @media (max-width: 767px) {
          margin: .5em 0 .75em .0em;
          padding-left: .5em;
        }
        position: relative;
        border-left: 0.2em solid #90c8ea;
        font-family: 'Century Schoolbook', serif;
        font-size: 0.90em;
        font-weight: 100;

        .source {
          font-family: 'Noto Sans', sans-serif;
          font-size: 0.85em;
          font-weight: 500;
          color: #65747d;
          float: right;
        }
      }
      div.unroller {
        position: absolute;
        top: 220px;
        padding-top: 90px;
        margin: 0;
        width: 100%;
        height: 130px;
        background: linear-gradient(#FFFFFF00, #FFFFFFBB, white);
        color: #2b4b8b;
        text-align: center;
        font-weight: 550;
        font-style: italic;
        display: none;
        cursor: grabbing;
      }
    }

    div.helper {
      display: none;
      padding: 5px 10px;
      font-style: italic;
      border-radius: 5px;

      &.helper-step-1 {
        background-color: #d0dee6;
        color: #34478b;
      }

      &.helper-step-2 {
        background-color: lightyellow;
        color: saddlebrown;
      }

      &.helper-step-3 {
        background-color: #bfeebe;
        color: darkgreen;
      }

      &.helper-step-4 {
        background-color: lightpink;
        color: darkred;
      }
    }

    .voile {
      background-color: whitesmoke;
      color: darkgray;
    }

    .selected {
      background-color: #bfeebe;
      color: darkred;

      &:hover {
        background-color: lightgreen;
        color: darkgreen;
      }

      div {
        background-color: transparent;
      }
    }
  }

  #ventilateur {
    position: absolute;
    font-size: .8em;
    top: 36em;
    right: 40px;
    z-index: 10;
    width: auto;
    padding: .375rem .75rem;
    border-radius: .375rem;
    border-color: #0dcaf0;
    background-color: #0dcaf0;
    color: #000;
    line-height: 1.5;

    &:hover {
      border-color: #31d2f2;
      background-color: #31d2f2;
    }
  }

  .famillesList {
    columns: 280px;
    margin: 20px 0;

    a.famille {
      break-inside: avoid;
      display: table;
      font-size: 1rem;
      @media (min-width: 576px) {
        font-size: 1.1rem;
      }
      color: black;
      text-decoration: none;
      padding: 4px 3px 4px 3rem;
      border-bottom: 4px solid #fbdea3;
      margin: 2px;
      width: 100%;
      @media (min-width: 768px) {
        width: 275px;
      }

      line-height: 1em;
      text-indent: -3rem;

      .nom {
        font-weight: bold;
      }

      .sansNoticeReformation {
        opacity: 0.5;
        font-style: italic;
      }

      .variantes {
        padding: 0 10px 0 5px;
        font-size: 0.8em;
        color: #3d3019cc;
      }

      &:hover {
        background-color: #d4d9de;
        cursor: pointer;
      }
    }
  }

  .pagination {
    margin: 20px 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    font-size: 0.8em;
  }

  .row {
    padding-top: .5em;

    &.spaced {
      padding-top: 15px;
    }
  }

  /* Contrôles hors <form> alignés sur une ligne (ex. déplacement d'évènement) */
  .inline-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5em 1em;

    input[type="number"] {
      width: 8em;
      padding: .4rem .6rem;
      border: 1px solid #d0d0d0;
      border-radius: 6px;
    }
  }

  form {
    padding-top: 20px;
    font-size: .8em;
    max-width: none;
    margin: 0;
    gap: .6em;

    /* Rendu Bootstrap (form-control) de la prod : libellé au-dessus, champ pleine largeur */
    label {
      font-weight: 400;
      color: inherit;
    }

    .form-field {
      gap: .25rem;
    }

    input:not([type="checkbox"], [type="radio"], [type="hidden"]), textarea, select {
      width: 100%;
      padding: .375rem .75rem;
      border: 1px solid #ced4da;
      border-radius: .375rem;
      line-height: 1.5;
    }

    textarea {
      min-height: 0;
    }

    input, textarea, select {
      font-size: .95em;
    }

    button[type="submit"] {
      align-self: flex-start;
      padding: .375rem .75rem;
      border-radius: .375rem;
      border-color: #0d6efd;
      background-color: #0d6efd;
      font-size: 1rem;
      line-height: 1.5;

      &:hover {
        border-color: #0a58ca;
        background-color: #0b5ed7;
      }
    }

    .hidden {
      display: none;
    }

    button {
      margin: 10px auto;
    }

    .buttons {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      row-gap: .3em;
      font-size: 0.7rem;

      .spaced {
        margin-left: 70px;

        &.long-spaced {
          margin-left: 165px;
        }
      }

      div {
        margin: 0 3px;
        padding: 0 3px;
        border: 1px solid black;
        border-radius: 3px;
        background-color: #c8e5f9;
        font-size: 0.9em;
        width: auto;
        white-space: nowrap;

        &.ressort {
          background-color: #c8f9e5;
        }

        &.deb {
          background-color: #f9bdbf;
        }

        &.des-aud {
          background-color: #f9f9bf;
        }

        &:hover {
          cursor: pointer;
          background-color: #557A95;
          color: white;
          border-color: white;

          &.ressort {
            background-color: #55957A;
          }
        }
      }
    }

    .replace-container {
      position: relative;
    }

    .button.replace {
      position: absolute;
      background-color: lightgrey;
      padding: 0 4px;
      border-radius: 13px;
      top: -15px;
      left: 5px;
      color: gray;
      cursor: pointer;

      &:not(:first-of-type) {
        left: 40px;
      }
    }
  }
}

.container.sources {
  #sourcesTable {
    width: 100%;
  }
}

/** Rechercher */
#chercher {
  .row.search {
    margin: 5px auto;
    display: flex;
    flex-direction: row;

    label {
      font-size: 1.3em;
      margin: 5px 20px 5px 0;
    }

    button {
      background-color: #0074D9;
      border-radius: 10px;
      color: #f0f0f0;
      padding: 3px 25px;
      margin: 10px auto;
      @media (min-width: 576px) {
        margin: 0 auto;
      }
    }
  }

  .search-field {
    @media (min-width: 576px) {
      width: 350px;
    }
    @media (min-width: 768px) {
      width: 500px;
    }
    @media (min-width: 1024px) {
      width: 700px;
    }
    padding: 5px 10px 5px 15px;
    border-radius: 5px;
    border: 1px solid #AAAAAA;
    color: #AAAAAA;
    margin-right: 20px;

    input {
      border: none;
      padding: 0 0 0 10px;
      font-family: 'CenturyG', 'Arial', sans-serif;
      @media (min-width: 576px) {
        width: 300px;
      }
      @media (min-width: 768px) {
        width: 450px;
      }
      @media (min-width: 1024px) {
        width: 620px;
      }
      margin-bottom: 5px;
      color: #888888;
    }
  }

  .radios {
    margin: 0 10px;
    font-family: 'CenturyG', 'Arial', sans-serif;
    font-weight: normal;
    color: black;

    .main-label {
      margin-top: 5px;
      margin-right: 20px;
    }

    label {
      padding: 5px 10px 5px 15px;
      color: #888888;
      margin-right: 40px;
    }
  }

  .nbResults {
    margin: 30px auto 0 auto;
    font-size: 1.2em;
    font-style: italic;
    text-align: center;
  }
}
