/* Fondation IRFAN pour le Patrimoine — feuille de style unique
   Identité : ivoire, vert profond (Khizana), rouge de Chine, point d'or du monogramme coufique,
   frise géométrique (coufique carré / tissage amazigh).
   Organisation : 1 réglages · 2 base · 3 typographie · 4 boutons et liens · 5 en-tête · 6 héros
   · 7 sections et mises en page · 8 composants · 9 bandeau final et pied de page · 10 arabe · 11 animation */

/* ============================================================ 1. Réglages */
:root {
  --ink: #141414;
  --ink-2: #221d18;
  --paper: #FBF8F1;
  --paper-2: #F4EFE4;
  --sand: #F2E8D4;
  --rule: #E4DCCB;
  --sepia: #6E655A;
  --gold: #E6B437;
  --gold-deep: #A8771F;
  --vert: #1E3B2E;
  --vert-2: #2C5240;
  --rouge: #B5251D;          /* rouge de Chine (laque) */
  --bordeaux: #7B2433;       /* noms anglais sous les titres arabes */
  --terracotta: #A84E2A;     /* Art Factory Marrakech */
  --footer: #15291F;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Syne", "Helvetica Neue", Arial, sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", serif;
  --kufi: "Reem Kufi", "Amiri", sans-serif;
  --tifinagh: "Noto Sans Tifinagh", sans-serif;
  --khizana: "Source Serif 4", Georgia, serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --header-h: 76px;

  --frise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cg fill='none' stroke='%23E6B437' stroke-width='2'%3E%3Cpath d='M0 15 L8 7 L16 15 M16 1 L24 9 L32 1 M32 15 L40 7 L48 15'/%3E%3C/g%3E%3Crect x='22' y='12' width='4' height='4' fill='%23E6B437'/%3E%3Crect x='6' y='0' width='4' height='4' fill='%23E6B437'/%3E%3Crect x='38' y='0' width='4' height='4' fill='%23E6B437'/%3E%3C/svg%3E");
  --losange-clair: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%231E3B2E' stroke-opacity='.06' stroke-width='2'%3E%3Cpath d='M32 4 L60 32 L32 60 L4 32 Z M32 18 L46 32 L32 46 L18 32 Z'/%3E%3C/g%3E%3Crect x='29' y='29' width='6' height='6' fill='%23E6B437' fill-opacity='.35'/%3E%3C/svg%3E");
  --losange: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23F2E8D4' stroke-opacity='.07' stroke-width='2'%3E%3Cpath d='M32 4 L60 32 L32 60 L4 32 Z M32 18 L46 32 L32 46 L18 32 Z'/%3E%3C/g%3E%3Crect x='29' y='29' width='6' height='6' fill='%23E6B437' fill-opacity='.18'/%3E%3C/svg%3E");
}

/* ============================================================ 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: clamp(18px, 1.15vw + 12px, 20px); line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.dark :focus-visible, .cta :focus-visible, .site-footer :focus-visible, .contact-card :focus-visible { outline-color: var(--sand); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -80px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

[lang="ar"], .ar { font-family: var(--arabic); }
/* Sur les pages en français et en anglais, les mots arabes isolés sont en coufique (police légère, déjà chargée) */
html:not([dir="rtl"]) span.ar, html:not([dir="rtl"]) span[lang="ar"], html:not([dir="rtl"]) bdi[lang="ar"] { font-family: var(--kufi); }
[lang="zgh"], .tfng { font-family: var(--tifinagh); letter-spacing: .02em; }

/* ============================================================ 3. Typographie */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(40px, 5.4vw, 76px); }
h2 { font-size: clamp(32px, 3.6vw, 50px); }
h3, .h3 { font-size: clamp(24px, 2vw, 30px); }
h3.sub { font-size: clamp(22px, 1.8vw, 26px); margin-top: 1.6em; }
p { margin: 0 0 1.1em; }
em { font-style: italic; }
.lead { font-size: 1.22em; color: var(--ink-2); }
.muted { color: var(--sepia); }
.khz { font-family: var(--khizana); font-weight: 600; color: var(--vert); letter-spacing: -.01em; }
.mot-irfan { display: inline-block; height: 1.05em; width: auto; vertical-align: -.28em; }
.latin-name { display: block; margin-top: 10px; font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; line-height: 1.5; color: var(--bordeaux); }
h1 .latin-name { font-size: 15px; margin-top: 14px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px;
  font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--sepia);
}
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; }

.statement { font-size: clamp(26px, 2.8vw, 40px); line-height: 1.35; font-weight: 500; max-width: 980px; }
.statement em { color: var(--rouge); }
.statement-centre { margin: 56px auto 0; text-align: center; }
.statement-sm { font-size: clamp(22px, 2vw, 28px); }

/* « Heart for Khizana » : cœur rouge en relief qui accompagne les appels au don */
.coeur { display: inline-block; width: auto; height: 1.05em; margin-inline-start: .45em; vertical-align: -.16em; transition: transform .25s; }
a:hover .coeur { transform: scale(1.18); }
.nav .coeur { height: 1.25em; margin-inline-start: .35em; }
h1 .coeur { height: .5em; vertical-align: .08em; }

/* ============================================================ 4. Boutons et liens */
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px;
  font-family: var(--sans); font-weight: 600; font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--vert); background: var(--vert); color: var(--paper); text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: transparent; color: var(--vert); }
.btn.ghost { background: transparent; color: var(--vert); }
.btn.ghost:hover { background: var(--vert); color: var(--paper); }
.btn.coeur-btn { background: #fff; color: var(--rouge); border-color: var(--rouge); }
.btn.coeur-btn:hover { background: var(--rouge); color: #fff; }
.dark .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.dark .btn:hover { background: transparent; color: var(--gold); }
.dark .btn.ghost { background: transparent; color: var(--sand); border-color: rgba(242,232,212,.45); }
.dark .btn.ghost:hover { border-color: var(--gold); color: var(--gold); }

.link-arrow { font-family: var(--sans); font-weight: 600; font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 4px; }
.links { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 8px; }

/* ============================================================ 5. En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,248,241,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { direction: ltr; max-width: 1440px; margin-inline: auto; padding-inline: clamp(16px, 2vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand { flex: none; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: 44px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name strong { font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.brand-name span { font-size: 15px; color: var(--sepia); }
.brand-name .scripts { font-size: 14px; display: flex; gap: 10px; }
.brand-name .scripts .ar { font-family: var(--kufi); font-size: 16px; }
.nav { display: flex; align-items: center; gap: 15px; }
.nav a { font-family: var(--sans); font-weight: 500; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; text-decoration: none; color: var(--ink); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--ink); }
.langs { display: flex; gap: 4px; align-items: center; font-family: var(--sans); font-size: 11.5px; letter-spacing: .12em; }
.langs a { padding: 5px 7px; text-decoration: none; color: var(--sepia); border: 1px solid transparent; }
.langs a:hover { color: var(--ink); border-color: var(--rule); }
.langs [aria-current="true"] { color: var(--ink); border-color: var(--gold); }
.langs .ar { font-family: var(--kufi); font-size: 15px; letter-spacing: 0; }
.langs .tfng { font-size: 13.5px; letter-spacing: 0; font-weight: 700; font-synthesis: weight; color: var(--ink); }   /* la police tifinaghe n'a qu'une graisse : le gras est simulé */
.menu-btn { display: none; background: none; border: 1px solid var(--rule); width: 44px; height: 44px; cursor: pointer; padding: 0; }
.menu-btn span { display: block; width: 20px; height: 1.5px; background: var(--ink); margin: 5px auto; transition: transform .25s, opacity .25s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1400px) {
  .menu-btn { display: block; }
  .header-right { position: fixed; inset: var(--header-h) 0 auto 0; display: none; flex-direction: column; align-items: flex-start; gap: 22px;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 24px var(--gutter) 32px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .menu-open .header-right { display: flex; }
  .nav { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nav a { font-size: 14px; letter-spacing: .14em; padding: 8px 0; }
}
@media (min-width: 1401px) {
  .site-header .wrap { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); gap: 20px; }
  .header-right { display: contents; }
  .brand { justify-self: start; }
  .nav { justify-self: center; }
  .langs { justify-self: end; }
}
@media (min-width: 1401px) and (max-width: 1600px) { .brand-name .scripts { display: none; } }
@media (max-width: 520px) { .brand-name span, .brand-name .scripts { display: none; } }

/* ============================================================ 6. Héros */
.frise { height: 16px; background: var(--frise) repeat-x center / 48px 16px; opacity: .9; }
.frise.thin { height: 10px; background-size: 30px 10px; }

/* Accueil : logo d'un côté, texte de l'autre, l'ensemble centré dans la page */
.hero { position: relative; overflow: hidden; background: var(--paper-2) var(--losange-clair) repeat; color: var(--ink); }
.hero .wrap { display: grid; grid-template-columns: auto minmax(0, 680px); justify-content: center; align-items: center; gap: clamp(40px, 6vw, 96px);
  padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); }
.hero h1 { color: var(--vert); }
.hero h1 em { color: var(--rouge); }
.hero .lead { max-width: 680px; }
.hero-mark { order: -1; width: clamp(240px, 26vw, 360px); }
.hero-mark img { width: 100%; }
.trio-block { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 26px; }
.trio { direction: ltr; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; color: var(--sepia); }
.trio .ar { font-family: var(--kufi); font-size: 22px; }
.trio .tfng { font-size: 19px; }
.trio i { width: 6px; height: 6px; border-radius: 50%; background: var(--rouge); display: inline-block; align-self: center; }
.trio-latin { font-family: var(--sans); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--rouge); }
.attente { max-width: 640px; margin-top: 8px; }
.attente p { margin-bottom: .8em; color: var(--ink-2); }
.attente p.ar { font-size: 1.12em; line-height: 1.9; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero .btns, .hero .trio { justify-content: center; }
  .trio-block { align-items: center; }
  .hero-mark { width: min(260px, 66vw); }
  .attente { margin-inline: auto; }
}

/* Pages intérieures */
.page-hero { background: var(--paper-2) var(--losange-clair) repeat; color: var(--ink); border-bottom: 1px solid var(--rule); }
.page-hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(48px, 7vw, 88px); }
.page-hero h1 { color: var(--vert); font-size: clamp(38px, 4.6vw, 64px); }
.page-hero.terre h1 { color: var(--rouge); }
.page-hero .lead { max-width: 760px; margin: 0; }
.page-hero .side { font-size: 64px; line-height: 1; color: rgba(30,59,46,.18); text-align: end; }
.page-hero .side.ar { font-family: var(--kufi); }
.page-hero .side.tfng { font-size: 46px; }
.page-hero.terre .side { color: rgba(181,37,29,.2); }
.page-hero .side img { width: 200px; mix-blend-mode: multiply; }
.page-hero .side img[src*="art-factory"] { width: 230px; margin-bottom: 12px; mix-blend-mode: normal; }
.crumbs { margin-bottom: 26px; font-family: var(--sans); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sepia); }
.crumbs a { color: var(--vert); text-decoration: none; }
.crumbs a:hover { color: var(--rouge); }
@media (max-width: 760px) { .page-hero .wrap { grid-template-columns: 1fr; } .page-hero .side { display: none; } }

/* ============================================================ 7. Sections et mises en page */
.section { padding: var(--section) 0; }
.section.alt { background: var(--paper-2); }
.section + .section:not(.alt):not(.dark) { border-top: 1px solid var(--rule); }
.section.dark { background: var(--vert); color: var(--sand); }
.section.dark h2, .section.dark h3 { color: var(--paper); }
.section.dark .eyebrow, .section.dark .muted { color: rgba(242,232,212,.7); }
.section.dark .lead { color: var(--sand); }
.dark .statement em { color: var(--gold); }

/* Deux colonnes : le titre accompagne le texte quand celui-ci est long */
.split { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; }
.split.media { align-items: center; }
@media (min-width: 861px) { .split:not(.media) > div:first-child:not(:only-child) { position: sticky; top: calc(var(--header-h) + 34px); } }
@media (max-width: 860px) { .split, .split.even { grid-template-columns: 1fr; } }

/* Blocs étroits : centrés dans la page */
.narrow { max-width: 780px; margin-inline: auto; }
.centre-block { text-align: center; }
.centre-block .eyebrow, .centre-block .btns { justify-content: center; }
.centre-block .statement { margin-inline: auto; }
.prose h2, .prose .h3 { margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }

/* ============================================================ 8. Composants */
/* Cartes : liens alignés en bas */
.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; align-items: flex-start; background: var(--paper); padding: clamp(26px, 3vw, 40px); }
.alt .card { background: var(--paper-2); }
.card h3 { font-size: clamp(23px, 1.8vw, 28px); }
.card p:last-child { margin-bottom: 0; }
.card > .link-arrow { margin-top: auto; }
.card > p + .link-arrow { margin-top: auto; padding-top: 0; }
.card > p:has(+ .link-arrow) { margin-bottom: 22px; }
.card .num { display: block; margin-bottom: 16px; font-family: var(--sans); font-size: 12px; letter-spacing: .2em; color: var(--rouge); }
/* Logos des projets en tête de carte (page Patrimoine) */
.card-logo { align-self: stretch; height: 110px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.card-logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.card-logo .logo-khz { height: 60%; }
.card-logo .logo-fest { mix-blend-mode: multiply; }
.palier .montant { display: block; margin-bottom: 14px; font-size: clamp(34px, 3vw, 44px); line-height: 1; color: var(--rouge); }

/* Listes à point d'or */
.dots { list-style: none; padding: 0; margin: 0 0 1.2em; }
.dots li { position: relative; padding: 12px 0; padding-inline-start: 26px; border-bottom: 1px solid var(--rule); }
.dots li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 1.15em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.dark .dots li { border-color: rgba(242,232,212,.15); }

/* Roue des cultures (huit rayons) et grille de repli */
.heritage-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.heritage-text > :last-child { margin-bottom: 0; }
@media (max-width: 900px) { .heritage-split { grid-template-columns: 1fr; } }
.wheel { position: relative; width: min(540px, 100%); aspect-ratio: 1; margin: 0 auto; }
.wheel-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wheel-svg .rim { fill: none; stroke: var(--gold); stroke-width: 2.5; }
.wheel-svg .rim.thin { stroke-width: 1; stroke-opacity: .5; }
.wheel-svg .hub { fill: rgba(242,232,212,.06); stroke: var(--gold); stroke-width: 2; }
.wheel-svg .spokes line { stroke: var(--gold); stroke-opacity: .55; stroke-width: 1.5; }
.wheel-svg .knobs circle { fill: var(--gold); }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 11.5%; transform: translate(-50%, -50%); }
.wheel-hub img { width: 100%; }
.wheel-item { position: absolute; width: 21%; text-align: center; transform: translate(-50%, -50%); transition: transform .3s; }
.wheel-item:hover { transform: translate(-50%, -50%) scale(1.08); }
.wheel-item span { display: block; font-family: var(--kufi); font-size: clamp(17px, 1.9vw, 23px); line-height: 1.3; color: var(--gold); }
.wheel-item strong { display: block; margin-top: 6px; font-family: var(--sans); font-weight: 600; font-size: clamp(9px, .8vw, 10.5px); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); }
.wheel-item strong.tfng, .heritages strong.tfng { font-family: var(--tifinagh); font-size: 14px; letter-spacing: .04em; text-transform: none; }
.heritages { display: none; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-top: 40px; background: rgba(242,232,212,.14); border: 1px solid rgba(242,232,212,.14); }
.heritages div { background: var(--vert); padding: 26px 20px; text-align: center; }
.heritages span { display: block; font-family: var(--kufi); font-size: 22px; line-height: 1.3; color: var(--gold); }
.heritages strong { display: block; margin-top: 10px; font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--paper); }
@media (max-width: 600px) { .wheel { display: none; } .heritages { display: grid; } }

/* Projets : un même fond pour les trois visuels, logos centrés, date dessous */
.project { display: grid; grid-template-columns: minmax(0, 320px) 1fr; align-items: center; gap: clamp(28px, 4vw, 60px); padding: clamp(22px, 3vw, 40px); border: 1px solid var(--rule); background: var(--paper); }
.project + .project { margin-top: 32px; }
/* Logo du projet dans un cadre carré, à hauteur du texte */
.project .visual { position: relative; overflow: hidden; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 26px 26px 46px; background: #EDE5D3; }
.project .visual img { width: 72%; max-height: 70%; object-fit: contain; }
.project .visual.festival-logo img { width: 66%; mix-blend-mode: multiply; }
.project .visual.khizana-logos img { width: 78%; max-height: 32%; }
.project .visual .date { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--rouge); }
.project.artfactory .visual .date { color: var(--terracotta); }
.project.khizana .visual .date { color: var(--rouge); font-weight: 600; }
.project .body { display: flex; flex-direction: column; justify-content: center; padding: 0; }
.project .body h3 { font-size: clamp(30px, 3vw, 42px); }
.project .tag { margin-bottom: 18px; font-family: var(--sans); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; }
.project.khizana .tag { color: var(--rouge); }
.project.festival .tag { color: var(--rouge); }
.project.artfactory .tag { color: var(--terracotta); }
.project .status { font-style: italic; color: var(--sepia); }
@media (max-width: 860px) { .project { grid-template-columns: 1fr; } .project .visual { width: min(300px, 100%); margin: 0 auto; } }

/* Chiffres */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 32px 0; background: var(--rule); border: 1px solid var(--rule); }
.figures div { background: var(--paper); padding: 28px; }
.figures strong { display: block; font-size: clamp(38px, 4vw, 56px); line-height: 1; font-weight: 500; color: var(--rouge); }
.figures span { font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--sepia); }
@media (max-width: 860px) { .figures { grid-template-columns: repeat(2, 1fr); } }
.programme { margin-top: 56px; }
.programme-title { font-size: clamp(26px, 2.4vw, 34px); margin-bottom: 26px; }

/* Annonce (communiqué) */
.announce { position: relative; padding: clamp(24px, 3vw, 36px); background: #fff; border: 1px solid var(--rouge); }
.announce .eyebrow { color: var(--rouge); }
.announce .eyebrow::before { background: var(--rouge); }
.announce .h3 { margin-bottom: .3em; }

/* Personnes */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.people div { background: var(--paper); padding: 32px; }
.people strong { display: block; font-size: 26px; font-weight: 500; }
.people span { font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--sepia); }

/* Actualités : lignes de lecture confortables */
.news { display: grid; gap: 32px; }
.article { display: grid; grid-template-columns: 200px minmax(0, 720px); gap: 32px; padding-top: 32px; border-top: 1px solid var(--rule); }
.article time, .article .cat { display: block; font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--sepia); }
.article .cat { margin-top: 8px; color: var(--gold-deep); }
@media (max-width: 720px) { .article { grid-template-columns: 1fr; gap: 10px; } }

/* Lettre du fondateur */
.lettre { max-width: 760px; margin: 0 auto; }
.split .lettre { max-width: none; margin: 0; }
.lettre p { font-size: 1.08em; }
.lettre .court { margin: 1.6em 0; padding-inline-start: 24px; border-inline-start: 2px solid var(--gold); }
.lettre .court p { margin: .2em 0; font-style: italic; }
.lettre .signature { margin-top: 48px; }
.lettre .signature strong { display: block; font-size: 1.5em; font-weight: 500; font-style: italic; color: var(--vert); }
.lettre .signature span { font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--sepia); }

/* Formulaire de contact */
.form { display: grid; gap: 22px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; margin-bottom: 8px; font-family: var(--sans); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--sepia); }
.form label.consent { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-family: var(--serif); font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.form .consent input { width: auto; margin-top: 6px; }
.form input, .form select, .form textarea { width: 100%; padding: 12px 14px; font: inherit; font-size: 18px; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 0; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 1px var(--gold-deep); }
.form textarea { min-height: 170px; resize: vertical; }
/* Liste déroulante : flèche dessinée, plus foncée et décollée du bord */
.form select { -webkit-appearance: none; appearance: none; padding-right: 56px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23141414' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 24px center; }
[dir="rtl"] .form select { padding-right: 14px; padding-left: 56px; background-position: left 24px center; }
/* Bouton d'envoi du formulaire : pleine largeur, rouge, bien visible */
.form button[type="submit"] { width: 100%; justify-content: center; padding: 20px 26px; font-size: 14px; background: var(--rouge); border-color: var(--rouge); color: #fff; }
.form button[type="submit"]:hover { background: #8f1c16; border-color: #8f1c16; color: #fff; }
[dir="rtl"] .form button[type="submit"] { font-size: 20px; }
.form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
.form-note { font-size: 15px; color: var(--sepia); }
.form-done { margin-top: 28px; padding: 26px; background: #fff; border: 1px solid var(--vert); }
.form-done h3 { color: var(--vert); margin-bottom: .3em; }
.contact-card { padding: clamp(28px, 4vw, 44px); background: var(--vert); color: var(--sand); }
.contact-card .h3 { color: var(--paper); }
.contact-card a { color: var(--gold); text-decoration: none; }
.contact-card dl { margin: 0; }
.contact-card dt { margin-top: 18px; font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(242,232,212,.7); }
.contact-card dd { margin: 4px 0 0; }

/* Coordonnées bancaires */
.rib { margin-top: 28px; padding: clamp(24px, 3vw, 36px); background: #fff; border: 1px solid var(--vert); }
.rib h3 { color: var(--vert); }
.rib dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0 0 20px; }
.rib dt { align-self: center; font-family: var(--sans); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--sepia); }
.rib dd { margin: 0; }
.rib-num { font-family: var(--khizana); font-weight: 600; font-size: clamp(20px, 2vw, 26px); letter-spacing: .06em; color: var(--ink); }
@media (max-width: 560px) { .rib dl { grid-template-columns: 1fr; } }

/* ============================================================ 9. Bandeau final et pied de page */
.croquis { height: clamp(110px, 14vw, 200px); margin-top: clamp(24px, 4vw, 56px); background: url("/assets/img/croquis-marrakech.svg") center bottom / auto 100% repeat-x; opacity: .5; }
.cta { text-align: center; background: var(--rouge) var(--losange); color: var(--paper); }
.cta .wrap { padding-top: var(--section); padding-bottom: var(--section); }
.cta h2 { max-width: 860px; margin-inline: auto; color: var(--paper); }
.cta p { max-width: 940px; margin-inline: auto; color: var(--paper); }
.cta .btns { justify-content: center; }

.site-footer { background: var(--footer); color: rgba(242,232,212,.8); font-size: 16.5px; }
.site-footer .wrap { padding-top: 72px; padding-bottom: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr) 1.15fr; gap: 36px; }
@media (max-width: 1100px) { .foot-grid { grid-template-columns: repeat(3, 1fr); } .foot-brand { grid-column: 1 / -1; max-width: 560px; } }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-title { margin-bottom: 18px; font-family: var(--sans); font-weight: 600; font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--paper); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; color: rgba(242,232,212,.85); }
.site-footer a:hover { color: var(--gold); }
.foot-brand img { width: 150px; margin-bottom: 20px; }
.foot-trio { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; color: rgba(242,232,212,.6); }
.foot-trio .ar { font-family: var(--kufi); font-size: 19px; }
.foot-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(242,232,212,.15); text-align: center; font-size: 14.5px; color: rgba(242,232,212,.78); }
.foot-bottom p { margin: 0; }

/* ============================================================ 10. Arabe (lecture de droite à gauche) */
:lang(ar), :lang(ar) * { font-style: normal !important; }          /* l'arabe ne connaît pas l'italique */
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--arabic); font-size: clamp(19px, 1.1vw + 13px, 21px); line-height: 1.9; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] .h3 { font-family: var(--kufi); font-weight: 500; line-height: 1.5; letter-spacing: 0; }
[dir="rtl"] .nav { direction: rtl; }
[dir="rtl"] .latin-name { text-align: right; }
[dir="rtl"] .mot-irfan { height: 1.3em; }
[dir="rtl"] .eyebrow { font-size: 18px; }
[dir="rtl"] .eyebrow, [dir="rtl"] .btn, [dir="rtl"] .link-arrow, [dir="rtl"] .nav a, [dir="rtl"] .crumbs, [dir="rtl"] .foot-title,
[dir="rtl"] .form label, [dir="rtl"] .card .num, [dir="rtl"] .article time, [dir="rtl"] .article .cat, [dir="rtl"] .people span,
[dir="rtl"] .figures span, [dir="rtl"] .contact-card dt, [dir="rtl"] .project .tag, [dir="rtl"] .lettre .signature span,
[dir="rtl"] .project .visual .date, [dir="rtl"] .rib dt, [dir="rtl"] .heritages strong, [dir="rtl"] .wheel-item strong {
  font-family: var(--arabic); letter-spacing: 0; text-transform: none;
}
[dir="rtl"] .btn { font-size: 18px; padding: 12px 26px; }
.btn:lang(ar), .nav a:lang(ar) { font-family: var(--arabic); letter-spacing: 0; text-transform: none; font-size: 18px; }

/* Titres de page : le H1 porte le sujet (intitulé ou nom de la Fondation),
   la formule (.h1) garde l'apparence d'un grand titre */
.h1 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; font-size: clamp(40px, 5.4vw, 76px); }
.h1 .coeur { height: .5em; vertical-align: .08em; }
.hero .h1 { color: var(--vert); }
.hero .h1 em { color: var(--rouge); }
.page-hero .h1 { color: var(--vert); font-size: clamp(38px, 4.6vw, 64px); }
.page-hero.terre .h1 { color: var(--rouge); }
.page-hero h1.eyebrow, .page-hero.terre h1.eyebrow { font-family: var(--sans); font-weight: 600; font-size: 12px; line-height: normal; letter-spacing: .22em; margin: 0 0 22px; color: var(--sepia); }
h1.trio-block, [dir="rtl"] h1.trio-block { font-family: inherit; font-size: inherit; font-weight: inherit; line-height: normal; letter-spacing: normal; margin: 0 0 26px; }
h1.trio-block > span { display: flex; }
[dir="rtl"] .h1 { font-family: var(--kufi); font-weight: 500; line-height: 1.5; letter-spacing: 0; }
[dir="rtl"] .page-hero h1.eyebrow { font-family: var(--arabic); font-size: 18px; letter-spacing: 0; text-transform: none; line-height: 1.5; }
[dir="rtl"] .link-arrow, [dir="rtl"] .nav a { font-size: 18px; }
[dir="rtl"] .crumbs { font-size: 17px; }
[dir="rtl"] .form label { font-size: 19px; color: var(--ink-2); margin-bottom: 10px; }
[dir="rtl"] .form label.consent, [dir="rtl"] .rib dt { font-size: 18px; }
[dir="rtl"] .form input, [dir="rtl"] .form select, [dir="rtl"] .form textarea { font-size: 21px; }
[dir="rtl"] .form-note, [dir="rtl"] .wheel-item strong { font-size: 17px; }
[dir="rtl"] .card .num, [dir="rtl"] .article time, [dir="rtl"] .article .cat, [dir="rtl"] .people span, [dir="rtl"] .figures span,
[dir="rtl"] .contact-card dt, [dir="rtl"] .project .tag, [dir="rtl"] .lettre .signature span, [dir="rtl"] .project .visual .date,
[dir="rtl"] .heritages strong, [dir="rtl"] .site-footer, [dir="rtl"] .foot-title { font-size: 18px; }
@media (max-width: 1400px) {
  [dir="rtl"] .header-right, [dir="rtl"] .nav { align-items: flex-end; }
  [dir="rtl"] .nav a { font-size: 19px; }
  [dir="rtl"] .nav .coeur { height: 17.5px; }   /* comme le menu mobile français : 1,25 × 14px */
}
/* En arabe, le cœur garde la taille qu'il a en français, malgré le texte arabe plus grand */
[dir="rtl"] .btn .coeur, [dir="rtl"] .link-arrow .coeur { height: 13.1px; }   /* 1,05 × 12,5px */
[dir="rtl"] .site-footer .coeur { height: 17.3px; }   /* 1,05 × 16,5px */
@media (min-width: 1401px) { [dir="rtl"] .nav .coeur { height: 14.4px; } }    /* 1,25 × 11,5px */

/* ============================================================ 11. Apparition douce (seulement si JavaScript est actif) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
