/* Atelier de mise à jour AlphAI — direction artistique de learningrobots.ai :
   DM Sans, bleu nuit, jaune, nuage ; boutons en pilule, cartes arrondies au « R » en filigrane. */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(polices/DMSans-latin.woff2) format('woff2');
}

:root {
  --nuit: #0f1c56;
  --bleu: #253785;
  --canard: #007bc2;
  --ciel: #79ccfc;
  --ciel-pale: #eaf5fe;
  --nuage: #edf1f7;
  --brume: #bcc6d2;
  --jaune: #ffcb00;
  --jaune-vif: #ffd83e;
  --orange: #f75123;
  --encre: #0e0e0e;
  --texte: #2c2f32;
  --pierre: #586069;
  --blanc: #fff;
  --ok: #cef5ca;
  --ok-fonce: #114e0b;
  --erreur: #f8e4e4;
  --erreur-fonce: #3b0b0b;
  --alerte: #fcf8d8;
  --alerte-fonce: #5e5515;
  --focus: #2d62ff;

  --r-pilule: 6.25rem;
  --r-carte: 1rem;
  --r-moyen: .75rem;
  --r-petit: .5rem;

  --ombre: 0 1px 2px rgb(15 28 86 / .06), 0 8px 24px -12px rgb(15 28 86 / .18);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--texte);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--blanc); font-size: 1rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu); text-underline-offset: 3px; }
a:hover { color: var(--canard); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ─── Barre du haut ─────────────────────────────────────────────── */
.barre-haut {
  position: sticky; top: 0; z-index: 10;
  background: rgb(237 241 247 / .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgb(188 198 210 / .45);
}
.barre-haut__contenu { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.marque img { width: 120px; height: auto; }
.pastille-haut {
  font-size: .82rem; font-weight: 600; color: var(--blanc); background: var(--bleu);
  padding: 7px 14px; border-radius: var(--r-pilule); white-space: nowrap;
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--nuage); padding: 72px 0 0; }
.hero__contenu { position: relative; z-index: 1; text-align: center; max-width: 820px; }
.reseau { position: absolute; top: -40px; right: -90px; width: 520px; opacity: .9; pointer-events: none; }
.reseau__liens path { stroke: var(--brume); stroke-width: 1.5; fill: none; opacity: .7; }
.reseau__noeuds circle { fill: var(--nuage); stroke: var(--brume); stroke-width: 1.5; }
.surtitre {
  display: inline-block; margin: 0 0 18px; font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  color: var(--bleu); background: var(--blanc); border-radius: var(--r-pilule); padding: 6px 14px;
  box-shadow: var(--ombre);
}
h1 {
  margin: 0; font-size: clamp(2.2rem, 5.4vw, 3.9rem); line-height: 1.06; letter-spacing: -.035em;
  font-weight: 700; color: var(--encre); text-wrap: balance;
}
.h1__bleu { display: block; color: var(--bleu); }
.chapo { margin: 22px auto 0; max-width: 560px; font-size: 1.08rem; color: var(--texte); text-wrap: pretty; }
.hero__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 30px; }
.hero__version { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--pierre); }
.point { width: 8px; height: 8px; border-radius: 50%; background: var(--brume); flex: none; }
.point--ok { background: #2fb344; box-shadow: 0 0 0 4px rgb(47 179 68 / .16); }
.point--attente { animation: pulse 1.2s ease-in-out infinite; }
.point--erreur { background: var(--orange); }
@keyframes pulse { 50% { opacity: .35; } }

.defilant {
  display: flex; width: max-content; margin-top: 36px; padding-bottom: 6px;
  font-size: clamp(4rem, 12vw, 9.5rem); font-weight: 600; letter-spacing: -.04em; line-height: 1;
  color: transparent; -webkit-text-stroke: 0; background: linear-gradient(180deg, #d7deea 20%, #e6ebf3 90%);
  -webkit-background-clip: text; background-clip: text; white-space: nowrap; user-select: none;
  animation: defile 60s linear infinite;
}
.defilant span { padding-right: .3em; }
@keyframes defile { to { transform: translateX(-50%); } }

/* ─── Boutons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 12px 22px; border: 0; border-radius: var(--r-pilule);
  font: inherit; font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.btn--jaune { background: var(--jaune); color: var(--encre); }
.btn--jaune:hover { background: var(--jaune-vif); color: var(--encre); }
.btn--bleu { background: var(--bleu); color: var(--blanc); }
.btn--bleu:hover:not(:disabled) { background: var(--nuit); color: var(--blanc); }
.btn--clair { background: var(--blanc); color: var(--bleu); box-shadow: inset 0 0 0 1.5px var(--brume); }
.btn--clair:hover { box-shadow: inset 0 0 0 1.5px var(--bleu); }
.btn--grand { min-height: 54px; padding: 14px 28px; font-size: 1.04rem; }
.fleche { width: 16px; height: 16px; flex: none; }
.fleche path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn--occupe .fleche { animation: tourne .9s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.lien { font-weight: 600; font-size: .95rem; }

/* ─── Étapes ────────────────────────────────────────────────────── */
.page { padding: 56px 0 72px; }
.etapes-page { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.carte {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--nuage); border-radius: var(--r-carte); padding: clamp(22px, 4vw, 44px);
}
.carte::after {
  /* le grand « R » de Learning Robots, en filigrane comme sur le site */
  content: ''; position: absolute; z-index: -1; right: -60px; bottom: -120px; width: 260px; height: 550px;
  background: url(img/r.svg) no-repeat center / contain; opacity: .05; pointer-events: none;
}
.carte--action { background: var(--blanc); box-shadow: inset 0 0 0 1.5px var(--nuage), var(--ombre); }
.carte--action::after { opacity: .035; }
.carte__tete { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.numero {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bleu); color: var(--blanc); font-weight: 700; font-size: 1.1rem;
}
.numero--jaune { background: var(--jaune); color: var(--encre); }
h2 { margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; color: var(--encre); font-weight: 700; }
.carte__sous-titre { margin: 4px 0 0; color: var(--pierre); font-size: .95rem; }
.carte p { margin: 0 0 14px; }
.carte__grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; }
.liste { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.liste li { position: relative; padding-left: 22px; }
.liste li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--jaune); }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.figure { margin: 0; background: var(--blanc); border-radius: var(--r-moyen); overflow: hidden; }
.figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.figure--sombre { background: #202020; }
.figure--sombre img { object-fit: contain; }
.figure figcaption { padding: 9px 12px; font-size: .82rem; color: var(--pierre); background: var(--blanc); }

.gestes { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gestes li { display: flex; gap: 12px; align-items: flex-start; background: var(--blanc); border-radius: var(--r-moyen); padding: 16px; }
.gestes__icone { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ciel-pale); color: var(--bleu); font-size: .95rem; }
.note { color: var(--pierre); font-size: .93rem; }

/* ─── Version et installation ───────────────────────────────────── */
.version { background: var(--nuage); border-radius: var(--r-moyen); padding: 16px 18px; margin-bottom: 20px; }
.version__tete { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.version__etiquette { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--pierre); }
.version__nom { font-size: 1.25rem; font-weight: 700; color: var(--encre); letter-spacing: -.01em; }
.version__badge { font-size: .78rem; font-weight: 600; color: var(--ok-fonce); background: var(--ok); padding: 3px 10px; border-radius: var(--r-pilule); }
.version__badge--ancienne { color: var(--alerte-fonce); background: var(--alerte); }
.version__ligne { margin: 4px 0 0 !important; color: var(--pierre); font-size: .92rem; }
.version__notes { margin: 8px 0 0 !important; font-size: .88rem; color: var(--pierre); white-space: pre-line; }
.version--erreur { background: var(--erreur); }
.version--erreur .version__ligne { color: var(--erreur-fonce); }

.rangee { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.pli { margin-top: 20px; border-top: 1px solid var(--nuage); }
.pli > summary {
  list-style: none; cursor: pointer; padding: 14px 0 4px; font-weight: 600; font-size: .95rem; color: var(--bleu);
  display: flex; align-items: center; gap: 8px; width: fit-content;
}
.pli > summary::-webkit-details-marker { display: none; }
.pli > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
.pli[open] > summary::before { transform: rotate(45deg); }
.pli__corps { padding: 12px 0 0; }
.options { display: grid; gap: 14px; max-width: 560px; }
.champ { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--encre); }
.champ select {
  font: inherit; font-weight: 500; padding: 10px 14px; border-radius: var(--r-petit); border: 1.5px solid var(--brume);
  background: var(--blanc); color: var(--encre); max-width: 320px;
}
.case { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: start; font-weight: 600; font-size: .92rem; color: var(--encre); cursor: pointer; }
.case input { margin: 4px 0 0; width: 17px; height: 17px; accent-color: var(--bleu); }
.case small { grid-column: 2; font-weight: 400; color: var(--pierre); font-size: .86rem; }

.suivi { margin-top: 24px; }
.progression { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.progression li {
  display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 500; color: var(--pierre);
  background: var(--nuage); padding: 6px 12px 6px 10px; border-radius: var(--r-pilule);
}
.progression li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brume); }
.progression li[data-etat="en_cours"] { color: var(--bleu); background: var(--ciel-pale); }
.progression li[data-etat="en_cours"]::before { background: var(--canard); animation: pulse 1s ease-in-out infinite; }
.progression li[data-etat="fait"] { color: var(--ok-fonce); background: var(--ok); }
.progression li[data-etat="fait"]::before { background: #2fb344; }
.progression li[data-etat="echec"] { color: var(--erreur-fonce); background: var(--erreur); }
.progression li[data-etat="echec"]::before { background: var(--orange); }
.barre { height: 10px; border-radius: var(--r-pilule); background: var(--nuage); overflow: hidden; }
.barre__plein { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--bleu), var(--canard)); transition: width .3s ease; }
.barre__texte { margin: 8px 0 0 !important; font-size: .88rem; color: var(--pierre); font-variant-numeric: tabular-nums; }

.encart { margin-top: 20px; padding: 16px 18px; border-radius: var(--r-moyen); background: var(--ciel-pale); color: var(--nuit); }
.encart p { margin: 0 0 6px; }
.encart p:last-child { margin: 0; }
.encart--ok { background: var(--ok); color: var(--ok-fonce); }
.encart--erreur { background: var(--erreur); color: var(--erreur-fonce); }
.encart--alerte { background: var(--alerte); color: var(--alerte-fonce); margin: 0 0 20px; }
.encart .btn { margin-top: 10px; }

.pli--journal { margin-top: 24px; }
.journal {
  margin: 10px 0 0; max-height: 260px; overflow: auto; padding: 14px 16px; border-radius: var(--r-petit);
  background: var(--nuit); color: #dbe3f4; font: .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap; word-break: break-word;
}
.journal:empty::before { content: 'Rien pour l’instant.'; opacity: .6; }

/* ─── FAQ ───────────────────────────────────────────────────────── */
.faq { margin-top: 64px; max-width: 820px; }
.faq h2 { margin-bottom: 18px; }
.faq details { border-bottom: 1px solid var(--nuage); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-weight: 600; color: var(--encre); font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--nuage); color: var(--bleu); font-size: 1.2rem; font-weight: 500; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--jaune); color: var(--encre); }
.faq__corps { padding: 0 0 18px; color: var(--texte); max-width: 70ch; }
.faq__corps p { margin: 0; }

/* ─── Pied ──────────────────────────────────────────────────────── */
.pied { background: var(--nuit); color: #c9d2ea; padding: 48px 0; }
.pied__contenu { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 32px; }
.pied__devise { margin: 0; color: var(--blanc); font-weight: 600; }
.pied__texte { margin: 0; font-size: .92rem; }
.pied a { color: var(--jaune); }
.pied a:hover { color: var(--jaune-vif); }

/* ─── Petits écrans ─────────────────────────────────────────────── */
@media (max-width: 880px) {
  .carte__grille { grid-template-columns: 1fr; }
  .gestes { grid-template-columns: 1fr; }
  .reseau { width: 360px; right: -160px; top: -30px; opacity: .6; }
  .pied__contenu { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero { padding-top: 48px; }
  .figures { grid-template-columns: 1fr; }
  .pastille-haut { display: none; }
  .btn--grand { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .defilant, .point--attente, .btn--occupe .fleche, .progression li::before { animation: none !important; }
}
