/* La Fabrique — thème clair et contrasté, pensé pour un vidéoprojecteur. */
:root {
  --fond: #f3efe6;
  --papier: #fffdf8;
  --encre: #1f2430;
  --encre-douce: #5b6170;
  --trait: #ddd5c4;
  --ok: #15803d;
  --ko: #b91c1c;
  --attention: #b45309;
  --code-fond: #1e2230;
  --code-texte: #e6e8ef;
  --rayon: 14px;
  --ombre: 0 1px 2px rgb(0 0 0 / .06), 0 6px 18px rgb(31 36 48 / .08);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--encre);
  background: var(--fond);
  display: flex;
  flex-direction: column;
}
@media (min-width: 1700px) { body { font-size: 17px; } }
code { font-family: var(--mono); font-size: .92em; background: rgb(31 36 48 / .07); padding: .05em .3em; border-radius: 4px; }
button { font: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

.bouton-principal {
  background: var(--encre); color: #fff; border: 0; border-radius: 10px;
  padding: .65em 1.1em; font-weight: 700; white-space: nowrap;
}
.bouton-principal:hover { background: #000; }
.bouton-principal:disabled { opacity: .45; cursor: not-allowed; }
.bouton-secondaire {
  background: var(--papier); color: var(--encre); border: 1.5px solid var(--trait);
  border-radius: 10px; padding: .5em .9em; font-weight: 600;
}
.bouton-secondaire:hover { border-color: var(--encre-douce); }

/* ——— En-tête ——— */
.entete {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: 12px 20px; background: var(--papier); border-bottom: 1.5px solid var(--trait);
}
.marque { display: flex; align-items: center; gap: 12px; }
.marque svg { width: 44px; height: 44px; }
.marque h1 { margin: 0; font-size: 1.45rem; letter-spacing: -.01em; }
.marque p { margin: 0; color: var(--encre-douce); font-size: .85rem; }
.besoin label { display: block; font-size: .8rem; font-weight: 700; color: var(--encre-douce); margin-bottom: 4px; }
.besoin-ligne { display: flex; gap: 10px; }
.besoin textarea {
  flex: 1; resize: none; font: inherit; padding: .5em .75em; border-radius: 10px;
  border: 1.5px solid var(--trait); background: #fff; color: var(--encre);
}
.reglages { display: flex; gap: 10px; align-items: center; }
.reglages select { font: inherit; padding: .5em; border-radius: 10px; border: 1.5px solid var(--trait); background: var(--papier); max-width: 220px; }
.interrupteur { display: flex; gap: 6px; align-items: center; font-weight: 600; white-space: nowrap; }
.interrupteur input { width: 18px; height: 18px; accent-color: var(--encre); }

/* ——— Atelier ——— */
.atelier { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px 1fr; }
.explorateur {
  border-right: 1.5px solid var(--trait); padding: 12px 10px; overflow: auto;
  background: #f8f5ee; font-size: .88rem;
}
.explorateur h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-douce); margin: 14px 6px 6px; }
.explorateur h2:first-child { margin-top: 0; }
.explorateur h2 small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; }
.arbre ul { list-style: none; margin: 0; padding-left: 14px; }
.arbre > ul { padding-left: 0; }
.dossier { font-weight: 700; padding: 2px 6px; color: var(--encre-douce); }
.dossier::before { content: "▾ "; }
.fichier {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  border: 0; background: none; padding: 3px 6px; border-radius: 6px; font-family: var(--mono); font-size: .82rem; color: var(--encre);
}
.fichier:hover { background: rgb(31 36 48 / .07); }
.fichier .pastille { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #999); flex: none; }
.fichier.nouveau { animation: eclair 1.6s ease-out; }
@keyframes eclair { 0% { background: #fde68a; } 100% { background: transparent; } }
.serveur, .journal { margin: 0; padding: 0 6px 0 22px; }
.serveur { list-style: none; padding-left: 6px; }
.serveur li { margin: 3px 0; font-family: var(--mono); font-size: .8rem; }
.serveur a { color: var(--encre); }
.serveur .final a { font-weight: 800; color: var(--ok); }
.vide { color: var(--encre-douce); font-style: italic; font-family: inherit !important; }
.journal li { margin: 4px 0; font-size: .8rem; color: var(--encre-douce); }
.journal li strong { color: var(--encre); }

/* ——— Scène ——— */
.scene { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; }

.orchestrateur {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 6px 14px; align-items: center;
  background: var(--papier); border: 1.5px solid var(--trait); border-radius: var(--rayon); padding: 10px 14px; box-shadow: var(--ombre);
}
.chef {
  grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 2px solid transparent; border-radius: 12px; padding: 4px 8px; font-weight: 800; color: var(--c);
}
.chef:hover { border-color: var(--c); }
.chef svg { width: 58px; height: 58px; }
.chef small { display: block; font-family: var(--mono); font-weight: 500; color: var(--encre-douce); font-size: .75rem; }
.annonce-ligne { font-family: var(--mono); font-weight: 800; font-size: 1.12rem; }
.annonce-mission { color: var(--encre-douce); }
.annonce.erreur .annonce-ligne { color: var(--ko); }
#continuer { grid-row: 1; grid-column: 3; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.etapes { grid-column: 2 / 4; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.etapes li {
  font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--trait);
  color: var(--encre-douce); background: #fff;
}
.etapes li.faite { color: var(--ok); border-color: #bbe5c8; background: #f0fbf3; }
.etapes li.courante { color: #fff; background: #b45309; border-color: #b45309; font-weight: 700; }

/* La chaîne des agents */
.chaine {
  display: grid; align-items: stretch;
  grid-template-columns: 1fr 22px 1fr 22px 1fr 22px 2.15fr 22px 1fr;
  grid-template-rows: auto auto;
}
.fleche { align-self: center; text-align: center; font-size: 1.4rem; color: var(--encre-douce); }
.parallele {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative;
  border: 2px dashed var(--trait); border-radius: calc(var(--rayon) + 4px); padding: 14px 6px 6px;
}
.etiquette-parallele {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--fond);
  padding: 0 8px; font-size: .75rem; font-weight: 800; color: var(--encre-douce); letter-spacing: .05em; text-transform: uppercase;
}
.carte {
  position: relative; display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto 1fr; gap: 0 8px;
  text-align: left; background: var(--papier); color: var(--encre);
  border: 2px solid var(--trait); border-top: 6px solid var(--c); border-radius: var(--rayon);
  padding: 8px 9px; box-shadow: var(--ombre); min-width: 0; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.carte:hover { border-color: var(--c); }
.carte .avatar { grid-row: 1 / 3; width: 48px; height: 48px; }
.carte .avatar svg { width: 100%; height: 100%; }
.carte-nom { font-weight: 800; font-size: .95rem; line-height: 1.15; }
.badge { display: inline-block; margin-left: 4px; font-size: .65rem; font-weight: 800; color: #fff; background: #dc2626; border-radius: 5px; padding: 1px 5px; vertical-align: 2px; }
.carte-outils { font-family: var(--mono); font-size: .68rem; color: var(--encre-douce); }
.carte-etat {
  grid-column: 1 / 3; justify-self: start; align-self: start; margin-top: 6px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; background: #eee9dd; color: var(--encre-douce);
}
.bulle { grid-column: 1 / 3; font-size: .8rem; color: var(--encre-douce); margin-top: 4px; min-height: 2.4em; line-height: 1.25; }
.carte[data-etat="travail"] { transform: translateY(-3px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent), var(--ombre); }
.carte[data-etat="travail"] .carte-etat { background: var(--c); color: #fff; }
.carte[data-etat="travail"] .bulle { color: var(--encre); font-weight: 600; }
.carte[data-etat="travail"] .antenne { animation: clignote .6s infinite alternate; }
.carte[data-etat="travail"] .yeux { animation: regarde 1.6s infinite ease-in-out; }
.carte[data-etat="fini"] .carte-etat, .carte[data-etat="ok"] .carte-etat { background: #dcfce7; color: var(--ok); }
.carte[data-etat="ko"] .carte-etat { background: #fee2e2; color: var(--ko); }
.carte[data-etat="erreur"] .carte-etat { background: var(--ko); color: #fff; }
@keyframes clignote { to { fill: #fde047; } }
@keyframes regarde { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-2.5px); } 70% { transform: translateX(2.5px); } }

.boucle {
  grid-row: 2; grid-column: 5 / 8; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 6px; color: var(--encre-douce); font-size: .82rem; font-weight: 700; position: relative;
  border: 2px solid var(--trait); border-top: 0; border-radius: 0 0 14px 14px; height: 26px; margin-inline: 12% 20%;
}
.boucle::before { content: "▲"; position: absolute; left: -9px; top: -12px; font-size: .8rem; color: var(--trait); }
.boucle span { background: var(--fond); padding: 0 8px; transform: translateY(13px); }
.boucle.active { border-color: #dc2626; color: #dc2626; }
.boucle.active::before { color: #dc2626; }

/* Colis : un fichier qui voyage d'un agent à l'autre */
.colis {
  position: fixed; z-index: 50; pointer-events: none; background: #fff; border: 2px solid var(--encre);
  border-radius: 8px; padding: 4px 9px; font: 700 .8rem var(--mono); box-shadow: 0 8px 20px rgb(0 0 0 / .2);
  transition: transform .85s cubic-bezier(.45, 0, .2, 1), opacity .2s; white-space: nowrap;
}

/* ——— Fenêtres en direct ——— */
.fenetres { flex: 1; min-height: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.fenetres[data-nombre="2"] { grid-template-columns: 1fr 1fr; }
.accueil {
  background: var(--papier); border: 1.5px dashed var(--trait); border-radius: var(--rayon); padding: 18px 26px; overflow: auto;
}
.accueil h2 { margin-top: 0; }
.accueil li { margin: 6px 0; }
.astuce { background: #fff7e6; border-left: 4px solid #f59e0b; padding: 8px 12px; border-radius: 6px; }
.fenetre {
  min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--papier);
  border: 1.5px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden;
}
.fenetre-titre {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 12px; color: #fff; background: var(--c);
}
.fenetre-titre svg { width: 28px; height: 28px; background: #fff; border-radius: 8px; padding: 2px; }
.fenetre-nom { font-weight: 800; }
.contexte { margin-left: auto; font-size: .75rem; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.contexte span { background: rgb(255 255 255 / .22); border-radius: 5px; padding: 1px 6px; font-family: var(--mono); }
.fenetre-corps { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px; }
.fenetre-corps.sans-marge { padding: 0; display: flex; flex-direction: column; }

.document { max-width: 900px; }
.document h1 { font-size: 1.35rem; margin: 0 0 .4em; }
.document h2 { font-size: 1.1rem; margin: .9em 0 .3em; }
.document h3 { font-size: 1rem; }
.document table { border-collapse: collapse; margin: .5em 0; font-size: .9rem; }
.document th, .document td { border: 1px solid var(--trait); padding: 4px 8px; text-align: left; vertical-align: top; }
.document th { background: #f4efe3; }
.document li { margin: 2px 0; }
.curseur { display: inline-block; width: .55em; height: 1.1em; background: currentColor; vertical-align: -2px; animation: curseur .9s steps(1) infinite; margin-left: 1px; }
@keyframes curseur { 50% { opacity: 0; } }

/* Éditeur de code */
.onglets { display: flex; gap: 2px; background: #151824; padding: 6px 8px 0; flex: none; }
.onglet {
  border: 0; background: transparent; color: #9aa3b8; font: .82rem var(--mono); padding: 6px 12px; border-radius: 8px 8px 0 0;
}
.onglet.actif { background: var(--code-fond); color: #fff; }
.onglet .point { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; margin-left: 6px; vertical-align: 1px; }
.editeur {
  flex: 1; min-height: 0; overflow: auto; margin: 0; background: var(--code-fond); color: var(--code-texte);
  font: .86rem/1.5 var(--mono); padding: 10px 0; counter-reset: ligne; tab-size: 2;
}
.editeur .ligne { display: block; white-space: pre-wrap; padding: 0 14px 0 52px; position: relative; min-height: 1.5em; }
.editeur .ligne::before { content: attr(data-n); position: absolute; left: 0; width: 38px; text-align: right; color: #596079; }
.editeur .ligne.modifiee { background: rgb(74 222 128 / .14); box-shadow: inset 3px 0 #4ade80; }
.editeur .ligne.signalee-BLOQUANT { background: rgb(248 113 113 / .2); box-shadow: inset 3px 0 #f87171; }
.editeur .ligne.signalee-MINEUR { background: rgb(251 191 36 / .16); box-shadow: inset 3px 0 #fbbf24; }
.c-com { color: #7f8aa3; font-style: italic; }
.c-chaine { color: #a5e3a0; }
.c-mot { color: #f6a5d4; }
.c-num { color: #f9c97c; }
.notes {
  flex: none; background: #fff7e6; border-top: 2px solid #f59e0b; padding: 8px 14px; font-size: .88rem; max-height: 35%; overflow: auto;
}
.notes ul { margin: 4px 0; padding-left: 20px; }
.secret { flex: none; background: #fef2f2; color: #7f1d1d; padding: 8px 14px; font-weight: 600; border-top: 2px solid #fca5a5; }

/* Banc de test */
.banc { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.banc-gauche { min-height: 0; overflow: auto; padding: 10px 12px; border-right: 1.5px solid var(--trait); }
.banc-droite { min-height: 0; display: flex; flex-direction: column; background: #e9e4d8; }
.banc-droite .legende { font: .75rem var(--mono); padding: 5px 10px; color: var(--encre-douce); background: #f4efe3; border-bottom: 1px solid var(--trait); }
.banc-droite iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.code-tests { margin: 0; background: var(--code-fond); color: var(--code-texte); font: .8rem/1.45 var(--mono); padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; }
.liste-tests { list-style: none; margin: 0; padding: 0; }
.liste-tests li { padding: 6px 8px; border-radius: 8px; margin-bottom: 4px; border: 1.5px solid transparent; }
.liste-tests li .icone { display: inline-block; width: 1.5em; }
.liste-tests li.en-cours { border-color: #f59e0b; background: #fffbeb; }
.liste-tests li.reussi .nom { color: var(--ok); }
.liste-tests li.echoue { background: #fef2f2; }
.liste-tests li.echoue .nom { color: var(--ko); font-weight: 700; }
.liste-tests .message { display: block; font-size: .8rem; color: var(--ko); margin: 2px 0 0 1.5em; }
.liste-tests .actions-test { display: block; font-size: .75rem; color: var(--encre-douce); margin: 2px 0 0 1.5em; font-family: var(--mono); }
.explication {
  margin: 8px 0 10px; background: #f0fdf4; border: 2px solid #86efac; border-radius: 12px; padding: 8px 12px; font-size: .95rem;
}
.explication::before { content: "🗣 Le testeur explique : "; font-weight: 800; color: var(--ok); }
.resume-tests { font-weight: 800; margin: 6px 0 10px; font-size: 1.05rem; }
.resume-tests.ok { color: var(--ok); }
.resume-tests.ko { color: var(--ko); }

/* Revue */
.revue { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.revue-code { min-height: 0; display: flex; flex-direction: column; }
.remarques { min-height: 0; overflow: auto; padding: 10px 12px; }
.remarque { display: block; width: 100%; text-align: left; border: 1.5px solid var(--trait); background: #fff; border-radius: 10px; padding: 7px 10px; margin-bottom: 7px; font-size: .88rem; }
.remarque:hover { border-color: var(--encre-douce); }
.remarque .niveau { font-weight: 800; font-size: .72rem; border-radius: 5px; padding: 1px 6px; margin-right: 4px; }
.remarque.BLOQUANT .niveau { background: var(--ko); color: #fff; }
.remarque.MINEUR .niveau { background: #fde68a; color: #78350f; }
.remarque .ou { font-family: var(--mono); font-size: .78rem; color: var(--encre-douce); }
.remarque .suggestion { display: block; color: var(--encre-douce); margin-top: 2px; }
.verdict { display: inline-block; font: 800 .95rem var(--mono); padding: 4px 10px; border-radius: 8px; margin-top: 4px; }
.verdict.OK { background: #dcfce7; color: var(--ok); }
.verdict.KO { background: #fee2e2; color: var(--ko); }

/* Terminal du devops */
.terminal { flex: 1; margin: 0; background: #0f172a; color: #e2e8f0; font: .95rem/1.6 var(--mono); padding: 14px 18px; overflow: auto; }
.terminal .commande { color: #93c5fd; }
.terminal .ok { color: #86efac; }
.terminal .ko { color: #fca5a5; }

/* Bilan */
.bilan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; }
.bilan h3 { margin: .2em 0 .5em; }
.bilan dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.bilan dt { font-weight: 700; color: var(--encre-douce); }
.bilan dd { margin: 0; }
.lien-final { display: inline-block; margin-top: 10px; font-size: 1.1rem; font-weight: 800; color: #fff; background: var(--ok); padding: 8px 14px; border-radius: 10px; text-decoration: none; }
.frise { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.frise span { border: 1.5px solid var(--trait); border-radius: 8px; padding: 4px 8px; font-size: .82rem; background: #fff; }
table.bugs { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.bugs th, table.bugs td { border: 1px solid var(--trait); padding: 6px 8px; text-align: left; vertical-align: top; }
table.bugs th { background: #f4efe3; }
.trouve { color: var(--ok); font-weight: 700; }
.rate { color: var(--ko); font-weight: 700; }
.discussion { margin-top: 12px; background: #eef2ff; border-left: 4px solid #6366f1; padding: 8px 12px; border-radius: 6px; }
.discussion ul { margin: 4px 0; padding-left: 20px; }

/* ——— Tiroir (fiche d'un agent ou d'un fichier) ——— */
.tiroir {
  position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); overflow: auto;
  background: var(--papier); border-left: 2px solid var(--trait); box-shadow: -12px 0 40px rgb(0 0 0 / .15); padding: 20px 24px 40px;
}
.fermer { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--trait); background: #fff; font-size: 1rem; }
.fiche-entete { display: flex; gap: 14px; align-items: center; border-bottom: 5px solid var(--c); padding-bottom: 12px; margin-bottom: 8px; padding-right: 40px; }
.fiche-entete svg { width: 72px; height: 72px; flex: none; }
.fiche-entete h2 { margin: 0; }
.fiche-entete p { margin: 2px 0 0; color: var(--encre-douce); }
.tiroir h3 { margin: 1.2em 0 .4em; font-size: 1.02rem; }
.flux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flux div { background: #fff; border: 1.5px solid var(--trait); border-radius: 10px; padding: 8px 10px; }
.flux strong { display: block; font-size: .8rem; text-transform: uppercase; color: var(--encre-douce); }
.flux ul { margin: 4px 0 0; padding-left: 18px; font-family: var(--mono); font-size: .85rem; }
.outils { display: flex; flex-wrap: wrap; gap: 6px; }
.outil { border-radius: 8px; padding: 5px 9px; font-size: .85rem; border: 1.5px solid; }
.outil b { font-family: var(--mono); }
.outil.autorise { border-color: #86efac; background: #f0fdf4; }
.outil.interdit { border-color: var(--trait); color: #9b9384; text-decoration: line-through; background: #f6f3ec; }
.entete-annotee { width: 100%; border-collapse: collapse; font-size: .88rem; margin-bottom: 8px; }
.entete-annotee td { border-bottom: 1px solid var(--trait); padding: 5px 6px; vertical-align: top; }
.entete-annotee td:first-child { font-family: var(--mono); font-weight: 700; color: #7c3aed; white-space: nowrap; }
.entete-annotee td:nth-child(2) { font-family: var(--mono); }
.entete-annotee td:last-child { color: var(--encre-douce); font-size: .82rem; }
.corps-md { background: #fff; border: 1.5px solid var(--trait); border-radius: 10px; padding: 4px 16px; font-size: .92rem; }
.corps-md li.etape-courante { background: #fde68a; border-radius: 4px; outline: 4px solid #fde68a; }
.code-source { margin: 0; background: var(--code-fond); color: var(--code-texte); font: .78rem/1.45 var(--mono); padding: 12px; border-radius: 10px; overflow: auto; max-height: 60vh; white-space: pre; }
.comparaison { border-collapse: collapse; width: 100%; font-size: .88rem; }
.comparaison th, .comparaison td { border: 1px solid var(--trait); padding: 6px 8px; text-align: left; vertical-align: top; }
.comparaison thead th { background: #f4efe3; }

/* ——— Boîtes de dialogue ——— */
.dialogue { border: 0; border-radius: 16px; padding: 22px 26px; max-width: 420px; width: calc(100vw - 32px); box-shadow: 0 20px 60px rgb(0 0 0 / .3); color: var(--encre); background: var(--papier); }
.dialogue::backdrop { background: rgb(31 36 48 / .45); }
.dialogue h2 { margin-top: 0; }
.dialogue input { width: 100%; font: inherit; padding: .55em .7em; border-radius: 10px; border: 1.5px solid var(--trait); margin-top: 4px; }
.dialogue .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.erreur { color: var(--ko); font-weight: 600; min-height: 1.2em; margin: 6px 0 0; }
.dialogue-large { max-width: 1100px; position: relative; }
.cartes-aide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cartes-aide article { background: #fff; border: 1.5px solid var(--trait); border-radius: 12px; padding: 4px 14px; font-size: .92rem; }
.cartes-aide h3 { font-size: 1rem; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.arbre-aide, .fichier-aide { background: var(--code-fond); color: var(--code-texte); font: .82rem/1.5 var(--mono); padding: 12px 14px; border-radius: 10px; overflow: auto; }
.arbre-aide i, .fichier-aide i { color: #fbbf24; font-style: normal; }
.arbre-aide .d { color: #93c5fd; }
.fichier-aide .fm { color: #7f8aa3; }
.fichier-aide .cle { color: #f6a5d4; }

/* ——— Petits écrans (téléphone, tablette) ——— */
@media (max-width: 1100px) {
  .entete { grid-template-columns: 1fr; gap: 10px; }
  .atelier { grid-template-columns: 1fr; }
  .explorateur { border-right: 0; border-bottom: 1.5px solid var(--trait); max-height: 220px; }
  .chaine { grid-template-columns: 1fr 1fr; gap: 10px; }
  .chaine .fleche, .boucle { display: none; }
  .parallele { grid-column: 1 / 3; }
  .fenetres[data-nombre="2"], .banc, .revue, .bilan, .cartes-aide, .deux-colonnes { grid-template-columns: 1fr; }
  .fenetre { min-height: 420px; }
  .scene { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
