:root {
  --bleu: #1d4f91;
  --bleu-clair: #2f6fc0;
  --bleu-nuit: #10254a;
  --orange: #ef8a1f;
  --vert: #17936a;
  --rouge: #d8372c;
  --violet: #6b4bbd;

  --fond: #f4f6fb;
  --carte: #ffffff;
  --trait: #e2e7f0;
  --texte: #16233a;
  --texte-doux: #5f6c85;

  --ombre: 0 1px 2px rgba(16, 37, 74, .06), 0 8px 24px rgba(16, 37, 74, .07);
  --ombre-forte: 0 2px 4px rgba(16, 37, 74, .08), 0 18px 44px rgba(16, 37, 74, .14);
  --rayon: 14px;
  --largeur-menu: 292px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--texte);
  background: var(--fond);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

/* ---------- Structure ---------- */

.mise-en-page {
  display: grid;
  grid-template-columns: var(--largeur-menu) minmax(0, 1fr);
  min-height: 100vh;
}

.contenu {
  padding: 42px clamp(20px, 4vw, 56px) 96px;
  max-width: 1080px;
  width: 100%;
}

/* ---------- Barre latérale ---------- */

.sidebar {
  background: var(--bleu-nuit);
  color: #cdd8ea;
  padding: 24px 18px 48px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.marque {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
  margin-bottom: 26px;
  padding: 6px 8px;
}
.marque:hover { text-decoration: none; }
.marque-logo {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  flex: none;
}
.marque-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 11px;
}
.marque-texte strong { display: block; font-size: 1.02rem; }
.marque-texte small { color: #8fa3c4; font-size: .78rem; }

.nav { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }

.nav-accueil {
  color: #cdd8ea;
  padding: 9px 12px;
  border-radius: 9px;
  font-weight: 600;
}
.nav-accueil:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav-accueil.actif { background: rgba(255, 255, 255, .13); color: #fff; }

.nav-groupe { margin-top: 14px; }

.nav-titre {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 9px;
}
.nav-titre:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav-titre.actif { background: rgba(255, 255, 255, .11); }

.pastille {
  width: 22px; height: 22px;
  flex: none;
  border-radius: 7px;
  background: var(--pastille, var(--bleu-clair));
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.nav-etapes {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 0 0 22px;
  border-left: 1px solid rgba(255, 255, 255, .13);
  margin-left: 22px;
}
.nav-etapes a {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: #a9b9d4;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: .845rem;
}
.nav-etapes a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav-etapes a.actif { color: #fff; background: rgba(47, 111, 192, .45); font-weight: 600; }
.nav-etapes .num {
  font-variant-numeric: tabular-nums;
  color: #6f83a5;
  font-size: .74rem;
  min-width: 13px;
}
.nav-etapes a.actif .num { color: #cfe0ff; }

/* ---------- Fil d'ariane + en-têtes ---------- */

.ariane {
  font-size: .84rem;
  color: var(--texte-doux);
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ariane span { color: #b6c0d2; }

.etiquette {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--bleu);
  padding: 5px 11px;
  border-radius: 999px;
}

.sous-titre { color: var(--texte-doux); font-size: 1.06rem; max-width: 68ch; }

/* ---------- Accueil ---------- */

.hero {
  background: linear-gradient(135deg, var(--bleu-nuit), var(--bleu) 55%, #2a6bbd);
  color: #fff;
  border-radius: 20px;
  padding: 40px clamp(24px, 4vw, 48px);
  box-shadow: var(--ombre-forte);
  margin-bottom: 34px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -70px; top: -70px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(239, 138, 31, .28);
  filter: blur(6px);
}
.hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: .35em; }
.hero p { color: #d3e0f3; max-width: 60ch; position: relative; }
.hero .hero-meta {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; position: relative;
}
.hero .puce {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: .84rem;
}

.grille-parcours {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.carte-parcours {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 24px;
  box-shadow: var(--ombre);
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--accent, var(--bleu));
  transition: transform .16s ease, box-shadow .16s ease;
}
.carte-parcours:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); text-decoration: none; }
.carte-parcours h2 { font-size: 1.15rem; color: var(--texte); }
.carte-parcours p { color: var(--texte-doux); font-size: .92rem; flex: 1; }

.carte-icone {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, white);
  color: var(--accent);
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.compteur-etapes {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Listes d'étapes ---------- */

.liste-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.ligne-etape {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 16px 20px;
  box-shadow: var(--ombre);
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.ligne-etape:hover { text-decoration: none; border-color: var(--bleu-clair); transform: translateX(3px); }
.ligne-etape .rond {
  width: 32px; height: 32px; flex: none;
  border-radius: 50%;
  background: var(--accent, var(--bleu));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: .9rem;
}
.ligne-etape strong { display: block; }
.ligne-etape small { color: var(--texte-doux); }

/* ---------- Page d'étape ---------- */

.entete-etape {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 26px;
}
.entete-etape .rond-geant {
  width: 54px; height: 54px; flex: none;
  border-radius: 16px;
  background: var(--accent, var(--bleu));
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 700;
  box-shadow: var(--ombre);
}

.progression {
  height: 6px;
  background: var(--trait);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}
.progression i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent, var(--bleu)), color-mix(in srgb, var(--accent, var(--bleu)) 45%, var(--orange)));
  border-radius: 999px;
}

.bloc {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 22px 24px;
  box-shadow: var(--ombre);
  margin-bottom: 22px;
}
.bloc > h3 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--texte-doux);
  margin-bottom: 14px;
}

/* Actions numérotées */
.actions { list-style: none; margin: 0; padding: 0; counter-reset: action; }
.actions li {
  counter-increment: action;
  position: relative;
  padding: 0 0 14px 40px;
  border-left: 2px dashed var(--trait);
  margin-left: 13px;
}
.actions li:last-child { border-left-color: transparent; padding-bottom: 0; }
.actions li::before {
  content: counter(action);
  position: absolute;
  left: -14px; top: -2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--carte);
  border: 2px solid var(--accent, var(--bleu));
  color: var(--accent, var(--bleu));
  font-size: .78rem; font-weight: 700;
  display: grid; place-items: center;
}

kbd, .champ {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .85em;
  background: #eef2f9;
  border: 1px solid var(--trait);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--bleu-nuit);
}

/* Encadrés */
.encadre {
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 14px;
  border: 1px solid;
  font-size: .93rem;
}
.encadre:last-child { margin-bottom: 0; }
.encadre > strong:first-child { display: block; margin-bottom: 2px; }
.encadre.astuce { background: #eef7f3; border-color: #bfe3d5; color: #0d5f45; }
.encadre.attention { background: #fdf4e7; border-color: #f4d5a7; color: #8a5312; }
.encadre.info { background: #eef3fb; border-color: #cfdcf1; color: #1b3f75; }

/* Visuels */
.visuel { margin: 0 0 22px; }
.visuel figcaption {
  font-size: .84rem;
  color: var(--texte-doux);
  margin-top: 10px;
  text-align: center;
}

.capture-web {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--trait);
  box-shadow: var(--ombre-forte);
  background: #fff;
}
.barre-navigateur {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  background: #eef1f6;
  border-bottom: 1px solid var(--trait);
}
.barre-navigateur i { width: 10px; height: 10px; border-radius: 50%; background: #cdd4e0; }
.barre-navigateur .url {
  margin-left: 8px;
  background: #fff;
  border: 1px solid var(--trait);
  border-radius: 999px;
  padding: 3px 14px;
  font-size: .76rem;
  color: var(--texte-doux);
  font-family: ui-monospace, Menlo, monospace;
}
.capture-web .zone-capture { position: relative; }
.capture-web img { display: block; width: 100%; }
.capture-web + .capture-web { margin-top: 16px; }

/* Téléphone */
.cadre-mobile {
  width: 300px;
  margin: 0 auto;
  background: #10151f;
  border-radius: 42px;
  padding: 11px;
  box-shadow: var(--ombre-forte);
  position: relative;
}
.cadre-mobile .ecran {
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
  position: relative;
}
.cadre-mobile img { display: block; width: 100%; }

.duo-mobile {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
}
.duo-mobile .cadre-mobile { width: 250px; }

/* Repères sur les captures */
.repere {
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  display: grid; place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(239, 138, 31, .32);
  z-index: 3;
}

.legende-reperes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.legende-reperes li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.legende-reperes .marqueur {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: .74rem; font-weight: 700;
  display: grid; place-items: center;
  margin-top: 2px;
}

.image-absente {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: repeating-linear-gradient(45deg, #f7f9fc, #f7f9fc 12px, #eef2f8 12px, #eef2f8 24px);
  color: var(--texte-doux);
  font-size: .9rem;
  text-align: center;
  padding: 20px;
}

/* Tableaux */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-doux); }
tr:last-child td { border-bottom: 0; }

/* Navigation bas de page */
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.bouton {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  color: var(--texte);
  box-shadow: var(--ombre);
}
.bouton:hover { text-decoration: none; border-color: var(--bleu-clair); color: var(--bleu); }
.bouton.principal { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.bouton.principal:hover { background: var(--bleu-clair); color: #fff; }
.bouton small { display: block; font-weight: 400; font-size: .74rem; opacity: .75; }
.bouton span { display: block; }

.titre-parcours { margin-top: .4em; }

.titre-ecran { text-align: center; font-size: .85rem; margin-top: 10px; font-weight: 600; }

.liste-prerequis { margin: 0; padding-left: 20px; }
.liste-prerequis li { margin-bottom: 6px; }

.bloc > h3 + table { margin-top: -4px; }

.pied {
  margin-top: 50px;
  padding-top: 18px;
  border-top: 1px solid var(--trait);
  color: var(--texte-doux);
  font-size: .82rem;
}

@media (max-width: 900px) {
  .mise-en-page { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav-etapes { display: none; }
  .nav-titre.actif + .nav-etapes { display: block; }
}
