/* ============================================================================
   ACCUEIL — style « Software » (index.html uniquement)
   Tout est préfixé par .home : la navbar, le footer et les autres pages
   gardent leur style. Polices servies en local (CSP : font-src 'self').
   ============================================================================ */

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(fonts/source-serif-4-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: 'Source Serif 4';
  font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(fonts/source-serif-4-latin-wght-normal.woff2) format('woff2');
  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: 'Source Serif 4';
  font-style: italic; font-display: swap; font-weight: 300 900;
  src: url(fonts/source-serif-4-italic-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: 'Source Serif 4';
  font-style: italic; font-display: swap; font-weight: 300 900;
  src: url(fonts/source-serif-4-italic-latin-wght-normal.woff2) format('woff2');
  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: 'Raleway';
  font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/raleway-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: 'Raleway';
  font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/raleway-latin-wght-normal.woff2) format('woff2');
  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;
}

/* — Jetons — */
.home {
  --dp-color-ground: #fcfcfd;
  --dp-color-ink: var(--texte, #1f2329);                 /* gris très foncé du site (stylesheet.css) */
  --dp-color-ink-secondary: var(--texte-2, #495057);
  --dp-color-ground-muted: #f3f4f6;
  --dp-color-rule: #dde0e6;
  --dp-color-accent: #334155;
  --dp-color-accent-hover: #1e293b;
  --dp-color-panel: #ffffff;
  --dp-color-on-accent: #ffffff;
  --dp-shadow: 0 1px 2px rgb(22 25 31 / .04), 0 8px 24px -12px rgb(22 25 31 / .14);
  --dp-typography-fallback: sans-serif;
  --dp-typography-body: 16px;
  --dp-typography-interface: 15px;
  --dp-typography-small: 14px;
  --dp-typography-metadata: 13px;
  --dp-typography-label: 12px;
  --dp-typography-body-leading: 1.6;
  --dp-spacing-grid-gap: 24px;
  --dp-radius-panel: 12px;
  --dp-border-hairline: 1px;
  --dp-motion-interaction: 160ms;
  --dp-motion-easing: ease-out;

  --dp-font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --dp-font-text: 'Raleway', var(--dp-typography-fallback);
  --dp-section-pad: clamp(56px, 8vw, 96px);
}
/* Mode sombre du site (bouton thème) : mêmes rôles, valeurs inversées */
[data-bs-theme="dark"] .home {
  --dp-color-ground: #111318;
  --dp-color-ink: var(--texte, #dee2e6);
  --dp-color-ink-secondary: var(--texte-2, #adb5bd);
  --dp-color-ground-muted: #171a20;
  --dp-color-rule: #2c313a;
  --dp-color-accent: #a9b8cf;
  --dp-color-accent-hover: #c3cfe0;
  --dp-color-panel: #1d2128;
  --dp-color-on-accent: #0f172a;
  --dp-shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
}

.home {
  background: var(--dp-color-ground);
  color: var(--dp-color-ink);
  font-family: var(--dp-font-text);
  font-variant-numeric: lining-nums;
  font-size: var(--dp-typography-body);
  line-height: var(--dp-typography-body-leading);
}
.home :is(h1, h2, h3, .dp-figure) {
  font-family: var(--dp-font-display);
  font-weight: 450; letter-spacing: -.02em; line-height: 1.1;
  color: inherit; margin: 0;
}
.home p { margin: 0; }
.home :focus-visible { outline: 3px solid var(--dp-color-accent); outline-offset: 2px; }

.dp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.dp-section { padding: var(--dp-section-pad) 0; }
.dp-muted { background: var(--dp-color-ground-muted); }

.dp-eyebrow {
  display: block; margin-bottom: 12px;
  font-size: var(--dp-typography-label); font-weight: 600;
  color: var(--dp-color-accent);
}
.dp-h2 { font-size: clamp(36px, 4.4vw, 54px); letter-spacing: -.03em; }
.home .dp-intro { max-width: 46rem; margin-top: 24px; color: var(--dp-color-ink-secondary); font-size: 1.125rem; }

/* — Boutons — */
.dp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: .5rem;
  font-family: var(--dp-font-text); font-size: var(--dp-typography-interface); font-weight: 600;
  line-height: 1.2; text-decoration: none;
  border: var(--dp-border-hairline) solid transparent;
  transition: transform var(--dp-motion-interaction) var(--dp-motion-easing),
              background-color var(--dp-motion-interaction) var(--dp-motion-easing),
              border-color var(--dp-motion-interaction) var(--dp-motion-easing);
}
.dp-btn:hover { transform: translateY(-1px); text-decoration: none; }
.dp-btn:active { transform: none; }

/* — Hero — */
.dp-hero { padding: clamp(40px, 5vw, 72px) 0 0; position: relative; isolation: isolate; }
/* Fond de la première section : pastel de la couleur de la matière affichée dans le titre (calque posé et mis à jour par le script de l'accueil) */
.dp-hero-fond { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--pal-tint); transition: background-color .7s ease; }
[data-bs-theme="dark"] .dp-hero-fond { background: rgb(var(--pal-rgb) / .14); }
@media (prefers-reduced-motion: reduce) { .dp-hero-fond { transition: none; } }
.dp-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr);   /* le titre occupe toute la largeur (plus de schéma animé) */
  gap: 0; align-items: center;
}
/* Boutons d'action */
.dp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.dp-actions-centre { justify-content: center; margin-top: clamp(32px, 4vw, 48px); }
.dp-actions-centre .dp-btn { border: 0; }   /* bouton « Découvrir le parcours » sans bordure */

/* Schéma : les 4 étapes d'un thème posées sur un escalier (« pas à pas »).
   Les couleurs suivent la palette de la matière affichée (attribut data-matiere
   posé sur .dp-diagram : palettes --pal-* de stylesheet.css) ; le script de
   l'accueil fait défiler compta → éco. politique → éco. d'entreprise → droit.
   Tailles en cqw : tout suit la largeur du schéma. */
.dp-diagram {
  --dg: var(--pal-strong);                 /* couleur d'accent de la matière */
  --dg-on: #fff;                           /* texte sur aplat --dg */
  --dg-soft: rgb(var(--pal-rgb) / .16);    /* fond teinté */
  --dg-end: var(--pal-deep);               /* fin du dégradé du n° 4 */
  position: relative; width: calc(100% + 16px); max-width: 620px; aspect-ratio: 520 / 480;
  margin-left: 0; margin-right: -16px; /* collé à droite, déborde un peu dans la marge ; commence au bord de sa colonne : plus proche du titre */
  container-type: inline-size;
}
[data-bs-theme="dark"] .dp-diagram { --dg: var(--pal-bright); --dg-on: #15151f; --dg-end: var(--pal-vivid); }
/* Le trait d'entrée a son propre data-matiere : il prend la couleur de la matière suivante */
.dp-leadsvg { --dg: var(--pal-strong); }
[data-bs-theme="dark"] .dp-leadsvg { --dg: var(--pal-bright); }
.dp-diagram > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dp-stair {
  fill: none; stroke: var(--dg); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1 7; opacity: .7;
}
/* Tronçons du masque : blancs = pointillés visibles */
.dp-seg { fill: none; stroke: #fff; stroke-width: 8; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }

/* Cycle d'une matière, piloté par le script de l'accueil (classes de phase sur .dp-diagram) :
     ph-in    : montée des marches : carte 1, trait, carte 2, trait, carte 3, trait, carte 4, trait de sortie
     ph-out   : tout disparaît de 1 à 4 (plus vite qu'à l'apparition)
   Trait d'entrée vers le 1 : il s'efface 1 s après l'apparition du chiffre 1, puis se redessine, à la
   couleur de la matière suivante (second svg .dp-leadnext), 2 s après la fin du trait qui suit le 4,
   pendant la fin de ph-out ; il reste ensuite affiché et le cycle reprend.
   Sans classe de phase (pas de JS, mouvement réduit) : tout est affiché, rien ne bouge. */
@media (prefers-reduced-motion: no-preference) {
  /* — Trait d'entrée de la matière suivante : se dessine 2 s après la fin du trait qui suit le 4 — */
  .dp-leadnext { visibility: hidden; }
  .dp-diagram.ph-in .dp-leadnext, .dp-diagram.ph-out .dp-leadnext { visibility: visible; }
  .dp-diagram.ph-in .dp-leadnext .dp-seg { stroke-dashoffset: 1; }
  /* fin du trait après le 4 : 3,9 s ; début de ph-out : 3,9 + 1,65 = 5,55 s ; + 0,35 s = 5,9 s, soit 2 s plus tard */
  .dp-diagram.ph-out .dp-leadnext .dp-seg { stroke-dashoffset: 1; animation: dp-draw .35s ease-out .35s forwards; }
  /* … et l'ancien trait (couleur de la matière courante) s'efface 1 s après le chiffre 1 */
  .dp-diagram.ph-in .dp-leadsvg:not(.dp-leadnext) .dp-seg { animation: dp-erase .3s ease-in 1s forwards; }
  .dp-diagram.ph-out .dp-leadsvg:not(.dp-leadnext) .dp-seg { stroke-dashoffset: -1; }

  /* — Apparition : la carte n arrive avec le trait, puis le trait file vers la suivante — */
  .dp-diagram.ph-in > svg:not(.dp-leadsvg) .dp-seg { stroke-dashoffset: 1; animation: dp-draw var(--dur, .6s) var(--ease, ease-in-out) var(--at, 0s) forwards; }
  .dp-diagram.ph-in .dp-seg-1 { --at: .4s; }
  .dp-diagram.ph-in .dp-seg-2 { --at: 1.4s; }
  .dp-diagram.ph-in .dp-seg-3 { --at: 2.4s; }
  .dp-diagram.ph-in .dp-seg-4 { --at: 3.4s; --dur: .5s; --ease: ease-in; }

  .dp-diagram.ph-in .dp-fc { animation: dp-rise .5s cubic-bezier(.2, .8, .3, 1) var(--at, 0s) both; }
  .dp-diagram.ph-in .dp-fc-1 { --at: 0s; }
  .dp-diagram.ph-in .dp-fc-2 { --at: 1s; }
  .dp-diagram.ph-in .dp-fc-3 { --at: 2s; }
  .dp-diagram.ph-in .dp-fc-4 { --at: 3s; }
  .dp-diagram.ph-in .dp-n { animation: dp-pop .4s cubic-bezier(.34, 1.56, .64, 1) var(--at, 0s) both; }
  .dp-diagram.ph-in .dp-fc-2 .dp-n { --at: 1s; }
  .dp-diagram.ph-in .dp-fc-3 .dp-n { --at: 2s; }
  .dp-diagram.ph-in .dp-fc-4 .dp-n { --at: 3s; }

  /* — Disparition de 1 à 4 : trait effacé de proche en proche, cartes estompées au même rythme — */
  .dp-diagram.ph-out > svg:not(.dp-leadsvg) .dp-seg { animation: dp-erase .22s ease-in var(--at, 0s) forwards; }
  .dp-diagram.ph-out .dp-seg-1 { --at: 0s; }
  .dp-diagram.ph-out .dp-seg-2 { --at: .12s; }
  .dp-diagram.ph-out .dp-seg-3 { --at: .24s; }
  .dp-diagram.ph-out .dp-seg-4 { --at: .36s; }
  .dp-diagram.ph-out .dp-fc { animation: dp-fall .22s ease-in var(--at, 0s) forwards; }
  .dp-diagram.ph-out .dp-fc-1 { --at: 0s; }
  .dp-diagram.ph-out .dp-fc-2 { --at: .12s; }
  .dp-diagram.ph-out .dp-fc-3 { --at: .24s; }
  .dp-diagram.ph-out .dp-fc-4 { --at: .36s; }
  .dp-diagram.ph-out .dp-n { animation: dp-pop-out .18s ease-in var(--at, 0s) forwards; }
  .dp-diagram.ph-out .dp-fc-2 .dp-n { --at: .12s; }
  .dp-diagram.ph-out .dp-fc-3 .dp-n { --at: .24s; }
  .dp-diagram.ph-out .dp-fc-4 .dp-n { --at: .36s; }
}
@keyframes dp-draw  { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dp-erase { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -1; } }
@keyframes dp-rise  { from { opacity: 0; transform: translateY(2.4cqw) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes dp-fall  { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(1.2cqw) scale(.97); } }
@keyframes dp-pop   { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes dp-pop-out { from { transform: scale(1); } to { transform: scale(0); } }

/* Cartes-marches */
.dp-fc {
  position: absolute; width: 37%;
  padding: 2.8cqw 3cqw; border-radius: 2.6cqw;
  background: var(--dp-color-panel); border: var(--dp-border-hairline) solid var(--dp-color-rule);
  box-shadow: 0 1px 2px rgb(22 25 31 / .05), 0 14px 30px -16px rgb(22 25 31 / .28);
  font-size: 2.4cqw; line-height: 1.3; color: var(--dp-color-ink-secondary);
}
.dp-fc-in { display: flex; flex-direction: column; gap: 1.8cqw; }
.dp-fc-1 { left: 4%;  top: 72%; z-index: 1; }
.dp-fc-2 { left: 23%; top: 49%; z-index: 2; }
.dp-fc-3 { left: 42%; top: 26%; z-index: 3; }
.dp-fc-4 { left: 61%; top: 3%;  z-index: 4; }
/* Numéro posé sur l'angle de la marche */
.dp-n {
  position: absolute; left: -2.6cqw; top: -2.6cqw; width: 4.6cqw; height: 4.6cqw; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--dp-font-display); font-weight: 700; font-size: 2.4cqw;
  background: var(--dg); color: var(--dg-on);
  box-shadow: 0 0 0 .8cqw var(--dp-color-ground);
}
.dp-fc-4 .dp-n { background: linear-gradient(155deg, var(--dg), var(--dg-end)); }
.dp-fc-head {
  display: flex; align-items: center; gap: 1.6cqw; white-space: nowrap;
  font-family: var(--dp-font-display); font-weight: 700; font-size: 2.9cqw; letter-spacing: -.01em;
  color: var(--dp-color-ink);
}
.dp-fc-head > i { font-size: 3.4cqw; line-height: 1; color: var(--dg); }

.dp-sk { display: block; height: 1.2cqw; border-radius: 999px; background: var(--dp-color-rule); }
.dp-sk.lt { background: var(--dp-color-ground-muted); }
.dp-sk.w80 { width: 80%; } .dp-sk.w70 { width: 70%; }

/* 1. Théorie — compta : bilan en T */
.dp-taccount { display: grid; grid-template-columns: 1fr 1fr; border-top: 1.5px solid var(--dp-color-ink); }
.dp-taccount > div { display: flex; flex-direction: column; gap: 1cqw; padding: 1cqw 1.2cqw 0; }
.dp-taccount > div + div { border-left: 1.5px solid var(--dp-color-ink); }
.dp-taccount b { font-size: 2.2cqw; font-weight: 600; color: var(--dp-color-ink); }
/* éco. politique : courbes d'offre et de demande */
.dp-chart { display: block; width: 100%; height: 9.5cqw; }
.dp-chart .ax { fill: none; stroke: var(--dp-color-ink); stroke-width: 1.2; }
.dp-chart .de { fill: none; stroke: var(--dp-color-ink-secondary); stroke-width: 2; stroke-linecap: round; }
.dp-chart .of { fill: none; stroke: var(--dg); stroke-width: 2; stroke-linecap: round; }
.dp-chart .eq { fill: var(--dg); }
/* éco. d'entreprise : les 4 P */
.dp-p4 { display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw; }
.dp-p4 span {
  padding: .9cqw 0; border-radius: 1.2cqw; text-align: center; font-size: 2.1cqw; font-weight: 600;
  color: var(--dp-color-ink); background: var(--dp-color-ground-muted);
}
.dp-p4 span:first-child { background: var(--dg-soft); }
/* droit : hiérarchie des normes */
.dp-norms { display: flex; flex-direction: column; align-items: flex-start; gap: .8cqw; }
.dp-norms span {
  padding: .8cqw 1.2cqw; border-radius: 1.1cqw; text-align: left; font-size: 2cqw; font-weight: 600; white-space: nowrap;
  color: var(--dp-color-ink); background: var(--dp-color-ground-muted);
}
.dp-norms span:nth-child(1) { width: 52%; background: var(--dg-soft); }
.dp-norms span:nth-child(2) { width: 76%; }
.dp-norms span:nth-child(3) { width: 100%; }

/* 2. Quiz : réponse choisie */
.dp-opt {
  display: flex; align-items: center; gap: 1.4cqw;
  padding: 1.2cqw 1.3cqw; border-radius: 1.5cqw; border: 1px solid var(--dg);
  font-size: 2.3cqw; color: var(--dp-color-ink); white-space: nowrap;
}
.dp-radio { width: 2.2cqw; height: 2.2cqw; border-radius: 50%; background: var(--dg); flex: none; }
.dp-opt i { margin-left: auto; font-size: 2.8cqw; line-height: 1; color: var(--dg); }

/* 3. Application — compta : écriture au journal */
.dp-entry {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 1.2cqw; align-items: center;
  padding: 1.2cqw 1.4cqw; border-radius: 1.5cqw; background: var(--dp-color-ground-muted);
  font-size: 2.3cqw; color: var(--dp-color-ink);
}
.dp-entry b { font-weight: 700; font-variant-numeric: tabular-nums; }
/* éco. politique : formule du PIB */
.dp-calc {
  padding: 1.2cqw 1.4cqw; border-radius: 1.5cqw; background: var(--dp-color-ground-muted);
  text-align: center; font-size: 2.3cqw; font-weight: 700; color: var(--dp-color-ink); white-space: nowrap;
}
/* éco. d'entreprise : SWOT */
.dp-swot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1cqw; }
.dp-swot b {
  padding: 1cqw 0; border-radius: 1.2cqw; text-align: center; font-family: var(--dp-font-display);
  font-size: 2.6cqw; color: var(--dp-color-ink); background: var(--dp-color-ground-muted);
}
.dp-swot b:nth-child(odd) { background: var(--dg-soft); }
/* droit : conditions de l'art. 41 CO */
.dp-conds { display: flex; gap: 1cqw; }
.dp-conds span {
  display: inline-flex; align-items: center; gap: 1cqw; padding: 1.1cqw 1.3cqw; border-radius: 1.5cqw;
  font-size: 2.1cqw; font-weight: 600; color: var(--dp-color-ink); background: var(--dp-color-ground-muted);
}
.dp-conds i { color: var(--dg); font-size: 2.5cqw; line-height: 1; }

/* 4. Flashcard empilée */
.dp-flash {
  position: relative; padding: 1.4cqw 1.6cqw; border-radius: 1.5cqw; text-align: center;
  font-weight: 600; font-size: 2.3cqw; color: var(--dp-color-ink);
  background: var(--dp-color-panel); border: 1px solid var(--dp-color-rule);
  box-shadow: .8cqw .8cqw 0 -1px var(--dp-color-ground-muted), .8cqw .8cqw 0 0 var(--dp-color-rule);
}

/* Bande de chiffres (calculés par le script de statistiques) */
.dp-hero { padding-bottom: clamp(40px, 5vw, 72px); }
/* Matières : enchaîne directement sous le hero (padding du hero suffit) */
.dp-stats { padding: clamp(40px, 5vw, 64px) 0; }
.dp-facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: var(--dp-border-hairline) solid var(--dp-color-rule);
  border-bottom: var(--dp-border-hairline) solid var(--dp-color-rule);
}
.dp-fact { padding: 24px 24px 24px 0; }
.dp-fact + .dp-fact { padding-left: 24px; border-left: var(--dp-border-hairline) solid var(--dp-color-rule); }
.dp-fact .dp-figure { font-size: clamp(28px, 3vw, 38px); }
.dp-fact div:last-child { margin-top: 4px; font-size: var(--dp-typography-small); color: var(--dp-color-ink-secondary); }

/* — Cartes matières — */
.dp-head { margin-bottom: 56px; }

/* Liens des matières : pastilles teintées à la couleur de la matière, pastille de couleur + flèche */
.dp-subjects { display: flex; flex-flow: row wrap; gap: 10px; margin-top: 24px; }
.dp-subject {
  --dg: var(--pal-strong);
  --dg-rgb: var(--pal-rgb);
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 20px; border-radius: 999px;
  font-family: var(--dp-font-text); font-size: .9375rem; font-weight: 600; line-height: 1.2;
  color: var(--pal-deep); text-decoration: none;     /* couleur foncée de la matière */
  background: rgb(var(--dg-rgb) / .14); border: 1px solid rgb(var(--dg-rgb) / .45);
  transition: transform var(--dp-motion-interaction) var(--dp-motion-easing),
              background-color var(--dp-motion-interaction) var(--dp-motion-easing),
              box-shadow var(--dp-motion-interaction) var(--dp-motion-easing),
              color var(--dp-motion-interaction) var(--dp-motion-easing);
}
[data-bs-theme="dark"] .dp-subject { --dg: var(--pal-bright); color: var(--pal-bright); }
.dp-subject:hover {
  transform: translateY(-2px); text-decoration: none; color: var(--pal-deep);
  background: rgb(var(--dg-rgb) / .24); box-shadow: 0 10px 20px -12px rgb(var(--dg-rgb) / .9);
}
[data-bs-theme="dark"] .dp-subject:hover { color: var(--pal-bright); }
.dp-subject-ic { flex: none; display: inline-flex; align-items: center; font-size: 1.125rem; line-height: 1; color: inherit; margin-right: -2px; }
.dp-subject .pod-chip-n:not(:empty) {
  font-size: var(--dp-typography-label); font-weight: 600; padding: 1px 7px; border-radius: 999px;
  background: rgb(var(--dg-rgb) / .2);
}
/* — Parcours (fond gris pâle) — */
.dp-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--dp-spacing-grid-gap);
}
.dp-step { position: relative; }
/* Trait reliant les numéros d'une étape à la suivante */
.dp-step:not(:last-child)::after {
  content: ''; position: absolute; top: 20px; left: 52px; right: calc(-1 * var(--dp-spacing-grid-gap) + 12px);
  height: 1px; background: var(--dp-color-rule);
}
.dp-step-num {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--dp-font-display); font-weight: 700; font-size: 1rem;
  background: var(--dp-color-panel); border: 1px solid var(--dp-color-rule); color: var(--dp-color-ink);
}
.dp-step-verb {
  display: flex; align-items: center; gap: 8px; margin: 24px 0 8px;
  font-size: var(--dp-typography-label); font-weight: 600;
  color: var(--dp-color-accent);
}
.dp-step-verb i { font-size: .9375rem; color: var(--dp-color-accent); }
/* .home devant : sinon « .home :is(h1, h2, h3, .dp-figure) { margin: 0 } » (spécificité plus forte) annule les marges */
.home .dp-step h3 { font-size: 1.5rem; letter-spacing: -.03em; margin-top: 24px; margin-bottom: 16px; }
.dp-step p { font-size: var(--dp-typography-small); color: var(--dp-color-ink-secondary); }
.dp-benefits {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--dp-spacing-grid-gap);
  margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--dp-color-rule);
}
.dp-benefit { display: flex; gap: 12px; font-size: var(--dp-typography-small); color: var(--dp-color-ink-secondary); }
.dp-benefit i { font-size: 1.25rem; line-height: 1.1; color: var(--dp-color-accent); }

/* — Trophées — */
.dp-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
/* Trophées : carte à gauche, texte à droite, centrés verticalement */
.dp-split-trophy { grid-template-columns: 1.2fr 1fr; align-items: center; }
.dp-trophy-card {
  display: flex; flex-direction: column; gap: 20px;
  padding: 28px; border-radius: var(--dp-radius-panel);
  background: var(--dp-color-panel); border: var(--dp-border-hairline) solid var(--dp-color-rule);
  box-shadow: var(--dp-shadow);
}
.dp-trophy-top { display: flex; align-items: center; gap: 16px; }
.dp-trophy-ic {
  position: relative; width: 64px; height: 64px; border-radius: .75rem; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 2rem;
  background: rgb(51 65 85 / .08); color: var(--dp-color-accent);
}
[data-bs-theme="dark"] .home .dp-trophy-ic { background: rgb(169 184 207 / .14); }
.dp-trophy-top .dp-figure { font-size: 2rem; }
.dp-trophy-top small { display: block; font-size: var(--dp-typography-metadata); color: var(--dp-color-ink-secondary); }

/* Trophées : la carte entière est le lien (survol sur le rectangle) ; les trophées sont des pastilles aux couleurs des matières, sans survol propre */
a.dp-trophy-link { color: inherit; text-decoration: none; flex-direction: row; align-items: center; gap: 28px; padding: 40px; min-height: 280px;   /* mêmes marges à droite et en bas : les trophées se posent sur le bord du bas */
  transition: transform var(--dp-motion-interaction) var(--dp-motion-easing), border-color var(--dp-motion-interaction) var(--dp-motion-easing); }
a.dp-trophy-link:hover { transform: translateY(-2px); border-color: var(--dp-color-accent); color: inherit; text-decoration: none; }
a.dp-trophy-link:focus-visible { outline: 2px solid var(--dp-color-accent); outline-offset: 3px; }
a.dp-trophy-link .dp-trophy-top { flex: none; display: grid; grid-template-columns: auto auto; align-items: center; justify-content: start; gap: 4px 16px;
  padding-right: 28px; border-right: 1px solid var(--dp-color-rule); align-self: stretch; align-content: center; }
a.dp-trophy-link .dp-trophy-top > div { display: contents; }
a.dp-trophy-link .dp-trophy-top .dp-trophy-ic { grid-row: 1 / span 2; grid-column: 1; }
a.dp-trophy-link .dp-trophy-top .dp-figure { grid-column: 2; grid-row: 1; align-self: end; line-height: 1; }
a.dp-trophy-link .dp-trophy-top small { grid-column: 2; grid-row: 2; align-self: start; margin-top: -6px; }
a.dp-trophy-link .dp-troph-cloud { flex: 1; min-width: 0; }
/* Succès : pastilles colorées (même format que les boutons de matières), débloquées une à une, alignées à droite ; pas de survol propre */
.dp-troph-cloud { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }   /* sans script : les premières pastilles, à plat */
.dp-troph-cloud:not(.is-live) .dp-subject:nth-child(n+6) { display: none; }
/* Mode animé : trois emplacements fixes (hauteur constante), le nouveau arrive en bas et repousse les précédents vers le haut */
.dp-troph-cloud.is-live { position: relative; display: block; height: 152px; min-height: 152px; flex-basis: auto; }
a.dp-trophy-link .dp-troph-cloud.is-live { flex: 1 1 0; min-width: 0; height: 152px; align-self: flex-end; }
.dp-troph-cloud.is-live .dp-subject {
  position: absolute; right: 0; top: calc(var(--lane, 2) * 54px); white-space: nowrap;
  opacity: 0; transform: translateY(10px) scale(.96); transform-origin: right center; pointer-events: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1), top .55s cubic-bezier(.2, .8, .2, 1);
}
.dp-troph-cloud.is-live .dp-subject.is-on { opacity: 1; transform: none; }
.dp-troph-cloud.is-live .dp-subject.is-out { transform: translateY(-14px) scale(.96); transition-duration: .35s; }   /* sortie rapide */
.dp-troph-cloud .dp-subject:hover { transform: none; background: rgb(var(--dg-rgb) / .14); box-shadow: none; }   /* pas de survol propre : c'est la carte qui réagit */

/* Écran moyen (carte étroite) : le bloc « 50+ » passe au-dessus des trophées, séparé par un filet horizontal ; grand écran : filet vertical */
@media (min-width: 1101px) { .dp-split-trophy { grid-template-columns: minmax(0, 540px) 1fr; } }   /* carte moins large, plus de place pour la description */
@media (min-width: 761px) and (max-width: 1100px) { .dp-split-trophy { grid-template-columns: 1fr 1fr; } }
@media (min-width: 761px) and (max-width: 1100px) {
  a.dp-trophy-link { flex-direction: column; gap: 32px; padding: 40px 32px 32px; min-height: 0; }
  a.dp-trophy-link .dp-trophy-top { align-self: auto; justify-content: center; padding: 0 0 24px; border-right: 0; border-bottom: 1px solid var(--dp-color-rule); width: 100%; }
    a.dp-trophy-link .dp-troph-cloud.is-live { flex: 0 0 auto; width: 100%; }
}
@media (max-width: 560px) { a.dp-trophy-link { flex-direction: column; align-items: flex-start; padding: 36px 28px; min-height: 0; } a.dp-trophy-link .dp-trophy-top { border-right: 0; padding-right: 0; align-self: auto; } a.dp-trophy-link .dp-troph-cloud { width: 100%; } a.dp-trophy-link .dp-troph-cloud.is-live { flex: 0 0 auto; width: 100%; } }

/* — Podcasts (fond gris pâle) — */
.dp-pod-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 56px; align-items: center; }
.dp-pod-stat { font-size: var(--dp-typography-small); color: var(--dp-color-ink-secondary); }
.dp-pod-stat strong { color: var(--dp-color-ink); font-size: 1rem; }
/* Illustration casque : disque blanc, ondes bleues pâles qui pulsent, barres de l'égaliseur qui
   dansent (animations dans stylesheet.css, coupées si l'utilisateur réduit les animations) */
.home .pod-visual .pod-disc { color: var(--dp-color-accent); --disc-bg: var(--dp-color-panel); box-shadow: 0 18px 40px -16px rgb(51 65 85 / .45); }
.home .pod-visual .pod-ring { border-color: rgb(51 65 85 / .3); }
.home .pod-visual .pod-eq i { background: rgb(51 65 85 / .35); transform-origin: bottom; }
[data-bs-theme="dark"] .home .pod-visual .pod-ring { border-color: rgb(169 184 207 / .35); }
[data-bs-theme="dark"] .home .pod-visual .pod-eq i { background: rgb(169 184 207 / .45); }

/* — Responsive — */
@media (max-width: 1050px) {
  .dp-wrap { padding: 0 24px; }
  .dp-pod-grid, .dp-split { gap: 36px; }
  .dp-hero-grid { gap: 8px; }
  .home { --dp-spacing-grid-gap: 20px; }
}
@media (max-width: 760px) {
  .dp-wrap { padding: 0 16px; }
  .dp-hero-grid, .dp-pod-grid, .dp-split, .dp-mobile-grid { grid-template-columns: 1fr; }
  .dp-hero-grid { gap: 24px; }   /* une colonne : titre au-dessus du schéma */
  .dp-diagram { max-width: 420px; margin-inline: auto; }
  .dp-facts { grid-template-columns: repeat(2, 1fr); }
  .dp-fact, .dp-fact + .dp-fact { padding: 20px 16px; border-left: 0; }
  .dp-fact:nth-child(even) { border-left: var(--dp-border-hairline) solid var(--dp-color-rule); }
  .dp-fact:nth-child(n+3) { border-top: var(--dp-border-hairline) solid var(--dp-color-rule); }
  /* Parcours en frise verticale : numéro à gauche relié à l'étape suivante, texte à droite */
  .dp-steps { grid-template-columns: 1fr; gap: 0; }
  .dp-step { padding: 0 0 28px 56px; min-height: 40px; }
  .dp-step:last-child { padding-bottom: 0; }
  .dp-step-num { position: absolute; left: 0; top: 0; }
  .dp-step:not(:last-child)::after {
    top: 48px; bottom: 8px; left: 19px; right: auto; width: 1px; height: auto;
  }
  .dp-step-verb { margin: 0 0 4px; line-height: 1.3; }
  .home .dp-step h3 { font-size: 1.5rem; margin-top: 0; margin-bottom: 12px; }
  .dp-benefits { grid-template-columns: 1fr; gap: 14px; }
  .dp-pod-visual { display: none; }
}
@media (max-width: 480px) {
  .dp-benefits{ grid-template-columns: 1fr; }
  .dp-actions .dp-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .home :is(.dp-btn, .dp-subject) { transition: none; }
  .home .dp-btn:is(:hover, :active) { transform: none; }
}
.dp-subjects-pod + .dp-actions { margin-top: 40px; }
.dp-subjects-pod + .dp-actions { justify-content: flex-end; }

/* — Fonds pastel par section (mode clair uniquement) : une teinte par matière, tirée de stylesheet.css —
   accueil = compta (violet) · parcours = éco. d'entreprise (bleu) · matières = éco. politique (vert)
   · podcasts = droit (ambre) · trophées = site (ardoise). Les chiffres gardent le fond d'origine. */
html:not([data-bs-theme="dark"]) .home {
  --bg-accueil:  #f4f5f7;
  --bg-parcours: #dbeaf4;
  --bg-matieres: #dcebe4;
  --bg-podcasts: #f7e7da;
  --bg-trophees: #e8edf4;
}
html:not([data-bs-theme="dark"]) .home #accueil   { background: var(--bg-accueil); }
html:not([data-bs-theme="dark"]) .home #parcours  { background: var(--bg-parcours); }
html:not([data-bs-theme="dark"]) .home #mobile    { background: var(--bg-matieres); }
html:not([data-bs-theme="dark"]) .home #podcasts  { background: var(--bg-podcasts); }
html:not([data-bs-theme="dark"]) .home #trophees  { background: var(--bg-trophees); }
/* Titres (h1, h2 et titres d'étapes) : couleur foncée de la palette de chaque fond pastel (mode clair).
   Valeurs = --pal-deep de stylesheet.css : compta (violet), éco. d'entreprise (bleu), éco. politique (vert),
   droit (ambre), site (ardoise). Contraste sur le fond pastel supérieur à 6:1. */
html:not([data-bs-theme="dark"]) .home {
  --ti-accueil:  #334155;
  --ti-parcours: #185887;
  --ti-matieres: #006a50;
  --ti-podcasts: #9a3a0c;
  --ti-trophees: #1e293b;
}
html:not([data-bs-theme="dark"]) .home #accueil  :is(h1, h2)          { color: var(--ti-accueil); }
[data-bs-theme="dark"] .home #accueil h1 { color: var(--dp-color-accent); }  /* ardoise claire en mode sombre */
html:not([data-bs-theme="dark"]) .home #parcours .dp-step h3          { color: var(--ti-parcours); }
/* Sous-titres des sections : ardoise (comme le titre de l'accueil), un seul mot en couleur (.dp-mot, palette d'une matière) */
html:not([data-bs-theme="dark"]) .home :is(#parcours, #mobile, #podcasts, #trophees) h2 { color: var(--ti-accueil); }
html:not([data-bs-theme="dark"]) .home h2 .dp-mot                     { font-style: italic; color: var(--pal-deep); }
[data-bs-theme="dark"] .home h2 .dp-mot                               { font-style: italic; color: var(--pal-bright); }
/* anneau des numéros du schéma : à la couleur du fond de l'accueil */
html:not([data-bs-theme="dark"]) .home .dp-n { box-shadow: 0 0 0 .8cqw var(--bg-accueil); }
/* le hero n'a plus de bande blanche sous lui */
html:not([data-bs-theme="dark"]) .home #accueil { padding-bottom: clamp(48px, 6vw, 72px); }
html:not([data-bs-theme="dark"]) .home .dp-steps .dp-step-num { border-color: rgb(24 88 135 / .3); }
html:not([data-bs-theme="dark"]) .home .dp-benefits,
html:not([data-bs-theme="dark"]) .home .dp-step:not(:last-child)::after { border-color: rgb(24 88 135 / .25); }
html:not([data-bs-theme="dark"]) .home .dp-step:not(:last-child)::after { background: rgb(24 88 135 / .25); }

/* — Podcasts : pastilles opaques (blanches) pour un meilleur contraste sur le fond ambre — */
/*   Même pastille pour les liens des matières du hero */
html:not([data-bs-theme="dark"]) .home :is(#podcasts, .dp-hero) .dp-subject {
  background: #fff; border: 1.5px solid rgb(var(--dg-rgb) / .8); color: var(--pal-deep);
}
html:not([data-bs-theme="dark"]) .home :is(#podcasts, .dp-hero) .dp-subject:hover { background: #fff; box-shadow: 0 10px 20px -12px rgb(var(--dg-rgb) / .9); }
html:not([data-bs-theme="dark"]) .home #podcasts .dp-subject .pod-chip-n:not(:empty) { background: rgb(var(--dg-rgb) / .22); color: var(--pal-deep); }
html:not([data-bs-theme="dark"]) .home :is(#podcasts, .dp-hero) .dp-subject-ic { color: var(--pal-strong); }

/* — Apprendre sur mobile : deux téléphones (quiz devant, flashcard derrière) — */
.dp-mobile-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.dp-phones { position: relative; height: 560px; display: flex; justify-content: center; }
.dp-phone {
  position: absolute; top: 20px; width: 262px; height: 520px; box-sizing: border-box; padding: 9px;
  border-radius: 40px; background: #1a1530;
  box-shadow: 0 30px 50px -24px rgb(22 25 31 / .55), 0 2px 4px rgb(22 25 31 / .2);
}
.dp-phone-front { left: calc(50% - 190px); transform: rotate(-4deg); z-index: 2; }
.dp-phone-back  { left: calc(50% - 20px);  transform: rotate(6deg) translateY(28px); z-index: 1; }
.dp-phone-screen { height: 100%; border-radius: 32px; overflow: hidden; background: #fff; display: flex; flex-direction: column; color: #1f2329; }
.dp-ph-bar {
  --dg: var(--pal-strong);
  display: flex; flex-direction: column; gap: 2px; padding: 30px 18px 14px;
  background: var(--dg); color: #fff;
}
.dp-ph-bar b { font-family: var(--dp-font-display); font-size: 1.125rem; letter-spacing: -.02em; }
.dp-ph-bar span { font-size: .75rem; opacity: .9; }
.dp-ph-steps { display: flex; gap: 6px; padding: 12px 18px 0; }
.dp-ph-steps i {
  flex: 1; text-align: center; font-style: normal; font-size: .75rem; font-weight: 700;
  padding: 4px 0; border-radius: .5rem; background: #eef0f3; color: #495057;
}
.dp-ph-steps i.on { background: #e4e1ea; color: #4a3f7a; box-shadow: inset 0 0 0 1.5px #5a4e88; }
.dp-ph-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px 18px 18px; }
.dp-ph-count { font-size: .75rem; color: #495057; }
.dp-ph-prog { height: 6px; border-radius: 999px; background: #eef0f3; overflow: hidden; }
.dp-ph-prog span { display: block; width: 40%; height: 100%; background: #5a4e88; border-radius: 999px; }
.dp-ph-q { font-family: var(--dp-font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; margin: 6px 0 4px; }
.dp-ph-opt {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: .75rem;
  border: 1px solid #dde0e6; font-size: .875rem;
}
.dp-ph-opt.on { border: 1.5px solid #5a4e88; background: #e4e1ea; font-weight: 600; color: #2a2347; }
.dp-ph-radio { width: 12px; height: 12px; border-radius: 50%; background: #5a4e88; flex: none; }
.dp-ph-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border-radius: .75rem; background: #5a4e88; color: #fff; font-weight: 600; font-size: .875rem;
}
.dp-ph-btn-wide { margin-top: auto; }
.dp-phone-back .dp-ph-bar { --dg: var(--pal-strong); }
.dp-phone-back .dp-ph-btn { background: #b84a1a; flex: 1; }
.dp-phone-back .dp-ph-btn-ghost { background: #f2d9c8; color: #4a1f0a; }
.dp-ph-flash {
  display: flex; flex-direction: column; gap: 10px; justify-content: center; text-align: center;
  min-height: 190px; padding: 20px; border-radius: 1rem; background: #f4e2d4; border: 1px solid #e3a283;
  font-family: var(--dp-font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em; color: #4a1f0a;
  box-shadow: 6px 6px 0 -1px #fff, 6px 6px 0 0 #e3a283;
}
.dp-ph-flash small { font-family: var(--dp-font-text); font-size: .75rem; color: #9a3a0c; }
.dp-ph-row { display: flex; gap: 8px; margin-top: auto; }

.dp-mobile-list { list-style: none; margin: 36px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dp-mobile-list li { display: flex; align-items: center; gap: 12px; font-size: var(--dp-typography-interface); color: var(--dp-color-ink); }
.dp-mobile-list i {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #2b7b66; font-size: 1rem; box-shadow: 0 2px 6px -2px rgb(22 25 31 / .25);
}
#mobile { overflow-x: clip; }
/* Écran moyen et petit : un seul téléphone, droit, centré (les deux se chevaucheraient et déborderaient) */
@media (max-width: 1000px) {
  .dp-phones { height: auto; padding: 8px 0 24px; }
  .dp-phone { position: static; width: min(262px, 100%); height: 520px; }
  .dp-phone-front { transform: none; }
  .dp-phone-back { display: none; }
}
@media (max-width: 760px) {
  .dp-phones { display: none; }   /* petit écran : le texte seul, sans téléphone */
}

/* — Filets ardoise entre les sections pastel (mode clair) — */
html:not([data-bs-theme="dark"]) .home :is(#parcours, #mobile, #podcasts, #trophees) { border-top: 1px solid #334155; }
html:not([data-bs-theme="dark"]) .home #trophees { border-bottom: 1px solid #334155; }

/* — Titre de l'accueil : plus grand, interligne resserré — */
.home .dp-hero h1 { font-size: clamp(38px, 5.4vw, 76px); font-weight: 450; line-height: 1; letter-spacing: -.03em; min-height: 4em; }  /* hauteur minimale : le script la règle sur le texte le plus haut */
/* Petit écran : titre plus grand (limité par « Comptabilité, », le mot le plus long, qui doit tenir sur une ligne) */
@media (max-width: 760px) {
  .home .dp-hero h1 { font-size: clamp(34px, 9.6vw, 56px); overflow-wrap: break-word; }}
/* Petit écran : le téléphone est masqué, le texte prend toute la largeur (la grille à 2 colonnes est définie plus haut dans le fichier que la règle responsive, qui ne s'appliquait donc pas) */
@media (max-width: 760px) {
  .dp-mobile-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Smartphones : cadre plus fin */
.dp-phone { padding: 4px; border-radius: 36px; }
.dp-phone-screen { border-radius: 32px; }

/* — Mode sombre : écran des smartphones — */
[data-bs-theme="dark"] .dp-phone { background: #0b0d11; box-shadow: 0 0 0 1px #3a3f4a, 0 30px 50px -24px rgb(0 0 0 / .8); }
[data-bs-theme="dark"] .dp-phone-screen { background: #171a20; color: #dee2e6; }
[data-bs-theme="dark"] .dp-ph-bar { background: var(--pal-night); color: #fff; border-bottom: 1px solid rgb(var(--pal-rgb) / .35); }
[data-bs-theme="dark"] .dp-ph-steps i { background: #262b33; color: #adb5bd; }
[data-bs-theme="dark"] .dp-ph-steps i.on { background: #2a2347; color: #c6bedd; box-shadow: inset 0 0 0 1.5px #a598c7; }
[data-bs-theme="dark"] .dp-ph-count { color: #adb5bd; }
[data-bs-theme="dark"] .dp-ph-prog { background: #2c313a; }
[data-bs-theme="dark"] .dp-ph-prog span { background: #a598c7; }
[data-bs-theme="dark"] .dp-ph-opt { border-color: #2c313a; }
[data-bs-theme="dark"] .dp-ph-opt.on { border-color: #a598c7; background: #2a2347; color: #e4e1ea; }
[data-bs-theme="dark"] .dp-ph-radio { background: #a598c7; }
[data-bs-theme="dark"] .dp-ph-btn { background: #a598c7; color: #15151f; }
[data-bs-theme="dark"] .dp-phone-back .dp-ph-btn { background: #e88a5b; color: #2a1208; }
[data-bs-theme="dark"] .dp-phone-back .dp-ph-btn-ghost { background: #3a2418; color: #f2d9c8; }
[data-bs-theme="dark"] .dp-ph-flash {
  background: #3a2418; border-color: #8a4a2a; color: #f4e2d4;
  box-shadow: 6px 6px 0 -1px #171a20, 6px 6px 0 0 #8a4a2a;
}
[data-bs-theme="dark"] .dp-ph-flash small { color: #e88a5b; }
[data-bs-theme="dark"] .dp-mobile-list i { background: #1d2128; color: #7fb6a4; box-shadow: none; }

/* ═════════════ Animations de l'accueil : titre du hero ═════════════
   Tout ce qui bouge est dans le bloc « no-preference » : avec « réduire les animations », la page reste fixe.
   La classe .w (un mot du titre) est posée par le script d'index.html. */

/* Bouton « Découvrir le parcours » : flèche vers le bas */
.dp-btn i { display: inline-block; transition: transform var(--dp-motion-interaction) var(--dp-motion-easing); }
.dp-btn:hover i { transform: translateY(3px); }
.dp-steps .dp-step:nth-child(1), .dp-benefits .dp-benefit:nth-child(1) { --i: 0; }
.dp-steps .dp-step:nth-child(2), .dp-benefits .dp-benefit:nth-child(2) { --i: 1; }
.dp-steps .dp-step:nth-child(3), .dp-benefits .dp-benefit:nth-child(3) { --i: 2; }
.dp-steps .dp-step:nth-child(4) { --i: 3; }

@media (prefers-reduced-motion: no-preference) {
  /* — Hero : titre mot par mot — */
  .home .dp-hero h1 .w {
    display: inline-block; opacity: 0; transform: translateY(.35em);
    animation: hero-word .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 70ms + 120ms);
  }
  @keyframes hero-word { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }

  /* Groupe qui alterne dans le titre : le mot sort vers le haut, le suivant monte du bas */
  .home .dp-hero h1 .dp-rot-txt { display: inline-block; font-style: italic; transition: opacity .28s ease, transform .28s ease; }
  /* Chaque matière dans sa couleur (palettes --pal-* définies par data-matiere ; version claire en mode sombre) */
  .home .dp-hero h1 .dp-rot-txt[data-matiere] { color: var(--pal-strong); }
  [data-bs-theme="dark"] .home .dp-hero h1 .dp-rot-txt[data-matiere] { color: var(--pal-bright); }
  .home .dp-hero h1 .dp-rot-txt.is-out { opacity: 0; transform: translateY(-.4em); }
  .home .dp-hero h1 .dp-rot-txt.is-in-start { opacity: 0; transform: translateY(.4em); transition: none; }

  /* Bouton principal : la flèche rappelle de temps en temps qu'il y a une suite en dessous */
  .dp-actions .dp-btn-primary[href="#parcours"] i { animation: cta-nudge 6s ease-in-out 3.5s infinite; }
  .dp-actions .dp-btn-primary[href="#parcours"]:hover i { animation: none; }
  @keyframes cta-nudge { 0%, 14%, 100% { transform: none; } 4%, 10% { transform: translateY(5px); } 7% { transform: translateY(1px); } }

  @media (hover: hover) {
    .dp-step { transition: transform .2s ease-out; }
    .dp-step:hover { transform: translateY(-3px); }
  }

  /* « Un parcours en 4 étapes » : les étapes apparaissent l'une après l'autre quand la section entre à l'écran.
     .rv est posée par le script d'index.html (étapes masquées), .is-in à l'arrivée ; --i = rang de l'étape (0 à 3).
     translate / scale (propriétés individuelles) : le survol, qui utilise transform, n'est pas gêné. */
  .dp-steps.rv .dp-step { opacity: 0; translate: 0 28px; }
  .dp-steps.rv .dp-step .dp-step-num { scale: .55; }
  .dp-steps.rv .dp-step.is-in {
    opacity: 1; translate: 0 0;
    transition: opacity .6s ease calc(var(--i) * 380ms), translate .7s cubic-bezier(.2, .7, .2, 1) calc(var(--i) * 380ms), transform .2s ease-out;
  }
  .dp-steps.rv .dp-step.is-in .dp-step-num { scale: 1; transition: scale .55s cubic-bezier(.34, 1.56, .64, 1) calc(var(--i) * 380ms + 150ms); }
  @media (min-width: 761px) {
    /* Le trait qui relie un numéro au suivant se dessine ensuite, vers l'étape suivante */
    .dp-steps.rv .dp-step:not(:last-child)::after { transform-origin: left center; scale: 0 1; }
    .dp-steps.rv .dp-step.is-in:not(:last-child)::after { scale: 1 1; transition: scale .5s ease calc(var(--i) * 380ms + 380ms); }
  }
}
/* ═════════════ Défilement doux, téléphones, podcasts ═════════════
   Tout ce qui bouge est dans « no-preference ». .is-in sur .dp-phones est posée par le script d'index.html. */

/* — Téléphones : variables de couleur (clair / sombre) utilisées par la démonstration — */
.dp-phone { --ph-off-bd: #dde0e6; --ph-on-bd: #5a4e88; --ph-on-bg: #e4e1ea; --ph-on-fg: #2a2347; --ph-ok-bd: #2b7b66; --ph-ok-bg: #d6eee5; --ph-ok-fg: #14473a; }
[data-bs-theme="dark"] .dp-phone { --ph-off-bd: #2c313a; --ph-on-bd: #a598c7; --ph-on-bg: #2a2347; --ph-on-fg: #e4e1ea; --ph-ok-bd: #4fae92; --ph-ok-bg: #12332b; --ph-ok-fg: #bfeadb; }
.dp-ph-ok { margin-left: auto; opacity: 0; font-size: 1rem; line-height: 1; color: var(--ph-ok-bd); }
/* Flashcard : la face « réponse » est posée sur la question (invisible tant qu'aucune animation ne tourne) */
.dp-ph-flash { position: relative; }
.dp-fl-q { display: flex; flex-direction: column; gap: 10px; }
.dp-fl-a { position: absolute; inset: 20px; display: flex; flex-direction: column; gap: 10px; justify-content: center; opacity: 0; }
.dp-phone-back .dp-ph-body { perspective: 700px; }
.dp-ph-ico-pop { display: inline-flex; }

@media (prefers-reduced-motion: no-preference) {
  /* — Défilement doux vers les ancres — */
  html:has(main.home) { scroll-behavior: smooth; }
  .home section[id] { scroll-margin-top: 64px; }

  /* — Section « Sur mobile » : arrivée des téléphones, flottement, démonstration — */
  .dp-phones.is-in .dp-phone-front { animation: phone-float 5.6s ease-in-out infinite alternate; }
  .dp-phones.is-in .dp-phone-back  { animation: phone-float 6.4s ease-in-out .3s infinite alternate-reverse; }
  @keyframes phone-float { from { translate: 0 0; } to { translate: 0 -8px; } }

  /* Quiz (téléphone de devant) : choix, validation, bonne réponse, question suivante — boucle de 9 s */
  .dp-phones.is-in .dp-phone-front .dp-ph-opt.on { animation: ph-answer 9s ease-in-out .6s infinite; }
  .dp-phones.is-in .dp-phone-front .dp-ph-radio { animation: ph-radio 9s ease-in-out .6s infinite; }
  .dp-phones.is-in .dp-phone-front .dp-ph-ok { animation: ph-ok 9s ease-in-out .6s infinite; }
  .dp-phones.is-in .dp-phone-front .dp-ph-btn-wide { animation: ph-valider 9s ease-in-out .6s infinite; }
  .dp-phones.is-in .dp-phone-front .dp-ph-prog span { animation: ph-prog 9s ease-in-out .6s infinite; }
  @keyframes ph-answer {
    0%, 12%   { background: transparent; border-color: var(--ph-off-bd); color: inherit; }
    18%, 40%  { background: var(--ph-on-bg); border-color: var(--ph-on-bd); color: var(--ph-on-fg); }
    52%, 80%  { background: var(--ph-ok-bg); border-color: var(--ph-ok-bd); color: var(--ph-ok-fg); }
    90%, 100% { background: transparent; border-color: var(--ph-off-bd); color: inherit; }
  }
  @keyframes ph-radio { 0%, 12% { opacity: 0; } 18%, 40% { opacity: 1; } 50%, 80% { opacity: 0; } 90%, 100% { opacity: 0; } }
  @keyframes ph-ok { 0%, 48% { opacity: 0; transform: scale(0); } 54% { opacity: 1; transform: scale(1.3); } 58%, 80% { opacity: 1; transform: scale(1); } 88%, 100% { opacity: 0; transform: scale(1); } }
  @keyframes ph-valider { 0%, 14% { opacity: .45; transform: none; } 20%, 38% { opacity: 1; transform: none; } 42% { transform: scale(.94); } 46%, 100% { opacity: 1; transform: none; } }
  @keyframes ph-prog { 0%, 84% { width: 30%; } 92%, 100% { width: 40%; } }

  /* Flashcard (téléphone de derrière) : la carte se retourne, puis revient — boucle de 10 s */
  .dp-phones.is-in .dp-phone-back .dp-ph-flash { animation: fl-flip 10s ease-in-out 1s infinite; }
  .dp-phones.is-in .dp-phone-back .dp-fl-q { animation: fl-q 10s step-end 1s infinite; }
  .dp-phones.is-in .dp-phone-back .dp-fl-a { animation: fl-a 10s step-end 1s infinite; }
  .dp-phones.is-in .dp-phone-back .dp-ph-btn:not(.dp-ph-btn-ghost) { animation: fl-know 10s ease-in-out 1s infinite; }
  @keyframes fl-flip {
    0%, 36% { transform: rotateY(0); } 43% { transform: rotateY(90deg); } 43.01% { transform: rotateY(-90deg); }
    50%, 86% { transform: rotateY(0); } 93% { transform: rotateY(90deg); } 93.01% { transform: rotateY(-90deg); } 100% { transform: rotateY(0); }
  }
  @keyframes fl-q { 0% { opacity: 1; } 43.01% { opacity: 0; } 93.01% { opacity: 1; } }
  @keyframes fl-a { 0% { opacity: 0; } 43.01% { opacity: 1; } 93.01% { opacity: 0; } }
  @keyframes fl-know { 0%, 60% { transform: none; } 64% { transform: scale(.93); } 68%, 100% { transform: none; } }


  /* — Podcasts : l'icône volume « joue » au survol d'une pastille — */
  .dp-subjects-pod .dp-subject:hover .dp-subject-ic i { animation: vol-play .9s ease-in-out infinite; }
  @keyframes vol-play { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

}


/* Carte des trophées réduite au bloc « trophée + 50+ » : centré, sans filet de séparation */
a.dp-trophy-link { justify-content: center; }
a.dp-trophy-link .dp-trophy-top { border: 0; padding: 0; width: auto; align-self: center; justify-content: center; }

/* Trophées : seule l'icône, grande, sans fond ni encart, qui flotte comme les smartphones (phone-float) */
.home a.dp-trophy-link {
  background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; border-radius: 0;
  justify-content: center; align-items: center; justify-self: center;
}
.home a.dp-trophy-link:hover { transform: none; border: 0; }
.home a.dp-trophy-link .dp-trophy-top { padding: 0; border: 0; width: auto; align-self: center; justify-content: center; display: flex; }
.home a.dp-trophy-link .dp-trophy-ic, [data-bs-theme="dark"] .home a.dp-trophy-link .dp-trophy-ic {
  background: none; width: 190px; height: 190px; font-size: 150px; border-radius: 0; color: var(--dp-color-accent);
}
@media (max-width: 760px) {
  .home a.dp-trophy-link .dp-trophy-ic, [data-bs-theme="dark"] .home a.dp-trophy-link .dp-trophy-ic { width: 140px; height: 140px; font-size: 110px; }
}
@media (prefers-reduced-motion: no-preference) {
  .home a.dp-trophy-link { animation: phone-float 5.6s ease-in-out infinite alternate; }
}

/* Trophées : l'icône occupe une colonne étroite et le texte démarre juste à côté (écran moyen et large) */
@media (min-width: 761px) {
  .dp-split.dp-split-trophy { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: center; }
  .home a.dp-trophy-link { justify-self: center; }
}

/* ═════════════ Défilement « one page website » (accueil) ═════════════
   Classe html.onepage posée par le script « one page » d'index.html (≥ 761 px de large, ≥ 520 px de haut, sans
   « réduire les animations »). Chaque zone de couleur occupe un écran : l'accueil sous le menu (menu + accueil = un
   écran), les autres zones tout l'écran, la dernière « page » est « Progression » avec les chiffres, le pied de page vient ensuite. Une zone dont le
   contenu est plus haut que l'écran garde sa hauteur naturelle. Un léger défilement emmène directement à la zone
   suivante (script d'index.html). Le menu défile avec la page. */
html.onepage main.home > section {
  min-height: 100svh; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; scroll-margin-top: 0;
}
html.onepage main.home > #accueil { min-height: calc(100svh - var(--nav-h, 56px)); padding-block: 4px; }   /* marges minimales, le centrage vertical fait le reste : le contenu de l'accueil tient en entier sous le menu */
html.onepage main.home > #trophees { min-height: 100svh; }   /* « Progression » + chiffres : un écran entier ; le pied de page vient ensuite */
html.onepage main.home > section > .dp-wrap { width: 100%; }
/* Accueil : titre centré dans la zone, bouton « Découvrir le parcours » tout en bas */
html.onepage main.home > #accueil > .dp-wrap { flex: 1; display: flex; flex-direction: column; }
html.onepage main.home > #accueil .dp-hero-grid { flex: 1; align-content: center; padding-bottom: clamp(32px, 10vh, 100px); }   /* remonte légèrement le titre (le centrage se fait sur un espace plus haut) */
html.onepage main.home > #accueil .dp-actions-centre { margin-top: 0; margin-bottom: clamp(20px, 4vh, 40px); }
html.onepage main.home > #mobile { padding-block: 48px; }   /* les téléphones (560 px) ne doivent pas rendre cette zone plus haute que l'écran */

/* Section « Progression » : le trophée et son texte, puis les 4 chiffres (anciennement une bande séparée) */
.dp-trophy-facts { margin-top: clamp(32px, 5vw, 64px); }   /* pas de filet de séparation */
/* Accueil : pas de bande blanche entre la dernière section et le pied de page (le pied de page a une marge haute de 48 px) */
html:has(#trophees) [data-component="footer"] > footer { margin-top: 0 !important; }

/* ═════════════ Trophées : les succès qui se débloquent remplacent le grand trophée ═════════════ */
/* Carte : colonne un peu plus large, pastilles alignées à droite (côté du texte), sans le flottement prévu pour l'icône */
@media (min-width: 761px) { .dp-split.dp-split-trophy { grid-template-columns: 300px minmax(0, 1fr); } }
.home a.dp-trophy-link { width: 100%; align-items: stretch; }
.home a.dp-trophy-link .dp-troph-cloud { width: 100%; }
@media (prefers-reduced-motion: no-preference) { .home a.dp-trophy-link { animation: none; } }
/* Déverrouillage : la pastille arrive grisée avec un cadenas, puis s'ouvre : couleur de la matière, emoji du succès qui « pop », halo */
.dp-troph .dp-subject-ic { min-width: 1.4em; justify-content: center; }
.dp-troph .ic-lock, .dp-troph .ic-emoji { display: inline-flex; align-items: center; }
.dp-troph.is-locked .ic-emoji, .dp-troph:not(.is-locked) .ic-lock { display: none; }
.dp-troph.is-locked { filter: grayscale(1); color: #64748b; }
@media (prefers-reduced-motion: no-preference) {
  .dp-troph-cloud.is-live .dp-troph.dp-subject { transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1), top .55s cubic-bezier(.2, .8, .2, 1), filter .5s ease, color .5s ease; }
  .dp-troph-cloud.is-live .dp-troph.dp-subject.is-out { transition-duration: .35s; }
  .dp-troph.is-locked .ic-lock i { animation: troph-secoue .5s ease-in-out .1s 1; }
  .dp-troph.is-unlocked { animation: troph-halo .9s ease-out 1; }
  .dp-troph.is-unlocked .ic-emoji { animation: troph-pop .55s cubic-bezier(.34, 1.56, .64, 1) 1; }
  @keyframes troph-secoue { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
  @keyframes troph-pop { 0% { transform: scale(.3) rotate(-25deg); } 100% { transform: none; } }
  @keyframes troph-halo { 0% { box-shadow: 0 0 0 0 rgb(var(--dg-rgb) / .55); } 100% { box-shadow: 0 0 0 16px rgb(var(--dg-rgb) / 0); } }
}

/* Téléphones réduits (~25 %) : zoom sur l'ensemble, la mise en page interne reste identique */
.dp-phones { zoom: .75; }

/* Dernière section : les chiffres descendent vers le bas de la zone, le bouton « Retourner au début » ferme la page */
html.onepage main.home > #trophees > .dp-wrap { flex: 1; display: flex; flex-direction: column; }
html.onepage main.home > #trophees .dp-trophy-facts { margin-top: auto; }
html.onepage main.home > #trophees { padding-bottom: 4px; }
.dp-actions-haut { margin-top: clamp(24px, 4vw, 40px); margin-bottom: clamp(20px, 4vh, 40px); }
