/* Héphaïstos · style « Île de nuit » : bleu nuit, jaune, formes rondes.
   Rail à gauche qui s'ouvre au survol, contenu en cartes. */
:root {
  --nuit: #0B1131;
  --fond: #121A44;
  --carte: #1A2357;
  --carte-haute: #212C69;
  --bord: #2B3780;
  --texte: #F2F4FF;
  --doux: #AAB4E8;
  --jaune: #FFD23F;
  --vert: #8DF0B9;
  --vert-fond: #1E4D3A;
  --rouge: #FF8A8A;
  --rouge-fond: #4D1E2A;
  --jaune-fond: #4A3A10;
  --f-titre: "Archivo Black", "Arial Black", sans-serif;
  --f-texte: "Archivo", system-ui, sans-serif;
  --f-code: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --rail: 68px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--fond); color: var(--texte); font-family: var(--f-texte); font-size: 15px; line-height: 1.5; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }

/* ---------- Rail ---------- */
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--nuit); z-index: 20;
  display: flex; flex-direction: column; gap: 6px; padding: 16px 10px; overflow: hidden;
  transition: width .18s ease; border-right: 1px solid #18205A; }
.rail:hover, .rail:focus-within { width: 250px; box-shadow: 12px 0 40px rgba(0,0,0,.35); }
.rail a { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 8px; border-radius: 14px;
  color: var(--doux); white-space: nowrap; font-weight: 600; }
.rail a:hover { background: var(--carte); color: var(--texte); }
.rail a .ico { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #1C2660; }
.rail a .ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail a.actif { color: var(--texte); }
.rail a > span:last-child { opacity: 0; transition: opacity .12s ease; }
.rail:hover a > span:last-child, .rail:focus-within a > span:last-child { opacity: 1; }
.rail a.actif .ico { background: var(--jaune); color: var(--fond); }
.rail .sep { height: 1px; background: #1C2660; margin: 8px 6px; }

/* ---------- Page ---------- */
.page { margin-left: var(--rail); min-height: 100vh; }
.entete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 32px; border-bottom: 1px solid #1C2660; }
.marque { font-family: var(--f-titre); font-size: 22px; text-transform: uppercase; text-decoration: none; letter-spacing: .01em; }
.marque em { font-style: normal; color: var(--jaune); }
.saison { color: var(--doux); font-weight: 600; font-size: 13px; }
.recherche { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--carte); border: 2px solid var(--bord);
  border-radius: 99px; padding: 6px 14px; min-width: 0; flex: 0 1 320px; }
.recherche svg { width: 16px; height: 16px; fill: none; stroke: var(--doux); stroke-width: 2.2; flex: none; }
.recherche input { background: none; border: 0; color: var(--texte); font: inherit; width: 100%; min-width: 0; outline: none; }
.recherche:focus-within { border-color: var(--jaune); }
.moi { color: var(--doux); font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page, main, .entete { min-width: 0; }
.page { overflow-x: clip; }
main { padding: 28px 32px 64px; max-width: 1180px; outline: none; }

h1 { font-family: var(--f-titre); font-size: clamp(24px, 3vw, 34px); line-height: 1.1; margin: 0 0 6px; text-wrap: balance; }
h2 { font-family: var(--f-texte); font-weight: 800; font-size: 20px; margin: 0; letter-spacing: -.01em; }
.sous { color: var(--doux); margin: 0 0 24px; }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.chip { border: 0; background: #1C2660; color: #C8D0F7; font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 99px; text-decoration: none; }
.chip.actif { background: var(--jaune); color: var(--fond); }

/* ---------- Sections et cartes ---------- */
.section { margin-bottom: 36px; }
.section-tete { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-tete .compte { color: var(--doux); font-size: 13px; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.carte { background: var(--carte); border: 2px solid var(--bord); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; min-width: 0; transition: transform .12s ease, border-color .12s ease; }
a.carte:hover { border-color: var(--jaune); transform: translateY(-2px); }
.carte-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.carte h3 { margin: 0; font-size: 17px; font-weight: 800; }
.carte p { margin: 0; color: var(--doux); font-size: 14px; }
.meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--doux); margin-top: auto; font-variant-numeric: tabular-nums; }
.meta b { color: var(--texte); font-weight: 600; }

.pastille { flex: none; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.p-ok { background: var(--vert-fond); color: var(--vert); }
.p-attente { background: var(--jaune-fond); color: var(--jaune); }
.p-bug { background: var(--rouge-fond); color: var(--rouge); }
.pastilles { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Ordre d'installation ---------- */
.ordre { background: var(--nuit); border: 2px dashed var(--bord); border-radius: 18px; padding: 16px 18px; margin-bottom: 30px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ordre strong { font-weight: 800; margin-right: 6px; }
.ordre a { background: var(--carte); border-radius: 99px; padding: 5px 12px; text-decoration: none; font-family: var(--f-code); font-size: 12.5px; }
.ordre a:hover { background: var(--carte-haute); }
.ordre .fl { color: var(--doux); }

/* ---------- Détail d'un script ---------- */
.retour { display: inline-flex; gap: 6px; align-items: center; color: var(--doux); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.retour:hover { color: var(--texte); }
.detail-tete { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.fichier { font-family: var(--f-code); font-size: 13px; color: var(--doux); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 26px; }
.bouton { border: 0; border-radius: 99px; padding: 10px 18px; font-weight: 800; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.b-jaune { background: var(--jaune); color: var(--fond); }
.b-jaune:hover { background: #FFE07A; }
.b-bleu { background: #1C2660; color: var(--texte); border: 2px solid var(--bord); }
.b-bleu:hover { border-color: var(--jaune); }
.b-rouge { background: var(--rouge-fond); color: var(--rouge); }

.colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.colonnes > div { min-width: 0; }
.bloc { background: var(--carte); border: 2px solid var(--bord); border-radius: 18px; padding: 18px; min-width: 0; }
.bloc + .bloc { margin-top: 18px; }
.bloc h2 { font-size: 16px; margin-bottom: 12px; }
.liste-app { display: grid; gap: 12px; }
.app { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--bord); }
.app:last-child { border-bottom: 0; padding-bottom: 0; }
.app-nom { font-weight: 800; }
.app-nom span { font-family: var(--f-code); font-weight: 400; font-size: 12px; color: var(--jaune); margin-left: 6px; }
.app-role { color: var(--doux); font-size: 13.5px; }
.app-config { font-size: 13.5px; }
.reglages { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.reglages td { padding: 6px 0; vertical-align: top; border-bottom: 1px solid var(--bord); }
.reglages tr:last-child td { border-bottom: 0; }
.reglages td:first-child { font-family: var(--f-code); font-size: 12.5px; color: var(--jaune); padding-right: 10px; white-space: nowrap; }
.reglages td:nth-child(2) { font-variant-numeric: tabular-nums; padding-right: 10px; white-space: nowrap; }
.reglages td:last-child { color: var(--doux); }
.verifier { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.necessite { display: flex; gap: 8px; flex-wrap: wrap; }
.necessite a { font-family: var(--f-code); font-size: 12.5px; background: #1C2660; padding: 4px 10px; border-radius: 99px; text-decoration: none; }
.necessite a:hover { background: var(--carte-haute); }

/* ---------- Code ---------- */
.code { background: var(--nuit); border: 2px solid var(--bord); border-radius: 16px; overflow: hidden; }
.code-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--bord); font-size: 13px; color: var(--doux); }
.code pre { margin: 0; padding: 14px 0; overflow: auto; max-height: 70vh; font-family: var(--f-code); font-size: 12.8px; line-height: 1.6; tab-size: 4; }
.code .l { display: block; padding: 0 16px 0 0; white-space: pre; }
.code .l::before { content: attr(data-n); display: inline-block; width: 52px; padding-right: 14px; text-align: right; color: #4A558F; user-select: none; }
.tk-com { color: #7280C2; font-style: italic; }
.tk-mot { color: var(--jaune); }
.tk-txt { color: var(--vert); }
.tk-num { color: #FFB27A; }
.tk-spec { color: #C9A6FF; }
.tk-fn { color: #8EC5FF; }
.tk-type { color: #FF9EC4; }

/* ---------- Tests et commentaires ---------- */
.tests-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.champ { width: 100%; background: var(--nuit); border: 2px solid var(--bord); border-radius: 12px; color: var(--texte); font: inherit; padding: 10px 12px; resize: vertical; }
.champ:focus { border-color: var(--jaune); outline: none; }
.fil { display: grid; gap: 12px; margin-top: 14px; }
.msg { background: var(--nuit); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.msg-tete { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--doux); margin-bottom: 2px; flex-wrap: wrap; }
.msg-tete b { color: var(--texte); }
.msg-texte { white-space: pre-wrap; overflow-wrap: anywhere; }
.lien-mini { background: none; border: 0; padding: 0; color: var(--doux); font-size: 12.5px; text-decoration: underline; margin-left: auto; }
.vide { color: var(--doux); font-size: 14px; }
.testeurs { display: grid; gap: 6px; font-size: 13.5px; }
.testeurs div { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* ---------- Guide ---------- */
.guide { display: grid; gap: 18px; max-width: 760px; }
.etape { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
.etape .num { width: 44px; height: 44px; border-radius: 50%; background: var(--jaune); color: var(--fond); font-family: var(--f-titre); display: grid; place-items: center; font-size: 18px; }
.etape h2 { font-size: 17px; margin: 8px 0 6px; }
.etape p, .etape li { color: var(--doux); margin: 0 0 6px; }
.etape code, .bloc code { font-family: var(--f-code); font-size: 12.5px; background: #1C2660; padding: 1px 6px; border-radius: 6px; color: var(--texte); }
.journal { display: grid; gap: 10px; max-width: 760px; }
.journal div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; background: var(--carte); border-radius: 14px; padding: 12px 16px; }
.journal time { color: var(--jaune); font-weight: 600; font-variant-numeric: tabular-nums; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--jaune); color: var(--fond);
  font-weight: 800; padding: 10px 20px; border-radius: 99px; transition: transform .2s ease; z-index: 40; }
.toast.visible { transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .colonnes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  :root { --rail: 56px; }
  .rail { padding: 12px 6px; }
  .entete { padding: 14px 16px; }
  .recherche { flex-basis: 100%; margin-left: 0; order: 3; }
  .moi { display: none; }
  .detail-tete .pastilles { justify-content: flex-start; }
  main { padding: 20px 16px 56px; }
  .journal div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .code .l::before { width: 38px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Connexion ---------- */
.ecran-connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.connexion { width: 100%; max-width: 400px; background: var(--carte); border: 2px solid var(--bord); border-radius: 22px; padding: 30px 26px; }
.connexion .marque { display: block; font-size: 28px; }
.connexion .sous { margin: 4px 0 20px; }
.onglets { display: flex; gap: 8px; margin-bottom: 20px; }
.formulaire { display: grid; gap: 14px; }
.formulaire label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.formulaire .bouton { justify-content: center; margin-top: 4px; }
.bouton:disabled { opacity: .6; cursor: wait; }
.code-saisie { font-family: var(--f-code); letter-spacing: .12em; text-transform: uppercase; }
.message { color: var(--rouge); min-height: 1.5em; margin: 14px 0 0; font-weight: 600; }

/* ---------- Équipe et compte ---------- */
.code-genere { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--nuit); border: 2px dashed var(--jaune); border-radius: 16px; padding: 14px 16px; margin-top: 14px; }
.code-genere strong { font-family: var(--f-code); font-size: 24px; letter-spacing: .12em; color: var(--jaune); }
.code-genere small { flex-basis: 100%; color: var(--doux); overflow-wrap: anywhere; }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th { text-align: left; color: var(--doux); font-weight: 600; font-size: 12.5px; padding: 0 10px 8px 0; }
.tableau td { padding: 10px 10px 10px 0; border-top: 1px solid var(--bord); vertical-align: middle; }
.tableau td.mono { font-family: var(--f-code); font-size: 13px; }
.defile { overflow-x: auto; }
.pile { display: grid; gap: 18px; max-width: 860px; }
