/* ============================================================
   Ouled El May — Refonte graphique 2026
   Design : chaleur méditerranéenne, identité djerbienne
   ============================================================ */

/* ——— 1. POLICES ——— */
@font-face {
  font-family: "Bree Serif";
  src: url("../fonts/bree-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bree Serif";
  src: url("../fonts/bree-serif-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-latin.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-latin-ext.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-arabic.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ——— 2. VARIABLES ——— */
:root {
  /* Couleur fixe (identité) */
  --navy: #0C1B35;

  /* Palette jour (défaut) */
  --fond:       #F4EFE6;
  --surface:    #FFFFFF;
  --surface-2:  #EDE7DA;
  --texte:      #0C1B35;
  --texte-doux: #56677F;
  --bordure:    #DDD7CD;
  --cta:        #B87010;
  --cta-survol: #9A5C0C;
  --cta-texte:  #FFFFFF;
  --accent:     #1880A0;
  --sea:        #1880A0;
  --porte:      #0C1B35;
  --fond-sable: #EDE6D8;
  --fond-bleu:  #E8F4F8;

  /* Bande d'impact — variables dédiées */
  --impact-fond:    #0C1B35;
  --impact-bordure: transparent;
  --impact-chiffre: #FFFFFF;
  --impact-label:   rgba(255, 255, 255, .55);
  --impact-sep:     rgba(255, 255, 255, .12);

  --ombre-1: 0 1px 3px rgba(12, 27, 53, .06), 0 4px 16px rgba(12, 27, 53, .06);
  --ombre-2: 0 2px 6px rgba(12, 27, 53, .08), 0 12px 36px rgba(12, 27, 53, .10);

  --police-titre: "Bree Serif", Georgia, serif;
  --police-texte: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

  --largeur-max: 74rem;
  --marge:  clamp(1rem, 5vw, 2.5rem);
  --rythme: clamp(4.5rem, 10vw, 7rem);

  color-scheme: light;
}

/* ——— Nuit djerbienne (mode sombre) ——— */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond:       #071323;
    --surface:    #0D1C35;
    --surface-2:  #152844;
    --texte:      #EDE8DC;
    --texte-doux: rgba(237, 232, 220, .55);
    --bordure:    rgba(255, 255, 255, .08);
    --cta:        #D4870A;
    --cta-survol: #E09A20;
    --cta-texte:  #071323;
    --accent:     #C05530;
    --sea:        #2494BC;
    --porte:      #152844;
    --fond-sable: #0A1525;
    --fond-bleu:  #071620;
    --impact-fond:    #0D1C35;
    --impact-bordure: rgba(212, 135, 10, .18);
    --impact-chiffre: #D4870A;
    --impact-label:   rgba(237, 232, 220, .55);
    --impact-sep:     rgba(255, 255, 255, .08);
    --ombre-1: 0 2px 8px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .2);
    --ombre-2: 0 4px 16px rgba(0, 0, 0, .4), 0 16px 48px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
[data-theme="dark"] {
  --fond:       #071323;
  --surface:    #0D1C35;
  --surface-2:  #152844;
  --texte:      #EDE8DC;
  --texte-doux: rgba(237, 232, 220, .55);
  --bordure:    rgba(255, 255, 255, .08);
  --cta:        #D4870A;
  --cta-survol: #E09A20;
  --cta-texte:  #071323;
  --accent:     #C05530;
  --sea:        #2494BC;
  --porte:      #152844;
  --fond-sable: #0A1525;
  --fond-bleu:  #071620;
  --impact-fond:    #0D1C35;
  --impact-bordure: rgba(212, 135, 10, .18);
  --impact-chiffre: #D4870A;
  --impact-label:   rgba(237, 232, 220, .55);
  --impact-sep:     rgba(255, 255, 255, .08);
  --ombre-1: 0 2px 8px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .2);
  --ombre-2: 0 4px 16px rgba(0, 0, 0, .4), 0 16px 48px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ——— 3. RESET & BASES ——— */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}


h1, h2, h3 {
  font-family: var(--police-titre);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.625rem, 6.5vw, 4.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.875rem, 4vw, 2.875rem); letter-spacing: -0.015em; }
h3 { font-size: 1.375rem; }

p { margin: 0 0 1em; max-width: 65ch; text-wrap: pretty; }

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

.insecable { white-space: nowrap; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.lien-evitement {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  color: var(--texte);
  border-radius: 0.625rem;
  box-shadow: var(--ombre-2);
  font-weight: 600;
}
.lien-evitement:focus { top: 1rem; }

/* ——— 4. NAVIGATION ——— */
.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem var(--marge);
  background: color-mix(in srgb, var(--fond) 85%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--bordure);
}

.entete-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}
.entete-logo img { width: 40px; height: 40px; }
.entete-nom {
  font-family: var(--police-titre);
  font-size: 1.0625rem;
  color: var(--texte);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.entete nav { margin-inline-start: auto; }
.entete nav ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.entete nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--texte-doux);
  transition: color 0.15s;
}
.entete nav a:hover { color: var(--texte); }
.entete nav a[aria-current="true"] {
  color: var(--texte);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}

.bouton-theme,
.bouton-langue {
  display: grid;
  place-items: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.65rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.bouton-theme:hover,
.bouton-langue:hover {
  border-color: var(--texte-doux);
  background: var(--fond);
}

/* ——— 5. ACCUEIL / HÉROS ——— */
.accueil {
  /* Motif zellige : points dorés très subtils sur fond ivoire */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(12, 27, 53, .065) 1px, transparent 0);
  background-size: 28px 28px;
  display: grid;
  grid-template-columns: 55fr 45fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) var(--marge) clamp(4.5rem, 9vw, 8rem);
  min-height: calc(100svh - 65px);
}

/* Nuit djerbienne : points dorés + lueur ambrée derrière l'arche */
[data-theme="dark"] .accueil {
  background-image:
    radial-gradient(ellipse 55% 65% at 68% 50%, rgba(212, 135, 10, .10) 0%, transparent 65%),
    radial-gradient(circle at 1px 1px, rgba(212, 135, 10, .12) 1px, transparent 0);
  background-size: auto, 28px 28px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .accueil {
    background-image:
      radial-gradient(ellipse 55% 65% at 68% 50%, rgba(212, 135, 10, .10) 0%, transparent 65%),
      radial-gradient(circle at 1px 1px, rgba(212, 135, 10, .12) 1px, transparent 0);
    background-size: auto, 28px 28px;
  }
}

/* Puce / chip au-dessus du H1 */
.accueil-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375em 1.125em;
  margin-bottom: 1.25rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--texte-doux);
  box-shadow: var(--ombre-1);
}
.accueil-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cta);
  flex-shrink: 0;
}

.accueil-texte h1 { margin-bottom: 0.45em; }
.accueil-texte > p {
  font-size: 1.125rem;
  color: var(--texte-doux);
  max-width: 36ch;
  margin-bottom: 2.25rem;
  line-height: 1.65;
}

.accueil-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem 1.75rem;
}

/* Enveloppe décorative autour de l'arche */
.arche-enveloppe {
  justify-self: center;
  position: relative;
  isolation: isolate;
  width: min(100%, 24rem);  /* aligne sur la largeur de l'arche pour que les anneaux l'encadrent */
}

/* Anneaux décoratifs dorés — évocation des chambranles djerbiens */
.arche-enveloppe::before,
.arche-enveloppe::after {
  content: '';
  position: absolute;
  border-radius: 999px 999px 8px 8px;
  border: 1px dashed;
  pointer-events: none;
  animation: apparition-anneaux 0.5s ease-out both;
}
.arche-enveloppe::before {
  inset: -20px;
  border-color: rgba(200, 136, 10, 0.40);
  animation-delay: 1.15s;
}
.arche-enveloppe::after {
  inset: -38px;
  border-color: rgba(200, 136, 10, 0.18);
  animation-delay: 1.35s;
}

/* La porte djerbienne */
.arche {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  padding: 2.25rem;
  background: var(--porte);
  border-radius: 999px 999px 4px 4px;
  box-shadow:
    0 0 0 12px var(--fond),
    0 0 0 14px var(--porte),
    0 0 0 15px rgba(212, 135, 10, .22),
    var(--ombre-2);
  animation: ouverture-arche 1.1s cubic-bezier(.2, .7, .2, 1) both;
}

/* Mode jour : pas de halo doré */
.arche {
  box-shadow:
    0 0 0 12px var(--fond),
    0 0 0 14px var(--porte),
    var(--ombre-2);
}

/* Nuit djerbienne : halo doré */
[data-theme="dark"] .arche {
  box-shadow:
    0 0 0 12px var(--fond),
    0 0 0 14px var(--porte),
    0 0 0 15px rgba(212, 135, 10, .22),
    var(--ombre-2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .arche {
    box-shadow:
      0 0 0 12px var(--fond),
      0 0 0 14px var(--porte),
      0 0 0 15px rgba(212, 135, 10, .22),
      var(--ombre-2);
  }
}
.arche img {
  width: 100%;
  max-width: 18rem;
  animation: apparition-logo 0.6s ease-out 0.7s both;
}

@keyframes ouverture-arche {
  from { clip-path: inset(100% -20px 0 -20px round 999px 999px 0 0); }
  to   { clip-path: inset(-20px -20px -20px -20px round 999px 999px 4px 4px); }
}
@keyframes apparition-logo {
  from { opacity: 0; transform: scale(0.92) translateY(0.375rem); }
  to   { opacity: 1; transform: none; }
}
@keyframes apparition-anneaux {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ——— 6. BANDE D'IMPACT (statistiques) ——— */
.impact {
  background: var(--impact-fond);
  border-top: 1px solid var(--impact-bordure);
  border-bottom: 1px solid var(--impact-bordure);
  position: relative;
  z-index: 1;
}

.impact-contenu {
  display: flex;
  align-items: stretch;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 0;
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 2.5rem var(--marge);
}

.impact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.375rem;
  padding: 1.25rem 2rem;
  flex: 1 1 11rem;
}

.impact-chiffre {
  font-family: var(--police-titre);
  font-size: clamp(2.125rem, 5vw, 3.375rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--impact-chiffre);
}

.impact-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--impact-label);
  max-width: 12ch;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.impact-sep {
  width: 1px;
  align-self: stretch;
  margin: 1.5rem 0;
  background: var(--impact-sep);
  flex-shrink: 0;
}

/* ——— 7. SECTIONS (base) ——— */
main > section:not(.accueil):not(.impact) {
  --fond-section: var(--fond);
  position: relative;
  padding-block: var(--rythme);
  padding-inline: max(var(--marge), calc((100% - var(--largeur-max)) / 2 + var(--marge)));
  background: var(--fond-section);
}

/* Fonds alternés */
main > #realisation,
main > #contact  { --fond-section: var(--fond-bleu); }
main > #soutenir { --fond-section: var(--fond-sable); }

/* Étiquette décorative (eyebrow) au-dessus du titre de section */
.section-etiquette {
  display: block;
  font-family: var(--police-texte);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cta);
  margin-bottom: 0.625rem;
}

/* ——— 8. BOUTONS & LIENS D'ACTION ——— */
.bouton-don {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.875em 1.875em;
  border-radius: 999px;
  background: var(--cta);
  color: var(--cta-texte);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(212, 135, 10, 0.38);
}
.bouton-don:hover {
  background: var(--cta-survol);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 135, 10, 0.45);
}
.bouton-don:active { transform: none; box-shadow: none; }

.entete .bouton-don {
  padding: 0.55em 1.25em;
  font-size: 0.875rem;
  box-shadow: none;
}
.entete .bouton-don:hover { transform: none; box-shadow: none; }

.lien-secondaire {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--texte);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--bordure);
  transition: text-decoration-color 0.15s;
}
.lien-secondaire:hover { text-decoration-color: var(--texte); }

.bouton-lien {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* ——— 9. PIED DE PAGE ——— */
.pied {
  display: block;
  max-width: none;
  margin: 0;
  padding: clamp(3rem, 7vw, 5rem)
           max(var(--marge), calc((100% - var(--largeur-max)) / 2 + var(--marge)))
           2rem;
  border-top: 0;
  background: var(--navy);
  color: rgba(255, 255, 255, .7);
}
.pied p { margin: 0; }
.pied a { color: #FFFFFF; }

.pied-colonnes {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.pied-identite { display: flex; gap: 1.25rem; align-items: flex-start; }
.pied-identite img { border-radius: 0.875rem; flex: none; }
.pied-identite p { font-size: 0.9375rem; line-height: 1.75; color: rgba(255,255,255,.6); }
.pied-identite strong { display: block; color: #FFFFFF; font-size: 1.0625rem; margin-bottom: 0.25rem; }

.pied-titre {
  margin: 0 0 1rem;
  font-family: var(--police-texte);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .38);
}
:root[lang="ar"] .pied-titre { font-family: var(--police-texte); font-size: 0.6875rem; }

.pied-nav ul,
.pied-reseaux ul {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pied-nav a,
.pied-reseaux a {
  text-decoration: none;
  font-size: 0.9375rem;
  color: rgba(255,255,255,.65);
  transition: color 0.15s;
}
.pied-nav a:hover,
.pied-reseaux a:hover { color: #FFFFFF; }

.pied-reseaux a,
.pied-bientot { display: inline-flex; align-items: center; gap: 0.6rem; }
.pied-icone { width: 1.25rem; height: 1.25rem; flex: none; opacity: 0.75; }
.pied-bientot { font-size: 0.9375rem; color: rgba(255,255,255,.35); }

.pied-bas {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.35);
}
.pied-bas a { color: rgba(255,255,255,.5); }
.pied-bas a:hover { color: #FFFFFF; }

/* Bouton don flottant : caché sur grand écran */
.don-mobile { display: none; }

/* ——— 10. QUI SOMMES-NOUS ——— */
.qui-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.qui-histoire p {
  text-align: justify;
  hyphens: auto;
}

.qui-cote .missions { margin-top: 2.25rem; }

.qui-devise {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 1.375rem;
  line-height: 1.4;
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}
:root[dir="rtl"] .qui-devise { font-style: normal; }

.interet-general {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-left: 3px solid var(--accent);
  border-radius: 0 0.875rem 0.875rem 0;
  font-size: 0.9375rem;
  box-shadow: var(--ombre-1);
}
:root[dir="rtl"] .interet-general {
  border-left: 1px solid var(--bordure);
  border-right: 3px solid var(--accent);
  border-radius: 0.875rem 0 0 0.875rem;
}
.interet-general a {
  display: inline-block;
  margin-top: 0.375rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.interet-general a:hover { text-decoration: underline; }

.missions { list-style: none; margin: 0; padding: 0; }
.missions li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  column-gap: 1.25rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--bordure);
}
.missions li:first-child { border-top: 0; padding-top: 0; }
.mission-icone {
  grid-row: span 2;
  font-family: var(--police-titre);
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cta);
  padding-top: 0.25rem;
  user-select: none;
}
.missions h3 { margin: 0 0 0.375rem; font-size: 1.25rem; }
.missions p { margin: 0; color: var(--texte-doux); font-size: 0.9375rem; line-height: 1.55; }

/* ——— 11. DERNIÈRE RÉALISATION ——— */
.real-grille {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.real-couverture { margin: 0; position: sticky; top: 6rem; }
.real-couverture img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 999px 999px 1rem 1rem;
  box-shadow: var(--ombre-2);
}
.real-emoji {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 1rem 1rem;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  font-size: 5rem;
  box-shadow: var(--ombre-1);
}
.real-statut {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin: 0 0 0.625rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--texte-doux);
}
.real-texte h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.real-accroche {
  font-family: var(--police-titre);
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  max-width: 22ch;
  margin-bottom: 1.25rem;
}

.faits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}
.faits li {
  padding: 0.4em 1.1em;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: var(--ombre-1);
}

/* Frise verticale des étapes (chronologie) */
.etapes {
  list-style: none;
  margin: 0 0 2.25rem;
  padding: 0;
  border-inline-start: 2px solid var(--bordure);
}
.etapes li {
  position: relative;
  display: grid;
  padding-block: 0 1.25rem;
  padding-inline: 1.5rem 0;
  font-size: 0.9375rem;
}
.etapes li::before {
  content: "";
  position: absolute;
  inset-inline-start: -7px;
  top: 0.4em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--fond-section, var(--fond));
}
.etapes li:last-child { padding-bottom: 0; }
.etape-date {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.etapes strong { display: block; margin-top: 0.125rem; }
.etapes span:last-child { color: var(--texte-doux); font-size: 0.9375rem; margin-top: 0.1rem; }

/* Galerie d'images (réalisation) */
.galerie {
  display: flex;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.galerie figure { flex: 0 0 13.5rem; margin: 0; scroll-snap-align: start; }
.galerie img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.875rem;
  box-shadow: var(--ombre-1);
}
.galerie figcaption { margin-top: 0.5rem; font-size: 0.8125rem; color: var(--texte-doux); }

.statut {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--texte-doux);
  letter-spacing: 0.01em;
}

/* ——— 12. PROJETS : filtres + carrousel ——— */
.projets-barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.filtres { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.filtre {
  padding: 0.5em 1.125em;
  border: 1.5px solid var(--bordure);
  border-radius: 999px;
  background: transparent;
  color: var(--texte-doux);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.filtre:hover { border-color: var(--texte-doux); color: var(--texte); }
.filtre-nombre { opacity: 0.65; font-weight: 400; }
.filtre[aria-pressed="true"] {
  background: var(--texte);
  border-color: var(--texte);
  color: var(--fond);
  box-shadow: var(--ombre-1);
}
.filtre[aria-pressed="true"] .filtre-nombre { opacity: 0.6; }

.fleches { display: flex; gap: 0.5rem; }
.fleches[hidden] { display: none; }
.fleche {
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--bordure);
  border-radius: 50%;
  background: var(--surface);
  color: var(--texte);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--ombre-1);
}
.fleche:hover {
  border-color: var(--texte);
  background: var(--texte);
  color: var(--fond);
}
.fleche:disabled { opacity: 0.3; cursor: default; box-shadow: none; }

.carrousel {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0 0 1rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--bordure) transparent;
}
.carrousel li { flex: 0 0 min(80%, 20rem); scroll-snap-align: start; display: flex; }

.carte {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--bordure);
  border-radius: 1.125rem;
  background: var(--surface);
  color: var(--texte);
  font: inherit;
  text-align: start;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--ombre-1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.15s;
}
.carte:hover {
  transform: translateY(-4px);
  box-shadow: var(--ombre-2);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--bordure));
}
.carte-visuel {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  overflow: hidden;
}
.carte-visuel img { width: 100%; height: 100%; object-fit: cover; }
.visuel-emoji { font-size: 3.5rem; line-height: 1; }
.carte-texte { display: grid; gap: 0.375rem; padding: 1.125rem 1.375rem 1.5rem; }
.carte-titre { font-family: var(--police-titre); font-size: 1.25rem; line-height: 1.2; }
.carte-accroche { font-size: 0.9rem; color: var(--texte-doux); line-height: 1.5; }

/* ——— 13. FICHE PROJET (bottom sheet) ——— */
.fiche-ouverte { overflow: hidden; }

.bottom-sheet {
  width: 100%;
  max-width: 48rem;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 1.5rem 1.5rem 0 0;
  background: var(--fond);
  color: var(--texte);
  overflow: hidden;
  box-shadow: 0 -8px 48px rgba(12, 27, 53, .18);
}
.bottom-sheet[open] {
  display: flex;
  flex-direction: column;
  animation: montee 0.3s cubic-bezier(.2, .8, .2, 1);
}
.bottom-sheet::backdrop {
  background: rgba(8, 15, 30, .65);
  backdrop-filter: blur(3px);
}
@keyframes montee {
  from { transform: translateY(100%); }
  to   { transform: none; }
}

.fiche-entete {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem;
  cursor: grab;
  touch-action: none;
  border-bottom: 1px solid var(--bordure);
  background: var(--surface);
  flex-shrink: 0;
}
.fiche-poignee {
  width: 3rem;
  height: 0.25rem;
  margin: 0.5rem 0;
  border-radius: 999px;
  background: var(--bordure);
}
.fiche-fermer {
  position: absolute;
  inset-inline-end: 0.875rem;
  top: 50%;
  translate: 0 -50%;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: var(--fond);
  color: var(--texte);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.fiche-fermer:hover { background: var(--bordure); }

.fiche-corps {
  padding: 1.5rem clamp(1.25rem, 4vw, 2.25rem) 2.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.fiche-corps h3 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0.375rem 0 0.5rem; }
.fiche-corps h4 {
  margin: 2rem 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--texte-doux);
}
.fiche-accroche {
  font-family: var(--police-titre);
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--texte-doux);
  margin-bottom: 1rem;
}

.fiche-photos {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}
.fiche-photos figure { flex: 0 0 min(78%, 17rem); margin: 0; scroll-snap-align: start; }
.fiche-photos img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.875rem;
}
.fiche-photos figcaption { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--texte-doux); }

.fiche-emoji {
  display: grid;
  place-items: center;
  height: 9rem;
  margin-bottom: 1.5rem;
  border-radius: 0.875rem;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  font-size: 4.5rem;
}

.fiche-etablissements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.4rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
.video { margin: 0; }
.video-facade,
.video iframe {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: 0.875rem;
  background: var(--porte);
  overflow: hidden;
  cursor: pointer;
}
.video-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}
.video-lecture { position: relative; font-size: 2.5rem; }
.video figcaption { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--texte-doux); }

.fiche-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.bouton-partage {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.875em 1.5em;
  border: 1.5px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface);
  color: var(--texte);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.15s;
}
.bouton-partage:hover {
  background: var(--texte);
  border-color: var(--texte);
  color: var(--fond);
}

/* ——— 14. NOUS SOUTENIR ——— */
.soutenir-intro {
  font-size: 1.125rem;
  color: var(--texte-doux);
  margin-bottom: 2.5rem;
  max-width: 50ch;
}

.soutenir-grille {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.don-bloc {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  box-shadow: var(--ombre-1);
}
.don-bloc h3,
.voie h3 { font-size: 1.375rem; margin-bottom: 0.5rem; }
.don-bloc > p { color: var(--texte-doux); font-size: 0.9375rem; margin-bottom: 0; }

.simulateur {
  margin: 1.75rem 0;
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--fond);
  border: 1px solid var(--bordure);
}
.simulateur-titre {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--texte-doux);
  margin-bottom: 1.25rem;
}

.segments {
  display: inline-flex;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
  border: 1.5px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface);
}
.segment {
  padding: 0.5em 1.25em;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--texte-doux);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}
.segment[aria-pressed="true"] {
  background: var(--texte);
  color: var(--fond);
  box-shadow: var(--ombre-1);
}

.montant-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--texte-doux);
  margin-bottom: 0.5rem;
}
.montant-champ { position: relative; max-width: 13rem; }
.montant-champ input {
  width: 100%;
  padding-block: 0.65em;
  padding-inline: 0.9em 2.5em;
  border: 1.5px solid var(--bordure);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--texte);
  font: inherit;
  font-size: 1.625rem;
  font-weight: 700;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.montant-champ input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.montant-champ span {
  position: absolute;
  inset-inline-end: 0.9em;
  top: 50%;
  translate: 0 -50%;
  font-size: 1.125rem;
  color: var(--texte-doux);
}

.montants-rapides { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.875rem 0 1.5rem; }
.montants-rapides button {
  flex: 1 1 0;
  white-space: nowrap;
  min-width: 3.25rem;
  padding: 0.45em 0.75em;
  border: 1.5px solid var(--bordure);
  border-radius: 999px;
  background: transparent;
  color: var(--texte-doux);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
}
.montants-rapides button:hover { border-color: var(--texte-doux); color: var(--texte); }
.montants-rapides button[aria-pressed="true"] {
  border-color: var(--texte);
  font-weight: 700;
  color: var(--texte);
  background: color-mix(in srgb, var(--texte) 8%, transparent);
}

.simulateur-resultat { font-size: 0.9375rem; color: var(--texte-doux); margin-bottom: 0.375rem; }
.cout-reel {
  display: block;
  margin: 0.25rem 0;
  font-family: var(--police-titre);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  line-height: 1.05;
  color: var(--cta);
  white-space: nowrap;
}
.simulateur-note { font-size: 0.8125rem; color: var(--texte-doux); margin: 0; line-height: 1.55; }

.autres-voies { display: grid; }
.voie { padding: 1.75rem 0; border-top: 1px solid var(--bordure); }
.voie:first-child { border-top: 0; padding-top: 0; }
.voie p { color: var(--texte-doux); font-size: 0.9375rem; }

.lien-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--accent);
  text-decoration: none;
}
.lien-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.lien-action::after { content: '→'; font-size: 0.875em; }
:root[dir="rtl"] .lien-action::after { content: '←'; }

/* ——— 15. COMMUNAUTÉ ET PARTENAIRES ——— */
.communaute-intro {
  font-size: 1.125rem;
  color: var(--texte-doux);
  margin-bottom: 2.5rem;
  max-width: 48ch;
}

.reseaux { margin: 0; padding: 0; list-style: none; max-width: 52rem; }
.reseau {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.375rem 0;
  border-top: 1px solid var(--bordure);
  transition: background 0.15s;
}
.reseau:last-child { border-bottom: 1px solid var(--bordure); }
.reseau-icone { width: 2.375rem; height: 2.375rem; font-size: 1.9rem; line-height: 1; }
.reseau-texte { display: grid; gap: 0.2rem; }
.reseau-texte strong { font-size: 1rem; }
.reseau-texte span { color: var(--texte-doux); font-size: 0.9375rem; }
.reseau-action {
  padding: 0.6em 1.25em;
  border: 1.5px solid var(--texte);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.reseau-action:hover { background: var(--texte); color: var(--fond); }
.reseau-bientot { font-size: 0.875rem; color: var(--texte-doux); white-space: nowrap; }

.partenaires-barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: clamp(3rem, 7vw, 5rem) 0 1.75rem;
}
.partenaires-barre .partenaires-titre { margin: 0; }
.partenaires-titre { font-size: 1.5rem; margin: clamp(3rem, 7vw, 4.5rem) 0 1.5rem; }

.partenaires {
  display: flex;
  gap: 1rem;
  padding-bottom: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--bordure) transparent;
  margin: 0;
  list-style: none;
}
.partenaires li {
  flex: 0 0 calc((100% - 3rem) / 4);
  min-width: 14rem;
  scroll-snap-align: start;
  display: flex;
}

.partenaire {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  width: 100%;
  padding: 1.25rem 1.25rem 1.5rem;
  border: 1px solid var(--bordure);
  border-radius: 1.125rem;
  background: var(--surface);
  text-decoration: none;
  box-shadow: var(--ombre-1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.partenaire:hover {
  transform: translateY(-3px);
  box-shadow: var(--ombre-2);
}
.partenaire-logo {
  display: grid;
  place-items: center;
  height: 7rem;
  margin-bottom: 0.625rem;
  border-radius: 0.75rem;
  background: #FFFFFF;
  font-size: 2.75rem;
}
.partenaire-logo img { max-height: 5.5rem; width: auto; }
.partenaire strong { font-size: 1rem; }
.partenaire-role { font-size: 0.875rem; color: var(--texte-doux); line-height: 1.45; }
a.partenaire:hover strong { text-decoration: underline; text-underline-offset: 2px; }

.partenaire-invitation {
  border-style: dashed;
  border-width: 2px;
  background: transparent;
  box-shadow: none;
}
.partenaire-invitation .partenaire-logo {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* ——— 16. CONTACT ——— */
.contact-grille {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.contact-intro p {
  color: var(--texte-doux);
  font-size: 1rem;
  line-height: 1.7;
}
.contact-infos {
  display: grid;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.contact-infos li {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
}
.contact-infos li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cta);
  flex-shrink: 0;
  translate: 0 -1px;
}
.contact-infos span { margin-inline-end: 0.5rem; }

.formulaire {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--bordure);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--ombre-1);
}
.champ { display: grid; gap: 0.5rem; }
.champ label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--texte-doux);
}
.champ input,
.champ select,
.champ textarea {
  width: 100%;
  padding: 0.75em 1em;
  border: 1.5px solid var(--bordure);
  border-radius: 0.625rem;
  background: var(--fond);
  color: var(--texte);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.champ input:focus,
.champ select:focus,
.champ textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.champ textarea { resize: vertical; min-height: 9rem; }
.champ-case { grid-template-columns: auto 1fr; align-items: start; gap: 0.75rem; }
.champ-case input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  accent-color: var(--cta);
}
.champ-case label {
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--texte-doux);
  text-transform: none;
  letter-spacing: 0;
}

.piege {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.bouton-envoyer {
  justify-self: start;
  padding: 0.875em 2.25em;
  border: 0;
  border-radius: 999px;
  background: var(--texte);
  color: var(--fond);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.bouton-envoyer:hover {
  background: var(--cta);
  color: var(--cta-texte);
  transform: translateY(-1px);
}
.bouton-envoyer:disabled { opacity: 0.55; cursor: wait; transform: none; }

.formulaire-etat { margin: 0; font-size: 0.875rem; min-height: 1.5em; }
.formulaire-etat[data-type="succes"] { color: #1F7A4D; font-weight: 600; }
.formulaire-etat[data-type="erreur"] { color: #B42318; font-weight: 600; }
[data-theme="dark"] .formulaire-etat[data-type="succes"] { color: #6EE7A8; }
[data-theme="dark"] .formulaire-etat[data-type="erreur"] { color: #FCA5A5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .formulaire-etat[data-type="succes"] { color: #6EE7A8; }
  :root:not([data-theme="light"]) .formulaire-etat[data-type="erreur"] { color: #FCA5A5; }
}

/* ——— 17. PAGE MENTIONS LÉGALES ——— */
.page-legale {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--marge) 4rem;
}
.page-legale h2 { font-size: 1.625rem; margin-top: 2.75rem; }
.page-legale h3 { font-size: 1.2rem; margin-top: 1.75rem; }
.page-legale ul { padding-inline-start: 1.25rem; }
.page-legale li { margin-bottom: 0.4rem; }
.page-legale .mise-a-jour { color: var(--texte-doux); font-size: 0.875rem; }
.retour-accueil { font-weight: 600; }

/* ——— 18. VERSION ARABE (RTL) ——— */
:root[lang="ar"] body { line-height: 1.85; }
:root[lang="ar"] h1,
:root[lang="ar"] h2,
:root[lang="ar"] h3,
:root[lang="ar"] .real-accroche,
:root[lang="ar"] .fiche-accroche,
:root[lang="ar"] .carte-titre,
:root[lang="ar"] .cout-reel {
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}
:root[dir="rtl"] .fleche { transform: scaleX(-1); }
[lang="fr"] { unicode-bidi: isolate; }
:root[dir="rtl"] input[type="email"],
:root[dir="rtl"] input[type="number"] { direction: ltr; text-align: right; }

/* ——— 19. MENU MOBILE (☰ + bottom sheet) ——— */
.bouton-menu {
  display: none;
  align-items: center;
  gap: 0.4rem;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1.5px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface);
  color: var(--texte);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.bouton-menu:hover { border-color: var(--texte-doux); }
.bouton-menu span[aria-hidden] { font-size: 1.125rem; line-height: 1; }

.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.menu-ouvert { overflow: hidden; }

.menu-liste { margin: 0; padding: 0; list-style: none; }
.menu-liste a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--bordure);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--texte);
  transition: color 0.15s;
}
.menu-liste a::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bordure);
  flex-shrink: 0;
  transition: background 0.15s;
}
.menu-liste a:hover { color: var(--cta); }
.menu-liste a:hover::before { background: var(--cta); }
.menu-liste a[aria-current="true"] { font-weight: 700; }
.menu-liste a[aria-current="true"]::before { background: var(--accent); }
.menu-liste a[aria-current="true"]::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-inline-start: auto;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.menu-pied { display: grid; gap: 1rem; justify-items: center; margin-top: 1.75rem; }
.menu-pied .bouton-don { width: 100%; text-align: center; justify-content: center; }
.menu-pied .lien-mentions { font-size: 0.875rem; color: var(--texte-doux); }

/* ——— 20. FRISE DU LOGO ——— */
.frise {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 24px;
  background: var(--sea) url("../img/logo/frise.webp") repeat-x left center / auto 100%;
}
:root[dir="rtl"] .frise { background-position: right center; }
main > section:not(.accueil):not(.impact) { padding-top: calc(var(--rythme) + 24px); }

.frise.a-derouler:not(.deroulee) { clip-path: inset(0 100% 0 0); }
:root[dir="rtl"] .frise.a-derouler:not(.deroulee) { clip-path: inset(0 0 0 100%); }
.frise.a-derouler.deroulee {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.4s cubic-bezier(.25, .8, .25, 1);
}

/* ——— 21. NAV DESKTOP & RESPONSIVE ——— */
@media (max-width: 1199px) {
  .entete nav { display: none; }
  .bouton-langue { margin-inline-start: auto; }
  .bouton-menu { display: inline-flex; }
}

/* ——— 22. MOBILE & TABLETTE ——— */
@media (max-width: 820px) {
  .entete { gap: 0.5rem; }
  .entete .bouton-don { display: none; }
  .bouton-langue { margin-inline-start: auto; }
  .bouton-menu { display: inline-flex; }

  html { scroll-padding-top: 5rem; }

  .accueil {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
    min-height: auto;
    gap: 2.5rem;
  }
  .arche-enveloppe {
    order: -1;
    justify-self: center;
    width: min(62%, 15rem);
  }
  .arche-enveloppe::before,
  .arche-enveloppe::after { display: none; }
  .arche { padding: 1.375rem; }

  .impact-sep { display: none; }
  .impact-item { min-width: 42%; padding: 1rem; }

  .qui-grille,
  .real-grille,
  .soutenir-grille,
  .contact-grille { grid-template-columns: minmax(0, 1fr); }

  .real-couverture { position: static; max-width: 22rem; }
  .galerie figure { flex-basis: 10.5rem; }

  .fleches { display: none !important; }

  .partenaires li { flex-basis: 78%; min-width: 0; }
  .partenaires-fleches { display: none !important; }

  .reseau { grid-template-columns: 2.5rem 1fr; }
  .reseau-action,
  .reseau-bientot { grid-column: 2; justify-self: start; }

  /* Bouton don flottant (mobile) */
  .don-mobile {
    display: block;
    position: fixed;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 60;
    padding: 0.9em 2.25em;
    border-radius: 999px;
    background: var(--cta);
    color: var(--cta-texte);
    font-weight: 700;
    font-size: 0.9375rem;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 4px 24px rgba(212, 135, 10, 0.45);
    opacity: 0;
    pointer-events: none;
    translate: 0 1rem;
    transition: opacity 0.2s, translate 0.2s;
  }
  .don-mobile.visible { opacity: 1; pointer-events: auto; translate: 0 0; }

  .pied { padding-bottom: calc(2rem + 5rem); }
  .pied-colonnes { grid-template-columns: 1fr 1fr; }
  .pied-identite { grid-column: 1 / -1; }
}

/* ——— 23. TRÈS PETITS ÉCRANS ——— */
@media (max-width: 400px) {
  .don-bloc { padding: 1.25rem; }
  .simulateur { padding: 1rem; }
  .segment { padding: 0.5em 0.9em; }
  .montants-rapides button { min-width: 0; }

  /* En-tête : le bouton Menu ne garde que l'icône ☰ pour que la ligne tienne
     avec le nom de l'association. Le mot « Menu » reste lu par les lecteurs d'écran. */
  .bouton-menu { width: 2.5rem; padding: 0; justify-content: center; flex-shrink: 0; }
  .bouton-menu [data-i18n="menu.bouton"] {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

/* ——— 24. PAGE 404 ——— */
.page-404 {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 6rem) var(--marge);
  text-align: center;
}
.page-404 .arche,
.page-404 .arche img { animation: none; }
.page-404 .arche { width: 12rem !important; padding: 1.25rem; }
.page-404 h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin: 0.5rem 0 0; }
.page-404 p { margin: 0 auto; color: var(--texte-doux); }
.page-404 [lang="ar"] { font-family: var(--police-texte); }

/* ——— 25. ANIMATIONS RÉDUITES ——— */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
