/* Start2Hack : l'identité du jeu, partagée par l'accueil, la map et les pages de niveau.
   Le logo : une fenêtre de navigateur crème à l'ombre décalée sable, « [S2H] » sur un écran nuit,
   une étincelle ; le mot « Start 2 Hack » (le 2 dans une tuile sable) et « $ ssh apprends@enquêtes ».
   Les pages de niveau reprennent ce langage : fenêtres à barre de titre crème et ombre décalée,
   repères en police mono, boutons sable. */
:root {
  --s2h-nuit: #14110E;
  --s2h-nuit-2: #1C1713;
  --s2h-nuit-3: #241D17;
  --s2h-nuit-4: #2E2620;
  --s2h-creme: #EFE6D2;
  --s2h-creme-2: #CFC4AE;
  --s2h-sable: #E08A4A;
  --s2h-sable-clair: #F0A468;
  --s2h-sable-fonce: #8A4B22;
  --s2h-gris: #A99D88;
  --s2h-trait: #3A2E24;
  --s2h-ok: #9cc58a;
  --s2h-alerte: #e7a76b;
  /* Papier du carnet, de la connexion et des fiches : fond clair, encre brune, rouille des tampons. */
  --s2h-papier: #F6EAD0;
  --s2h-papier-2: #EAE0C8;
  --s2h-brun: #6E5434;
  --s2h-encre: #2A2118;
  --s2h-rouille: #9A3B1F;
  --s2h-mono: 'IBM Plex Mono', 'IBM Plex Mono', ui-monospace, monospace;
}

/* Focus clavier commun : un anneau sable clair, sans effet sur la mise en page. Spécificité nulle (:where),
   donc toute règle de page garde la main. */
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"]):focus-visible { outline: 3px solid var(--s2h-sable-clair); outline-offset: 2px; }

/* --- Logo --- */
.s2h-icone { display: block; height: auto; }
.s2h-mot { display: inline-flex; align-items: center; font-family: 'IBM Plex Sans', system-ui, sans-serif; font-weight: 700; letter-spacing: -0.035em; line-height: 1; color: var(--s2h-creme); white-space: nowrap; }
.s2h-deux { display: inline-flex; align-items: center; justify-content: center; width: 0.74em; height: 0.92em; margin: 0 0.08em 0 0.06em; border-radius: 0.15em; background: var(--s2h-sable);
  box-shadow: 0 0 0 0.05em var(--s2h-creme), 0.08em 0.08em 0 0.05em var(--s2h-sable-fonce); transform: rotate(-4deg); }
.s2h-deux svg { display: block; width: 50%; height: auto; }
.s2h-ssh { font-family: var(--s2h-mono); color: var(--s2h-gris); letter-spacing: 0.01em; white-space: nowrap; }
.s2h-ssh b { color: var(--s2h-sable); font-weight: 400; }

/* --- Fond des pages de niveau : la nuit, une trame de points discrète --- */
.s2h-fond { background-color: var(--s2h-nuit); background-image: radial-gradient(rgba(239, 230, 210, 0.07) 1px, transparent 1.6px); background-size: 24px 24px; }

/* --- Fenêtres : barre de titre crème (les trois carrés du logo), corps nuit, ombre décalée sable --- */
.s2h-fenetre { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-radius: 12px; overflow: hidden; background: var(--s2h-nuit-2);
  box-shadow: 0 0 0 1.5px var(--s2h-creme), 6px 6px 0 1.5px var(--s2h-sable); }
.s2h-fenetre.calme { box-shadow: 0 0 0 1px var(--s2h-trait); background: color-mix(in srgb, var(--s2h-nuit-2) 92%, transparent); }
.s2h-barre { flex: none; display: flex; align-items: center; gap: 12px; min-height: 34px; padding: 0 14px; background: var(--s2h-creme); color: var(--s2h-nuit);
  font-family: var(--s2h-mono); font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.s2h-barre.sombre { background: var(--s2h-nuit-4); color: var(--s2h-creme); box-shadow: inset 0 -1px 0 var(--s2h-trait); }
.s2h-points { flex: none; display: inline-flex; gap: 5px; }
.s2h-points i { display: block; width: 9px; height: 8px; border-radius: 2px; background: currentColor; }
.s2h-chemin { overflow: hidden; text-overflow: ellipsis; }
.s2h-chemin b { color: var(--s2h-sable-fonce); font-weight: 500; }
.s2h-barre.sombre .s2h-chemin b { color: var(--s2h-sable); }

/* --- Repères : petites étiquettes en mono, « $ » ou « // » en sable --- */
.s2h-repere { font-family: var(--s2h-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--s2h-gris); }
.s2h-repere b { color: var(--s2h-sable); font-weight: 500; }
.s2h-h1 { margin: 0; font-family: 'IBM Plex Sans', system-ui, sans-serif; font-weight: 700; font-size: 34px; line-height: 1.12; letter-spacing: -0.025em; color: var(--s2h-creme); text-wrap: pretty; }

/* --- Boutons propres aux pages de niveau --- */
.s2h-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border-radius: 8px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; background: var(--s2h-sable); color: var(--s2h-nuit); box-shadow: 3px 3px 0 var(--s2h-sable-fonce); }
.s2h-btn:hover { background: var(--s2h-sable-clair); }
.s2h-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--s2h-sable-fonce); }
.s2h-btn:disabled, .s2h-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
/* Bouton orange désactivé (« Verrouillé », « Il manque… ») : papier clair, texte brun, lisible ; les variantes creux et nuit gardent la transparence. */
.s2h-btn:not(.creux):not(.nuit):disabled, .s2h-btn:not(.creux):not(.nuit)[aria-disabled="true"] { opacity: 1; background: #D9C9A6; color: #4A3A28; box-shadow: inset 0 0 0 1.5px #A58B57; }
.s2h-btn.creux { background: transparent; color: var(--s2h-creme); box-shadow: inset 0 0 0 1.5px var(--s2h-trait); }
.s2h-btn.creux:hover { box-shadow: inset 0 0 0 1.5px var(--s2h-gris); background: rgba(239, 230, 210, 0.05); }
.s2h-btn.nuit { background: var(--s2h-nuit); color: var(--s2h-creme); box-shadow: 3px 3px 0 var(--s2h-sable); }
.s2h-btn.nuit:hover { background: var(--s2h-nuit-4); }
.s2h-btn:focus-visible { outline: 3px solid var(--s2h-sable-clair); outline-offset: 3px; }
/* Tailles : grand (appels à l'action des pages d'accueil), compact (barres serrées). */
.s2h-btn.grand { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 9px; box-shadow: 4px 4px 0 var(--s2h-sable-fonce); }
.s2h-btn.grand:active { box-shadow: 1px 1px 0 var(--s2h-sable-fonce); transform: translate(3px, 3px); }
.s2h-btn.compact { min-height: 32px; padding: 0 11px; font-size: 13px; }

/* --- « À faire maintenant » : la consigne en cours, impossible à rater --- */
.s2h-afaire { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: color-mix(in srgb, var(--s2h-sable) 14%, var(--s2h-nuit-2));
  box-shadow: inset 0 0 0 1.5px var(--s2h-sable); }
.s2h-afaire-num { flex: none; min-width: 34px; height: 34px; padding: 0 6px; box-sizing: border-box; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--s2h-mono); font-size: 13px; font-weight: 500; background: var(--s2h-sable); color: var(--s2h-nuit); }
.s2h-afaire-tete { display: block; font-family: var(--s2h-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--s2h-sable-clair); }
.s2h-afaire-texte { display: block; margin-top: 3px; font-size: 18px; line-height: 1.4; font-weight: 600; color: var(--s2h-creme); text-wrap: pretty; }
.s2h-afaire-aide { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.45; color: var(--s2h-creme-2); text-wrap: pretty; }

/* Cible de la consigne (lien, bouton, champ) : un anneau sable qui pulse. */
@keyframes s2hCible { 0%, 100% { box-shadow: 0 0 0 2px var(--s2h-sable), 0 0 0 0 rgba(185, 152, 95, 0.55); } 50% { box-shadow: 0 0 0 2px var(--s2h-sable), 0 0 0 9px rgba(185, 152, 95, 0); } }
.s2h-cible { animation: s2hCible 1.6s ease-in-out infinite !important; border-radius: 6px !important; }
@media (prefers-reduced-motion: reduce) { .s2h-cible { animation: none !important; box-shadow: 0 0 0 3px var(--s2h-sable) !important; } }

/* Objectif fait (.s2h-afaire). */
.s2h-afaire.fait { background: color-mix(in srgb, var(--s2h-ok) 13%, var(--s2h-nuit-2)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--s2h-ok) 70%, transparent); }
.s2h-afaire.fait .s2h-afaire-num { background: var(--s2h-ok); }
.s2h-afaire.fait .s2h-afaire-tete { color: var(--s2h-ok); }

/* --- Barre du niveau, en haut des pages de niveau : crème, ombre décalée sable (le cadre du logo) --- */
.s2h-entete { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 9px 14px; border-radius: 12px; background: var(--s2h-creme); color: var(--s2h-nuit);
  box-shadow: 6px 6px 0 var(--s2h-sable); }
.s2h-entete .s2h-repere { color: #5A5143; }
.s2h-entete .s2h-repere b { color: var(--s2h-sable-fonce); }
.s2h-entete-titre { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2h-retour { all: unset; box-sizing: border-box; cursor: pointer; flex: none; width: 38px; height: 38px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--s2h-nuit); color: var(--s2h-creme); }
.s2h-retour:hover { background: var(--s2h-nuit-4); }
.s2h-retour:focus-visible { outline: 3px solid var(--s2h-sable); outline-offset: 2px; }
.s2h-etapes { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.s2h-etape { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font-family: var(--s2h-mono); font-size: 12px; white-space: nowrap; }
.s2h-etape.fait { background: var(--s2h-nuit); color: var(--s2h-creme); }
.s2h-etape.ici { background: var(--s2h-sable); color: var(--s2h-nuit); font-weight: 500; box-shadow: 0 0 0 2px var(--s2h-nuit); }
.s2h-etape.suite { color: #6f6656; box-shadow: inset 0 0 0 1.5px rgba(22, 25, 32, 0.22); }
.s2h-btn.sur-creme { background: transparent; color: var(--s2h-nuit); box-shadow: inset 0 0 0 1.5px rgba(22, 25, 32, 0.35); }
.s2h-btn.sur-creme:hover { background: rgba(20, 17, 14, 0.07); }
/* Panneau latéral des pages de niveau. */
.s2h-cote { min-height: 0; min-width: 0; border-radius: 12px; background: var(--s2h-nuit-2); box-shadow: 0 0 0 1px var(--s2h-trait); }
.s2h-titre-cote { font-family: var(--s2h-mono); font-size: 12px; color: var(--s2h-gris); }
.s2h-titre-cote b { color: var(--s2h-sable); font-weight: 500; }

/* --- Menu de gauche des pages de niveau : onglets, éléments, ARGOS en grand --- */
.s2h-onglets-cote { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--s2h-nuit); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.s2h-onglet-cote { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 7px; font-family: var(--s2h-mono); font-size: 13.5px; color: var(--s2h-gris); }
.s2h-onglet-cote b { color: var(--s2h-sable); font-weight: 500; }
.s2h-onglet-cote span { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 12px; color: var(--color-neutral-400); }
.s2h-onglet-cote span.lab { font-family: var(--s2h-mono); font-size: 13.5px; color: inherit; }
.s2h-onglet-cote[aria-selected="true"] { background: var(--s2h-creme); color: var(--s2h-nuit); }
.s2h-onglet-cote[aria-selected="true"] b { color: var(--s2h-sable-fonce); }
.s2h-onglet-cote[aria-selected="true"] span { color: #6f6656; }
.s2h-onglet-cote[aria-selected="true"] span.lab { color: var(--s2h-nuit); }
.s2h-onglet-cote:focus-visible { outline: 3px solid var(--s2h-sable); outline-offset: 2px; }
.s2h-item-cote { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.s2h-item-cote:hover { background: rgba(239, 230, 210, 0.05); }
.s2h-item-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--s2h-mono); font-size: 14px; font-weight: 500; }
.s2h-item-kicker { font-family: var(--s2h-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--s2h-gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2h-item-titre { font-size: 15.5px; line-height: 1.3; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
/* ARGOS : une scène à sa taille, son nom sur une plaque, sa bulle au-dessus. */
.s2h-argos { flex: none; display: flex; flex-direction: column; gap: 0; }
.s2h-bulle { position: relative; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; text-wrap: pretty;
  background: var(--s2h-creme); color: var(--s2h-nuit); box-shadow: 4px 4px 0 var(--s2h-sable); }
.s2h-bulle::after { content: ''; position: absolute; left: 44%; bottom: -9px; width: 16px; height: 16px; background: var(--s2h-creme); transform: rotate(45deg); }
.s2h-argos-scene { position: relative; height: 190px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(90% 85% at 50% 72%, color-mix(in srgb, var(--s2h-sable) 30%, var(--s2h-nuit-3)), var(--s2h-nuit) 78%); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.s2h-argos-nom { position: absolute; left: 10px; bottom: 10px; padding: 4px 9px; border-radius: 6px; font-family: var(--s2h-mono); font-size: 12px; font-weight: 500;
  background: var(--s2h-nuit); color: var(--s2h-sable-clair); box-shadow: 0 0 0 1px var(--s2h-trait); }
.s2h-argos-nom i { font-style: normal; color: var(--s2h-gris); margin-left: 4px; }

/* --- Dossier de niveau sur la map (après le zoom) : papier dans un cadre de bois, coins de laiton,
   onglets de dossier, tampon de statut, fiche d'enquête scotchée, étapes à cocher. Posé en bas de
   l'écran, sous l'enquêteur (la map zoomée reste visible au-dessus) ; le papier défile si besoin.
   Palette : bois sombre #2A170E, bois #4A2A1A, laiton #D9A441, papier #EDE0C2, fiche #F6EEDA,
   indice #E6D2AE, encre rouille #9A3F25, texte #33241A. --- */
.s2h-dossier-pos { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); max-height: min(50%, 540px); display: flex; flex-direction: column;
  transition: width 0.65s cubic-bezier(.2,.7,.2,1), opacity 0.35s ease; }
.s2h-dossier-onglets { position: absolute; left: 48px; bottom: 100%; display: flex; align-items: flex-end; gap: 10px; }
/* Onglets du dossier : celui qu'on lit est en papier (et un peu plus haut), l'autre en bois. */
.s2h-dossier-onglet { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; font-family: var(--s2h-mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap;
  border: 2.5px solid #2A170E; border-bottom: 0; }
.s2h-dossier-onglet.papier { height: 37px; background: #EDE0C2; color: #9A3F25; }
.s2h-dossier-onglet.bois { background: #6b3a22; color: #F6EEDA; }
.s2h-dossier-onglet.bois:hover { background: #82482a; }
.s2h-dossier-onglet:focus-visible { outline: 3px solid #F2CC6E; outline-offset: 2px; }
.s2h-onglet-pastille { display: inline-block; width: 9px; height: 9px; background: #D9A441; box-shadow: 0 0 0 2px #2A170E; }
.s2h-dossier-onglet.papier .s2h-onglet-pastille { background: #9A3F25; box-shadow: none; }
.s2h-dossier-enquete { padding: 30px 0 26px; }
.s2h-enquete-grille { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 20px 28px; align-items: start; }
@media (max-width: 1000px) { .s2h-enquete-grille { grid-template-columns: minmax(0, 1fr); } }
.s2h-fiche-indice.a-gagner { background: transparent; border-style: dashed; }
.s2h-dossier-x { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; right: -4px; bottom: calc(100% + 10px); width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  background: #2A170E; color: #F2CC6E; box-shadow: inset 0 0 0 2.5px #D9A441, 0 3px 0 #120a06; }
.s2h-dossier-x svg { width: 15px; height: 15px; }
.s2h-dossier-x:hover { background: #4A2A1A; }
.s2h-dossier-x:focus-visible, .s2h-dbtn:focus-visible, .s2h-d-lien:focus-visible { outline: 3px solid #F2CC6E; outline-offset: 3px; }
/* Petit écran : les deux onglets et la croix tiennent sur la largeur du dossier (le second se coupe avec « … » au lieu de passer sous la croix). */
@media (max-width: 560px) {
  .s2h-dossier-pos { width: calc(100% - 36px) !important; }   /* 96 px de marge laissaient ~290 px au dossier : les coins de laiton ne débordent que de 14 px */
  .s2h-dossier-onglets { left: 6px; right: 54px; gap: 6px; }
  .s2h-dossier-onglet { display: block; flex: 0 1 auto; min-width: 0; padding: 0 8px; line-height: 29px; overflow: hidden; text-overflow: ellipsis; }
  .s2h-dossier-onglet:first-child { flex: none; }
  .s2h-dossier-onglet.papier { line-height: 34px; }
  .s2h-onglet-suite { display: none; }
}

/* En-tête de niveau sur petit écran : retour, titre et deux boutons-icônes sur une ligne, les étapes dessous (≈ 110 px au lieu de ≈ 215 px). */
@media (max-width: 560px) {
  .s2h-entete { gap: 8px 10px; padding: 8px 10px; }
  .s2h-entete .s2h-icone { display: none; }
  .s2h-entete > div { flex: 1 1 0 !important; }   /* le style en ligne du bloc titre impose flex: 0 1 auto */
  .s2h-entete-titre { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.2; }
  .s2h-entete .s2h-btn[data-visite="rappel"], .s2h-entete .s2h-btn[data-visite="carnet"] { order: 1; font-size: 0; gap: 0; width: 40px; padding: 0; }
  .s2h-entete .s2h-etapes { order: 2; flex: 1 1 100%; margin: 0; gap: 5px; }
  .s2h-entete > .s2h-btn:not([data-visite="rappel"]):not([data-visite="carnet"]) { order: 3; flex: 1 1 100%; }   /* « Passer le mini-lab » : sa propre ligne, le titre garde la place */
  .s2h-etape { padding: 0 9px; }
}
.s2h-dossier-cadre { position: relative; flex: 1 1 auto; min-height: 0; display: flex; padding: 13px; background: #4A2A1A;
  box-shadow: 0 0 0 3px #2A170E, inset 0 0 0 3px #2A170E, 0 18px 44px rgba(0, 0, 0, 0.55); }
.s2h-laiton { position: absolute; z-index: 2; width: 33px; height: 33px; image-rendering: pixelated; }
.s2h-dossier { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #b9a07a transparent; padding: 0 34px;
  background-color: #EDE0C2; background-image: radial-gradient(rgba(51, 36, 26, 0.1) 1px, transparent 1.3px); background-size: 6px 6px;
  box-shadow: inset 0 0 0 2.5px #2A170E; color: #33241A; font-family: 'IBM Plex Sans', system-ui, sans-serif; }
.s2h-dossier-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 20px 0 16px; border-bottom: 2px solid #c9b48c; }
.s2h-d-kicker { font-family: var(--s2h-mono); font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: #8a3d12; }
.s2h-d-titre { margin: 0; font-family: var(--s2h-mono); font-weight: 700; font-size: clamp(19px, 1.65vw, 26px); line-height: 1.15; letter-spacing: 0.01em; color: #33241A; text-wrap: pretty; }
.s2h-d-meta { font-size: 13.5px; color: #6a5a45; }
.s2h-d-mono { font-family: var(--s2h-mono); font-size: 12.5px; letter-spacing: 0.05em; color: #33241A; }
.s2h-tampon { flex: none; padding: 5px 13px; font-family: var(--s2h-mono); font-weight: 700; font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase;
  border: 2.5px solid currentColor; box-shadow: inset 0 0 0 2px #EDE0C2, inset 0 0 0 3.5px currentColor; transform: rotate(-7deg); opacity: 0.88; }
.s2h-tampon.resolu { color: #b8352a; }
.s2h-tampon.encours { color: #8a5a1c; }
.s2h-tampon.nouveau { color: #2f4f8a; }
.s2h-tampon.verrou { color: #5a4632; border-style: dashed; box-shadow: none; }
.s2h-dbtn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 18px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif; font-weight: 600; font-size: 15px; color: #2A170E; text-decoration: none; white-space: nowrap;
  background: #E08A4A; border: 2.5px solid #2A170E; box-shadow: 0 4px 0 #2A170E; transform: translateY(-2px); transition: transform 0.06s, box-shadow 0.06s; }
.s2h-dbtn svg { width: 14px; height: 14px; }
.s2h-dbtn:hover { background: #E89E66; }
.s2h-dbtn:active { transform: translateY(1px); box-shadow: 0 1px 0 #2A170E; }
.s2h-dbtn.second { background: #F6EEDA; }
.s2h-dbtn.second:hover { background: #fff8e8; }
.s2h-dbtn:disabled { cursor: not-allowed; background: #d9c9a6; color: #6a5a45; border-color: #b9a07a; box-shadow: 0 4px 0 #b9a07a; }
.s2h-dossier-grille { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px 36px; padding: 20px 0 22px; align-items: start; }
@media (max-width: 1000px) { .s2h-dossier-grille { grid-template-columns: minmax(0, 1fr); } .s2h-dossier { padding: 0 22px; } }
.s2h-d-objectif { margin: 0; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.4; font-weight: 600; color: #33241A; text-wrap: pretty; }
.s2h-d-note { margin: 0; font-size: 14px; line-height: 1.5; color: #6a5a45; text-wrap: pretty; }
.s2h-pastille { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-family: var(--s2h-mono); font-size: 12.5px; letter-spacing: 0.03em; color: #33241A; border: 2px solid #C4895A; }
.s2h-fiche-enquete { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 20px; background: #F6EEDA; border: 2px solid #cdb68e;
  box-shadow: 6px 6px 0 #c4a676; transform: rotate(0.35deg); }
.s2h-scotch { position: absolute; top: -11px; left: 50%; width: 110px; height: 24px; transform: translateX(-50%) rotate(-2deg); background: rgba(226, 178, 88, 0.72); }
.s2h-d-sous { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 700; color: #9A3F25; }
.s2h-d-texte { margin: 0; font-size: 14.5px; line-height: 1.5; color: #33241A; text-wrap: pretty; }
.s2h-fiche-indice { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: #E6D2AE; border: 2px solid #b98a5a; transform: rotate(-0.25deg); }
.s2h-d-lien { all: unset; cursor: pointer; align-self: flex-start; font-family: var(--s2h-mono); font-size: 12.5px; color: #9A3F25; text-decoration: underline; text-underline-offset: 3px; }
.s2h-d-lien:hover { color: #6b2a16; }
.s2h-dossier-etapes { display: flex; flex-direction: column; gap: 14px; padding: 18px 0 22px; border-top: 2px dashed #d1b58a; }
.s2h-dossier-etapes ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px 14px; }
.s2h-dossier-etapes li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.s2h-dossier-etapes li b { margin-top: 6px; font-size: 14px; line-height: 1.3; font-weight: 700; color: #33241A; }
.s2h-dossier-etapes li.encours b { color: #9A3F25; }
.s2h-dossier-etapes li.verrou b { color: #8a7a62; }
.s2h-d-desc { font-size: 12.5px; line-height: 1.4; color: #6a5a45; text-wrap: pretty; }
.s2h-case { flex: none; width: 22px; height: 22px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.s2h-case svg { width: 12px; height: 12px; }
.s2h-case.faite { background: #D9A441; border: 2.5px solid #2A170E; color: #2A170E; }
.s2h-case.encours { background: #F6EEDA; border: 2.5px solid #9A3F25; }
.s2h-case.encours i { display: block; width: 8px; height: 8px; background: #9A3F25; }
.s2h-case.afaire { background: #F6EEDA; border: 2px solid #c9b48c; }
.s2h-case.verrou { background: #d9c9a6; border: 2px solid #b9a07a; color: #6a5a45; }
.s2h-tirets { flex: 1; height: 0; border-top: 2px dashed #c98a6a; }

/* =====================================================================================
   Pages de cours : mission d'un chapitre, quiz façon jeu télévisé, challenge. Mots-clés SQL en
   JetBrains Mono (--s2h-mono sur la page de cours), boutons et libellés en Inter.
   ===================================================================================== */

/* --- Mission : ce qu'il faut faire, et la liste des objectifs, bien visibles --- */
.s2h-mission { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 12px; font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: color-mix(in srgb, var(--s2h-sable) 13%, var(--s2h-nuit-2)); box-shadow: inset 0 0 0 1.5px var(--s2h-sable); }
.s2h-mission-tete { display: flex; align-items: center; gap: 10px; }
.s2h-mission-num { flex: none; min-width: 30px; height: 30px; padding: 0 6px; box-sizing: border-box; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--s2h-mono); font-size: 13px; font-weight: 700; background: var(--s2h-sable); color: var(--s2h-nuit); }
.s2h-mission-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--s2h-sable-clair); }
.s2h-mission-texte { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 600; color: var(--s2h-creme); text-wrap: pretty; }
.s2h-objectifs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.s2h-objectifs li { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; font-size: 16px; line-height: 1.35; font-weight: 500;
  background: var(--s2h-nuit); color: var(--s2h-creme-2); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.s2h-objectifs li i { flex: none; width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700;
  color: var(--s2h-nuit); box-shadow: inset 0 0 0 2px var(--s2h-gris); }
.s2h-objectifs li.bonus { box-shadow: inset 0 0 0 1px var(--s2h-trait); border: 0; color: var(--s2h-gris); background: transparent; }
.s2h-objectifs li.fait { background: color-mix(in srgb, var(--s2h-ok) 15%, var(--s2h-nuit)); color: var(--s2h-creme); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--s2h-ok) 65%, transparent); }
.s2h-objectifs li.fait i { background: var(--s2h-ok); box-shadow: none; }
.s2h-mission.fait { background: var(--s2h-nuit-2); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.s2h-mission.fait .s2h-mission-num { background: transparent; color: var(--s2h-sable-clair); box-shadow: inset 0 0 0 1.5px var(--s2h-sable); }
.s2h-mission.fait .s2h-mission-kicker { color: var(--s2h-gris); }
.s2h-mission.fait .s2h-mission-texte { color: var(--s2h-creme-2); font-weight: 500; }

/* --- Bloc SQL du constructeur --- */
.rq-sql { margin: 0; padding: 11px 14px; border-radius: 9px; background: var(--s2h-nuit); box-shadow: inset 0 0 0 1px var(--s2h-sable-fonce);
  font-family: var(--s2h-mono); font-size: 14.5px; line-height: 1.55; color: var(--s2h-sable-clair); white-space: pre-wrap; }

/* --- Mini-challenge : titre clair et accroche, en tête de la fenêtre de manipulation --- */
.mc-tete { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; box-shadow: 0 1px 0 var(--s2h-trait); }
.mc-kicker { font-family: var(--s2h-inter); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--s2h-sable-clair); }
.mc-titre { margin: 0; font-size: 36px; line-height: 1.1; color: var(--s2h-creme); }
.mc-accroche { margin: 0; font-size: 15px; line-height: 1.5; color: var(--s2h-creme-2); text-wrap: pretty; }

/* --- Constructeur SQL libre (requêteur et console en écriture) : une banque de pièces, une zone qui se lit comme du SQL ---
   coloration d'éditeur : mot-clé sable, table bleu, colonne lilas, valeur vert, opérateur et lien crème. */
.cx { --cx-mot: #F0A468; --cx-table: #8fc1e3; --cx-col: #c9aef0; --cx-val: #9cc58a; --cx-op: #EFE6D2;
  display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cx-zone-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cx-zone-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cx-mini { all: unset; box-sizing: border-box; cursor: pointer; min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 6px; font-family: var(--s2h-inter); font-size: 13px; font-weight: 500;
  color: var(--s2h-creme-2); box-shadow: inset 0 0 0 1px var(--s2h-trait); transition: background 0.15s, color 0.15s; }
.cx-mini:hover:not(:disabled) { background: rgba(239, 230, 210, 0.08); color: var(--s2h-creme); }
.cx-mini:disabled { opacity: 0.4; cursor: default; }
.cx-mini:focus-visible, .cx-j:focus-visible, .cx-b:focus-visible { outline: 2px solid var(--s2h-sable-clair); outline-offset: 2px; }
.cx-editeur { display: flex; flex-direction: column; min-height: 124px; padding: 8px 0; border-radius: 8px; background: var(--s2h-nuit); box-shadow: inset 0 0 0 1px var(--s2h-trait); font-family: var(--s2h-jb); font-size: 15px; }
.cx-amorce { margin: 0; padding: 10px 16px 10px 52px; font-family: var(--s2h-inter); font-size: 14px; line-height: 1.5; color: var(--s2h-gris); }
.cx-rangee { display: flex; align-items: center; gap: 14px; min-height: 40px; padding: 2px 16px 2px 0; }
.cx-num { flex: 0 0 38px; text-align: right; color: var(--s2h-gris); opacity: 0.7; user-select: none; font-size: 13px; }
.cx-sql { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.cx-pc { display: inline-flex; align-items: center; }
.cx-p { color: var(--s2h-gris); white-space: pre; }
.cx-j, .cx-b { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 5px; font-family: var(--s2h-jb); font-size: 14.5px; font-weight: 500;
  color: var(--cx-c, var(--s2h-creme)); background: color-mix(in srgb, var(--cx-c, var(--s2h-creme)) 10%, var(--s2h-nuit-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cx-c, var(--s2h-creme)) 35%, transparent);
  cursor: grab; user-select: none; -webkit-user-drag: element; transition: background 0.15s, box-shadow 0.15s; }
.cx-j:hover, .cx-b:hover { background: color-mix(in srgb, var(--cx-c, var(--s2h-creme)) 22%, var(--s2h-nuit-2)); box-shadow: inset 0 0 0 1px var(--cx-c, var(--s2h-creme)); }
.cx-j:active, .cx-b:active { cursor: grabbing; }
.cx-j.cx-avant { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cx-c, var(--s2h-creme)) 35%, transparent), -4px 0 0 -1px var(--s2h-sable); }
.cx-j.cx-apres { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cx-c, var(--s2h-creme)) 35%, transparent), 4px 0 0 -1px var(--s2h-sable); }
.cx-mot { --cx-c: var(--cx-mot); font-weight: 700; letter-spacing: 0.04em; }
.cx-table { --cx-c: var(--cx-table); }
.cx-col { --cx-c: var(--cx-col); }
.cx-val { --cx-c: var(--cx-val); }
.cx-op, .cx-lien { --cx-c: var(--cx-op); font-weight: 700; }
.cx-legende { margin: -4px 0 0; font-size: 13px; line-height: 1.5; color: var(--s2h-gris); }
.cx-banque { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--s2h-nuit-2); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.cx-groupe, .cx-valeur { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.cx-items { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cx-rubrique { font-family: var(--s2h-inter); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-c, var(--s2h-gris)); }
.cx-t-mot { --cx-c: var(--cx-mot); } .cx-t-table { --cx-c: var(--cx-table); } .cx-t-col { --cx-c: var(--cx-col); } .cx-t-val { --cx-c: var(--cx-val); } .cx-t-op, .cx-t-lien { --cx-c: var(--cx-op); }
.cx-saisie { flex: 1 1 180px; min-width: 140px; min-height: 34px; box-sizing: border-box; background: var(--s2h-nuit); font-family: var(--s2h-jb); font-size: 14.5px; }
.cx-ajout { cursor: pointer; -webkit-user-drag: none; font-family: var(--s2h-inter); font-weight: 600; }
.cx-existe { font-size: 13px; color: var(--s2h-gris); }
.cx-lancer { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cx-diag { flex: 1 1 260px; margin: 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--s2h-trait); font-size: 14px; line-height: 1.5; color: var(--s2h-creme-2); text-wrap: pretty; }
.cx-diag.ok { border-left-color: var(--cx-val); }
.cx-diag.attente { border-left-color: var(--s2h-sable); }
.cx-diag.faute { border-left-color: var(--s2h-alerte); color: var(--s2h-creme); }
.cx-go:disabled { opacity: 0.45; cursor: not-allowed; }
.cx-res { display: flex; flex-direction: column; gap: 8px; }
.cx-defile { overflow: auto; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--s2h-trait); max-height: 320px; scrollbar-width: thin; }
.cx-tab { display: flex; flex-direction: column; min-width: 100%; width: max-content; font-family: var(--s2h-jb); font-size: 13.5px; }
.cx-tr { display: grid; }
.cx-tr:nth-child(odd) { background: rgba(239, 230, 210, 0.045); }
.cx-tr.neuf { background: color-mix(in srgb, var(--s2h-sable) 20%, var(--s2h-nuit)); box-shadow: inset 3px 0 0 var(--s2h-sable); }
.cx-entete, .cx-entete:nth-child(odd) { position: sticky; top: 0; background: var(--s2h-nuit-4); box-shadow: inset 0 -1px 0 var(--s2h-trait); }
.cx-th { padding: 8px 14px; font-family: var(--s2h-inter); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--s2h-sable-clair); white-space: nowrap; }
.cx-td { padding: 8px 14px; color: var(--s2h-creme); white-space: nowrap; }
.cx-vide-res, .cx-compte { margin: 0; font-size: 14px; line-height: 1.5; color: var(--s2h-gris); text-wrap: pretty; }
.cx-vide-res { padding: 12px 14px; border-radius: 9px; background: var(--s2h-nuit); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.cx-err { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 9px; background: color-mix(in srgb, var(--s2h-alerte) 12%, var(--s2h-nuit)); box-shadow: inset 0 0 0 1px var(--s2h-alerte);
  font-family: var(--s2h-jb); font-size: 13.5px; line-height: 1.5; color: var(--s2h-creme); white-space: pre-wrap; }
.cx-err b { font-family: var(--s2h-inter); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--s2h-alerte); }
@media (max-width: 560px) { .cx-lancer { align-items: stretch; } .cx-go { width: 100%; } .cx-rangee { gap: 8px; } .cx-num { flex-basis: 26px; } .cx-amorce { padding-left: 34px; } }
@media (prefers-reduced-motion: reduce) { .cx-j, .cx-b, .cx-mini { transition: none; } }

/* --- Zones du mini-lab : « À faire », « Rappel des tables », « Ta requête » : un titre h3 par bloc, même style partout --- */
.mb-titre { margin: 0; font-family: var(--s2h-inter); font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: 0.1em; text-transform: uppercase; color: var(--s2h-sable-clair); }
.mb-bloc { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; border-radius: 12px; background: var(--s2h-nuit-2); box-shadow: inset 0 0 0 1px var(--s2h-trait); min-width: 0; }
.sc-panneau.mb-bloc { gap: 0; padding: 0; }
.sc-entete { display: block; }

/* --- Rappel de schéma des consoles SQL (mini-labs de lecture et challenges) : repliable, jamais par-dessus l'éditeur --- */
.sc-panneau { display: flex; flex-direction: column; border-radius: 10px; background: var(--s2h-nuit); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.sc-titre { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 0 16px; border-radius: 12px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.sc-titre:hover { color: var(--s2h-creme); }
.sc-titre:focus-visible { outline: 2px solid var(--s2h-sable); outline-offset: 2px; }
.sc-chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.18s ease; }
.sc-titre[aria-expanded="true"] .sc-chevron { transform: rotate(-135deg) translate(-2px, -2px); }
.sc-corps { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
.sc-aide { margin: 0; font-family: var(--s2h-inter); font-size: 13px; color: var(--s2h-gris); }
.sc-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.sc-table { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; border-radius: 9px; background: var(--s2h-nuit-2); }
.sc-nom, .sc-col { box-sizing: border-box; cursor: default; font-family: var(--s2h-jb); }
.sc-nom { align-self: flex-start; font-size: 13.5px; font-weight: 700; color: #8fc1e3; }
.sc-cols { display: flex; flex-wrap: wrap; gap: 5px; }
.sc-col { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12.5px; color: #c9aef0; }
.sc-col small { font-family: var(--s2h-inter); font-size: 10.5px; color: var(--s2h-gris); }
.sc-col em { font-family: var(--s2h-inter); font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s2h-sable-clair); }
.sc-col em:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .sc-chevron { transition: none; } }
@media (max-width: 560px) { .sc-tables { grid-template-columns: 1fr; } }
@media (max-height: 800px) { .sc-aide { display: none; } }

/* --- Quiz façon jeu télévisé : une question à la fois, cadres à pans coupés, réponses A à D --- */
.qz { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 940px; margin: 0 auto; font-family: 'IBM Plex Sans', system-ui, sans-serif; }
.qz-tete { display: flex; align-items: center; gap: 16px; }
.qz-compte { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--s2h-sable-clair); white-space: nowrap; }
.qz-barre { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.qz-barre i { height: 6px; border-radius: 3px; background: var(--s2h-nuit-4); transition: background 0.3s; }
.qz-barre i.fait { background: var(--s2h-ok); }
.qz-barre i.ici { background: var(--s2h-sable); }
.qz-scene { display: flex; flex-direction: column; gap: 26px; }
.qz-question { padding: 2px; background: linear-gradient(105deg, var(--s2h-sable-clair), var(--s2h-creme) 48%, var(--s2h-sable));
  clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px); }
.qz-question > div { display: flex; align-items: center; gap: 18px; min-height: 104px; padding: 26px 34px 26px 28px; box-sizing: border-box;
  background: radial-gradient(120% 140% at 0% 0%, var(--s2h-nuit-4), var(--s2h-nuit-2) 70%);
  clip-path: polygon(23px 0, 100% 0, 100% calc(100% - 23px), calc(100% - 23px) 100%, 0 100%, 0 23px); }
.qz-numero { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--s2h-mono); font-size: 18px; font-weight: 700; background: var(--s2h-creme); color: var(--s2h-nuit); }
.qz-q { font-size: clamp(20px, 2vw, 26px); line-height: 1.35; font-weight: 600; color: var(--s2h-creme); text-wrap: balance; }
.qz-reps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.qz-reps .qz-rep:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 10px); justify-self: center; }
.qz-rep { all: unset; box-sizing: border-box; cursor: pointer; display: block; padding: 2px; min-height: 70px; background: var(--s2h-trait);
  clip-path: polygon(24px 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 24px 100%, 0 50%); transition: background 0.15s, opacity 0.2s; }
.qz-rep .in { display: flex; align-items: center; gap: 14px; height: 100%; min-height: 66px; box-sizing: border-box; padding: 10px 34px 10px 26px; background: var(--s2h-nuit-2); transition: background 0.15s;
  clip-path: polygon(23px 0, calc(100% - 23px) 0, 100% 50%, calc(100% - 23px) 100%, 23px 100%, 0 50%); }
.qz-lettre { flex: none; width: 34px; height: 34px; border-radius: 50%; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--s2h-mono); font-size: 15px; font-weight: 700; color: var(--s2h-creme); box-shadow: inset 0 0 0 2px var(--s2h-gris); transition: background 0.15s, color 0.15s; }
.qz-texte { font-size: 17px; line-height: 1.35; font-weight: 500; color: var(--s2h-creme); text-wrap: pretty; }
.qz-rep:hover { background: var(--s2h-sable); }
.qz-rep:hover .in { background: var(--s2h-nuit-3); }
.qz-rep:hover .qz-lettre { background: var(--s2h-sable); color: var(--s2h-nuit); box-shadow: none; }
.qz-rep:focus-visible { background: var(--s2h-creme); }
.qz-rep.bon, .qz-rep.bon:hover { background: var(--s2h-ok); }
.qz-rep.bon .in { background: color-mix(in srgb, var(--s2h-ok) 22%, var(--s2h-nuit-2)); }
.qz-rep.bon .qz-lettre { background: var(--s2h-ok); color: var(--s2h-nuit); box-shadow: none; }
.qz-rep.mauvais, .qz-rep.mauvais:hover { background: var(--s2h-alerte); }
.qz-rep.mauvais .in { background: color-mix(in srgb, var(--s2h-alerte) 20%, var(--s2h-nuit-2)); }
.qz-rep.mauvais .qz-lettre { background: var(--s2h-alerte); color: var(--s2h-nuit); box-shadow: none; }
.qz-rep.estompe { opacity: 0.38; cursor: default; background: var(--s2h-trait); }
.qz-rep.estompe .in { background: var(--s2h-nuit-2); }
.qz-rep.estompe .qz-lettre { background: transparent; color: var(--s2h-creme); box-shadow: inset 0 0 0 2px var(--s2h-gris); }
.qz-retour { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 10px; font-size: 16px; line-height: 1.5; color: var(--s2h-creme); text-wrap: pretty; }
.qz-retour b { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.qz-pied { display: flex; justify-content: flex-end; }
.qz-bilan { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; border-radius: 14px;
  background: color-mix(in srgb, var(--s2h-ok) 10%, var(--s2h-nuit-2)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--s2h-ok) 60%, transparent); animation: pxApparaitA 0.45s ease both; }
.qz-bilan-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; background: var(--s2h-ok); color: var(--s2h-nuit); }
.qz-bilan-txt { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.qz-bilan-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--s2h-ok); }
.qz-bilan-phrase { font-size: 19px; line-height: 1.4; font-weight: 600; color: var(--s2h-creme); text-wrap: pretty; }
@media (max-width: 760px) { .qz-reps { grid-template-columns: minmax(0, 1fr); } .qz-reps .qz-rep:last-child:nth-child(odd) { width: auto; } }

/* --- Challenge : sa propre page, la console au centre, le flag en grand une fois trouvé --- */
.df { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 940px; margin: 0 auto; font-family: 'IBM Plex Sans', system-ui, sans-serif; }
.df-bas { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.df-sortie { margin: 0; padding: 12px 14px; border-radius: 9px; background: var(--s2h-nuit); max-height: 280px; overflow: auto; font-family: var(--s2h-mono); font-size: 13.5px; line-height: 1.55; color: var(--s2h-creme); }
.df-compte { font-size: 14px; color: var(--s2h-gris); }
/* Indice du niveau, gagné en réussissant le challenge : la pièce maîtresse de l'écran, en sable, sur fond sobre. */
.df-indice { display: flex; flex-direction: column; gap: 12px; padding: 30px 34px 30px; border-radius: 16px; animation: pxApparaitA 0.5s ease both;
  background: color-mix(in srgb, var(--s2h-sable) 9%, var(--s2h-nuit-2)); box-shadow: inset 0 0 0 1.5px var(--s2h-sable); }
.df-indice-kicker { font-family: var(--s2h-inter); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--s2h-sable-clair); }
.df-indice-titre { font-family: var(--s2h-archivo); font-weight: 700; font-size: 30px; line-height: 1.2; color: var(--s2h-creme); text-wrap: balance; }
.df-indice-texte { margin: 0; font-size: 18px; line-height: 1.6; color: var(--s2h-creme); text-wrap: pretty; }
.df-indice-suite { margin: 0; padding-top: 14px; box-shadow: 0 -1px 0 var(--s2h-trait); font-size: 14px; line-height: 1.5; color: var(--s2h-gris); text-wrap: pretty; }
.df-preuve { margin: 0; font-size: 17px; line-height: 1.55; color: var(--s2h-creme-2); text-wrap: pretty; }
.df-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.df-etapes li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; background: var(--s2h-nuit-2); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.df-etapes b { display: block; margin-bottom: 3px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--s2h-sable-clair); }
.df-etapes span { font-size: 17px; line-height: 1.5; color: var(--s2h-creme); text-wrap: pretty; }

/* =====================================================================================
   Typographie par rôle, commune à tous les écrans « dossier / carnet » :
   Archivo Bold (titres), Inter (texte, libellés SemiBold à interlettrage élargi, boutons),
   JetBrains Mono (chiffres, progression, code), Special Elite seulement pour « DOSSIER N° » et le tampon.
   ===================================================================================== */
:root {
  --s2h-archivo: 'Special Elite', 'IBM Plex Sans', system-ui, sans-serif;
  --s2h-inter: 'IBM Plex Sans', system-ui, sans-serif;
  --s2h-jb: 'IBM Plex Mono', ui-monospace, monospace;
  --s2h-elite: 'Special Elite', 'Courier New', monospace;
}
.s2h-dossier-onglet { font-family: var(--s2h-inter); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; }
.s2h-dossier-onglet:first-child { font-family: var(--s2h-elite); font-weight: 400; font-size: 12.5px; letter-spacing: 0.2em; }
.s2h-d-kicker { font-family: var(--s2h-inter); font-weight: 600; font-size: 12px; letter-spacing: 0.2em; }
.s2h-d-titre { font-family: var(--s2h-archivo); font-weight: 700; letter-spacing: -0.012em; }
.s2h-d-meta { font-family: var(--s2h-inter); font-weight: 500; }
.s2h-d-mono, .s2h-pastille { font-family: var(--s2h-jb); letter-spacing: 0.02em; }
.s2h-tampon { font-family: var(--s2h-elite); font-weight: 400; font-size: 15px; letter-spacing: 0.2em; }
.s2h-d-lien { font-family: var(--s2h-inter); font-weight: 600; font-size: 13px; }
.s2h-d-objectif { font-family: var(--s2h-inter); }
/* --- Pages de cours et mini-labs : titres en Archivo Bold, libellés en Inter SemiBold à interlettrage élargi,
   tout ce qui ressemble à du code ou à un chiffre en JetBrains Mono. --- */
.s2h-h1, .s2h-entete-titre { font-family: var(--s2h-archivo); font-weight: 700; }
.s2h-afaire-tete { font-family: var(--s2h-inter); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; }
.s2h-mission-kicker, .qz-compte, .qz-retour b, .qz-bilan-kicker, .df-etapes b { font-family: var(--s2h-inter); font-weight: 600; }

/* --- Blocs de code, à la façon d'un bloc Markdown : étiquette du langage en haut à droite, code coloré --- */
.code-bloc { position: relative; align-self: stretch; }
.code-bloc > pre { padding-top: 24px; }
.code-lang { position: absolute; top: 0; right: 0; z-index: 1; padding: 2px 9px 3px; border-radius: 0 9px 0 7px; font-family: var(--s2h-inter); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--s2h-nuit-4); color: var(--s2h-gris); }
.rq-sql code { font: inherit; }
.rq-sql { color: var(--s2h-creme-2); }
.sy-mot { color: #e2b14a; font-weight: 700; }
.sy-fn { color: #8fc1e3; }
.sy-chn { color: #9cc58a; }
.sy-nb { color: #e7a76b; }
.sy-com { color: #8b8678; font-style: italic; }
.sy-op, .sy-pn { color: #EFE6D2; }
.sy-id { color: #dcd2bd; }
/* Saisie du visiteur dans une requête (cours) : à part du code du site, sur un fond sable. */
.sy-inj { color: #f6c48f; font-weight: 600; background: rgba(224, 138, 74, 0.26); border-radius: 3px; box-shadow: 0 0 0 1px rgba(224, 138, 74, 0.5); }
/* Archivo a une espace fine : on la compense dans les titres, et on desserre un peu l'interlettrage. */
.s2h-h1, .s2h-entete-titre, .s2h-d-titre { word-spacing: 0.14em; letter-spacing: -0.005em; }

/* --- Saisie de code colorée en direct : le calque coloré (pre) donne la taille, le champ transparent est posé dessus --- */
.code-saisie { position: relative; display: grid; font-family: var(--s2h-mono); font-size: var(--cs-taille, 14px); line-height: var(--cs-inter, 1.5); }
.code-saisie > .code-saisie-fond, .code-saisie > .code-saisie-champ { grid-area: 1 / 1; box-sizing: border-box; margin: 0; width: 100%; padding: 26px 12px 10px; border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  font: inherit; letter-spacing: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; tab-size: 2; }
.code-saisie > .code-saisie-fond { min-height: calc(var(--cs-lignes, 3) * 1lh + 36px); background: var(--color-bg); color: var(--s2h-creme-2); pointer-events: none; overflow: hidden; border-color: transparent; }
.code-saisie > .code-saisie-fond code { font: inherit; }
.code-saisie > .code-saisie-champ { position: relative; background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--s2h-creme); resize: none; overflow: hidden; min-height: 0; }
.code-saisie > .code-saisie-champ::placeholder { -webkit-text-fill-color: var(--color-neutral-500); color: var(--color-neutral-500); }
.code-saisie > .code-saisie-champ::selection { background: color-mix(in srgb, var(--s2h-sable) 45%, transparent); -webkit-text-fill-color: transparent; }
.code-saisie > .code-saisie-champ:focus-visible { border-color: var(--color-accent); outline: none; }
.code-saisie > .code-lang { z-index: 2; }

/* --- Code dans une phrase : même coloration, sur un fond discret (comme `code` en Markdown) --- */
.cl { font-family: var(--s2h-mono); font-size: 0.86em; line-height: 1; background: rgba(239, 230, 210, 0.09); padding: 0.1em 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cl-d { padding-left: 0.3em; border-radius: 5px 0 0 5px; }
.cl-f { padding-right: 0.22em; border-radius: 0 5px 5px 0; }
.cl-d.cl-f { border-radius: 5px; }

/* ===== Revue de design : lisibilité et mise en page ===== */
/* Sommaire du cours : ARGOS se réduit quand l'écran est bas, la liste montre qu'elle défile (ombres de défilement) */
.s2h-argos-compact { height: clamp(84px, 11vh, 160px); }
.s2h-defile { background:
  linear-gradient(var(--s2h-nuit-2) 30%, transparent) top / 100% 26px no-repeat local,
  linear-gradient(transparent, var(--s2h-nuit-2) 70%) bottom / 100% 26px no-repeat local,
  radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, 0.5), transparent) top / 100% 10px no-repeat scroll,
  radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.5), transparent) bottom / 100% 10px no-repeat scroll; }
@media (max-height: 920px) {
  .s2h-item-cote { padding: 6px 10px; gap: 10px; }
  .s2h-item-num { width: 28px; height: 28px; font-size: 13px; }
  .s2h-bulle { padding: 9px 12px; font-size: 14px; line-height: 1.4; margin-bottom: 10px; }
}

/* ===== Une seule famille de titres : Archivo Bold. Boutons et libellés : Inter ===== */
h1, h2, h3, h4 { font-family: var(--s2h-archivo); font-weight: 700; word-spacing: 0.12em; }
.btn, .s2h-btn { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-weight: 600; }

/* Quiz terminé : récapitulatif question par question */
.qz-recap { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 14px; background: var(--s2h-nuit-2); box-shadow: inset 0 0 0 1px var(--s2h-trait); }
.qz-recap-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.qz-recap-titre { font-family: var(--s2h-inter); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--s2h-sable-clair); }
.qz-recap-score { font-family: var(--s2h-jb); font-size: 14px; color: var(--s2h-creme); }
.qz-recap ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qz-recap li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; background: var(--s2h-nuit); }
.qz-recap li i { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 13px; font-weight: 700; background: var(--s2h-trait); color: var(--s2h-creme); }
.qz-recap li.bon i { background: var(--s2h-ok); color: var(--s2h-nuit); }
.qz-recap li.retry i { background: var(--s2h-alerte); color: var(--s2h-nuit); }
.qz-recap-q { font-size: 15px; line-height: 1.35; color: var(--s2h-creme-2); }
.qz-recap-etat { font-family: var(--s2h-jb); font-size: 12px; color: var(--s2h-gris); white-space: nowrap; }
.qz-recap li.bon .qz-recap-etat { color: var(--s2h-ok); }
.qz-recap li.retry .qz-recap-etat { color: var(--s2h-alerte); }
@media (max-width: 560px) { .qz-recap li { grid-template-columns: 26px minmax(0, 1fr); } .qz-recap-etat { grid-column: 2; } }

/* Anneau de focus clavier commun à tout le jeu (certains boutons repartent de « all: unset » et n'en avaient pas).
   Or sur les écrans sombres, brun sur le papier. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #e2b04a !important; outline-offset: 2px; }
.s2h-entete :focus-visible, .qt-cadre :focus-visible, .s2h-dossier-cadre :focus-visible, .qt-liste :focus-visible { outline-color: #2a170e !important; }

/* Cibles tactiles : au moins ~36 px de haut sur les éléments qu'on clique souvent */
.ol-lien { display: inline-flex; align-items: center; min-height: 32px; }
.s2h-tampon { opacity: 1; }
