/* ===========================================================
   CyNoLux — Page d'accueil (refonte épurée)
   Chargée en DERNIER, uniquement par index.html.

   ⚠️ POURQUOI ce fichier plutôt qu'une nouvelle couche sur
   refonte.css / epure.css : l'ancien accueil empilait dix sections,
   du verre, des filigranes, un fil de chapitres, un terminal factice
   et un carrousel. Chaque passe « d'épuration » ajoutait une couche
   par-dessus la précédente sans rien retirer. Ici, les sections sont
   réécrites avec leurs propres classes (préfixe hm-) : aucune règle
   héritée des anciens blocs (bento, glass, cnx-*, sys-panel,
   chapter-mark…) ne s'applique.

   Seuls l'en-tête, le pied de page et les jetons de couleur
   (clair / sombre) restent partagés avec le reste du site.

   Règle de composition : un seul point focal par écran, une seule
   couleur d'accent (l'or ne sert qu'aux boutons et aux repères),
   des cadres à filet fin à la place du verre et des ombres.

   v2 — le point focal BOUGE : le hero reçoit un tableau de mission vivant
   (les six expertises y déposent leurs résultats), le mot du titre change,
   les expertises se choisissent (onglets) au lieu de s'empiler, les
   modules d'Ysraa s'allument, et le « comment on travaille » s'allume
   étape par étape. Le comportement est dans focus.js, les primitives
   (orbite, onglets, étapes) dans focus.css.
   =========================================================== */

body.home .fab-cmd { display: none; }

/* Squelette commun ------------------------------------------------ */
.hm-section { padding: 112px 0; }
.hm-section--soft { background: var(--bg-soft); }
@media (max-width: 900px) { .hm-section { padding: 72px 0; } }

.hm-head { max-width: 760px; margin-bottom: 52px; }
.hm-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.hm-head p { margin-top: 14px; font-size: 1.05rem; }
.hm-more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 36px; font-weight: 700; color: var(--navy-600);
}
.hm-more i { transition: transform .25s var(--ease); }
.hm-more:hover i { transform: translateX(4px); }
[data-theme="dark"] .hm-more { color: var(--gold-400); }

/* 1. Hero --------------------------------------------------------- */
.hm-hero {
  position: relative; isolation: isolate; color: #fff;
  min-height: min(92vh, 800px);
  padding: 190px 0 110px;
  display: flex; align-items: center;
  background: var(--navy-900);
  overflow: hidden;
}
.hm-hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; opacity: .55;
}
.hm-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7,25,56,.94) 0%, rgba(7,25,56,.78) 48%, rgba(7,25,56,.35) 100%),
    linear-gradient(0deg, rgba(7,25,56,.7) 0%, transparent 40%);
}
.hm-hero__inner { max-width: 720px; }
.hm-hero .eyebrow { color: var(--gold-300); }
.hm-hero h1 {
  color: #fff; font-size: clamp(2.3rem, 4.9vw, 3.9rem);
  line-height: 1.06; letter-spacing: -.02em;
}
.hm-hero h1 em { font-style: normal; color: var(--gold-400); }
.hm-hero__lead {
  margin-top: 24px; max-width: 560px;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.65;
  color: rgba(233, 240, 255, .86);
}
.hm-hero__actions { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }
.hm-hero .btn-ghost {
  color: #fff; background: transparent; border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.hm-hero .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .hm-hero__inner > * { animation: hm-rise .8s var(--ease) both; }
  .hm-hero__inner > :nth-child(2) { animation-delay: .08s; }
  .hm-hero__inner > :nth-child(3) { animation-delay: .16s; }
  .hm-hero__inner > :nth-child(4) { animation-delay: .24s; }
}
@keyframes hm-rise { from { opacity: 0; transform: translateY(22px); } }

@media (max-width: 700px) {
  .hm-hero { padding: 150px 0 80px; min-height: 0; }
  .hm-hero::after { background: linear-gradient(0deg, rgba(7,25,56,.92), rgba(7,25,56,.72)); }
  .hm-hero__actions .btn { flex: 1 1 100%; }
}

/* 2. Expertises : voir « Sélecteur » plus bas (onglets + panneau). */

/* 3. Ysraa -------------------------------------------------------- */
.hm-ysraa {
  color: #fff;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 100%);
}
.hm-ysraa__grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 72px; align-items: center;
}
@media (max-width: 900px) { .hm-ysraa__grid { grid-template-columns: 1fr; gap: 44px; } }
.hm-ysraa .eyebrow { color: var(--gold-300); }
.hm-ysraa h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.hm-ysraa p { color: rgba(233, 240, 255, .82); }
.hm-ysraa__text { margin-top: 20px; font-size: 1.06rem; line-height: 1.7; max-width: 520px; }
.hm-ysraa__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
.hm-ysraa .btn-ghost {
  color: #fff; background: transparent; border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.hm-ysraa .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }


/* 4. Réalisations ------------------------------------------------- */
.hm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .hm-grid-3 { grid-template-columns: 1fr; max-width: 520px; } }

.hm-project {
  display: flex; flex-direction: column;
  background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.hm-project:hover { transform: translateY(-4px); border-color: var(--gold-500); }
.hm-project img {
  /* height:auto : l'attribut height="500" du HTML l'emporterait sinon sur le ratio. */
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  background: var(--bg-deep);
}
.hm-project__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.hm-project__cat {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
}
.hm-project h3 { font-size: 1.3rem; }
.hm-project p { font-size: .95rem; }

/* 5. Confiance ---------------------------------------------------- */
.hm-trust { text-align: center; }
.hm-trust .hm-head { margin-inline: auto; margin-bottom: 40px; }
.hm-figures {
  display: flex; justify-content: center; gap: clamp(36px, 8vw, 110px);
  flex-wrap: wrap; margin-bottom: 64px;
}
.hm-figure strong {
  display: block; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; color: var(--navy-700);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .hm-figure strong { color: #fff; }
.hm-figure > span { display: block; margin-top: 8px; color: var(--ink-muted); }
/* Le suffixe (+) est un <span> ajouté par main.js : ne pas le passer en bloc. */
.hm-figure .counter-suffix { color: var(--gold-600); }
.hm-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.hm-logos li {
  width: 148px; height: 90px; padding: 12px 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
}
.hm-logos img {
  /* height:auto : les attributs width/height du HTML (240×140) ne doivent pas imposer la taille. */
  max-width: 100%; max-height: 66px; width: auto; height: auto; object-fit: contain;
  filter: grayscale(1); opacity: .9;
  transition: filter .3s var(--ease), opacity .3s var(--ease);
}
.hm-logos li:hover img { filter: none; opacity: 1; }
@media (max-width: 600px) { .hm-logos { gap: 10px; } .hm-logos li { width: calc(33.333% - 7px); height: 76px; padding: 8px 10px; } }

/* 6. Appel à l'action --------------------------------------------- */
.hm-cta-wrap { padding: 0 0 112px; }
@media (max-width: 900px) { .hm-cta-wrap { padding-bottom: 72px; } }
.hm-cta {
  text-align: center; color: #fff;
  padding: clamp(48px, 7vw, 84px) 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
}
.hm-cta h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.hm-cta p { margin: 14px auto 0; max-width: 480px; color: rgba(233, 240, 255, .82); }
.hm-cta__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hm-cta .btn-ghost {
  color: #fff; background: transparent; border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.hm-cta .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* Le hero est au-dessus de la ligne de flottaison : pas de calcul différé. */
.hm-hero { content-visibility: visible; }


/* ===========================================================
   v2 — POINT FOCAL VIVANT
   =========================================================== */

/* 1bis. Hero : texte à gauche, tableau de mission à droite --------- */
.hm-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 72px); align-items: center; width: 100%;
}
.hm-hero__inner { max-width: 640px; }
.hm-proof {
  margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .03em; color: rgba(233, 240, 255, .7);
}
.hm-proof i { color: var(--gold-400); margin-right: 6px; }

.hm-hero__visual { position: relative; min-height: 440px; padding-bottom: 130px; display: flex; align-items: center; }
.hm-hero__visual .cn-mark { width: 124%; left: -24%; top: calc(50% - 50px); transform: translateY(calc(-50% + var(--sy, 0) * .14px)); }

.hm-board {
  position: relative; width: 100%; max-width: 440px; margin-left: auto; padding: 22px 22px 18px;
  border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(165deg, rgba(14, 40, 96, .96), rgba(8, 28, 70, .96));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 44px 90px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(253, 185, 19, .06) inset;
}
.hm-board__head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.hm-board__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 0 0 rgba(253, 185, 19, .6); animation: hm-pulse 2.2s ease-out infinite; }
@keyframes hm-pulse { 0% { box-shadow: 0 0 0 0 rgba(253, 185, 19, .55); } 100% { box-shadow: 0 0 0 11px rgba(253, 185, 19, 0); } }
.hm-board__title { font-family: var(--f-display); font-weight: 700; font-size: 1.02rem; }
.hm-board__tag { margin-left: auto; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid rgba(253, 185, 19, .45); color: var(--gold-300); font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }

.hm-metric { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .09); }
.hm-metric:first-of-type { border-top: 0; padding-top: 0; }
.hm-metric > span { font-size: .84rem; color: rgba(233, 240, 255, .72); }
.hm-metric > strong { font-family: var(--f-display); font-size: 1.04rem; font-variant-numeric: tabular-nums; }
.hm-metric__bar { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.hm-metric__bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, var(--gold-600), var(--gold-400)); transition: width 1.3s var(--ease); }
.hm-metric__bar i.is-full { width: var(--w, 0%); }
.hm-board__foot { margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .09); display: flex; align-items: center; gap: 8px; font-size: .8rem; color: rgba(233, 240, 255, .7); }
.hm-board__foot i { color: var(--gold-400); }

/* Les résultats arrivent : le plus récent en haut, les anciens descendent. */
.hm-feed { position: absolute; z-index: 2; left: -34px; top: calc(100% - 4px); width: min(300px, 74%); height: 176px; pointer-events: none; }
.hm-toast {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r-md); color: #fff;
  background: rgba(16, 44, 104, .97); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, .75);
  transition: transform .75s var(--ease), opacity .75s var(--ease);
  animation: hm-toast-in .75s var(--ease) backwards;
}
.hm-toast.is-pos-0 { transform: none; }
.hm-toast.is-pos-1 { transform: translateY(58px) scale(.97); opacity: .82; }
.hm-toast.is-pos-2 { transform: translateY(116px) scale(.94); opacity: .5; }
.hm-toast.is-pos-3 { transform: translateY(164px) scale(.9); opacity: 0; }
@keyframes hm-toast-in { from { opacity: 0; transform: translateY(-26px) scale(.95); } }
.hm-toast__icon { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; background: var(--gold-500); color: var(--navy-900); font-size: 1rem; }
.hm-toast__body { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hm-toast__body strong { font-size: .88rem; }
.hm-toast__body small { font-size: .76rem; color: rgba(233, 240, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (prefers-reduced-motion: reduce) {
  .hm-board__dot, .hm-toast { animation: none; }
  .hm-toast { transition: none; }
  .hm-metric__bar i { transition: none; }
}
.cyn-lite .hm-board__dot { animation: none; }

@media (max-width: 1000px) {
  .hm-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hm-hero__visual { min-height: 0; padding-bottom: 150px; margin-top: 12px; }
  .hm-board { margin: 0 auto; }
  .hm-hero__visual .cn-mark { width: 118%; left: -9%; top: 44%; }
  .hm-feed { left: 50%; margin-left: -150px; }
}
@media (max-width: 700px) {
  .hm-hero { padding-bottom: 60px; }
  .hm-hero__visual { padding-bottom: 130px; }
  .hm-feed { width: min(300px, 86%); margin-left: calc(min(300px, 86%) / -2); left: 50%; top: calc(100% - 24px); }
  .hm-hero__visual .cn-mark { opacity: .55; }
}

/* 2. Sélecteur d'expertise --------------------------------------- */
.hm-pick__panel {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 60px); align-items: center;
  padding: clamp(26px, 4vw, 46px); border-radius: var(--r-lg);
  background: var(--surface-solid); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.hm-pick__icon { width: 58px; height: 58px; display: grid; place-items: center; font-size: 1.55rem; color: var(--navy-600); border: 1.5px solid var(--gold-500); border-radius: 16px; margin-bottom: 18px; }
[data-theme="dark"] .hm-pick__icon { color: var(--gold-400); }
.hm-pick__panel h3 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); }
.hm-pick__panel p { margin-top: 12px; font-size: 1.04rem; line-height: 1.65; max-width: 44ch; }
.hm-pick__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-weight: 700; color: var(--navy-600); }
.hm-pick__go i { transition: transform .25s var(--ease); }
.hm-pick__go:hover i { transform: translateX(5px); }
[data-theme="dark"] .hm-pick__go { color: var(--gold-400); }
.hm-pick__side small { display: block; margin-bottom: 12px; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.hm-deliver { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-deliver li { display: flex; align-items: center; gap: 10px; padding: 14px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); font-weight: 600; font-size: .94rem; }
.hm-deliver li i { color: var(--gold-600); }
.hm-pick__tech { margin-top: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .sg-panel.is-active .hm-pick__panel > div:first-child > * { animation: hm-rise .55s var(--ease) both; }
  .sg-panel.is-active .hm-pick__panel > div:first-child > :nth-child(2) { animation-delay: .06s; }
  .sg-panel.is-active .hm-pick__panel > div:first-child > :nth-child(3) { animation-delay: .12s; }
  .sg-panel.is-active .hm-pick__panel > div:first-child > :nth-child(4) { animation-delay: .18s; }
  .sg-panel.is-active .hm-deliver li { animation: hm-chip .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + .1s); }
}
@keyframes hm-chip { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@media (max-width: 900px) { .hm-pick__panel { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .hm-deliver { grid-template-columns: minmax(0, 1fr); } }

/* 3. Ysraa : les modules s'allument ------------------------------- */
.hm-mods {
  padding: 22px; border-radius: var(--r-lg); border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
}
.hm-mods__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(233, 240, 255, .62); }
.hm-mods__head [data-toggles-count] { color: var(--gold-300); }
.hm-mods ul { display: grid; gap: 8px; }
.hm-mod {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; border-radius: var(--r-md); color: rgba(233, 240, 255, .72); font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03);
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.hm-mod i:first-child { font-size: 1.25rem; color: rgba(233, 240, 255, .5); transition: color .35s var(--ease); width: 24px; text-align: center; }
.hm-mod span:not(.sg-switch) { flex: 1; }
.hm-mod[aria-pressed="true"] { color: #fff; background: rgba(253, 185, 19, .1); border-color: rgba(253, 185, 19, .5); }
.hm-mod[aria-pressed="true"] i:first-child { color: var(--gold-400); }
.hm-mod:focus-visible { outline: 2.5px solid var(--gold-500); outline-offset: 2px; }
.hm-mods__note { margin-top: 14px; font-size: .84rem; color: rgba(233, 240, 255, .6); }

/* 4. Comment on travaille ----------------------------------------- */
.hm-process .sg-flow { margin-top: 8px; }
.hm-process .hm-head { margin-bottom: 40px; }

/* 6bis. Appel final : l'orbite le signe -------------------------- */
.hm-cta { position: relative; isolation: isolate; overflow: hidden; }
.hm-cta .sg-orbit { left: 50%; top: 50%; width: min(560px, 92vw); transform: translate(-50%, -50%); opacity: .55; }
.hm-cta > * { position: relative; }

/* Le reste de la page : plus compact (les sections étaient à 112 px). */
.hm-section { padding: 96px 0; }
@media (max-width: 900px) { .hm-section { padding: 64px 0; } }


/* ===========================================================
   v3 — INDICE DE DÉFILEMENT, DECK DE PARTENAIRES, NOTES DE TERRAIN
   =========================================================== */

/* Indice : un petit trait lumineux qui descend — l'œil est invité à continuer */
.hm-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(233, 240, 255, .7);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.hm-scroll i { position: relative; width: 1.5px; height: 44px; background: rgba(255, 255, 255, .22); border-radius: 2px; overflow: hidden; }
.hm-scroll i::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--gold-400); box-shadow: 0 0 10px var(--gold-400); animation: hm-drop 1.9s var(--ease) infinite; }
@keyframes hm-drop { 0% { top: -40%; } 70%, 100% { top: 110%; } }
.hm-scroll.is-gone { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
@media (max-width: 1000px), (max-height: 640px) { .hm-scroll { display: none; } }
@media (prefers-reduced-motion: reduce) { .hm-scroll i::after { animation: none; top: 30%; } }

/* Chiffres */
.hm-trust { padding-bottom: 56px; }
.hm-trust .hm-figures { margin-bottom: 0; }

/* Deck de partenaires ------------------------------------------- */
.hm-partners { background: var(--bg-soft); overflow: hidden; }
.dk-wrap { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.dk-text .eyebrow { margin-bottom: 18px; }
.dk-text h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.dk-text > p { margin-top: 16px; max-width: 46ch; font-size: 1.04rem; }
.dk-ctl { display: flex; align-items: center; gap: 12px; margin: 30px 0 26px; }
.dk-btn {
  width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-solid); color: var(--navy-700); font-size: 1.05rem;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
}
[data-theme="dark"] .dk-btn { color: var(--gold-400); }
.dk-btn:hover { border-color: var(--gold-500); transform: translateY(-2px); }
.dk-btn:focus-visible { outline: 2.5px solid var(--gold-500); outline-offset: 3px; }
.dk-count { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .1em; color: var(--ink-muted); min-width: 64px; text-align: center; }
.dk-count b { color: var(--ink); font-size: 1rem; }

.dk { position: relative; width: 100%; max-width: 470px; margin-inline: auto; padding-top: 72px; outline: none; touch-action: pan-y; }
.dk:focus-visible { outline: 2.5px solid var(--gold-500); outline-offset: 10px; border-radius: 26px; }
.dk-stage { position: relative; height: 280px; perspective: 1200px; }
.dk-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 16px; padding: 18px;
  border-radius: 26px; background: var(--surface-solid); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -34px rgba(11, 42, 107, .5);
  /* origine EN HAUT : les cartes du fond rétrécissent vers le haut, leur bord supérieur dépasse de 17 px par rang */
  transform-origin: 50% 0;
  transform: translateY(calc(var(--k, 0) * -17px)) scale(calc(1 - var(--k, 0) * .05));
  opacity: calc(1 - var(--k, 0) * .17);
  z-index: calc(30 - var(--k, 0));
  transition: transform .72s var(--ease), opacity .72s var(--ease);
  overflow: hidden;
}
.dk-card.is-exit { transform: translateX(-72%) translateY(-14px) rotate(-10deg) scale(.96); opacity: 0; z-index: 60; }
.dk-card:not(.is-front) { pointer-events: none; }
.dk-logo { flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 18px; background: #fff; border: 1px solid rgba(11, 42, 107, .08); padding: 14px 22px; }
.dk-logo img { max-width: 78%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.dk-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: end; padding: 0 6px 4px; }
.dk-meta small { grid-column: 1 / -1; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-700); }
[data-theme="dark"] .dk-meta small { color: var(--gold-400); }
.dk-meta h3 { font-size: 1.35rem; }
.dk-meta p { font-size: .9rem; color: var(--ink-muted); text-align: right; }
.dk-meta .dk-n { font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; color: var(--ink-faint); opacity: .5; }
/* L'éclat qui traverse la carte quand elle passe devant */
.dk-card::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(105deg, transparent, rgba(253, 185, 19, .28), transparent); transform: skewX(-18deg); pointer-events: none; opacity: 0;
}
.dk-card.is-front::after { animation: dk-glint 1.3s var(--ease) .25s 1 both; }
@keyframes dk-glint { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }

.dk-bar { height: 3px; margin-top: 26px; border-radius: 3px; background: var(--line); overflow: hidden; }
.dk-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-600), var(--gold-400)); }
.dk-bar i.is-run { animation: dk-fill var(--dk-dur, 3.8s) linear forwards; }
@keyframes dk-fill { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .dk-card, .dk-card.is-exit { transition: none; }
  .dk-card.is-front::after, .dk-bar i.is-run { animation: none; }
}
@media (max-width: 900px) { .dk-wrap { grid-template-columns: minmax(0, 1fr); } .dk-stage { height: 260px; } }

/* Notes de terrain ------------------------------------------------ */
.hm-notes .hm-head { max-width: 640px; }
.nt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.nt-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface-solid); border: 1px solid var(--line);
  transition: border-color .35s var(--ease), box-shadow .45s var(--ease);
}
.nt-card:hover, .nt-card:focus-within { border-color: var(--gold-500); box-shadow: 0 30px 56px -34px rgba(11, 42, 107, .5); }
.nt-img { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-deep); }
.nt-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.nt-card:hover .nt-img img { transform: scale(1.07); }
.nt-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7, 25, 56, .55)); }
.nt-badge {
  position: absolute; z-index: 2; left: 16px; top: 16px; padding: 6px 13px; border-radius: var(--r-pill);
  background: var(--gold-500); color: var(--navy-900); font-family: var(--f-mono); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.nt-num { position: absolute; z-index: 2; right: 18px; bottom: 10px; font-family: var(--f-display); font-weight: 700; font-size: 3rem; line-height: 1; color: #fff; opacity: .9; }
.nt-body { display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 26px; flex: 1; }
.nt-body h3 { font-size: 1.22rem; line-height: 1.25; }
.nt-body p { font-size: .95rem; line-height: 1.6; }
.nt-link { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy-600); }
.nt-link::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.nt-link i { transition: transform .3s var(--ease); }
.nt-card:hover .nt-link i { transform: translateX(6px); }
[data-theme="dark"] .nt-link { color: var(--gold-400); }
@media (max-width: 1000px) { .nt-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }

/* Mosaïque des secteurs (accueil) ---------------------------------- */
.hm-sectors { background: var(--bg-soft); }
.sm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 14px; }
.sm-tile { position: relative; border-radius: var(--r-md); overflow: hidden; isolation: isolate; color: #fff; background: var(--navy-800); display: block; }
.sm-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.1s var(--ease), filter .6s var(--ease); filter: brightness(.82); }
.sm-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 25, 56, .05) 25%, rgba(7, 25, 56, .92)); }
.sm-tile:hover img, .sm-tile:focus-visible img { transform: scale(1.09); filter: brightness(.95); }
.sm-tile:focus-visible { outline: 2.5px solid var(--gold-500); outline-offset: 3px; }
.sm-icon { position: absolute; top: 14px; left: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--gold-500); color: var(--gold-400); background: rgba(7, 25, 56, .45); font-size: 1.05rem; }
.sm-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 18px; display: grid; gap: 6px; }
.sm-body strong { font-family: var(--f-display); font-size: 1.08rem; line-height: 1.2; }
/* La description se déploie au survol (toujours visible sur un écran tactile) */
.sm-body span { font-size: .86rem; line-height: 1.5; color: rgba(233, 240, 255, .86); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .45s var(--ease); }
.sm-tile:hover .sm-body span, .sm-tile:focus-visible .sm-body span { max-height: 9.5em; opacity: 1; }
@media (hover: none) { .sm-body span { max-height: 4.6em; opacity: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; } }
@media (max-width: 1060px) { .sm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sm-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 220px; } }

/* Ysraa : le fond de la section est celui d'Ysraa en permanence ; seule l'animation
   du logo se joue dessus (le canvas est transparent, voir ysraa-intro.js). Le voile
   sombre de product.css (.ysraa-fond::after) assombrissait la gauche : retiré. */
.hm-ysraa.ysraa-fond { background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 100%); }
.hm-ysraa.ysraa-fond::after { content: none; }
