/* =========================================================
   Thème Gommecourt / Vexin – custom.css
   Version avec nav corrigée + timelines stylées
   ========================================================= */

/* ------------------------
   0. Variables visuelles
   ------------------------ */

:root {
  --color-bg-page: #e5e2da;      /* gris pierre clair */
  --color-bg-content: #ffffff;
  --color-text-main: #444444;    /* gris doux texte */
  --color-accent: #506c91;       /* bleu Vexin */
  --color-accent-soft: #6e8b6a;  /* vert bocage discret */
  --color-accent-warm: #8b6a4a;  /* brun terre / bois */
  --radius-soft: 10px;
}

/* ========================
   1. BASE & TYPO
   ======================== */

body {
  background-color: var(--color-bg-page);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-main);
}

/* Quand le header est fixé, on annule le gros padding de Quark */
.header-fixed #body-wrapper {
  padding-top: 0;
}

/* On rapproche le contenu du bord gauche pour le menu */
#body-wrapper .container {
  padding: 0 0 0 2rem;
}

main#body-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
}

h1, h2, h3, h4 {
  color: var(--color-text-main);
  letter-spacing: 0.02em;
}

h1 {
  color: var(--color-accent);
  font-weight: 500;
}

h2 {
  color: var(--color-accent-warm);
  font-weight: 450;
}

h3, h4 {
  font-weight: 400;
}

p {
  margin: 0 0 0.9rem;
}

/* ========================
   2. LIENS
   ======================== */

a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-accent-soft);
}

#header a {
  text-decoration: none;
}

#header a:hover {
  text-decoration: underline;
}

#header a.active {
  color: #ffffff;
  font-weight: 600;
}

/* ========================
   3. IMAGES & FIGURES
   ======================== */

img {
  display: block;
  margin: 1.2rem auto;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

p img {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

figure {
  margin: 1.5rem auto;
}

figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #666666;
  text-align: center;
}

.left  { float: left;  margin: 0 1.5rem 1rem 0; }
.right { float: right; margin: 0 0 1rem 1.5rem; }
.center {
  display: block;
  margin: 1rem auto;
  float: none;
}
.small  { max-width: 240px; }
.medium { max-width: 360px; }
.large  { max-width: 520px; }

p::after {
  content: "";
  display: block;
  clear: both;
}

/* ========================
   4. HEADER / NAV
   ======================== */

#header {
  background-color: #445a82;
}

/* largeur générale */
#header .container {
  max-width: 1420px;
}

/* barre nav */
#header .navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

/* sections gauche / droite */
#header .navbar-section {
  display: flex;
  align-items: center;
}

/* logo + titre */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.site-logo {
  height: 44px;
  width: auto;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f5f5f5;
}

/* largeur fixe pour le bloc logo */
#header .navbar-section.logo {
  flex: 0 0 auto;
  max-width: 180px;
}

/* bloc menu : prend tout le reste, collé à gauche */
#header .navbar-section.desktop-menu {
  flex: 1 1 auto;
  justify-content: flex-end;
}

/* liste principale */
/* Liste principale – on resserre encore un peu */
#header .desktop-menu .dropmenu > ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.05rem;            /* moins d’espace entre les items */
  margin: 0 0.6rem 0 0.2rem;
  padding: 0;
}

/* Évite les retours à la ligne bizarres */
#header .desktop-menu .dropmenu > ul > li {
  white-space: nowrap;
  margin-right: 12px;   /* augmente ou diminue si besoin */
}



/* liens 1er niveau : police réduite */
#header .desktop-menu .dropmenu > ul > li > a {
  font-size: 0.95rem;       /* un cran en dessous */
  padding: 1rem 1rem 1rem 1rem;/* un peu moins large */
  line-height: 1;
  color: #e7ecf7;
  text-decoration: none;
   padding-right: 2px;
}

#header .desktop-menu .dropmenu > ul > li > a:hover {
  color: #ffffff;
}

#header .desktop-menu .dropmenu > ul > li.active > a {
  border-bottom: 2px solid #e5e2da;
}

/* Décale légèrement le menu vers la droite
   pour ne plus qu'il morde sur le logo */
#header .desktop-menu .dropmenu > ul > li:first-child {
  margin-left: 3.2rem;   /* tu peux monter à 1rem si besoin */
}

/* Icône maison à la place du texte du 1er item */
#header .desktop-menu .dropmenu > ul > li:first-child > a {
  font-size: 0;
  padding: 0.55rem 0.55rem;
  color: transparent;
}

#header .desktop-menu .dropmenu > ul > li:first-child > a::before {
  content: "🏠";
  font-size: 1.05rem;
  line-height: 1;
  color: #e7ecf7;
    /* correction d’alignement vertical */
  position: relative;
  top: -4px;         /* ajuste finement si besoin */
  margin-left: 1px;
}

#header .desktop-menu .dropmenu > ul > li:first-child > a:hover::before,
#header .desktop-menu .dropmenu > ul > li:first-child.active > a::before {
  color: #ffffff;
}

/* pas de bordure active sous l’icône */
#header .desktop-menu .dropmenu > ul > li:first-child.active > a {
  border-bottom: none !important;
}

/* Sous-menus : comportement stable 1er + 2e niveau */
#header .desktop-menu .dropmenu ul li {
  position: relative;
}

#header .desktop-menu .dropmenu ul li > ul {
  display: none;
  position: absolute;
  z-index: 9999;
  background: #445a82;
}

/* ouverture au survol / focus */
#header .desktop-menu .dropmenu ul li:hover > ul,
#header .desktop-menu .dropmenu ul li:focus-within > ul {
  display: block;
}

/* sous-menu de 1er niveau */
#header .desktop-menu .dropmenu > ul > li > ul {
  top: 100%;
  left: 0;
  margin-top: -2px;
}

/* sous-menu de 2e niveau */
#header .desktop-menu .dropmenu ul ul li > ul {
  top: 0;
  left: 100%;
  margin-left: -2px;
}

#header .desktop-menu .dropmenu ul ul a {
  font-size: 0.86rem;
  color: #f5f7fc;
  white-space: nowrap;
  padding: 0.45rem 0.9rem;
}

#header .desktop-menu .dropmenu ul ul a:hover {
  background: rgba(0,0,0,0.15);
}

/* évite le gap qui faisait décrocher la souris */
#header .desktop-menu .dropmenu > ul > li {
  padding-bottom: 0;
}

#header .desktop-menu .dropmenu > ul > li:last-child {
  margin-right: 0;
}

@media (max-width: 900px) {
  #header .desktop-menu {
    display: none;
  }
}





/* ========================
   5. BANNIÈRE
   ======================== */

.page-hero {
  display: none;
}

.home .modular-hero,
.home .header-hero,
.home .hero,
.home .showcase {
  display: none !important;
}

.top-banner {
  background-color: #3F4E6A;
  color: #f5f5f5;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  background-position: center 45%;
  background-size: cover;
  background-repeat: no-repeat;
}

.top-banner__inner {
  align-items: flex-end;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.top-banner__title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.1em;
  padding-left: clamp(36px, 4vw, 56px);
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  font-weight: 650;
}

.top-banner__title::before,
.top-banner__title::after,
.top-banner__title-text::before {
  content: none !important;
}

.top-banner__subtitle {
  margin-top: 0.6rem;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #f0f0f0;
}

.home main#body-inner {
  padding-top: 0.1rem;
}

.home main#body-inner > h2:first-of-type,
.home main#body-inner > h1:first-of-type {
  margin-top: 0.2rem;
}

/* Spécifique page d'accueil : autoriser une zone plus large pour la timeline */
.home main#body-inner {
  max-width: 1500px;   /* même valeur que .period-timeline */
}

/* ========================
   6. TIMELINE HOME – cartes de périodes
   ======================== */

/* Conteneur de la timeline sur la home */
.period-timeline {
  max-width: 1500px;   /* plus large que le contenu standard */
  margin: 0 auto 3rem;
  padding-inline: 1rem; /* petit padding latéral */
}

.period-timeline h2 {
  font-size: 1.5rem;
  font-weight: 650;
  color: #3f5b83;
  margin-bottom: 0.35rem;
}

.period-timeline .pt-intro {
  max-width: 44rem;
  font-size: 0.98rem;
  color: #555;
  margin-bottom: 1.7rem;
}

.pt-grid {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}


/* Axe vertical de la frise des périodes (page d'accueil) */
.period-timeline .pt-grid {
  position: relative;
}

.period-timeline .pt-grid::before {
  content: "";
  position: absolute;
  top: 1.4rem;            /* sous le titre de la section */
  bottom: 1.6rem;
  left: 1.4rem;           /* aligné grosso modo avec les points */
  width: 2px;
  background: rgba(80,108,145,0.25);
}


/* carte + axe vertical */
.pt-item {
  position: relative;
  margin-left: 2.6rem;
  border-radius: 16px;
  padding: 1.1rem 1.4rem 1.25rem 1.4rem;
  background: var(--period-bg, #ffffff);     /* <– ici */
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.04),
    0 1px 3px rgba(0,0,0,0.06);
  transition: transform .15s ease, box-shadow .2s ease;
  overflow: hidden;                          /* nécessaire pour l’image */
}


/* point sur l’axe */
.pt-item::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.9rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: #fff;
}

/* hover */
.pt-item:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.06),
    0 3px 8px rgba(0,0,0,0.10);
}

/* alternance subtile */
/* image décorative à droite, sous la couleur de fond */
.pt-item__bg-image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 55%; /* image sur ~45% à droite */
  background-size: cover;
  background-position: center right;
  opacity: 0.25;              /* transparence globale */
  mix-blend-mode: multiply;   /* se teinte avec la couleur */
  pointer-events: none;
  z-index: 0;
}

.pt-item__content {
  position: relative;
  z-index: 1;
}


.pt-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding-bottom: 0.55rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(0,0,0,0.06);
}

.pt-icon {
  flex: 0 0 auto;
  min-width: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 1.2rem;
  line-height: 1;
  text-align: center;
  background: rgba(0,0,0,0.03);
}

/* icônes colorées par thème */
.pt-item--geologie .pt-icon      { background:#E8ECEF; }
.pt-item--prehistoire .pt-icon   { background:#EBEFE7; }
.pt-item--protohistoire .pt-icon { background:#EEE9E2; }
.pt-item--antiquite .pt-icon     { background:#E9ECF2; }
.pt-item--moyenage .pt-icon      { background:#ECE8F0; }
.pt-item--modernes .pt-icon      { background:#EFE8E7; }
.pt-item--contemporaine .pt-icon { background:#E9EFEA; }

/* bordure gauche par thème */
.pt-item--geologie       { border-left:3px solid #506c91; }
.pt-item--prehistoire    { border-left:3px solid #c18a4a; }
.pt-item--protohistoire  { border-left:3px solid #b36239; }
.pt-item--antiquite      { border-left:3px solid #8a6b3a; }
.pt-item--moyenage       { border-left:3px solid #3f5b83; }
.pt-item--modernes       { border-left:3px solid #7a5b3e; }
.pt-item--contemporaine  { border-left:3px solid #5c8455; }

/* Couleur de fond par thème, si le YAML ne définit pas timeline_bg */
.pt-item--geologie      { --period-bg: #e8edf5; }
.pt-item--prehistoire   { --period-bg: #f3ecdf; }
.pt-item--protohistoire { --period-bg: #f3e7e0; }
.pt-item--antiquite     { --period-bg: #e9edf7; }
.pt-item--moyenage      { --period-bg: #ece8f2; }
.pt-item--modernes      { --period-bg: #f2e7e4; }
.pt-item--contemporaine { --period-bg: #e9f1eb; }


.pt-title a {
  color: #2f3f5c;
  font-weight: 700;
  text-decoration: none;
}

.pt-title a:hover {
  text-decoration: underline;
}

.pt-date {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a7a7a;
  margin-bottom: 0.2rem;
}

.pt-summary {
  color: #444;
  line-height: 1.55;
}

.pt-footer {
  margin-top: 0.8rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(0,0,0,0.06);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: #777;
}

.pt-count {
  opacity: 0.9;
}

.pt-cta {
  font-size: 0.86rem;
  font-weight: 600;
  color: #506c91;
  text-decoration: none;
}

.pt-cta:hover {
  text-decoration: underline;
}

@media (max-width: 800px) {
  .pt-item {
    margin-left: 2.1rem;
  }
  .pt-item::before {
    left: -1.4rem;
  }
  .pt-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========================
   7. PAGES PÉRIODE
   ======================== */

.page-periode {
  background: var(--color-bg-content);
  padding: 2rem 1.8rem;
  border-radius: var(--radius-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
  margin-bottom: 2.5rem;
}

.periode-header h1 {
  margin-top: 0;
}

.periode-resume {
  font-size: 1.05rem;
  margin-top: 0.6rem;
  color: #555555;
}

.periode-dates {
  font-weight: 600;
  color: var(--color-accent-soft);
  margin-top: 0.3rem;
}

/* ========================
   8. TIMELINE DANS LES ARTICLES
   ======================== */

.article-timeline {
  position: relative;
  max-width: 900px;
  margin: 3rem auto 2.5rem;
  padding: 2rem 1.6rem 2.2rem;
  background: #f4f6fb;
  border-radius: 1.5rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

/* axe vertical */
.article-timeline::before {
  content: "";
  position: absolute;
  top: 3.1rem;
  bottom: 1.8rem;
  left: 1.4rem;
  width: 2px;
  background: rgba(80,108,145,0.25);
}

.article-timeline h2 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  color: var(--color-accent-warm);
}

.article-timeline .at-intro {
  margin-top: 0.2rem;
  margin-bottom: 1.4rem;
  color: #555;
}

/* liste des items */
.at-grid {
  display: grid;
  gap: 1.8rem;
}

/* carte d’item */
.at-item {
  position: relative;
  margin-left: 2.6rem;
  padding: 0.8rem 1rem 0.95rem;
  background: #ffffff;
  border-radius: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

/* point sur l’axe */
.at-item::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.85rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: #ffffff;
}

.at-item--highlight {
  border: 1px solid var(--color-accent-soft);
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

.at-date {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777777;
  margin-bottom: 0.2rem;
}

.article-timeline .at-figure {
  margin: 0 0 0.6rem;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #f7f7f7;
}

.article-timeline .at-figure img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

@media (max-width: 800px) {
  .article-timeline {
    padding-inline: 1.2rem;
  }
  .article-timeline::before {
    left: 1.2rem;
  }
  .at-item {
    margin-left: 2.4rem;
  }
  .at-item::before {
    left: -1.4rem;
  }
}

body.header-fixed.header-animated #header.scrolled {
  height: 3.3rem;
}
  

/* ===== Barre de repères chronologiques (home) ===== */

.timeline-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  scrollbar-width: thin;
}

.timeline-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 0.82rem;
  color: #3f5b83;
  text-decoration: none;
  white-space: nowrap;
}

.timeline-nav__item:hover {
  background: #f1ede4;
  border-color: rgba(80,108,145,0.35);
}

.timeline-nav__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #506c91;
}

.timeline-nav__icon {
  font-size: 1rem;
}

.timeline-nav__label {
  font-weight: 500;
}

/* mobile : on laisse scroller horizontalement */
@media (max-width: 800px) {
  .timeline-nav {
    margin-inline: -0.3rem;
    padding-inline: 0.3rem;
  }
}

/* ===== Mise en page timeline + mini-carte ===== */


.timeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 2.05fr); /* ~30% / 70% */
  gap: 2.2rem;
  align-items: flex-start;
  margin-top: 1.25rem;
}


.timeline-map {
  position: sticky;
  top: 6rem;
  max-width: 360px;  /* au lieu de 320 si tu veux */
}


.timeline-main {
  min-width: 0;
}

/* Mini-carte schématique */

.mini-map {
  background: #ffffff;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 0.86rem;
  color: #444;
}

.mini-map__title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  color: #3f5b83;
}

.mini-map__zones {
  display: grid;
  gap: 0.6rem;
}

/* Responsive : mini-carte au-dessus sur mobile */
@media (max-width: 900px) {
  .timeline-layout {
    grid-template-columns: 1fr;
  }
  .timeline-map {
    position: static;
    max-width: none;
    order: -1;
  }
}

.mini-map__zone {
  position: relative;
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  background: #f2efe7;
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

/* Couleurs de base par zone */
.mini-map__zone--plateau {
  background: #e7f0e4;
}

.mini-map__zone--vallee {
  background: #e5edf7;
}

.mini-map__zone--village {
  background: #f3e6df;
}

/* État actif quand une période liée est survolée */
.mini-map__zone.is-active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border-color: rgba(80,108,145,0.5);
}
  
/* Responsive : mini-carte au-dessus sur mobile */
@media (max-width: 900px) {
  .timeline-layout {
    grid-template-columns: 1fr;
  }
  .timeline-map {
    position: static;
    order: -1;
  }
}



/* ========================
   9. PAGE-CARD (articles)
   ======================== */

.page-card {
  background: var(--color-bg-content);
  padding: 2rem 1.8rem 2.3rem;
  border-radius: var(--radius-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
  margin-bottom: 2.5rem;
}

/* ========================
   10. FOOTER
   ======================== */

.site-footer {
  background: #445a82;
  color: #f3f3f3;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2rem;
}

.footer-logo img {
  height: 60px;
  width: auto;
  margin-bottom: 0.4rem;
}

.footer-tagline {
  font-size: 0.95rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.footer-col ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.25rem;
}

.footer-col a {
  color: #dbe4ff;
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-small {
  font-size: 0.8rem;
  opacity: 0.8;
}

@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* === HOME : élargir la zone centrale pour la timeline === */

.home #body,
.home main#body-inner,
.home .content-wrapper {
  max-width: 1500px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-inline: auto;    /* centre horizontalement */
  padding-inline: 1.5rem; /* petits marges internes */
  box-sizing: border-box;
}

/* === HOME : faire déborder la timeline du conteneur central === */

/* On laisse le reste du contenu tel quel, mais la timeline va utiliser la largeur de la fenêtre */
.home .period-timeline {
  /* on centre par rapport à la fenêtre, pas au conteneur 
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;

  width: 100vw;
  max-width: 1400px;           largeur max globale 
  padding-inline: 1.5rem;     /* marge interne confortable */
}
/* === HOME : timeline centrée dans la zone de contenu === 

.home .period-timeline {
  position: static;
  left: auto;
  right: auto;
  margin-left: 0;
  margin-right: 0;

  width: 100%;
  max-width: 1500px;   /* cohérent avec main#body-inner 
  padding-inline: 1rem;*/
}
/* === HOME : timeline alignée sur le conteneur principal === */
.home .period-timeline {
  width: 100%;
  max-width: 1500px;   /* exactement comme main#body-inner */
  margin-inline: auto; /* centrée */
  padding-inline: 1rem;
  position: static;
}


/* sur les grands écrans, on peut monter un peu si tu veux */
@media (min-width: 1400px) {
  .home .period-timeline {
    max-width: 1500px;
  }
}

/* =========================================================
   PAGES PERIODE
   ========================================================= */

.period-page {
  padding: 0;
  overflow: hidden;
}

/* --- Héro de période --- */

.period-hero {
  position: relative;
  padding: 2.25rem 2.5rem 2rem;
  border-radius: 1.5rem 1.5rem 0 0;
  background: var(--period-bg, #f5f2ea);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}

.period-hero__bg {
  position: absolute;
  inset: 0;
  right: -15%;
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.22;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.period-hero__inner {
  position: relative;
  z-index: 1;
}

.period-hero__top {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.period-hero__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.period-hero__titles h1 {
  margin: 0 0 0.25rem;
}

.page-card__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7b7b7b;
  margin: 0 0 0.15rem;
}

.page-card__meta {
  margin: 0;
  font-size: 0.9rem;
  color: #665c55;
}

.page-card__lead {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #4b4b4b;
}

/* Badges de zones (plateau / vallée / village) */

.period-hero__zones {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.zone-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid transparent;
}

/* tu peux ajuster les couleurs si besoin */
.zone-badge--plateau {
  background: rgba(110, 139, 106, 0.10);
  border-color: rgba(110, 139, 106, 0.35);
  color: #445a3f;
}

.zone-badge--vallee {
  background: rgba(80, 108, 145, 0.08);
  border-color: rgba(80, 108, 145, 0.35);
  color: #2e4666;
}

.zone-badge--village {
  background: rgba(139, 106, 74, 0.10);
  border-color: rgba(139, 106, 74, 0.35);
  color: #5b3e27;
}

/* --- Corps de la page période --- */

.periode-content {
  padding: 2rem 2.5rem 2rem;
}

/* Sections en-dessous (éléments marquants, sous-périodes, articles) */

.periode-highlights,
.periode-subperiods,
.periode-articles {
  padding: 0 2.5rem 2rem;
}

.periode-highlights h2,
.periode-subperiods h2,
.periode-articles h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Sous-périodes : petites cartes */

.subperiods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.subperiod-card {
  border-radius: 1rem;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              border-color 0.15s ease, background 0.15s ease;
}

.subperiod-card a {
  display: block;
  padding: 1rem 1.2rem 1.05rem;
  color: inherit;
  text-decoration: none;
}

.subperiod-card h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.subperiod-card__meta {
  font-size: 0.85rem;
  color: #6b6b6b;
  margin-bottom: 0.35rem;
}

.subperiod-card__summary {
  font-size: 0.9rem;
  color: #4b4b4b;
  margin-bottom: 0.4rem;
}

.subperiod-card__cta {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  color: #506c91;
}

.subperiod-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
  border-color: rgba(80, 108, 145, 0.35);
  background: #f8f6f1;
}

/* Articles liés : on réutilise ta grille d'articles si elle existe,
   sinon on force un peu la mise en forme. */

.periode-articles .articles-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 850px) {
  .periode-articles .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Ajustement responsive pour le hero */

@media (max-width: 700px) {
  .period-hero {
    padding: 1.7rem 1.5rem 1.5rem;
  }
  .periode-content,
  .periode-highlights,
  .periode-subperiods,
  .periode-articles {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .period-hero__top {
    flex-direction: row;
  }
}

.article-footer-nav {
  margin-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 0.9rem;
}

.back-to-period {
  font-size: 0.9rem;
  color: var(--color-accent-soft);
  text-decoration: none;
}

.back-to-period:hover {
  text-decoration: underline;
}

.article-period-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #e6ebf4;
  color: #2c3e6e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .85rem;
}
.article-period-badge .icon {
  font-size: 1.1rem;
}

.article-zone-badge {
  display:inline-block;
  padding:6px 10px;
  border-radius:10px;
  background:#eef5ea;
  color:#3c5c2b;
  font-size:.8rem;
  border:1px solid rgba(60,92,43,.2);
  margin-right:6px;
}

.article-tag {
  display:inline-block;
  padding:4px 8px;
  border-radius:8px;
  background:#f2f2f2;
  font-size:.78rem;
  color:#555;
  border:1px dashed rgba(0,0,0,.15);
  margin-right:4px;
}

/* =========================================================
   ARTICLE – MÉTA & BADGES
   ========================================================= */

/* bande de métadonnées sous le titre (date, type de récit, lieux éditoriaux) */
.article-meta {
  margin-top: 0.8rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  background: #f5f2ea;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  font-size: 0.86rem;
  color: #5b524b;
}

.article-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* petits tags dans la barre méta */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid transparent;
}

/* lieux éditoriaux */
.tag--place {
  background: rgba(110, 139, 106, 0.12);
  border-color: rgba(110, 139, 106, 0.35);
  color: #3e5036;
}

/* thèmes éditoriaux */
.tag--theme {
  background: rgba(80, 108, 145, 0.10);
  border-color: rgba(80, 108, 145, 0.35);
  color: #2f4261;
}

/* type de récit */
.tag--type {
  background: rgba(139, 106, 74, 0.10);
  border-color: rgba(139, 106, 74, 0.35);
  color: #5b3e27;
}

/* bloc des gros badges (période / zones / tags taxonomy) */
.article-meta-block {
  margin-top: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  background: #f1f4fa;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
}

/* on garde tes styles existants pour les badges mais on ajoute juste un peu de layout */
.article-zones,
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

@media (max-width: 700px) {
  .article-meta {
    padding-inline: 0.75rem;
  }
  .article-meta-block {
    padding-inline: 0.75rem;
  }
}

/* ========================= */
/* Mini-carte accueil        */
/* ========================= */

.home-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2.2fr);
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2.5rem;
}

.home-map-card {
  position: relative;
  background: #f5f1e8;
  border-radius: 1.5rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* halo coloré en fonction de la zone survolée */
.home-map-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
  background: radial-gradient(circle at 30% 20%, rgba(0, 0, 0, 0.06), transparent 60%);
}

/* Plateau & champs */
.home-map-card[data-hover-zone="plateau"]::before {
  opacity: 1;
  background: radial-gradient(circle at 25% 20%, rgba(110, 139, 106, 0.22), transparent 60%);
}

/* Vallée de la Seine */
.home-map-card[data-hover-zone="vallee"]::before {
  opacity: 1;
  background: radial-gradient(circle at 30% 25%, rgba(80, 108, 145, 0.22), transparent 60%);
}

/* Gommecourt & hameaux */
.home-map-card[data-hover-zone="village"]::before {
  opacity: 1;
  background: radial-gradient(circle at 20% 30%, rgba(139, 106, 74, 0.22), transparent 60%);
}

.home-map-card-inner {
  position: relative;
  z-index: 1;
}

.home-map-title {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a6a57;
  margin-bottom: 0.75rem;
}

.home-map-zones {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* boutons de zones */
.home-map-zone-btn {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transition: background 0.15s ease-out, border-color 0.15s ease-out, transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.home-map-zone-bullet {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  flex-shrink: 0;
}

/* couleurs des puces */
.home-map-zone-btn[data-zone="plateau"] .home-map-zone-bullet {
  background: #6e8b6a;
}
.home-map-zone-btn[data-zone="vallee"] .home-map-zone-bullet {
  background: #506c91;
}
.home-map-zone-btn[data-zone="village"] .home-map-zone-bullet {
  background: #8b6a4a;
}

/* hover + actif */
.home-map-zone-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

.home-map-zone-btn.is-active {
  background: #ffffff;
  border-width: 2px;
  border-color: rgba(0, 0, 0, 0.18);
}

/* colonne des périodes */
.home-periods-column {
  max-width: 780px;
  margin-inline: auto;
}

/* pastille de filtre de période au dessus de la frise */
.home-period-chip {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}

.home-period-chip.is-active {
  border-color: rgba(0, 0, 0, 0.16);
  background: #f3eee4;
}

/* en mobile on repasse en pile */
@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-periods-column {
    max-width: 100%;
  }
}

/* ----------------------------------------
   Article historique – en-tête & métas
   ------------------------------------- */

.article-header-card {
  max-width: 840px;
  margin: 0 auto 2.5rem auto;
  padding: 1.8rem 2.2rem 1.6rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(4px);
}

.article-header-meta {
  margin-bottom: 1.2rem;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.article-meta-row--tags {
  margin-top: 0.2rem;
}

.article-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.04);
  background: #f5efe3; /* neutre “papier” */
  color: #6b4d33;
}

.article-meta-chip-icon {
  font-size: 0.9rem;
}

/* Variation "période" – même couleur que timeline home */
.article-meta-chip--section {
  background: #e2e8f4;
  color: #304466;
  border-color: rgba(48, 68, 102, 0.07);
}

/* Type de récit (histoire, témoignage…) */
.article-meta-chip--type {
  background: #f0e8ff;
  color: #50367a;
  border-color: rgba(80, 54, 122, 0.1);
}

/* Tags secondaires (dates / lieux / thèmes) */
.article-meta-chip--date {
  background: #ecf6ff;
  color: #345a7a;
}

.article-meta-chip--place {
  background: #e7f4ec;
  color: #325c3f;
}

.article-meta-chip--theme {
  background: #f8ede4;
  color: #7a4c24;
}

/* Titre & chapeau */
.article-title {
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 0.4rem;
  color: #3a547a;
}

.article-subtitle {
  margin: 0 0 0.4rem;
  font-weight: 500;
  color: #8b6a4a;
}

.article-chapeau {
  margin: 0;
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}

/* Un peu de resp. */
@media (max-width: 768px) {
  .article-header-card {
    padding: 1.4rem 1.3rem;
    margin-bottom: 2rem;
  }
  .article-title {
    font-size: 1.7rem;
  }
}

/* -----------------------------------------------------
   Encarts d'article (info, focus, sources, avertissement)
   -------------------------------------------------- */

.encart {
  position: relative;
  margin: 1.8rem 0;
  padding: 1.2rem 1.4rem 1.2rem 1.4rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.03);
  font-size: 0.95rem;
  line-height: 1.55;
}

.encart p:last-child {
  margin-bottom: 0;
}

.encart ul {
  margin: 0.4rem 0 0.2rem 1.1rem;
}

/* Petit bandeau de titre en haut de l'encart */
.encart-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
  padding: 0.16rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ---------- Variantes de couleur ---------- */

/* Info / contexte – bleu doux */
.encart--info {
  border-left: 4px solid #506c91;
  background: #f1f4fa;
}

.encart--info .encart-title {
  background: rgba(80, 108, 145, 0.08);
  color: #304466;
}

/* À retenir – accent brun / “craie” */
.encart--focus {
  border-left: 4px solid #8b6a4a;
  background: #f5efe5;
}

.encart--focus .encart-title {
  background: rgba(139, 106, 74, 0.1);
  color: #5f4126;
}

/* Avertissement / nuance – orangé doux */
.encart--warning {
  border-left: 4px solid #cc7a2b;
  background: #fff6e9;
}

.encart--warning .encart-title {
  background: rgba(204, 122, 43, 0.12);
  color: #8a4e16;
}

/* Sources – vert discret */
.encart--source {
  border-left: 4px solid #6e8b6a;
  background: #eef5ef;
}

.encart--source .encart-title {
  background: rgba(110, 139, 106, 0.12);
  color: #3f5a3c;
}

/* Citation mise en avant */
.encart--quote {
  border-left: 4px solid #506c91;
  background: #f5f7fb;
  font-style: italic;
}

.encart--quote footer {
  margin-top: 0.4rem;
  font-style: normal;
  font-size: 0.85rem;
  color: #6b7280;
}

/* ----------------------------
   Tableaux dans les articles
   ------------------------- */

.article-content table,
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.92rem;
}

.article-content table th,
.article-content table td,
.page-content table th,
.page-content table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.article-content table th,
.page-content table th {
  text-align: left;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
}

.article-content table tbody tr:nth-child(odd),
.page-content table tbody tr:nth-child(odd) {
  background: rgba(249, 250, 251, 0.9);
}

.article-content table caption,
.page-content table caption {
  caption-side: bottom;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.4rem;
}

/* Blockquote – surcharge Quark */
blockquote {
  background-color: #f6f7f8;
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
  border-left: 4px solid #9aa3ad;
}


/* Encart pour documents d'archives et sources historiques */
.encart--document {
    background-color: #e9f4cc;
    border-left: 4px solid #8b7355;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.encart--document .encart-title {
    font-weight: 600;
    font-size: 1.1em;
    color: #375d50;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #d4c4a8;
}

.encart--document em {
    font-style: italic;
    color: #446b53;
}

.encart--document small {
    display: block;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #d4c4a8;
    color: #547a78;
    font-size: 0.9em;
}


/* Encart pour liens d'archives et sources historiques */
.encart--lien {
    background-color: #d1ecf6;
    border-left: 4px solid #528187;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.encart--lien .encart-title {
    font-weight: 600;
    font-size: 1.1em;
    color: #375d5d;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #d4c4a8;
}

.encart--lien em {
    font-style: italic;
    color: #44656b;
}

.encart--lien small {
    display: block;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #d4c4a8;
    color: #54747a;
    font-size: 0.9em;
}

/* =========================================================
   Page contact - style "carte postale"
   ========================================================= */

.contact-body {
  display: flex;
  justify-content: center;
}

.contact-postcard {
  max-width: 980px;
  margin: 2.5rem auto;
  padding: 0;
  background: #f8f4ec;
  border-radius: 24px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

.contact-postcard__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 0;
  position: relative;
}

/* bandes diagonales façon "bord de carte postale" */
.contact-postcard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background:
    linear-gradient(135deg,
      #8b6a4a 0,
      #8b6a4a 15%,
      #506c91 15%,
      #506c91 30%,
      #6e8b6a 30%,
      #6e8b6a 45%,
      #8b6a4a 45%,
      #8b6a4a 60%,
      #506c91 60%,
      #506c91 75%,
      #6e8b6a 75%,
      #6e8b6a 90%,
      #8b6a4a 90%,
      #8b6a4a 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}

/* Colonne gauche : texte */
.contact-postcard__intro {
  padding: 2.2rem 2.5rem 2.2rem 2.4rem;
  border-right: 1px dashed rgba(139, 106, 74, 0.35);
  position: relative;
}

.contact-postcard__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b6a4a;
  margin: 0 0 0.35rem;
}

.contact-postcard__intro h1 {
  font-size: 1.7rem;
  margin: 0 0 0.7rem;
  color: #3b4f6f;
}

.contact-postcard__lead {
  margin: 0 0 0.9rem;
  color: #4a433b;
  font-size: 0.98rem;
  line-height: 1.6;
}

.contact-postcard__hints {
  margin: 0 0 0.9rem 1.1rem;
  padding: 0;
  color: #5a5046;
  font-size: 0.9rem;
}

.contact-postcard__hints li {
  margin-bottom: 0.25rem;
}

.contact-postcard__footnote {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: #7a7167;
}

/* Colonne droite : formulaire */
.contact-postcard__form {
  padding: 2.2rem 2.3rem 2.2rem 2.3rem;
  position: relative;
}

/* timbre */
.contact-postcard__stamp {
  position: absolute;
  top: 1.4rem;
  right: 1.3rem;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px dashed rgba(48, 68, 102, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #304466;
  text-align: center;
  pointer-events: none;
}

/* lignes du formulaire */
.contact-postcard__form form {
  display: grid;
  gap: 0.75rem;
}

.contact-postcard__form .form-field {
  margin-bottom: 0.35rem;
}

.contact-postcard__form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #5b524b;
  margin-bottom: 0.15rem;
  display: inline-block;
}

.contact-postcard__form input[type="text"],
.contact-postcard__form input[type="email"],
.contact-postcard__form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0.65rem;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.9);
}

.contact-postcard__form textarea {
  min-height: 120px;
  resize: vertical;
}

/* bouton envoyer */
.contact-postcard__form button,
.contact-postcard__form input[type="submit"] {
  border-radius: 999px;
  border: none;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: #506c91;
  color: #fff;
  cursor: pointer;
  align-self: flex-start;
  box-shadow: 0 10px 22px rgba(80, 108, 145, 0.35);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out;
}

.contact-postcard__form button:hover,
.contact-postcard__form input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(80, 108, 145, 0.45);
  background: #3e5877;
}

/* messages du formulaire */
.contact-postcard__form .form-errors,
.contact-postcard__form .alert {
  margin-top: 0.4rem;
}

/* responsive */
@media (max-width: 900px) {
  .contact-postcard__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-postcard__intro {
    border-right: none;
    border-bottom: 1px dashed rgba(139, 106, 74, 0.35);
  }
  .contact-postcard__stamp {
    top: 1rem;
    right: 1rem;
    width: 75px;
    height: 75px;
  }
}

/* =========================
   Page Contact – mise en forme
   ========================= */
.contact-page .grav-form {
  max-width: 760px;
  margin: 0 auto 4rem;
  padding: 2.5rem 2.75rem;
  border-radius: 28px;
  background: #f7f3eb;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

/* Titres et textes */
.contact-page .grav-form legend,
.contact-page .grav-form h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #34527a;
  margin-bottom: 1rem;
}

/* Champs */
.contact-page .grav-form .form-field {
  margin-bottom: 1.5rem;
}

.contact-page .grav-form label {
  font-weight: 500;
  font-size: 0.95rem;
  color: #5b5550;
  margin-bottom: 0.4rem;
}

.contact-page .grav-form input[type="text"],
.contact-page .grav-form input[type="email"],
.contact-page .grav-form textarea {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.contact-page .grav-form textarea {
  border-radius: 20px;
  line-height: 1.5;
}

.contact-page .grav-form input[type="text"]:focus,
.contact-page .grav-form input[type="email"]:focus,
.contact-page .grav-form textarea:focus {
  outline: none;
  border-color: #c7914b;
  box-shadow: 0 0 0 3px rgba(199, 145, 75, 0.25);
  background: #fffdf8;
}

/* Champ anti-robot : petite aide plus légère */
.contact-page .grav-form .form-field[name="antispam"] small,
.contact-page .grav-form .form-field .help {
  font-size: 0.85rem;
  color: #8a8279;
}

/* Honeypot : on le masque */
.contact-page .grav-form .form-field.honeypot,
.contact-page .grav-form .form-field[data-grav-field="website"] {
  display: none !important;
}

/* Bouton d’envoi */
.contact-page .grav-form button,
.contact-page .grav-form .button[type="submit"],
.contact-page .grav-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.8rem;
  border: none;
  background: #c7914b;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.contact-page .grav-form button:hover,
.contact-page .grav-form .button[type="submit"]:hover,
.contact-page .grav-form input[type="submit"]:hover {
  background: #b57e38;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.contact-page .grav-form button:active,
.contact-page .grav-form .button[type="submit"]:active,
.contact-page .grav-form input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* Messages d’erreur et de succès Grav */
.contact-page .grav-form .form-errors,
.contact-page .grav-form .alert {
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.contact-page .grav-form .form-errors,
.contact-page .grav-form .alert.error {
  background: #fbe4de;
  color: #7b2817;
}

.contact-page .grav-form .alert.success {
  background: #e3f6e8;
  color: #21623a;
}

/* Cache le champ technique mais le laisse dans le DOM */
.antispam-hidden-wrapper {
  display: none;
}

/* Mise en forme du quiz */
.form-field.antispam-quiz {
  margin-top: 1.5rem;
}

.form-field.antispam-quiz .radio {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Chaque option = un gros bouton "paysage" */
.form-field.antispam-quiz label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: #f4efe4;
  border: 1px solid #e2d6c4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.08s ease;
}

/* cachons la puce radio native pour garder un look propre */
.form-field.antispam-quiz input[type="radio"] {
  margin: 0;
}

/* État actif */
.form-field.antispam-quiz input[type="radio"]:checked + label {
  background: #2f4858;
  border-color: #2f4858;
  color: #fff;
  transform: translateY(-1px);
}

/* =========================================================
   Correction largeur du contenu (home + pages normales)
   ========================================================= */

/* Conteneur principal : on remplace main#body-inner par #body-inner */
#body-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 1.5rem;
  box-sizing: border-box;
}

/* Page d'accueil : plus large pour la timeline */
.home #body-inner {
  max-width: 1500px;
}

/* Pages de période : un peu plus larges aussi si tu veux */
.body-period #body-inner,
.template-period #body-inner {
  max-width: 1300px;
}

/* =========================================================
   Places index – Pills (filters + legend)
   Ajout : les boutons utilisent .taxonomy-pill + .places-filter-pill
   ========================================================= */

.taxonomy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.2rem 0 1.4rem 0;
}

.taxonomy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(80, 108, 145, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-text-main);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.taxonomy-pill:focus {
  outline: none;
}

.taxonomy-pill:focus-visible {
  outline: 3px solid rgba(80, 108, 145, 0.35);
  outline-offset: 2px;
}

.taxonomy-pill:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(80, 108, 145, 0.45);
}

.taxonomy-pill:active {
  transform: translateY(1px);
}

.taxonomy-pill.is-active {
  background: rgba(80, 108, 145, 0.12);
  border-color: rgba(80, 108, 145, 0.55);
  color: #2c3e57;
}

/* Si un <a> est dans une pill (cas des pages /lieux/xxx) */
.taxonomy-pill a {
  color: inherit;
  text-decoration: none;
}

/* Petit “badge couleur” optionnel dans la légende */
.places-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
}

/* ===========================
   Pages de taxonomie
   =========================== */

.articles-list {
  margin-top: 32px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.article-card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  background: white;
  transition: box-shadow 0.2s ease;
}

.article-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.article-card h3 a {
  color: inherit;
  text-decoration: none;
}

.article-card h3 a:hover {
  color: #0066cc;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.taxonomy-badge {
  font-size: 0.85em;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 12px;
  color: #666;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}



/* ===========================
   Plan du site
   =========================== */

.sitemap-sections {
  display: grid;
  gap: 48px;
  margin-top: 32px;
}

.sitemap-section__title {
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

.sitemap-taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.sitemap-taxonomy-item {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e0e0e0;
}

.sitemap-taxonomy-name {
  font-size: 1.1rem;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

.sitemap-taxonomy-name a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
}

.sitemap-taxonomy-name a:hover {
  color: #0066cc;
}

.sitemap-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.85em;
  color: #666;
  font-weight: normal;
}

.sitemap-articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.sitemap-articles-list li {
  padding-left: 16px;
  position: relative;
}

.sitemap-articles-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #999;
}

.sitemap-articles-list a {
  text-decoration: none;
  color: #555;
  font-size: 0.95em;
}

.sitemap-articles-list a:hover {
  color: #0066cc;
  text-decoration: underline;
}

.sitemap-empty {
  font-size: 0.9em;
  color: #999;
  font-style: italic;
  margin: 8px 0 0 0;
}

.article-year {
  display: inline-block;
  font-size: 0.85em;
  color: #666;
  font-weight: 600;
  margin-right: 8px;
  min-width: 45px;
}

.video-wrap {
  width: 100%;
  max-width: 100%;
}

.video-wrap video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.video-wrap.js-video-widget {
  position: relative;
}

.video-unmute-btn {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.video-unmute-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.video-replay-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.video-replay-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}


/* --- Fix arrondis + bg qui déborde (period + article hero) --- */
.period-hero {
  position: relative;
  overflow: hidden; /* CLIP le bg dans l’arrondi */
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.period-hero__bg {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.encadre {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 1rem 1rem 0.75rem 1rem;
  margin: 1.25rem 0;
  background: rgba(0,0,0,0.02);
}

.encadre__header { margin-bottom: 0.75rem; }
.encadre__title { margin: 0; font-size: 1.15rem; }
.encadre__subtitle { margin: 0.25rem 0 0 0; opacity: 0.8; }

.encadre__defs { margin: 0; padding-left: 1.1rem; }
.encadre__defs li { margin: 0.35rem 0; }

.encadre__hr {
  height: 1px;
  background: rgba(0,0,0,0.12);
  margin: 0.9rem 0;
}

.encadre__lead { margin: 0 0 0.5rem 0; }

.encadre__timeline { margin: 0; padding-left: 1.2rem; }
.encadre__timeline li { margin: 0.35rem 0; }

.encadre__note {
  margin-top: 0.8rem;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid rgba(0,0,0,0.25);
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
}

/* Hiérarchie temps géologiques */
.encadre__defs {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.encadre__defs .geo {
  display: block;
  padding: 0.5rem 0.75rem;
  margin: 0.35rem 0;
  border-left: 4px solid rgba(0,0,0,0.25);
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
}

.encadre__defs .geo strong {
  display: block;
  font-weight: 600;
}

.encadre__defs .geo span {
  font-size: 0.95em;
  opacity: 0.85;
}

/* Codes couleur sobres */
.geo--eon     { border-color: #6b7280; }
.geo--ere     { border-color: #3b82f6; }
.geo--periode { border-color: #10b981; }
.geo--epoque  { border-color: #f59e0b; }


.frise-locale {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 1rem;
  margin: 1.25rem 0;
  background: rgba(0,0,0,0.02);
}

.frise-locale__title { margin: 0; font-size: 1.15rem; }
.frise-locale__intro { margin: 0.35rem 0 0.85rem 0; opacity: 0.85; }

.frise-locale__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.frise-locale__item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(0,0,0,0.10);
}

.frise-locale__item:first-child { border-top: 0; padding-top: 0; }

.frise-locale__when {
  font-weight: 600;
  opacity: 0.9;
}

.frise-locale__label {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.frise-locale__text { opacity: 0.9; }

.frise-locale__indices {
  margin: 0.5rem 0 0 0;
  padding-left: 1.1rem;
  opacity: 0.9;
}

.frise-locale__note {
  margin-top: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid rgba(0,0,0,0.25);
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
}

@media (max-width: 680px) {
  .frise-locale__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
/* Encadré visible : mini frise locale */
.frise-locale {
  border: 1px solid rgba(0,0,0,0.18);
  border-left: 4px solid rgba(0,0,0,0.35);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin: 1.5rem 0;
  background: #fafafa;
}

/* En-tête */
.frise-locale__header {
  margin-bottom: 0.9rem;
}

.frise-locale__title {
  margin: 0;
  font-size: 1.2rem;
}

.frise-locale__intro {
  margin: 0.35rem 0 0 0;
  opacity: 0.85;
}

/* Liste timeline */
.frise-locale__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Élément de frise */
.frise-locale__item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.9rem;
  padding: 0.7rem 0;
  border-top: 1px dashed rgba(0,0,0,0.18);
}

.frise-locale__item:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}

/* Colonne "quand" */
.frise-locale__when {
  font-weight: 600;
  opacity: 0.9;
}

/* Contenu */
.frise-locale__label {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.frise-locale__text {
  opacity: 0.9;
}

.frise-locale__indices {
  margin: 0.45rem 0 0 0;
  padding-left: 1.1rem;
  opacity: 0.9;
}

/* Note de bas de frise */
.frise-locale__note {
  margin-top: 0.9rem;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid rgba(0,0,0,0.35);
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
}

.frise-locale__link { margin-top: 0.35rem; }
.frise-locale__source { margin-top: 0.35rem; opacity: 0.85; font-size: 0.95em; }

.frise-locale__source {
  margin-top: 0.35rem;
  font-size: 0.95em;
  opacity: 0.9;
}

.frise-locale__source--online {
  opacity: 0.8;
}


.frise-locale__figure {
  margin: 0.35rem 0 0.5rem 0;
}

.frise-locale__figure img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.frise-locale__credit {
  font-size: 0.85em;
  opacity: 0.75;
  margin-top: 0.15rem;
}



/* ========================================
   SCÈNES DE VIE - Encarts narratifs
   ======================================== */

.encart--scene-de-vie {
  background: linear-gradient(to right, #f9f6f0 0%, #fefdfb 100%);
  border-left: 4px solid #d4a574;
  border-radius: 4px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.encart--scene-de-vie .encart-title {
  color: #8b6914;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.encart--scene-de-vie .encart-subtitle {
  color: #7f8c8d;
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  padding-left: 1.8rem; /* aligné avec le titre après l'emoji */
}

.encart--scene-de-vie p {
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 1rem;
}

.encart--scene-de-vie p:last-of-type {
  margin-bottom: 0;
}

/* Image dans scène de vie */
.encart--scene-de-vie img {
  margin-top: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.encart--scene-de-vie .image-caption,
.encart--scene-de-vie center {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .encart--scene-de-vie {
    padding: 1rem;
  }
  
  .encart--scene-de-vie .encart-title {
    font-size: 1.1rem;
  }
}
/* Mobile */
@media (max-width: 680px) {
  .frise-locale__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}


/* ========================================
   SCÈNES DE VIE - Encarts narratifs
   Pour articles historiques - Gommecourt
   ======================================== */

.encart--scene-de-vie {
  background: linear-gradient(to right, #f9f6f0 0%, #fefdfb 100%);
  border-left: 4px solid #d4a574;
  border-radius: 4px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.encart--scene-de-vie .encart-title {
  color: #8b6914;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.encart--scene-de-vie .encart-subtitle {
  color: #7f8c8d;
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  padding-left: 1.8rem; /* aligné avec le titre après l'emoji */
}

.encart--scene-de-vie p {
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 1rem;
}

.encart--scene-de-vie p:last-of-type {
  margin-bottom: 0;
}

/* Image dans scène de vie */
.encart--scene-de-vie img {
  margin-top: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.encart--scene-de-vie .image-caption,
.encart--scene-de-vie center {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
}

.encart--scene-de-vie center em {
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .encart--scene-de-vie {
    padding: 1rem;
  }
  
  .encart--scene-de-vie .encart-title {
    font-size: 1.1rem;
  }
  
  .encart--scene-de-vie .encart-subtitle {
    font-size: 0.9rem;
    padding-left: 0;
  }
}

/* Print styles */
@media print {
  .encart--scene-de-vie {
    border: 1px solid #d4a574;
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* Légende sous les images */
.figure + em,
img + em {
    display: block;
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
    margin-bottom: 20px;
    line-height: 1.4;
}

body.home #body-inner {
  max-width: 1500px !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}
/* HOME: Quark container plus large */
body.home #body-wrapper > .container {
  max-width: 1500px !important;
  width: 100%;
}


