/* ============================================================
   Page d'accueil v11 — styles propres à l'accueil
   (charge après style.css et gray.css ; tout est préfixé .home)
   ============================================================ */
.home{
  --stone:#e9e7e2; --stone-2:#dfdcd5; --paper:#f5f4f0;
  --graphite:#2a2c31; --ink:#1e2024; --muted:#55585f;
  --gold:#c9a227; --gold-ink:#7a600f;
  --rule:rgba(38,41,46,.16);
  --hdr:72px;
  background:var(--stone);
  color:var(--ink);
}
/* « clip » au lieu de « hidden » : sinon le panneau du parcours ne reste pas fixé */
html:has(body.home), body.home{ overflow-x:clip !important; }
.home main{ display:block; }
.home section{ padding:0; }
.home h2{
  font-family:var(--f-display); font-weight:600; color:var(--ink);
  font-size:clamp(1.9rem, 3.6vw, 3rem); line-height:1.08; letter-spacing:-.01em;
  max-width:22ch; margin:0;
}
.home .skip-link{
  position:absolute; left:16px; top:-60px; z-index:2000;
  background:var(--gold); color:var(--ink); padding:10px 16px; font-weight:600;
}
.home .skip-link:focus{ top:12px; }

/* ---------- Boutons ---------- */
.home .h-btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:50px; padding:0 26px; border:1px solid transparent;
  font-family:var(--f-body); font-weight:600; font-size:.95rem; letter-spacing:.01em;
  transition:background-color .25s ease, color .25s ease, border-color .25s ease;
}
.home .h-btn-solid{ background:var(--gold); color:var(--ink); border-color:var(--gold); }
.home .h-btn-solid:hover{ background:#e0bb3f; border-color:#e0bb3f; }
.home .h-btn-line{ border-color:var(--graphite); color:var(--ink); }
.home .h-btn-line:hover{ background:var(--graphite); color:var(--paper); }
.home .h-btn:focus-visible, .home .h-link:focus-visible{ outline:3px solid var(--gold); outline-offset:3px; }
.home .h-link{
  display:inline-block; margin-top:2.2rem; font-weight:600; color:var(--ink);
  border-bottom:2px solid var(--gold); padding-bottom:3px;
}
.home .h-link:hover{ color:var(--gold-ink); }

/* ============ HERO ============ */
/* Ordinateur : texte à gauche sur fond graphite, photo à droite.
   Téléphone : photo en haut (visage bien visible), texte en dessous. */
.home .h-hero{
  position:relative; isolation:isolate; overflow:hidden;
  display:grid; grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
  min-height:min(100svh, 860px);
  background:var(--ink); color:#f6f4ee;
  --hp:0;
}
.home{ --hdr-h:63px; }
@media (max-width: 480px){ .home{ --hdr-h:84px; } }
.home .h-hero-media{ position:relative; margin:var(--hdr-h) 0 0; grid-column:2; grid-row:1; overflow:hidden; min-height:0; }
.home .h-hero-media img{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:62% 30%;
  transform:scale(calc(1 + var(--hp) * .05)); transform-origin:62% 30%;
}
.home .h-hero-media::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(90deg, rgba(30,32,36,.55) 0%, rgba(30,32,36,0) 22%);
}
[dir=rtl] .home .h-hero-media::after{ background:linear-gradient(270deg, rgba(30,32,36,.55) 0%, rgba(30,32,36,0) 22%); }
.home .h-hero-inner{
  grid-column:1; grid-row:1; align-self:end; min-width:0;
  width:100%; max-width:calc(var(--maxw) * .5);
  justify-self:end;
  padding:calc(var(--hdr) + 56px) clamp(28px, 4vw, 64px) clamp(56px, 9vh, 104px) var(--pad);
}
[dir=rtl] .home .h-hero-inner{ padding-inline:var(--pad) clamp(28px, 4vw, 64px); }
.home .h-kicker{ font-weight:500; font-size:1rem; color:#e3c45c; margin-bottom:1.1rem; }
.home .h-name{
  font-family:var(--f-display); font-weight:600; color:#f6f4ee;
  font-size:clamp(3.2rem, 7.2vw, 7.4rem); line-height:.9; letter-spacing:-.025em;
  margin:0;
}
.home .h-name em{ font-style:normal; color:inherit; font-weight:400; }
.home .h-role{
  margin-top:1.4rem; max-width:32ch;
  font-size:clamp(1.1rem, 1.6vw, 1.35rem); line-height:1.45; color:#ecebe6;
}
.home .h-chips{ display:flex; flex-wrap:wrap; gap:10px; margin-top:1.6rem; }
.home .h-chips li{
  font-size:.88rem; font-weight:500; color:#f6f4ee;
  padding:8px 14px; border:1px solid rgba(246,244,238,.38);
}
.home .h-cta{ display:flex; flex-wrap:wrap; gap:12px; margin-top:2rem; }
.home .h-hero .h-btn-line{ border-color:rgba(246,244,238,.7); color:#f6f4ee; }
.home .h-hero .h-btn-line:hover{ background:#f6f4ee; color:var(--ink); }

/* Entrée au chargement : animation CSS seule, elle se termine toujours */
@keyframes hm-rise{ from{ opacity:0; transform:translateY(28px); } to{ opacity:1; transform:none; } }
@keyframes hm-fade{ from{ opacity:0; } to{ opacity:1; } }
.has-js .home .h-hero-inner > *{ animation:hm-rise .9s cubic-bezier(.2,.7,.2,1) both; }
.has-js .home .h-kicker{ animation-delay:.15s !important; }
.has-js .home .h-name{ animation-delay:.25s !important; animation-duration:1.1s !important; }
.has-js .home .h-role{ animation-delay:.5s !important; }
.has-js .home .h-chips{ animation-delay:.62s !important; }
.has-js .home .h-cta{ animation-delay:.74s !important; }
.has-js .home .h-hero-media{ animation:hm-fade 1.2s ease both; }

/* ============ BANDEAU ============ */
.home .ticker{ position:relative; z-index:1; }

/* ============ PRÉSENTATION ============ */
.home .h-intro{ padding:clamp(80px, 11vw, 140px) 0; }
.home .h-intro-grid{ display:grid; grid-template-columns:1.25fr 1fr; gap:clamp(40px, 6vw, 96px); align-items:end; }
.home .h-intro-text p{ margin-top:1.4rem; font-size:1.12rem; line-height:1.65; color:var(--muted); max-width:52ch; }
.home .h-stats{ display:grid; grid-template-columns:1fr 1fr; margin:0; border-top:1px solid var(--rule); }
.home .h-stats > div{ display:flex; flex-direction:column-reverse; justify-content:flex-end; padding:22px 0 20px; border-bottom:1px solid var(--rule); }
.home .h-stats > div:nth-child(odd){ padding-inline-end:20px; border-inline-end:1px solid var(--rule); }
.home .h-stats > div:nth-child(even){ padding-inline-start:24px; }
.home .h-stats dd{
  margin:0; font-family:var(--f-display); font-weight:600; line-height:1;
  font-size:clamp(2.8rem, 4.6vw, 4rem); color:var(--ink); font-variant-numeric:tabular-nums;
}
.home .h-stats dt{ margin-top:.5rem; font-size:.92rem; color:var(--muted); }

/* ============ PARCOURS ============ */
.home .story{ background:var(--paper); padding:clamp(80px, 10vw, 130px) 0 clamp(60px, 8vw, 100px); --sp:0; }
.home .story-head{ margin-bottom:clamp(40px, 6vw, 72px); }
.home .story-head p{ margin-top:1rem; color:var(--muted); font-size:1.08rem; }
.home .story-stage{ display:none; }
.home .story-steps{ list-style:none; margin:0; padding:0; display:grid; gap:64px; }

.home .step-media{ margin:0 0 22px; aspect-ratio:4/3; overflow:hidden; background:var(--stone-2); }
.home .step-media img{ width:100%; height:100%; object-fit:cover; }
.home .step-badge{ background:var(--graphite); display:grid; place-items:center; }
.home .step-badge img{ width:34%; height:auto; object-fit:contain; }
.home .step-season{
  font-family:var(--f-display); font-weight:600; font-size:1.15rem;
  color:var(--gold-ink); font-variant-numeric:tabular-nums;
}
.home .step-club{ margin-top:.3rem; font-weight:600; font-size:.95rem; color:var(--muted); }
.home .step h3{
  margin-top:.7rem; font-family:var(--f-display); font-weight:600; color:var(--ink);
  font-size:clamp(1.7rem, 3vw, 2.5rem); line-height:1.1; letter-spacing:-.01em;
}
.home .step-text{ margin-top:1rem; font-size:1.06rem; line-height:1.7; color:#3c3f45; max-width:52ch; }
.home .step-cta{ margin-top:1.8rem; align-self:flex-start; }

/* Version ordinateur : panneau fixe + étapes qui défilent */
.story-on .home .story-grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(48px, 6vw, 110px); }
.story-on .home .story-stage{
  display:flex; flex-direction:column; justify-content:center; gap:18px;
  position:sticky; top:var(--hdr); height:calc(100svh - var(--hdr)); align-self:start;
}
.story-on .home .stage-frame{
  position:relative; width:100%; max-height:calc(100svh - var(--hdr) - 120px); aspect-ratio:4/5;
  overflow:hidden; background:var(--stone-2);
}
.story-on .home .stage-item{
  position:absolute; inset:0; margin:0; opacity:0;
  transition:opacity .8s ease;
}
.story-on .home .stage-item.is-on{ opacity:1; }
.story-on .home .stage-item img{
  width:100%; height:100%; object-fit:cover;
  transform:scale(calc(1.1 - var(--sp) * .08)); transition:transform .2s linear;
}
.story-on .home .stage-badge{ background:var(--graphite); display:grid; place-items:center; }
.story-on .home .stage-badge img{ width:38%; height:auto; object-fit:contain; transform:none; }
.story-on .home .stage-season{
  position:relative; display:flex; align-items:baseline; gap:.35em;
  font-family:var(--f-display); font-weight:700; line-height:1; letter-spacing:-.02em;
  font-size:clamp(2.4rem, 4.2vw, 4.2rem); color:var(--ink); font-variant-numeric:tabular-nums;
}
.story-on .home .stage-to{ color:var(--gold-ink); }
.story-on .home .stage-to::before{ content:'– '; color:var(--rule); }
.story-on .home .stage-season.is-swap span{ animation:hm-rise .55s cubic-bezier(.2,.7,.2,1) both; }
.story-on .home .stage-season.is-swap .stage-to{ animation-delay:.07s; }
.story-on .home .stage-rail{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(6,1fr); gap:6px; }
.story-on .home .stage-rail li{ height:3px; background:var(--rule); transition:background-color .4s ease; }
.story-on .home .stage-rail li.is-done{ background:var(--graphite); }
.story-on .home .stage-rail li.is-on{ background:var(--gold); }
.story-on .home .story-steps{ gap:0; }
.story-on .home .step{
  min-height:78svh; display:flex; flex-direction:column; justify-content:center;
  opacity:.32; transition:opacity .5s ease;
}
.story-on .home .step.is-active{ opacity:1; }
.story-on .home .step:last-child{ min-height:70svh; }
.story-on .home .step-media{ display:none; }
.story-on .home .step-season{ display:none; }

/* ============ FORMATION ============ */
.home .h-edu{ padding:clamp(80px, 10vw, 130px) 0; }
.home .edu-line{
  list-style:none; margin:clamp(40px, 5vw, 64px) 0 0; padding:0;
  display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:24px;
}
.home .edu-line li{ position:relative; padding-top:26px; border-top:2px solid var(--rule); font-size:.95rem; line-height:1.45; color:var(--muted); }
.home .edu-line li::before{
  content:''; position:absolute; top:-7px; inset-inline-start:0;
  width:12px; height:12px; border-radius:50%; background:var(--stone); border:2px solid var(--graphite);
}
.home .edu-y{ display:block; margin-bottom:.4rem; font-family:var(--f-display); font-weight:600; font-size:1.7rem; color:var(--ink); font-variant-numeric:tabular-nums; }
.home .edu-line li.is-top{ border-top-color:var(--gold); color:var(--ink); }
.home .edu-line li.is-top::before{ background:var(--gold); border-color:var(--gold); }
.home .edu-line li.is-top .edu-y{ color:var(--gold-ink); }

/* ============ CLUBS ============ */
.home .h-clubs{ background:var(--stone-2); padding:clamp(80px, 10vw, 120px) 0; }
.home .club-row{
  display:grid; grid-template-columns:repeat(6, minmax(0,1fr));
  margin-top:clamp(36px, 5vw, 56px); border-top:1px solid var(--rule);
}
.home .club-row li{
  display:flex; flex-direction:column; align-items:center; gap:14px; text-align:center;
  padding:28px 10px; font-size:.9rem; font-weight:500; line-height:1.35; color:var(--ink);
  border-bottom:1px solid var(--rule);
}
.home .club-row li + li{ border-inline-start:1px solid var(--rule); }
.home .club-row img{ width:72px; height:72px; object-fit:contain; }

/* ============ GALERIE ============ */
.home .h-gallery{ padding:clamp(80px, 10vw, 130px) 0; }
.home .h-mosaic{
  display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); grid-auto-rows:clamp(150px, 17vw, 240px);
  gap:10px; margin-top:clamp(36px, 5vw, 56px);
}
.home .h-mosaic figure{ position:relative; margin:0; overflow:hidden; background:var(--stone-2); }
.home .h-mosaic img{ width:100%; height:100%; object-fit:cover; transition:transform .6s ease; }
.home .h-mosaic figure:hover img{ transform:scale(1.03); }
.home .h-mosaic figcaption{
  position:absolute; inset:auto 0 0 0; padding:28px 14px 12px;
  font-size:.85rem; color:#f6f4ee; line-height:1.35;
  background:linear-gradient(0deg, rgba(22,24,28,.78), rgba(22,24,28,0));
}
.home .m-a{ grid-column:span 3; grid-row:span 2; }
.home .m-b{ grid-column:span 1; grid-row:span 2; }
.home .m-c, .home .m-d{ grid-column:span 2; }
.home .m-a img{ object-position:50% 30%; }

/* ============ DISPONIBILITÉ ============ */
.home .h-final{ background:var(--graphite); color:#f6f4ee; padding:clamp(80px, 10vw, 120px) 0; }
.home .h-final-grid{ display:grid; grid-template-columns:1.2fr 1fr; gap:48px; align-items:end; }
.home .h-final h2{ color:#f6f4ee; }
.home .h-final-grid > div > p{ margin-top:1.1rem; color:#cfcdc6; font-size:1.08rem; max-width:44ch; }
.home .h-final-actions{ display:flex; flex-wrap:wrap; gap:12px; align-content:flex-end; }
.home .h-final .h-btn-line{ border-color:rgba(246,244,238,.6); color:#f6f4ee; }
.home .h-final .h-btn-line:hover{ background:#f6f4ee; color:var(--ink); }
.home .h-direct{ flex-basis:100%; display:flex; flex-wrap:wrap; gap:8px 24px; margin-top:1rem; font-size:.98rem; }
.home .h-direct a{ color:#e3c45c; border-bottom:1px solid rgba(227,196,92,.35); }
.home .h-direct a:hover{ border-bottom-color:#e3c45c; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px){
  .home .edu-line{ grid-template-columns:repeat(3, minmax(0,1fr)); row-gap:40px; }
  .home .club-row{ grid-template-columns:repeat(3, minmax(0,1fr)); }
  .home .club-row li:nth-child(4){ border-inline-start:0; }
}
@media (max-width: 900px){
  .home .h-hero{ grid-template-columns:minmax(0,1fr); min-height:0; }
  .home .h-hero-media{ grid-column:1; grid-row:1; min-height:0; aspect-ratio:4/5; max-height:66svh; margin-top:var(--hdr-h); }
  .home .h-hero-media::after{ background:linear-gradient(0deg, rgba(30,32,36,.5) 0%, rgba(30,32,36,0) 25%) !important; }
  .home .h-hero-inner{ grid-column:1; grid-row:2; max-width:none; justify-self:stretch; padding:32px var(--pad) 56px !important; }
  .home .h-intro-grid, .home .h-final-grid{ grid-template-columns:1fr; }
  .home .h-mosaic{ grid-template-columns:repeat(2, minmax(0,1fr)); grid-auto-rows:clamp(150px, 42vw, 260px); }
  .home .m-a{ grid-column:span 2; grid-row:span 2; }
  .home .m-b{ grid-column:span 1; grid-row:span 2; }
  .home .m-c, .home .m-d{ grid-column:span 1; grid-row:span 1; }
}
@media (max-width: 700px){
  .home{ --hdr:84px; }
  .home .h-hero-media img{ object-position:60% 22%; }
  .home .h-cta .h-btn{ flex:1 1 100%; }
  .home .edu-line{ grid-template-columns:1fr; row-gap:0; gap:0; border-inline-start:2px solid var(--rule); margin-inline-start:6px; }
  .home .edu-line li{ border-top:0; padding:0 0 28px; padding-inline-start:26px; }
  .home .edu-line li::before{ top:6px; inset-inline-start:-8px; }
  .home .edu-line li.is-top{ padding-bottom:0; }
  .home .club-row{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .home .club-row li:nth-child(odd){ border-inline-start:0; }
  .home .club-row li:nth-child(4){ border-inline-start:1px solid var(--rule); }
  .home .h-final-actions .h-btn{ flex:1 1 100%; }
}

/* ============ MOUVEMENT RÉDUIT ============ */
@media (prefers-reduced-motion: reduce){
  .has-js .home .h-hero-inner > *, .has-js .home .h-hero-media{ animation:none !important; }
  .home .h-hero-media img{ transform:none !important; }
  .story-on .home .stage-item img{ transform:none !important; }
  .story-on .home .step{ opacity:1; }
}

/* Arabe : nom un peu plus compact (les lettres sont plus larges) */
[dir=rtl] .home .h-name{ font-size:clamp(3rem, 7.5vw, 7rem); line-height:1.05; }

/* Panneau à deux écussons (Berkane, Kawkab) */
.home .step-duo, .story-on .home .stage-duo{ display:flex !important; align-items:center; justify-content:center; gap:10%; }
.home .step-duo img{ width:26% !important; }
.story-on .home .stage-duo img{ width:28% !important; }
.story-on .home .step-media.step-duo{ display:none !important; }
