/* Modernized presentation for MENU FLOTTANT A-Z territory index. --ethnia-bg: #F7F1E8;--ethnia-paper: #FBFFDC;*/
:root {
  --ethnia-bg: #F7F1E8;
  --ethnia-paper: #FBFFDC;
  --ethnia-ink: #221f1a;
  --ethnia-muted: #6f6658;
  --ethnia-rule: #d8d0bf;
  --ethnia-link: #996600;
  --ethnia-link-hover: #9f1d1d;
  --ethnia-accent: #2f6f5e;
  --ethnia-soft-accent: #e8f0eb;
  --ethnia-shadow: 0 8px 24px rgba(55, 45, 28, 0.08);
}

html {
  scroll-behavior: smooth;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--ethnia-bg);
  color: var(--ethnia-ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
table,
td,
div,
p,
a,
input {
  font-size: 16px;
}

a:link,
a:visited {
  color: var(--ethnia-link);
  text-decoration-color: rgba(122, 79, 0, 0.38);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--ethnia-link-hover);
  text-decoration-color: currentColor;
}

a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ethnia-accent);
  outline-offset: 3px;
}

hr {
  border: 0;
  border-top: 1px solid var(--ethnia-rule);
  height: 0;
  margin: 1rem auto;
  width: min(92vw, 1120px);
}


/* Menu flottant commun : index / polity / geozone */
.ethnia-floating-menu {
  background: var(--ethnia-paper);
  border-bottom: 1px solid var(--ethnia-rule);
  box-shadow: 0 8px 20px rgba(55, 45, 28, 0.07);
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  justify-content: center;
  margin: 0 auto;
  padding: 0.55rem clamp(0.5rem, 1.5vw, 1rem);
  position: sticky;
  top: 0;
  z-index: 50;
}

.ethnia-floating-menu a {
  display: inline-block;
  flex: 0 0 auto;
  text-decoration: none !important;
}

.ethnia-floating-menu input[type="submit"] {
  appearance: none;
  background: #ffffff;
  border: 1px solid var(--ethnia-rule);
  border-radius: 4px;
  color: var(--ethnia-ink) !important;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 2rem;
  min-width: 2rem;
  padding: 0.2rem 0.55rem;
}

.ethnia-floating-menu input[type="submit"]:hover,
.ethnia-floating-menu input[type="submit"]:focus {
  background: var(--ethnia-soft-accent);
  border-color: var(--ethnia-accent);
  color: var(--ethnia-accent) !important;
}

:target {
  scroll-margin-top: 4.25rem;
}

.ethnia-index-page {
  background: var(--ethnia-paper);
  border: 1px solid var(--ethnia-rule);
  box-shadow: var(--ethnia-shadow);
  color: var(--ethnia-ink);
  margin: 1rem auto 2rem;
  max-width: 1240px;
  padding: 1rem clamp(0.75rem, 2vw, 1.5rem) 1.5rem;
  width: calc(100% - 1rem);
}

.ethnia-index-page table {
  max-width: 100%;
}

.ethnia-index-page table[width="100%"],
.ethnia-index-page table[width="90%"] {
  width: 100% !important;
}

.ethnia-index-page td {
  vertical-align: top;
}

.ethnia-index-page > center:first-of-type {
  background: var(--ethnia-paper);
  border-bottom: 1px solid var(--ethnia-rule);
  box-shadow: 0 8px 20px rgba(55, 45, 28, 0.07);
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  justify-content: center;
  margin: -1rem calc(clamp(0.75rem, 2vw, 1.5rem) * -1) 1.2rem;
  overflow-x: visible;
  padding: 0.65rem clamp(0.75rem, 2vw, 1.5rem);
  position: sticky;
  top: 0;
  z-index: 10;
}

.ethnia-index-page > center:first-of-type a {
  display: inline-block;
  flex: 0 0 auto;
  text-decoration: none;
}

.ethnia-index-page input[type="submit"] {
  appearance: none;
  background: #ffffff;
  border: 1px solid var(--ethnia-rule);
  border-radius: 4px;
  color: var(--ethnia-ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  min-height: 2rem;
  min-width: 2rem;
  padding: 0.2rem 0.55rem;
}

.ethnia-index-page input[type="submit"]:hover,
.ethnia-index-page input[type="submit"]:focus {
  background: var(--ethnia-soft-accent);
  border-color: var(--ethnia-accent);
  color: var(--ethnia-accent);
}

.ethnia-index-page font[id^="indexen_"] {
  color: var(--ethnia-accent) !important;
  display: inline-block;
  font-size: clamp(2rem, 6vw, 4.5rem) !important;
  line-height: 1;
  margin: 0.85rem 0 0.35rem;
  scroll-margin-top: 5rem;
}

.ethnia-index-page a[data-toggle="collapse"] {
  background: var(--ethnia-soft-accent);
  border: 1px solid rgba(47, 111, 94, 0.25);
  border-radius: 4px;
  color: var(--ethnia-accent);
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-left: 0.25rem;
  padding: 0.12rem 0.35rem 0.2rem;
  text-decoration: none !important;
}

.ethnia-index-page a[data-toggle="collapse"]:hover,
.ethnia-index-page a[data-toggle="collapse"]:focus {
  background: var(--ethnia-accent);
  color: #ffffff;
}

.ethnia-index-page .collapse {
  background: var(--ethnia-paper);
  border-left: 3px solid var(--ethnia-rule);
  color: var(--ethnia-muted);
  font-style: normal;
  font-weight: normal;
  margin: 0.25rem 0 0.6rem 1.15rem !important;
  padding: 0.35rem 0 0.35rem 0.75rem !important;
}

.ethnia-index-page .collapse b,
.ethnia-index-page .collapse b a {
  font-style: normal;
  font-weight: normal;
}

.ethnia-index-page img[src^="flag/"] {
  background: #ffffff;
  border: 1px solid var(--ethnia-rule) !important;
  box-shadow: 0 1px 2px rgba(55, 45, 28, 0.14);
  margin-right: 0.25rem;
  vertical-align: -0.18em;
}

.timeline-date {
  color: var(--ethnia-ink);
  display: inline-block;
  font-size: 1.62rem !important;
  font-weight: 700;
  line-height: 1.2;
  margin-right: 0.75rem;
  white-space: nowrap;
}

h1.timeline-name,
h2.timeline-name,
.timeline-name {
  color: var(--ethnia-ink);
  font-size: 2rem !important;
  font-weight: 700 !important;
  line-height: 1.15;
  margin: 0.25rem 0;
}

.timeline-local-polity-name {
  font-size: 1.25rem !important;
}

.timeline-status-name {
  font-size: 1rem !important;
  font-size: 16px !important;
  margin: 0;
}

.timeline-long-main-from-small {
  display: inline;
  font-size: 125% !important;
  font-weight: 700 !important;
  line-height: 1.15;
}

.timeline-long-note-small {
  display: inline;
  font-style: italic;
  font-weight: normal !important;
  line-height: 1.15;
}

.timeline-capital-local-name {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  line-height: 1.15;
  margin: 0;
}

.timeline-capital-code {
  font-size: 0.45em;
  line-height: 0;
  vertical-align: super;
}

.timeline-media-cell {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.timeline-ruler-media-cell {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}

.timeline-ruler-name-main {
  font-size: 1.7rem;
}

.timeline-sov-table {
  border-collapse: collapse;
  width: 100%;
}

.timeline-sov-row {
  border-bottom: 1px solid var(--ethnia-rule);
}

.timeline-date-cell {
  padding: 0.45rem 1rem 0.45rem 0;
  vertical-align: middle;
  width: 9.5rem;
}

.timeline-sov-list {
  padding: 0.35rem 0;
  vertical-align: middle;
}

.timeline-sov-name {
  align-items: center;
  color: var(--ethnia-ink);
  display: flex;
  flex-wrap: wrap;
  font-size: 2rem !important;
  font-weight: 700 !important;
  gap: 0.15rem;
  line-height: 1.15;
  margin: 0.15rem 0;
}

.timeline-sov-item {
  align-items: center;
  display: inline-flex;
  gap: 0.2rem;
  margin: 0.15rem 0.1rem;
  vertical-align: middle;
}

.timeline-sov-flag {
  border: 1px solid var(--ethnia-rule);
  box-shadow: 0 1px 2px rgba(55, 45, 28, 0.14);
  flex: 0 0 auto;
  max-height: 2.2rem;
  object-fit: contain;
}

.timeline-sov-plus {
  color: var(--ethnia-muted);
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0.2rem;
  vertical-align: middle;
}

@media (max-width: 820px) {
  body,
  table,
  td,
  div,
  p,
  a,
  input {
    font-size: 15px;
  }

  .ethnia-index-page {
    border-left: 0;
    border-right: 0;
    margin-top: 0;
    width: 100%;
  }

  .ethnia-index-page > center:first-of-type {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 0.2rem;
    overflow-x: visible;
  }

  .ethnia-index-page > center:first-of-type a {
    min-width: 0;
  }

  .ethnia-index-page > center:first-of-type a:last-child {
    grid-column: span 2;
  }

  .ethnia-index-page td[width="30%"],
  .ethnia-index-page td[width="33%"] {
    display: block;
    width: 100% !important;
  }

  .ethnia-index-page input[type="submit"] {
    min-height: 2.15rem;
    min-width: 2.15rem;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    width: 100%;
  }

  .timeline-date {
    font-size: 1.38rem !important;
  }

  h1.timeline-name,
  h2.timeline-name,
  .timeline-name {
    font-size: 1.55rem !important;
  }

  .timeline-local-polity-name {
    font-size: 0.97rem !important;
  }

  .timeline-date-cell,
  .timeline-sov-list {
    display: block;
    width: 100%;
  }

  .timeline-date-cell {
    padding-bottom: 0;
  }

  .timeline-sov-list {
    padding-top: 0.15rem;
  }

  .timeline-sov-plus {
    margin-left: 0.45rem;
    margin-right: 0.45rem;
  }
}

/* Ethnia patch 2026-05-22: menus superposes, geozone, et HR marron pleine largeur. */
.ethnia-floating-menu {
  text-align: center;
}

.ethnia-index-page > center:first-of-type {
  top: 3.65rem;
  z-index: 45;
}

.ethnia-geozone-menu {
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  max-width: none;
  text-align: center;
  width: 100%;
}

.ethnia-brown-hr {
  background-color: #996600;
  border: 0;
  border-top: 3px solid #996600;
  color: #996600;
  display: block;
  height: 0;
  margin: 1em 0;
  padding: 0;
  width: 100%;
}
/* Fin Ethnia patch 2026-05-22 */



/* Ethnia patch v4: styles sortis du PHP quand c'est sans risque. */
.ethnia-menu-button {
  color: var(--ethnia-link) !important;
  font-weight: 700 !important;
}

.ethnia-capital-code {
  font-variant: normal !important;
  font-variant-caps: normal !important;
  text-transform: none !important;
}

.ethnia-smallcaps-name {
  font-variant: small-caps;
  font-variant-caps: small-caps;
}

.ethnia-inline-bracket-note,
.ethnia-inline-bracket-note i {
  font-size: smaller !important;
  font-style: italic !important;
  font-weight: normal !important;
}

.ethnia-multiline-bracket-note {
  display: inline-block;
  font-size: 68% !important;
  line-height: 1.1;
}

.ethnia-multiline-bracket-note i {
  font-style: italic !important;
  font-weight: normal !important;
}

.ethnia-silver-border {
  border: 1px solid silver;
}

.ethnia-site-wordmark {
  font-size: 2.4rem;
  line-height: 1.05;
  margin: 0.35rem 0 0.45rem;
}

.ethnia-index-intro-text {
  font-size: 1rem;
}

.ethnia-index-green-hr {
  border: 0;
  border-top: 1px solid green;
  height: 0;
  margin: 1rem auto;
  width: 66%;
}

.ethnia-search-wait-hidden {
  display: none;
}

.ethnia-search-wait-visible {
  display: block;
}

.ethnia-search-year-fallback {
  color: #6b5532;
  font-size: 90%;
}
/* Fin Ethnia patch v4 */
