/* === OASIS — Design System === */
/* Polices auto-hébergées — voir /fonts/telecharger-polices.sh */
@import url('fonts.css');

:root {
  --vert-fonce:   #2D5016;
  --vert-moyen:   #3E6B20;
  --vert-clair:   #A8C077;
  --beige:        #F5F0E8;
  --beige-fonce:  #E8E0D0;
  --terracotta:   #C4622D;
  --brun:         #6B4C2A;
  --blanc:        #FAFAF7;
  --texte:        #2A2A22;
  --texte-leger:  #5A5A50;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Compensation header sticky pour toutes les ancres */
[id] { scroll-margin-top: 160px; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--blanc);
  color: var(--texte);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--vert-fonce);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* --- bandeau défilant --- */
.header-banner {
  display: block;
  position: relative;
  height: 90px;
  padding: 0;
  overflow: hidden;
  background: var(--blanc);
  border-bottom: 4px solid var(--terracotta);
}

/* Logo fixe à gauche */
.header-logo-fixed {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 106px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blanc);
  border-right: 1px solid var(--beige-fonce);
  z-index: 2;
}

.header-logo-fixed img {
  height: 78px;
  width: auto;
  object-fit: contain;
}

/* Zone de défilement */
.strip-scroll-area {
  position: absolute;
  left: 106px; right: 0; top: 0; bottom: 0;
  overflow: hidden;
}

.strip-scroll-area::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(to left, var(--blanc), transparent);
  z-index: 1;
  pointer-events: none;
}

/* Bande d'images */
.image-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: 100%;
  width: max-content;
  gap: 3px;
  animation: slideStrip 60s linear infinite;
}

.image-strip:hover { animation-play-state: paused; }

.image-strip img {
  height: 84px;
  width: auto;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

@keyframes slideStrip {
  0%   { transform: translateX(0); }
  100% { transform: translateX(var(--x-fin, -50%)); }
}

/* Les <img> directs du banner (ancien markup) sont cachés */
.header-banner > img { display: none; }

/* ===== NAV ===== */
nav {
  background: var(--vert-fonce);
  margin-bottom: 0;
  padding-bottom: 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: block;
  padding: 6px 15px;
  color: var(--blanc);
  text-decoration: none;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-item > a:hover,
.nav-item > a.active {
  background: var(--terracotta);
  color: #fff;
}

.nav-item:hover .dropdown {
  display: block;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--vert-moyen);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 200;
}

.dropdown a {
  display: block;
  padding: 11px 20px;
  color: var(--beige);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s, padding-left 0.15s;
}

.dropdown a:hover {
  background: var(--terracotta);
  color: #fff;
  padding-left: 28px;
}

/* ===== MAIN CONTENT ===== */
.page-hero {
  background: linear-gradient(135deg, var(--vert-fonce) 0%, var(--vert-moyen) 100%);
  color: var(--blanc);
  padding: 0.9rem 2rem 0.8rem;
  text-align: center;
  margin-top: 0;
}

.page-hero h1 {
  font-family: 'Merriweather', serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.page-hero .tagline {
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--vert-clair);
  font-style: italic;
  font-family: 'Merriweather', serif;
}

/* ===== LIENS RAPIDES (entre le titre et les paragraphes du page-hero) ===== */
.liens-rapides {
  /* Annule le fond/marges hérités de la règle générique "nav" du header,
     qui s'applique par défaut à toute balise <nav> de la page. */
  background: none;
  margin: 0.6rem 0 0.5rem;
}

.liens-rapides ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.liens-rapides a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 1.2rem;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--blanc);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  line-height: 1.2;
}

.liens-rapides a:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

.liens-rapides a:focus-visible {
  outline: 3px solid var(--vert-clair);
  outline-offset: 2px;
}

.page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.section-block {
  margin-bottom: 3rem;
}

.section-block h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--vert-fonce);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--terracotta);
  display: inline-block;
}

.section-block h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.2rem;
  color: var(--brun);
  margin: 1.5rem 0 0.6rem;
}

.section-block p {
  margin-bottom: 1rem;
  color: var(--texte);
}

/* ===== CARDS / GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--beige);
  border-radius: 6px;
  padding: 1.5rem;
  border-left: 4px solid var(--vert-clair);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.card h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.05rem;
  color: var(--vert-fonce);
  margin-bottom: 0.5rem;
}

/* ===== HORAIRES TABLE ===== */
.infos-bloc {
  background: var(--beige);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--vert-moyen);
}

.infos-bloc h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.15rem;
  color: var(--vert-fonce);
  margin-bottom: 0.6rem;
}

.infos-bloc p, .infos-bloc ul {
  color: var(--texte);
  font-size: 0.96rem;
  margin-bottom: 1rem;
}

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

.infos-bloc ul {
  padding-left: 1.2rem;
  margin-top: 0.4rem;
}

.infos-bloc ul li {
  margin-bottom: 0.3rem;
}

/* ===== BUTTONS / LINKS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}

/* .btn fixe "display", ce qui l'emporte sinon sur la règle native de l'attribut
   hidden (même spécificité, mais navigateur vs feuille de style de la page) :
   on la rétablit explicitement pour que hidden="" masque bien les boutons .btn. */
.btn[hidden] {
  display: none;
}

.btn-primary {
  background: var(--terracotta);
  color: #fff;
}

.btn-primary:hover {
  background: #a84f23;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--vert-fonce);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--vert-moyen);
  transform: translateY(-1px);
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--beige);
  border-radius: 6px;
  text-decoration: none;
  color: var(--vert-fonce);
  font-weight: 600;
  margin-bottom: 0.75rem;
  border: 1px solid var(--beige-fonce);
  transition: background 0.2s, border-color 0.2s;
}

.doc-link:hover {
  background: var(--beige-fonce);
  border-color: var(--vert-clair);
}

.doc-link::before {
  content: '📄';
  font-size: 1.3rem;
}

/* ===== IFRAME ===== */
.fb-iframe-wrap {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
  margin-top: 1.5rem;
}

.fb-iframe-wrap iframe {
  display: block;
  width: 100%;
  border: none;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--vert-fonce);
  color: var(--beige);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}

.site-footer .contact-line {
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: var(--vert-clair);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-separator {
  width: 50px;
  height: 3px;
  background: var(--terracotta);
  margin: 1rem auto;
}

/* Mise en exergue inline */
.exergue {
  color: var(--terracotta);
  font-style: normal;
}

/* Bloc exergue (paragraphe entier) */
.bloc-exergue {
  border-left: 4px solid var(--terracotta);
  background: var(--beige);
  padding: 0.9rem 1.25rem;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--brun);
  margin: 1rem 0;
}

/* ===== EXERGUE DEPUIS .TXT ===== */
.txt-exergue {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 5px solid var(--terracotta);
  background: var(--beige);
  border-radius: 0 6px 6px 0;
  font-family: 'Merriweather', serif;
  font-style: italic;
  color: var(--brun);
  font-size: 1rem;
  line-height: 1.7;
  /* Annuler les marges par défaut du navigateur sur <blockquote> */
  -webkit-margin-start: 0;
  -webkit-margin-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  /* Empêcher tout débordement horizontal */
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.txt-exergue p { margin-bottom: 0.5rem; }
.txt-exergue p:last-child { margin-bottom: 0; }

/* Option ":encadre" : trait au-dessus et en dessous du texte */
.txt-exergue-encadre {
  border-top: 2px solid var(--terracotta);
  border-bottom: 2px solid var(--terracotta);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* Option ":taille2" / ":taille3" : agrandissement de la police (à tester) */
.txt-exergue-taille2 { font-size: 1.2rem; }
.txt-exergue-taille3 { font-size: 1.4rem; }

/* ===== LISTE A PUCES DEPUIS .TXT [liste]...[/liste] ===== */
/* list-style-position:outside (par défaut) aligne nativement les lignes
   d'un même <li> (après un <br>) sous le texte, pas sous la puce. */
.txt-liste {
  margin: 0.8rem 0 1.2rem;
  padding-left: 1.4rem;
}
.txt-liste li {
  margin-bottom: 0.6rem;
  padding-left: 0.3rem;
}
.txt-liste li:last-child { margin-bottom: 0; }
/* Un exergue imbriqué dans une puce garde son style, sans marge superflue */
.txt-liste li > .txt-exergue { margin: 0.4rem 0 0; }

/* ===== TABLEAUX DEPUIS .TXT ===== */
.txt-tableau-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.txt-tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-family: 'Source Sans 3', sans-serif;
}

.txt-tableau th {
  background: var(--vert-fonce);
  color: var(--blanc);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.txt-tableau td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--beige-fonce);
  color: var(--texte);
}

.txt-tableau tr:nth-child(even) td {
  background: var(--beige);
}

.txt-tableau tr:hover td {
  background: var(--beige-fonce);
}

/* ===== IMAGES DEPUIS .TXT ===== */
.txt-bloc-image {
  display: flow-root; /* contient le flottant, sans affecter le paragraphe suivant */
  margin-bottom: 1.5rem;
}

.txt-bloc-image > p:last-child { margin-bottom: 0; }

/* L'exergue contient elle-même son flottant (image posée avant le texte
   à l'intérieur du cadre, dans son padding — pas de chevauchement avec
   la bordure gauche colorée). */
.txt-exergue {
  display: flow-root;
}

.txt-image {
  margin: 0 0 0.5rem;
}

.txt-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.txt-image figcaption {
  margin-top: 0.35rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--texte-leger);
  text-align: center;
}

/* Côté du flottement : gauche pour "debut", droite pour "fin".
   Le texte s'enroule directement autour, sans "sauter" en bord de page. */
.txt-image-debut {
  float: left;
  margin-right: 1.25rem;
}

.txt-image-fin {
  float: right;
  margin-left: 1.25rem;
}

/* Tailles PC (largeur relative à la colonne de texte, plafonnée en pixels) */
.txt-image-grande  { width: 25%;    max-width: 216px; }
.txt-image-moyenne { width: 12.5%;  max-width: 108px; }
.txt-image-petite  { width: 6.25%;  max-width: 54px;  }
.txt-image-icone   { width: 3.13%;  max-width: 27px;  }
.txt-image-pleine  { width: 75%; }

/* Mobile : plus d'habillage de texte (image en bloc, centrée, au-dessus
   ou en dessous du texte selon debut/fin) ; tailles doublées par
   rapport au PC pour rester lisibles sur petit écran. */
@media (max-width: 768px) {
  .txt-image-debut,
  .txt-image-fin {
    float: none;
    display: block;
    margin: 0 auto 1rem;
  }

  .txt-image-grande  { width: 50%;   max-width: 432px; }
  .txt-image-moyenne { width: 25%;   max-width: 216px; }
  .txt-image-petite  { width: 12.5%; max-width: 108px; }
  .txt-image-icone   { width: 6.25%; max-width: 54px;  }
  .txt-image-pleine  { width: 37.5%; max-width: 324px; }
}

/* Respect des préférences de mouvement réduit : pas de transition sur ces images */
@media (prefers-reduced-motion: reduce) {
  .txt-image img { transition: none; }
}

/* ===== COLONNES DEPUIS .TXT ===== */
.txt-colonnes {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.txt-colonnes > p:last-child,
.txt-colonnes > .txt-bloc-image:last-child { margin-bottom: 0; }

.txt-colonnes-2 { grid-template-columns: repeat(2, 1fr); }
.txt-colonnes-3 { grid-template-columns: repeat(3, 1fr); }
.txt-colonnes-4 { grid-template-columns: repeat(4, 1fr); }
.txt-colonnes-5 { grid-template-columns: repeat(5, 1fr); }

/* Ligne de séparation verticale optionnelle (option ":ligne" de la balise) :
   uniquement avant les colonnes 2, 3... de chaque ligne de la grille,
   jamais avant la 1ère colonne. */
.txt-colonnes-lignes.txt-colonnes-2 > *:nth-child(2n) { border-left: 2px solid rgba(90, 90, 80, 0.35); padding-left: 1.5rem; }

.txt-colonnes-lignes.txt-colonnes-3 > *:nth-child(3n+2),
.txt-colonnes-lignes.txt-colonnes-3 > *:nth-child(3n)  { border-left: 2px solid rgba(90, 90, 80, 0.35); padding-left: 1.5rem; }

.txt-colonnes-lignes.txt-colonnes-4 > *:nth-child(4n+2),
.txt-colonnes-lignes.txt-colonnes-4 > *:nth-child(4n+3),
.txt-colonnes-lignes.txt-colonnes-4 > *:nth-child(4n)  { border-left: 2px solid rgba(90, 90, 80, 0.35); padding-left: 1.5rem; }

.txt-colonnes-lignes.txt-colonnes-5 > *:nth-child(5n+2),
.txt-colonnes-lignes.txt-colonnes-5 > *:nth-child(5n+3),
.txt-colonnes-lignes.txt-colonnes-5 > *:nth-child(5n+4),
.txt-colonnes-lignes.txt-colonnes-5 > *:nth-child(5n)  { border-left: 2px solid rgba(90, 90, 80, 0.35); padding-left: 1.5rem; }

/* Sur mobile, les images des colonnes gardent le système précédent
   (largeur en %, cf. .txt-image-* plus haut) : un logo large et bas
   calé sur une hauteur fixe peut déborder de la largeur de l'écran,
   les images étant par défaut insensibles à max-width dans un
   conteneur flex. Comportement de base commun aux deux formats. */
.txt-colonnes .txt-image {
  float: none;
  margin: 0 auto 0.5rem 0; /* gauche par défaut */
}

.txt-colonnes-centre .txt-image { margin-left: auto; margin-right: auto; }
.txt-colonnes-droite  .txt-image { margin-left: auto; margin-right: 0; }

/* Normalisation de la taille des logos : réservée au PC. Même hauteur
   pour tous, quelle que soit la taille indiquée dans la balise [image:]
   ou le ratio largeur/hauteur propre à chaque logo — c'est la hauteur
   commune qui donne un alignement visuel homogène, pas la largeur
   (un logo large et bas resterait sinon minuscule à côté d'un logo
   carré). */
@media (min-width: 769px) {
  .txt-colonnes .txt-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 0.5rem;
  }

  .txt-colonnes .txt-image img {
    width: auto;
    height: 50px;
    max-width: 100%;
    object-fit: contain;
  }
}

/* Le texte suit l'option d'alignement gauche/centre/droite. Sur PC, les
   images sont toujours centrées dans leur cellule (ci-dessus) pour la
   grille de logos normalisée ; sur mobile, elles suivent la même
   option gauche/centre/droite que le texte (cf. règles .txt-colonnes
   .txt-image plus haut). */
.txt-colonnes-centre p { text-align: center; }
.txt-colonnes-droite  p { text-align: right; }


@media (max-width: 768px) {
  .txt-colonnes-2,
  .txt-colonnes-3,
  .txt-colonnes-4,
  .txt-colonnes-5 {
    grid-template-columns: 1fr;
  }

  .txt-colonnes-lignes > * {
    border-left: none !important;
    padding-left: 0 !important;
  }
}

/* ===== PAGE NOUS AIDER ===== */
.don-options {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.don-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1;
  min-width: 220px;
  padding: 1rem;
  background: var(--blanc);
  border-radius: 6px;
  border: 1px solid var(--beige-fonce);
}

.don-option h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.05rem;
  color: var(--vert-fonce);
  margin: 0;
  text-align: center;
}

.don-fiscal {
  font-size: 0.88rem;
  color: var(--texte-leger);
  text-align: center;
  margin: 0;
  font-style: italic;
}

@media (max-width: 500px) {
  .don-options { flex-direction: column; }
  .don-option  { min-width: 0; width: 100%; }
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 16px;
  margin-right: auto;
  flex-direction: column;
  gap: 5px;
  align-self: center;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanc);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Chevron sous-menu mobile */
.nav-chevron {
  display: none;
  background: none;
  border: none;
  color: var(--blanc);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0 0 8px;
  line-height: 1;
  vertical-align: middle;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-banner {
    height: 68px;
  }

  .header-logo-fixed {
    width: 80px;
  }

  .header-logo-fixed img {
    height: 58px;
  }

  .strip-scroll-area {
    left: 80px;
  }

  .image-strip img {
    height: 62px;
  }

  /* Header sticky plus bas sur mobile (bandeau 68px + barre hamburger
     ~36px) qu'en desktop (bandeau 90px + nav ~55px) : la compensation
     de défilement vers les ancres doit donc être réduite, sinon les
     rubriques atterrissent trop bas avec un grand vide au-dessus. */
  [id] { scroll-margin-top: 120px; }


  nav {
    display: flex;
    align-items: center;
    padding: 0;
    margin-bottom: 0;
  }

  .hamburger {
    display: flex;
  }

  /* Hero collé à la nav, padding réduit au minimum */
  .page-hero {
    padding: 0.5rem 1rem 0.6rem;
    margin-top: 0;
  }

  .nav-inner {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--vert-fonce);
    z-index: 300;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  }

  .nav-inner.mobile-open {
    display: flex;
  }

  .nav-chevron {
    display: inline;
  }

  .nav-item > a {
    padding: 12px 18px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  /* Désactiver le hover desktop */
  .nav-item:hover .dropdown {
    display: none;
  }

  .dropdown {
    display: none;
    position: static;
    background: rgba(0,0,0,0.25);
    box-shadow: none;
    max-height: none;
  }

  .nav-item.open > a {
    background: var(--terracotta);
  }

  .nav-item.open .dropdown {
    display: block;
  }

  .dropdown a {
    padding: 10px 18px 10px 32px;
    font-size: 0.85rem;
  }

  .dropdown a:hover {
    padding-left: 38px;
  }

  .page-hero h1 {
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0;
  }

  .page-hero .tagline {
    font-size: 0.82rem;
    margin-top: 0.25rem;
  }

  .liens-rapides {
    display: block;
    margin: 0.6rem 0 0.3rem;
  }

  .liens-rapides ul {
    display: grid;
    grid-template-columns: minmax(0, max-content);
    justify-content: center;
    gap: 0.4rem;
  }

  .liens-rapides li {
    display: block;
  }

  .liens-rapides a {
    display: inline-flex;
    width: 100%;
    box-sizing: border-box;
    min-height: 32px;
    justify-content: center;
    padding: 0.35rem 1rem;
    font-size: 0.78rem;
  }

  .page-content {
    padding: 2rem 1.25rem 3rem;
  }

  .btn-communautaire {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===== ACCESSIBILITÉ ===== */

/* Skip link — visible uniquement au focus clavier */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--vert-fonce);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 4px 4px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0;
}

/* ===== BOUTON RETOUR EN HAUT ===== */
#btn-haut {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 500;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--vert-fonce);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s;
}

#btn-haut.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#btn-haut:hover {
  background: var(--terracotta);
}

#btn-haut:focus-visible {
  outline: 3px solid var(--vert-clair);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  #btn-haut {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}

/* ===== FORMULAIRE DE CONTACT ===== */
.form-contact {
  margin-top: 1.5rem;
}

.champ {
  margin-bottom: 1.4rem;
}

.champ label {
  display: block;
  font-weight: 600;
  color: var(--vert-fonce);
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.champ .obligatoire {
  color: var(--terracotta);
  font-weight: 700;
}

.champ .aide {
  display: block;
  font-size: 0.85rem;
  color: var(--texte-leger);
  margin-bottom: 0.45rem;
}

.champ input[type="text"],
.champ input[type="email"],
.champ input[type="password"],
.champ select,
.champ textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  color: var(--texte);
  background: var(--blanc);
  border: 2px solid var(--beige-fonce);
  border-radius: 5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.champ textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.6;
}

.champ select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232D5016'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.3rem;
  padding-right: 2.6rem;
}

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
  outline: none;
  border-color: var(--vert-moyen);
  box-shadow: 0 0 0 3px rgba(168, 192, 119, 0.45);
}

.champ input[aria-invalid="true"],
.champ select[aria-invalid="true"],
.champ textarea[aria-invalid="true"] {
  border-color: var(--terracotta);
}

.champ .erreur-champ {
  display: block;
  color: #a02f12;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

/* Pot de miel anti-spam — masqué visuellement et aux lecteurs d'écran */
.pot-de-miel {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Résumé d'erreurs en tête de formulaire */
.form-erreurs {
  background: #fdece7;
  border: 2px solid var(--terracotta);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  color: #8a2a10;
}

.form-erreurs h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
  color: #8a2a10;
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

.form-erreurs ul {
  margin: 0;
  padding-left: 1.25rem;
}

.form-erreurs a {
  color: #8a2a10;
  font-weight: 600;
}

/* Message de confirmation */
.form-succes {
  background: #eef4e3;
  border: 2px solid var(--vert-moyen);
  border-left: 6px solid var(--vert-moyen);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  color: var(--vert-fonce);
}

.form-succes h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.15rem;
  color: var(--vert-fonce);
  margin-bottom: 0.4rem;
  border: none;
  padding: 0;
}

.form-actions {
  margin-top: 0.5rem;
}

.form-actions button {
  border: none;
  font-family: 'Source Sans 3', sans-serif;
}

/* Case « Recevoir une copie de mon message » */
.champ-copie {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.champ-copie input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--vert-moyen);
  cursor: pointer;
}
.champ-copie label {
  display: inline;
  font-weight: 400;
  color: var(--texte);
  margin-bottom: 0;
  cursor: pointer;
}

/* ===== VIDÉO DE PRÉSENTATION (page d'accueil, sous le titre) ===== */
.intro-video {
  position: relative;
  display: none;               /* affiché par js/intro.js uniquement si besoin */
  width: 100%;
  text-align: center;          /* centre la vidéo (inline-block) */
  background: var(--vert-fonce);
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.intro-video.is-active { display: block; }
.intro-video.is-hiding { opacity: 0; }

/* La vidéo est mise à l'échelle en conservant ses proportions :
   bornée par la largeur ET par la hauteur, elle s'affiche toujours en entier. */
.intro-video__media {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 50vh;            /* hauteur réduite : tient sous le titre, sans rognage */
  vertical-align: middle;
  background: var(--vert-fonce);
}

.intro-video__skip {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  padding: 0.5rem 1.2rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--terracotta);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.intro-video__skip:hover { background: #a84f23; }
.intro-video__skip:focus-visible {
  outline: 3px solid var(--vert-clair);
  outline-offset: 2px;
}

/* Mobile : bouton plus petit et placé SOUS la vidéo pour ne rien masquer */
@media (max-width: 768px) {
  .intro-video__media { max-height: 42vh; }
  .intro-video__skip {
    position: static;
    display: inline-block;
    margin: 0.6rem auto;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
  }
}

/* Respect des préférences d'accessibilité : pas d'animation imposée */
@media (prefers-reduced-motion: reduce) {
  .intro-video { display: none !important; }
}

/* ===== ESPACE ADMINISTRATION (adm_alfred_gap*.php) ===== */
.adm-alfred-gap-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--vert-fonce);
  color: #fff;
  padding: 0.6rem 1.25rem;
}

.adm-alfred-gap-header img { border-radius: 4px; flex-shrink: 0; }

.adm-alfred-gap-titre {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-right: auto;
}

.adm-alfred-gap-deco {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.adm-alfred-gap-qui { font-size: 0.9rem; color: var(--vert-clair); }

.adm-alfred-gap-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--texte-leger);
  font-size: 0.85rem;
}

/* Liens texte simples (hors boutons et cartes) : même charte que le reste du site. */
.adm-alfred-gap main a:not(.btn):not(.card) {
  color: var(--vert-fonce);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.adm-alfred-gap main a:not(.btn):not(.card):hover {
  color: var(--terracotta);
}

.adm-alfred-gap main a:not(.btn):not(.card):focus-visible {
  outline: 3px solid var(--vert-clair);
  outline-offset: 2px;
}

.card-lien-inactif { cursor: default; opacity: 0.6; }
.card-lien-inactif:hover { transform: none; box-shadow: none; }

.btn-petit { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

.btn-supprimer { background: #a02f12; color: #fff; border: none; }
.btn-supprimer:hover { background: #7d2409; }

.admin-action-inline { display: inline-block; margin: 0; }

.alerte-mdp-provisoire {
  background: #fff8e1;
  border: 2px solid #c99a1f;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.alerte-mdp-provisoire h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
  color: #7a5b0a;
  border: none;
  padding: 0;
  margin-bottom: 0.5rem;
}

.alerte-mdp-valeur {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: #fff;
  border: 1px dashed #c99a1f;
  border-radius: 4px;
  padding: 0.5rem 0.9rem;
  display: inline-block;
  margin: 0.5rem 0;
  user-select: all;
}

.badge-fonction {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: var(--vert-clair);
  color: var(--vert-fonce);
  font-weight: 600;
  font-size: 0.82rem;
}

.admin-tableau-wrap { overflow-x: auto; margin-top: 1.5rem; }

.admin-tableau { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.admin-tableau th {
  background: var(--vert-fonce);
  color: #fff;
  text-align: left;
  padding: 0.6rem 0.8rem;
}

.admin-tableau td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--beige-fonce);
  vertical-align: middle;
}

.admin-tableau tr:nth-child(even) td { background: var(--beige); }

.admin-tableau-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .admin-tableau thead { display: none; }
  .admin-tableau, .admin-tableau tbody, .admin-tableau tr, .admin-tableau td { display: block; width: 100%; }
  .admin-tableau tr {
    margin-bottom: 0.6rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--beige-fonce);
    border-radius: 6px;
    line-height: 1.3;
  }
  .admin-tableau td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    border-bottom: none;
    padding: 0.2rem 0;
  }
  .admin-tableau td::before {
    content: attr(data-label) " :";
    font-weight: 700;
    color: var(--vert-fonce);
    flex-shrink: 0;
  }
  /* La case à cocher se suffit à elle-même : pas besoin d'y répéter « Sélection ». */
  .admin-tableau td[data-label="Sélection"] {
    justify-content: flex-start;
  }
  .admin-tableau td[data-label="Sélection"]::before { content: none; }
  .adm-alfred-gap-deco { width: 100%; justify-content: space-between; }
}

/* ===== DOUBLE AUTHENTIFICATION (TOTP) ===== */

/* Liste des codes de secours : des <li> (éléments de bloc) pour que la
   sélection + copier-coller les sépare naturellement d'un saut de ligne
   par code, contrairement à des <span> collés les uns aux autres. */
.codes-secours-liste {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.codes-secours-liste li {
  background: #fff;
  border: 1px dashed #c99a1f;
  border-radius: 4px;
  padding: 0.45rem 0.6rem;
  text-align: center;
  letter-spacing: 0.03em;
}

@media (max-width: 480px) {
  .codes-secours-liste { grid-template-columns: 1fr; }
}

.qrcode-conteneur {
  background: #fff;
  border: 1px solid var(--beige-fonce);
  border-radius: 6px;
  padding: 0.75rem;
  display: inline-block;
  margin-top: 0.5rem;
  line-height: 0; /* évite un espace parasite sous le canevas généré */
}

.badge-2fa {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.82rem;
}

.badge-2fa-active {
  background: var(--vert-clair);
  color: var(--vert-fonce);
}

.badge-2fa-attente {
  background: #ffe8b3;
  color: #7a5b0a;
}

/* ===== GESTION DES TEXTES DU SITE (adm_redactionnels.php) ===== */

/* Liste des documents repliée par défaut (natif, sans JavaScript) ;
   une fois dépliée, l'en-tête des colonnes reste visible au défilement
   de la page (pas de hauteur limitée : la page défile normalement). */
.admin-tableau-repliable summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--vert-fonce);
  padding: 0.5rem 0;
}

.admin-tableau-repliable summary:hover,
.admin-tableau-repliable summary:focus-visible {
  color: var(--terracotta);
}

.admin-tableau-repliable .admin-tableau-wrap {
  margin-top: 0.75rem;
}

.admin-tableau thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* ===== GESTION DES IMAGES DU SITE (adm_images.php) ===== */
.vignette-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--beige-fonce);
  display: block;
}

.badge-bandeau {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.82rem;
}

.badge-bandeau-oui     { background: var(--vert-clair); color: var(--vert-fonce); }
.badge-bandeau-non     { background: var(--beige-fonce); color: var(--texte-leger); }
.badge-bandeau-ajout   { background: #d7ecd0; color: #2f6b1f; }
.badge-bandeau-retrait { background: #ffe8b3; color: #7a5b0a; }

.section-block-encadre {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--beige);
  border: 1px solid var(--beige-fonce);
  border-radius: 8px;
}

.section-block-encadre h3 {
  font-family: 'Merriweather', serif;
  color: var(--vert-fonce);
  margin-top: 0;
}

.aide-balises-texte {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  line-height: 1.15;
  color: var(--texte);
}
