/* Astreinte — habillage. Couleurs : nuit d'encre, orange attiéké, vert lagune, rouge alerte. */
:root {
  --fond: #0a0d16; --panneau: #121725; --panneau2: #19203200; --creux: #0b0e17; --bord: #242d45; --bord2: #34405f;
  --texte: #e8edf6; --pale: #8d99b3; --orange: #ff8a3d; --vert: #2ec4b6; --rouge: #ff5a5a; --jaune: #ffd166; --violet: #9b8cff;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --main: "Bradley Hand", "Segoe Print", "Comic Sans MS", "Chalkboard SE", cursive;
}
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: var(--fond); color: var(--texte); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.plein { position: fixed; inset: 0; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s; }
#scene.visible { opacity: 1; }
#voile { position: fixed; inset: 0; z-index: 100; background: #000; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
#voile.noir { opacity: 1; pointer-events: auto; }

.btn { border: 1px solid var(--bord2); background: rgba(20, 26, 42, .82); padding: 11px 20px; border-radius: 10px; font-weight: 600; transition: transform .12s, background .2s, border-color .2s; backdrop-filter: blur(6px); }
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--orange); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.principal { background: linear-gradient(180deg, #ff9a52, #f0701f); border-color: #ffb27a; color: #1c0d02; box-shadow: 0 8px 28px rgba(255, 138, 61, .35); }
.btn.principal:hover:not(:disabled) { background: linear-gradient(180deg, #ffab6e, #f57c2e); }
.btn.discret { padding: 7px 12px; font-weight: 500; font-size: 12.5px; color: var(--pale); background: rgba(10, 13, 22, .5); }
.btn small { font-weight: 400; opacity: .7; }
.avatar { display: inline-block; width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; }
.avatar svg { display: block; width: 100%; height: 100%; }
/* un portrait en photo : l'image recouvre les initiales, qui restent visibles si l'image ne charge pas */
.avatar.photo, .st-portrait.photo { position: relative; display: inline-grid; place-items: center; background: var(--teinte, #34405f); container-type: size; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16); }
.avatar.photo img, .st-portrait.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.initiales { font: 700 13px/1 var(--sans); font-size: 38cqw; letter-spacing: .02em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); user-select: none; }
.avatar.mini { width: 26px; height: 26px; align-self: flex-end; }
.ligne-bulle { align-self: flex-start; display: flex; align-items: flex-end; gap: 7px; max-width: 92%; flex: none; }
.ligne-bulle .bulle, .bobo-fil .ligne-bulle .bulle { max-width: none; min-width: 0; flex: 0 1 auto; }
/* le bouton du son : toujours visible, avec son état écrit en toutes lettres */
.btn-son { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px 0 9px; border-radius: 999px; border: 1px solid var(--bord2); background: rgba(255, 255, 255, .06); color: #dfe6f3; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.btn-son svg { width: 19px; height: 19px; flex: none; }
.btn-son:hover { border-color: var(--orange); color: #fff; }
.btn-son.coupe { color: #ffb0b0; border-color: rgba(255, 90, 90, .55); background: rgba(255, 90, 90, .12); }
.btn-son.hors { position: fixed; z-index: 45; left: 16px; bottom: 44px; background: rgba(10, 13, 22, .72); backdrop-filter: blur(6px); }
.btn-son.hors.coupe { background: rgba(60, 14, 14, .78); }
#bureau:not([hidden]) ~ .btn-son.hors { display: none; }
code, .cmd { font-family: var(--mono); font-size: .92em; }
code.cmd { background: rgba(255, 138, 61, .14); color: #ffc49b; border: 1px solid rgba(255, 138, 61, .3); padding: 1px 6px; border-radius: 5px; cursor: pointer; white-space: pre-wrap; }
code.cmd:hover { background: rgba(255, 138, 61, .3); color: #fff; }

/* ---------------------------------------------------------------- écran titre */
#titre { z-index: 5; display: grid; place-items: center; text-align: center; overflow: hidden; }
.titre-fond { position: absolute; inset: 0; background:
  radial-gradient(60% 46% at 62% 68%, rgba(255, 208, 138, .95), rgba(255, 138, 61, .5) 30%, transparent 62%),
  linear-gradient(180deg, #14173f 0%, #4c2b6e 34%, #c9544f 58%, #ff9b4f 68%, #2a1c4a 68.2%, #0d1030 100%); }
.titre-fond::before { content: ""; position: absolute; left: 0; right: 0; bottom: 31.6%; height: 26%; background: #1a1230;
  clip-path: polygon(0 100%, 0 78%, 4% 78%, 4% 52%, 8% 52%, 8% 70%, 13% 70%, 13% 38%, 17% 38%, 17% 62%, 22% 62%, 24% 20%, 29% 20%, 31% 62%, 36% 62%, 36% 8%, 40% 8%, 40% 46%, 44% 46%, 44% 28%, 49% 28%, 49% 66%, 55% 66%, 58% 30%, 59% 30%, 66% 74%, 71% 74%, 71% 40%, 75% 40%, 75% 58%, 80% 58%, 80% 24%, 84% 24%, 84% 66%, 90% 66%, 90% 48%, 95% 48%, 95% 76%, 100% 76%, 100% 100%); }
.titre-fond::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; background:
  repeating-linear-gradient(180deg, rgba(255, 190, 130, .16) 0 2px, transparent 2px 13px), linear-gradient(180deg, rgba(255, 150, 90, .35), transparent 70%); mask-image: radial-gradient(50% 120% at 62% 0%, #000, transparent 75%); }
.titre-boite { position: relative; top: -9vh; padding: 24px; max-width: 760px; text-shadow: 0 2px 30px rgba(0, 0, 0, .65); }
.titre-sur { letter-spacing: .32em; text-transform: uppercase; font-size: 12px; color: #ffd9b8; margin: 0 0 6px; }
#titre h1 { font-size: clamp(54px, 11vw, 132px); line-height: .95; margin: 0; letter-spacing: .06em; font-weight: 800; display: inline-flex; align-items: center; gap: .18em; }
.pouls { width: .2em; height: .2em; border-radius: 50%; background: var(--rouge); box-shadow: 0 0 0 0 rgba(255, 90, 90, .8); animation: pouls 1.4s infinite; }
@keyframes pouls { 70% { box-shadow: 0 0 0 .32em rgba(255, 90, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0); } }
.titre-accroche { font-size: clamp(16px, 2.2vw, 22px); margin: 18px 0 30px; color: #fff3e6; }
.titre-boutons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.titre-boutons .btn { font-size: 16px; padding: 14px 26px; }
.titre-note { margin-top: 26px; font-size: 12.5px; color: rgba(255, 255, 255, .72); }

/* ---------------------------------------------------------------- intro (par-dessus la 3D) */
#intro { z-index: 6; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .28), transparent 18%, transparent 62%, rgba(0, 0, 0, .6)); }
#intro > * { pointer-events: auto; }
#titre.fond-seul .titre-boite { display: none; }
body.sans3d .st-portrait { width: 92px; height: 92px; }
.intro-lieu { position: absolute; top: 28px; left: 32px; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; opacity: 0; transform: translateY(-6px); transition: opacity 1s, transform 1s; text-shadow: 0 1px 12px #000; pointer-events: none !important; }
.intro-lieu.visible { opacity: 1; transform: none; }
#intro-passer { position: absolute; top: 20px; right: 20px; }
.sous-titre { position: absolute; left: 50%; bottom: 5vh; transform: translateX(-50%); width: min(820px, calc(100vw - 28px)); display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 16px; background: rgba(9, 11, 20, .82); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: monte .35s ease; }
@keyframes monte { from { opacity: 0; transform: translate(-50%, 12px); } }
.st-portrait { width: 64px; height: 64px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, .18); }
.sous-titre.recit .st-portrait, .sous-titre.recit #st-nom { display: none; }
.sous-titre.recit #st-texte { font-style: italic; color: #dfe6f3; }
.st-corps { flex: 1; min-height: 62px; }
.st-corps b { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.st-corps p { margin: 2px 0 0; font-size: clamp(15px, 1.7vw, 18.5px); line-height: 1.42; }
.st-suite { flex: none; align-self: flex-end; padding: 8px 14px; font-size: 13px; }
.intro-clic { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); padding: 12px 22px; border-radius: 999px; background: rgba(255, 138, 61, .95); color: #1c0d02; font-size: 16px; box-shadow: 0 10px 40px rgba(255, 138, 61, .5); animation: appel 1.3s ease-in-out infinite; cursor: pointer; }
@keyframes appel { 50% { transform: translateX(-50%) translateY(-5px); } }

/* ---------------------------------------------------------------- le bureau */
#bureau { z-index: 4; display: grid; grid-template: 46px 1fr / 66px 1fr; background:
  radial-gradient(90% 70% at 78% 108%, rgba(255, 138, 61, .30), transparent 60%), radial-gradient(70% 60% at 8% -10%, rgba(91, 51, 120, .55), transparent 60%), linear-gradient(160deg, #101433, #0a0d16 55%); }
body.nuit #bureau { background: radial-gradient(80% 60% at 80% 110%, rgba(40, 70, 160, .32), transparent 60%), linear-gradient(160deg, #05071a, #070912 60%); }
.barre { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 14px; background: rgba(8, 10, 18, .78); border-bottom: 1px solid var(--bord); backdrop-filter: blur(8px); z-index: 3; }
.barre-logo { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; letter-spacing: .01em; }
.barre-logo i { font-style: normal; color: var(--orange); }
.bol { width: 20px; height: 12px; border-radius: 0 0 12px 12px; background: var(--orange); position: relative; margin-top: 7px; }
.bol::before { content: ""; position: absolute; left: 2px; right: 2px; top: -7px; height: 8px; border-radius: 10px 10px 0 0; background: var(--jaune); }
.barre-mission { color: var(--pale); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-etat { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 999px; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; border: 1px solid transparent; white-space: nowrap; }
.barre-etat .pastille { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.barre-etat.ok { color: var(--vert); background: rgba(46, 196, 182, .1); border-color: rgba(46, 196, 182, .3); }
.barre-etat.ko { color: #fff; background: var(--rouge); border-color: #ff9a9a; animation: battre 1s ease-in-out infinite; }
.barre-etat.ko .pastille { background: #fff; }
@keyframes battre { 50% { box-shadow: 0 0 0 6px rgba(255, 90, 90, .22); } }
.barre-droite { display: flex; align-items: center; gap: 16px; }
.compteur, .horloge { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.compteur small, .horloge small { font-size: 10.5px; color: var(--pale); text-transform: uppercase; letter-spacing: .08em; }
.compteur b { font: 700 17px var(--mono); color: var(--rouge); }
body.repare .compteur b { color: var(--pale); }
.horloge b { font: 700 17px var(--mono); }
.btn-icone { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--bord); background: rgba(255, 255, 255, .04); padding: 6px; color: var(--pale); }
.btn-icone:hover { color: #fff; border-color: var(--bord2); } .btn-icone.coupe { color: var(--rouge); }
.btn-icone svg { width: 100%; height: 100%; display: block; }

.dock { display: flex; flex-direction: column; gap: 6px; padding: 10px 7px; background: rgba(8, 10, 18, .6); border-right: 1px solid var(--bord); z-index: 2; }
.dock-btn { position: relative; border: 1px solid transparent; background: none; border-radius: 12px; padding: 8px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--pale); transition: background .15s, color .15s; }
.dock-btn span { width: 24px; height: 24px; } .dock-btn svg { width: 100%; height: 100%; display: block; }
.dock-btn small { font-size: 9.5px; letter-spacing: .02em; }
.dock-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.dock-btn.ouverte { color: #dfe6f3; } .dock-btn.ouverte::before { content: ""; position: absolute; left: -7px; top: 30%; bottom: 30%; width: 3px; border-radius: 3px; background: var(--bord2); }
.dock-btn.active { background: rgba(255, 138, 61, .14); border-color: rgba(255, 138, 61, .35); color: #fff; } .dock-btn.active::before { background: var(--orange); }
.badge { position: absolute; top: 2px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--rouge); color: #fff; font: 700 10.5px/17px var(--sans); font-style: normal; text-align: center; animation: saute .4s; }
@keyframes saute { 40% { transform: scale(1.5); } }

.espace { position: relative; overflow: hidden; }
.vignette { position: absolute; inset: 46px 0 0 0; pointer-events: none; z-index: 1; opacity: 0; box-shadow: inset 0 0 140px 20px rgba(255, 50, 50, .38); transition: opacity .6s; }
body.panne .vignette { opacity: 1; animation: alarme 2.2s ease-in-out infinite; }
@keyframes alarme { 50% { opacity: .35; } }
.bandeau { position: fixed; z-index: 35; cursor: pointer; top: 50px; left: 50%; transform: translateX(-50%); padding: 8px 20px; border-radius: 11px; font-size: 15px; width: max-content; box-shadow: 0 16px 50px rgba(0, 0, 0, .55); animation: tombe .5s cubic-bezier(.2, 1.4, .4, 1); text-align: center; max-width: calc(100vw - 24px); }
.bandeau b { letter-spacing: .12em; margin-right: 6px; } .bandeau small { display: inline; opacity: .9; font-size: 12.5px; margin-left: 12px; }
.bandeau.alerte { background: linear-gradient(180deg, #ff5a5a, #d92d2d); border: 1px solid #ffb0b0; }
.bandeau.ok { background: linear-gradient(180deg, #2ec4b6, #1a9e92); border: 1px solid #9ff1e8; color: #02231f; }
@keyframes tombe { from { opacity: 0; transform: translate(-50%, -30px); } }

/* ---------------------------------------------------------------- fenêtres */
.fenetre { position: absolute; display: flex; flex-direction: column; min-width: 280px; min-height: 180px; background: var(--panneau); border: 1px solid var(--bord); border-radius: 11px; overflow: hidden; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); resize: both; transition: border-color .2s, box-shadow .2s; }
.fenetre.active { border-color: var(--bord2); box-shadow: 0 22px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 138, 61, .12); }
.fenetre.pop { animation: pop .22s ease; } @keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.fen-barre { flex: none; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 11px; background: #171d2e; border-bottom: 1px solid var(--bord); cursor: grab; user-select: none; touch-action: none; }
.fen-barre:active { cursor: grabbing; }
.fen-icone { width: 16px; height: 16px; color: var(--orange); } .fen-icone svg { display: block; width: 100%; height: 100%; }
.fen-barre b { font-size: 13px; } .fen-barre small { color: var(--pale); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fen-espace { flex: 1; }
.fen-fermer { border: 0; background: none; width: 26px; height: 26px; border-radius: 7px; font-size: 18px; line-height: 1; color: var(--pale); }
.fen-fermer:hover { background: rgba(255, 90, 90, .2); color: #fff; }
.fen-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- terminal */
.term { position: relative; background: #070a11; font: 13.5px/1.5 var(--mono); }
/* tout ce qui est écrit dans le terminal se sélectionne à la souris et se copie */
.term-sortie, .term-sortie * { -webkit-user-select: text; user-select: text; }
.term-sortie ::selection, .term-vue ::selection { background: rgba(255, 138, 61, .55); color: #fff; }
.term-ecran { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 13px 14px; cursor: text; scrollbar-width: thin; scrollbar-color: #2a3350 transparent; }
.term-sortie > div { white-space: pre-wrap; word-break: break-word; color: #c9d3e6; }
.term-sortie .term-cmd { color: #fff; margin-top: 7px; }
.term-ligne { display: flex; margin-top: 7px; }
.term-invite, .a-invite { color: var(--vert); font-weight: 600; white-space: pre; }
.term-saisie { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; font: inherit; padding: 0; caret-color: var(--orange); }
.term-ligne.suivi .term-invite, .term-ligne.coupe .term-invite { opacity: .25; }
.term-ligne.coupe::after { content: "connexion perdue…"; color: var(--rouge); animation: clignote 1s steps(2) infinite; }
@keyframes clignote { 50% { opacity: .2; } }
.term-rapides { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 10px; border-top: 1px solid var(--bord); background: #0c101a; font-size: 11.5px; }
.term-rapides span { color: var(--pale); font-family: var(--sans); margin-right: 2px; }
.term-rapides button { border: 1px solid var(--bord); background: #131928; color: #b9c5dc; border-radius: 6px; padding: 3px 8px; font: 11.5px var(--mono); }
.term-rapides button:hover { border-color: var(--orange); color: #fff; }
.term-rapides .fleche { margin-left: auto; }
.a-gras { font-weight: 700; color: #fff; } .a-pale { color: #6f7b96; } .a-rouge { color: #ff6b6b; } .a-vert { color: #4be3a4; } .a-jaune { color: var(--jaune); } .a-bleu { color: #6aa8ff; } .a-cyan { color: #67d9e8; }
.a-pale .a-gras, .a-gras .a-pale { color: inherit; }

/* ---------------------------------------------------------------- la supervision (Uptime Kuma) */
.supervision { position: relative; padding: 10px; gap: 8px; overflow-y: auto; }
.vg-etat { flex: none; display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 10px; border: 1px solid; transition: background .4s, border-color .4s; }
.vg-etat b { font-size: 15px; display: block; } .vg-etat small { color: rgba(255, 255, 255, .7); font-size: 12px; }
.vg-voyant { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.vg-label { margin-left: auto; font-weight: 800; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.vg-etat.ok { background: rgba(46, 196, 182, .1); border-color: rgba(46, 196, 182, .35); } .vg-etat.ok .vg-voyant { background: var(--vert); box-shadow: 0 0 12px var(--vert); } .vg-etat.ok .vg-label { color: var(--vert); }
.vg-etat.ko { background: rgba(255, 90, 90, .16); border-color: rgba(255, 90, 90, .6); } .vg-etat.ko .vg-voyant { background: var(--rouge); box-shadow: 0 0 14px var(--rouge); animation: clignote .8s steps(2) infinite; } .vg-etat.ko .vg-label { color: #ff8c8c; }
.vg-tuiles { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vg-tuile { background: var(--creux); border: 1px solid var(--bord); border-radius: 9px; padding: 6px 11px; }
.vg-tuile small { display: block; font-size: 10.5px; color: var(--pale); text-transform: uppercase; letter-spacing: .07em; }
.vg-tuile b { font: 700 22px var(--mono); } .vg-tuile.ko b { color: var(--rouge); } .vg-tuile.ko { border-color: rgba(255, 90, 90, .4); }
.vg-graphe { flex: 1; min-height: 58px; display: flex; flex-direction: column; background: var(--creux); border: 1px solid var(--bord); border-radius: 9px; padding: 8px 10px 6px; }
.vg-graphe small, .vg-protections small, .vg-disque small { font-size: 10.5px; color: var(--pale); text-transform: uppercase; letter-spacing: .07em; }
.vg-courbe { flex: 1; min-height: 40px; width: 100%; display: block; }
.vg-disque { display: flex; align-items: center; gap: 10px; background: var(--creux); border: 1px solid var(--bord); border-radius: 9px; padding: 8px 11px; }
.vg-jauge { flex: 1; height: 9px; border-radius: 5px; background: #1c2438; position: relative; overflow: hidden; }
.vg-jauge i { position: absolute; inset: 0 auto 0 0; background: var(--vert); border-radius: 5px; transition: width .6s; } .vg-jauge em { position: absolute; left: 80%; top: 0; bottom: 0; width: 2px; background: var(--jaune); }
.vg-disque.ko .vg-jauge i { background: var(--rouge); } .vg-disque b { font: 700 13px var(--mono); }
.vg-protections { flex: none; }
.vg-mention { flex: none; margin: 0; font-size: 10.5px; color: #66718c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg-protections .vide { margin: 3px 0 0; color: var(--pale); font-size: 12.5px; font-style: italic; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.puce { padding: 3px 10px; border-radius: 999px; font-size: 12px; background: rgba(46, 196, 182, .12); border: 1px solid rgba(46, 196, 182, .4); color: #8ff0e4; }

/* ---------------------------------------------------------------- messagerie */
.msg { flex-direction: row !important; }
.msg-liste { width: 38%; max-width: 230px; min-width: 150px; border-right: 1px solid var(--bord); overflow-y: auto; background: #0e1320; }
.msg-item { position: relative; width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .04); background: none; text-align: left; }
.msg-item div { min-width: 0; flex: 1; } .msg-item b { display: block; font-size: 13px; } .msg-item small { display: block; color: var(--pale); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item:hover { background: rgba(255, 255, 255, .04); } .msg-item.active { background: rgba(46, 196, 182, .12); }
.msg-item .badge { position: static; background: #25d366; color: #04210f; flex: none; }
.msg-conv { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #0b0f19 radial-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 18px 18px; }
.msg-entete { flex: none; display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: #131a2b; border-bottom: 1px solid var(--bord); }
.msg-entete .avatar { width: 32px; height: 32px; } .msg-entete b { display: block; font-size: 13.5px; line-height: 1.2; } .msg-entete small { color: var(--pale); font-size: 11.5px; }
.msg-fil, .bobo-fil { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 7px; scrollbar-width: thin; scrollbar-color: #2a3350 transparent; }
.msg-vide { margin: auto; color: var(--pale); font-style: italic; }
.msg-sep { align-self: center; font-size: 11px; color: var(--pale); background: #161d2e; padding: 3px 12px; border-radius: 999px; margin: 6px 0; }
.bulle { align-self: flex-start; max-width: 86%; background: #1a2236; border-radius: 4px 13px 13px 13px; padding: 7px 11px 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.bulle p { margin: 0; white-space: pre-wrap; font-size: 13.5px; line-height: 1.42; overflow-wrap: anywhere; }
.bulle time { display: block; text-align: right; font-size: 10px; color: var(--pale); margin-top: 1px; }
.bulle .auteur { display: block; font-size: 11.5px; color: var(--jaune); margin-bottom: 1px; }
.bulle.moi { align-self: flex-end; background: #0f5a4c; border-radius: 13px 4px 13px 13px; } .bulle.moi time { color: #8fe0cf; }
.bulle.neuf { animation: bulle .3s ease; } @keyframes bulle { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.msg-pied { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 9px 11px; border-top: 1px solid var(--bord); background: #101624; }
.msg-pied small { color: var(--pale); font-size: 11.5px; } .msg-pied .muet { font-style: italic; }
.reponse { text-align: left; border: 1px solid rgba(46, 196, 182, .45); background: rgba(46, 196, 182, .09); border-radius: 10px; padding: 7px 11px; font-size: 13px; animation: bulle .3s ease; }
.reponse:hover { background: rgba(46, 196, 182, .25); }
.aide { border: 1px dashed var(--bord2); background: none; border-radius: 10px; padding: 7px 11px; color: #b9c5dc; font-size: 13px; }
.aide:hover { border-color: var(--orange); color: #fff; }

/* ---------------------------------------------------------------- journaux */
.jrn { background: #070a11; }
.jrn-onglets { flex: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 7px 8px 0; background: #101624; border-bottom: 1px solid var(--bord); }
.jrn-onglets button { border: 1px solid var(--bord); border-bottom: 0; background: #0b0f19; color: var(--pale); padding: 5px 11px; border-radius: 7px 7px 0 0; font-size: 12.5px; }
.jrn-onglets button.actif { background: #070a11; color: #fff; border-color: var(--bord2); box-shadow: inset 0 2px 0 var(--orange); }
.jrn-info { flex: none; padding: 5px 11px; font: 11.5px var(--mono); color: var(--pale); border-bottom: 1px solid rgba(255, 255, 255, .05); }
.jrn-texte { flex: 1; min-height: 0; margin: 0; overflow: auto; padding: 9px 11px; font: 12px/1.55 var(--mono); color: #b7c2d8; scrollbar-width: thin; scrollbar-color: #2a3350 transparent; }
.jrn-texte div { white-space: pre-wrap; word-break: break-all; padding-left: 1.5em; text-indent: -1.5em; }

/* ---------------------------------------------------------------- carnet */
.carnet { flex-direction: row !important; background: #2b1a10; }
.carnet-sommaire { width: 34%; max-width: 210px; min-width: 132px; padding: 10px 0 10px 8px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.carnet-sommaire button { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; border-radius: 8px 0 0 8px; padding: 8px 9px; background: rgba(244, 236, 216, .08); color: #e6d6b8; font: 13.5px var(--main); position: relative; }
.carnet-sommaire i { font: 700 11px var(--sans); width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .3); display: grid; place-items: center; flex: none; font-style: normal; }
.carnet-sommaire button.actif { background: #f4ecd8; color: #3a2414; } .carnet-sommaire button.actif i { background: #d7263d; color: #fff; }
.carnet-sommaire button.verrou { opacity: .5; }
.carnet-sommaire button.neuve::after { content: "nouveau"; position: absolute; right: 6px; top: -5px; font: 700 9px var(--sans); background: var(--orange); color: #1c0d02; padding: 1px 6px; border-radius: 6px; }
.carnet-page { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 22px 22px 30px; color: #2e1d10; font: 14.5px/1.6 "Iowan Old Style", Georgia, "Times New Roman", serif;
  background: linear-gradient(90deg, transparent 17px, rgba(215, 38, 61, .35) 17px 18px, transparent 18px), repeating-linear-gradient(180deg, transparent 0 25px, rgba(60, 90, 140, .16) 25px 26px), #f4ecd8; border-radius: 3px 0 0 3px; }
.carnet-page h3 { font: 700 25px var(--main); margin: 0 0 8px; color: #7a2b12; transform: rotate(-.6deg); }
.carnet-page h4 { font: 700 16px var(--main); margin: 14px 0 2px; color: #1e4a7a; }
.carnet-page p { margin: 6px 0; } .carnet-page ol { margin: 4px 0; padding-left: 22px; } .carnet-page li { margin: 3px 0; }
.carnet-page table { border-collapse: collapse; width: 100%; margin: 6px 0; } .carnet-page td { padding: 3px 6px 3px 0; vertical-align: top; border-bottom: 1px dotted rgba(46, 29, 16, .25); font-size: 13.5px; }
.carnet-page code.cmd { background: rgba(255, 209, 102, .55); border: 0; color: #2e1d10; padding: 1px 5px; border-radius: 3px; font-size: 12.5px; }
.carnet-page code.cmd:hover { background: var(--orange); color: #fff; }
.carnet-page .marge { font: 15.5px var(--main); color: #7a2b12; transform: rotate(-.8deg); margin-top: 14px; }
.carnet-page .tampon { display: inline-block; border: 2px solid #1f9d6b; color: #1f9d6b; font: 700 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; transform: rotate(-2deg); margin: 0 0 4px; }
.carnet-pied { text-align: right; font: 20px var(--main); color: #7a2b12; }
.carnet-verrou { margin: 22% auto 0; text-align: center; color: #7a5a3c; } .carnet-verrou b { font: 700 24px var(--main); }
.schema { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; font-family: var(--sans); }
.schema .boite { border: 2px solid #3a2414; border-radius: 9px; padding: 6px 10px; text-align: center; font-weight: 700; font-size: 13px; background: #fff8e6; transform: rotate(-1deg); }
.schema .boite small { font-weight: 400; font-size: 11px; } .schema .b1 { border-color: #1e4a7a; } .schema .b2 { border-color: #c8501a; transform: rotate(1deg); } .schema .b3 { border-color: #1f7a52; }
.schema span { font-size: 18px; }

/* ---------------------------------------------------------------- Bobo */
.bobo { background: #0d0b1f; }
.bobo-tete { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #181436; border-bottom: 1px solid #2c2760; }
.bobo-tete b { display: block; } .bobo-tete small { color: #b6adf0; font-size: 11.5px; }
.bobo .bulle { background: #221d4d; } .bobo .bulle.moi { background: #3d32a8; }
.bobo-questions { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 2px; margin-top: 4px; border-top: 1px dashed #2c2760; }
.bobo-questions small { flex-basis: 100%; color: #8d86c9; font-size: 11.5px; }
.bobo-fil .bulle { flex: none; }
.bobo-questions button { border: 1px solid #3f3791; background: rgba(155, 140, 255, .1); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: #d6d0ff; }
.bobo-questions button:hover { background: rgba(155, 140, 255, .3); color: #fff; }
.bobo-saisie { flex: none; padding: 8px 11px 11px; } .bobo-saisie input { width: 100%; border: 1px solid #3f3791; background: #14102e; color: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; outline: 0; }
.bobo-saisie input:focus { border-color: var(--violet); }
.points { display: inline-flex; gap: 4px; padding: 5px 2px; } .points i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: rebond 1s infinite; } .points i:nth-child(2) { animation-delay: .15s; } .points i:nth-child(3) { animation-delay: .3s; }
@keyframes rebond { 30% { transform: translateY(-5px); opacity: .5; } }

/* ---------------------------------------------------------------- notifications */
#toasts { position: fixed; top: 56px; right: 12px; z-index: 30; transition: top .25s; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 24px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 13px; border: 1px solid var(--bord2); background: rgba(18, 23, 37, .96); box-shadow: 0 14px 40px rgba(0, 0, 0, .55); animation: glisse .35s cubic-bezier(.2, 1.2, .4, 1); backdrop-filter: blur(8px); }
.toast b { font-size: 13px; } .toast p { margin: 1px 0 0; font-size: 12.5px; color: #c4cee2; line-height: 1.35; }
.toast.part { opacity: 0; transform: translateX(30px); transition: .35s; }
@keyframes glisse { from { opacity: 0; transform: translateX(40px); } }

/* ---------------------------------------------------------------- panneaux (prévention, bilan, fin) */
#calque { position: fixed; inset: 0; z-index: 40; display: none; overflow-y: auto; padding: 12px 14px; background: rgba(5, 7, 14, .74); backdrop-filter: blur(7px); }
#calque.ouvert { display: grid; place-items: center; align-items: safe center; }
#calque.opaque { background: radial-gradient(70% 55% at 50% 112%, rgba(255, 138, 61, .32), transparent 62%), radial-gradient(60% 50% at 50% -12%, rgba(91, 51, 120, .5), transparent 60%), #080a13; backdrop-filter: none; }
#calque.sombre { background: radial-gradient(70% 60% at 50% 110%, rgba(40, 70, 160, .25), transparent 60%), rgba(3, 4, 10, .58); backdrop-filter: none; }
.panneau { width: min(1040px, 100%); background: linear-gradient(180deg, #171d30, #10141f); border: 1px solid var(--bord2); border-radius: 18px; padding: 16px 26px 14px; box-shadow: 0 40px 120px rgba(0, 0, 0, .7); animation: pop .35s ease; }
.panneau .sur, .final .sur { margin: 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--orange); }
.panneau h2 { margin: 2px 0 8px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; }
.panneau .intro { color: #c4cee2; font-size: 15px; max-width: 66ch; margin: 0 0 16px; }
.panneau .pied, .final .pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.panneau .pied small { color: var(--pale); }
.choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.carte-choix { display: flex; gap: 11px; text-align: left; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--bord); background: rgba(255, 255, 255, .03); transition: border-color .15s, background .15s, transform .12s; }
.carte-choix:hover { border-color: var(--bord2); transform: translateY(-1px); }
.carte-choix b { font-size: 15px; } .carte-choix p { margin: 3px 0 0; color: #b4bfd6; font-size: 13px; line-height: 1.4; }
.coche { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--bord2); margin-top: 1px; display: grid; place-items: center; }
.carte-choix.pris { border-color: var(--orange); background: rgba(255, 138, 61, .12); } .carte-choix.pris .coche { background: var(--orange); border-color: var(--orange); } .carte-choix.pris .coche::after { content: "✓"; color: #1c0d02; font: 800 14px var(--sans); font-style: normal; }

.bilan-haut { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.bilan-note { display: flex; align-items: center; gap: 16px; }
.anneau { width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, #131826 78%, transparent 79%), conic-gradient(var(--orange) calc(var(--p) * 1%), #232b42 0); transition: --p 1.1s cubic-bezier(.2, .8, .2, 1); }
.anneau b { font: 800 30px/1 var(--mono); } .anneau small { color: var(--pale); font-size: 11.5px; }
.grade small { display: block; color: var(--pale); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; } .grade b { font-size: 23px; color: var(--jaune); }
.bilan-chiffres { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.bilan-chiffres div, .final-chiffres div { background: var(--creux); border: 1px solid var(--bord); border-radius: 11px; padding: 9px 15px; text-align: center; min-width: 104px; }
.bilan-chiffres b, .final-chiffres b { display: block; font: 700 21px var(--mono); } .bilan-chiffres small, .final-chiffres small { color: var(--pale); font-size: 11.5px; }
.scores { display: grid; gap: 3px; margin-bottom: 10px; }
.score { display: grid; grid-template-columns: 124px 1fr 52px minmax(0, 1.3fr); gap: 11px; align-items: center; font-size: 13px; }
.score .jauge { height: 8px; border-radius: 5px; background: #1c2438; overflow: hidden; } .score .jauge i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--jaune)); border-radius: 5px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.score b { font-family: var(--mono); text-align: right; } .score small { color: var(--pale); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bilan-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bilan-colonnes h4 { margin: 0 0 5px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--pale); }
.bilan-colonnes h4:not(:first-child) { margin-top: 13px; }
.bilan-colonnes p { margin: 0 0 5px; font-size: 13px; line-height: 1.38; color: #cfd8ea; }
.bilan-colonnes .lecon { color: #fff; font-weight: 600; border-left: 3px solid var(--orange); padding-left: 10px; }
.methode { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; line-height: 1.38; }
.methode li { padding-left: 25px; position: relative; } .methode li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.methode .ok::before, .retour.ok b::before { content: "✓ "; color: var(--vert); } .methode .ko::before, .retour.ko b::before { content: "✗ "; color: var(--rouge); } .methode .ko { color: #ffb4b4; }
.page-gagnee { display: flex; align-items: center; gap: 13px; margin-top: 10px; padding: 7px 15px; border-radius: 12px; background: linear-gradient(90deg, rgba(244, 236, 216, .14), rgba(244, 236, 216, .03)); border: 1px dashed rgba(244, 236, 216, .4); }
.page-gagnee span { width: 28px; height: 28px; color: var(--jaune); flex: none; } .page-gagnee svg { width: 100%; height: 100%; }
.page-gagnee small { display: block; color: var(--pale); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; } .page-gagnee b { font: 700 19px var(--main); color: #f4ecd8; } .page-gagnee i { margin-left: auto; color: var(--pale); font-size: 12.5px; }

/* le téléphone de 2 h du matin */
.nuit-ecran { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.nuit-texte { margin: 0; font-size: 17px; color: #c6d0ea; text-shadow: 0 2px 16px #000; } .nuit-texte b { font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: #8ea4dd; }
.telephone { position: relative; width: 264px; height: 470px; border-radius: 38px; padding: 46px 14px 18px; background: linear-gradient(180deg, #0c1230, #070a1a); border: 3px solid #2b3352; box-shadow: 0 0 0 2px #05060d, 0 40px 100px rgba(0, 0, 0, .8), 0 0 90px rgba(90, 130, 255, .25); animation: vibre 1.9s linear infinite; transform-origin: 50% 90%; }
@keyframes vibre { 0%, 20%, 26%, 46%, 100% { transform: rotate(-3deg); } 2%, 6%, 10%, 14%, 18%, 28%, 32%, 36%, 40%, 44% { transform: rotate(-3deg) translate(-2.5px, 1px); } 4%, 8%, 12%, 16%, 30%, 34%, 38%, 42% { transform: rotate(-3deg) translate(2.5px, -1px); } }
.tel-encoche { position: absolute; top: 12px; left: 50%; width: 84px; height: 22px; margin-left: -42px; border-radius: 12px; background: #000; }
.tel-heure { font: 200 62px/1 var(--sans); letter-spacing: .02em; } .tel-date { color: #9fb0dc; font-size: 13.5px; margin: 2px 0 16px; }
.tel-notif { display: flex; gap: 9px; align-items: center; text-align: left; padding: 9px 10px; border-radius: 15px; background: rgba(255, 255, 255, .11); margin-top: 7px; backdrop-filter: blur(8px); opacity: 0; animation: apparait .45s ease forwards; }
@keyframes apparait { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.tel-notif .avatar { width: 30px; height: 30px; } .tel-notif b { font-size: 12.5px; display: block; } .tel-notif p { margin: 0; font-size: 11.5px; color: #cdd6ee; line-height: 1.3; }
.tel-notif.n1 { animation-delay: .9s; background: rgba(255, 90, 90, .25); } .tel-notif.n2 { animation-delay: 2.1s; } .tel-notif.n3 { animation-delay: 3.3s; }
.nuit-btn { font-size: 16px; padding: 13px 26px; } .nuit-note { margin: 0; color: #7f8db5; font-style: italic; }

/* l'écran final */
.final { width: min(860px, 100%); text-align: center; padding: 30px 20px; animation: pop .5s ease; }
.final h2 { font-size: clamp(26px, 4.4vw, 46px); line-height: 1.12; margin: 8px 0 16px; font-weight: 700; }
.final .gros { font: 800 1.5em var(--mono); color: var(--orange); }
.final-puces { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 auto 20px; max-width: 700px; }
.final-puces code { padding: 3px 10px; border-radius: 7px; background: #0b0e17; border: 1px solid var(--bord2); color: #7dffb2; opacity: 0; animation: apparait .4s ease forwards; }
.final-chiffres { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.final-revelation { font-size: clamp(16px, 2vw, 20px); line-height: 1.55; color: #d5ddef; margin: 24px 0; } .final-revelation b { color: #fff; font-size: 1.15em; background: linear-gradient(transparent 62%, rgba(255, 138, 61, .5) 62%); }
.final-suite { display: inline-block; text-align: left; padding: 14px 20px; border-radius: 14px; border: 1px dashed var(--bord2); background: rgba(255, 255, 255, .03); max-width: 620px; }
.final-suite small { color: var(--orange); letter-spacing: .2em; text-transform: uppercase; font-size: 11.5px; } .final-suite b { display: block; font-size: 19px; margin: 2px 0; } .final-suite p { margin: 0; color: var(--pale); font-size: 13.5px; }
.final .pied { justify-content: center; margin-top: 24px; }

/* ---------------------------------------------------------------- finitions du prototype */
.badge-proto { flex: none; font: 600 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #c9b8a6; border: 1px solid rgba(255, 190, 140, .32); background: rgba(255, 138, 61, .08); padding: 4px 8px; border-radius: 999px; white-space: nowrap; cursor: default; }
#titre .badge-proto { position: absolute; left: 16px; bottom: 14px; background: rgba(10, 13, 22, .55); color: #ffe2c9; backdrop-filter: blur(4px); }
#titre.fond-seul .badge-proto { display: none; }
.titre-simulation { margin: 10px auto 0; max-width: 660px; font-size: 13px; color: #fff; background: rgba(9, 11, 20, .55); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; padding: 7px 14px; text-shadow: none; backdrop-filter: blur(4px); }
.titre-petit-ecran { display: none; margin: 10px auto 0; font-size: 13px; color: #ffe2c9; text-shadow: 0 1px 8px #000; }
.final-proto { margin: 16px 0 0; font-size: 12px; color: var(--pale); letter-spacing: .04em; }
body.avec-bandeau #toasts { top: 98px; }
.bilan-chiffres div.ko { border-color: rgba(255, 90, 90, .45); } .bilan-chiffres div.ko b { color: var(--rouge); }
.bilan-colonnes .vraie-vie { border-left: 3px solid var(--vert); padding-left: 10px; color: #d6efe9; }
.nuit-lien { margin: -8px 0 0; max-width: 420px; font-size: 13px; color: #9fb0dc; text-shadow: 0 1px 10px #000; }
.puce.alerte { background: rgba(255, 209, 102, .12); border-color: rgba(255, 209, 102, .5); color: #ffe3a1; }
.vg-protections .puces + .vide { margin-top: 6px; }

/* la bulle « c'est quoi, cet écran ? » (une seule fois) */
.vg-aide { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 2; box-shadow: 0 -8px 24px rgba(0, 0, 0, .5); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; text-align: left; padding: 7px 11px; border-radius: 10px; border: 1px solid rgba(46, 196, 182, .55); background: #0f2a2c; color: #dff7f3; font-size: 12.5px; line-height: 1.4; animation: bulle .35s ease; }
.vg-aide span { flex: 1 1 260px; }
.vg-aide b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--vert); }
.vg-aide i { margin-left: auto; font-style: normal; font-size: 11.5px; color: #8fe0cf; text-decoration: underline; }
.vg-aide:hover { border-color: var(--vert); }

/* nano / vim : visionneuse en lecture seule, par-dessus le terminal */
.term-vue { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: #070a11; outline: 0; font: 13px/1.5 var(--mono); color: #d5ddef; }
.vue-tete { flex: none; display: flex; gap: 12px; justify-content: space-between; padding: 2px 10px; background: #c9d3e6; color: #0a0d16; white-space: nowrap; }
.vue-tete b { overflow: hidden; text-overflow: ellipsis; }
.term-vue.vim .vue-tete { background: #1c2438; color: #b9c5dc; }
.vue-note { flex: none; padding: 2px 10px; color: var(--jaune); background: rgba(255, 209, 102, .08); font-size: 12px; }
.vue-texte { flex: 1; min-height: 0; margin: 0; overflow: auto; padding: 8px 12px; font: inherit; white-space: pre-wrap; word-break: break-word; outline: 0; scrollbar-width: thin; scrollbar-color: #2a3350 transparent; -webkit-user-select: text; user-select: text; }
.term-vue.vim .vue-texte { color: #c9d3e6; }
.vue-etat { flex: none; padding: 1px 10px; color: #8d99b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vue-message { flex: none; padding: 1px 10px 3px; color: var(--jaune); font-weight: 700; }
.vue-message.refus { animation: refus .5s ease; }
@keyframes refus { 0%, 60% { background: var(--jaune); color: #1c0d02; } }
.vue-pied { flex: none; display: flex; align-items: center; gap: 16px; padding: 5px 10px; border-top: 1px solid var(--bord); background: #0c101a; font-size: 12px; color: #b9c5dc; }
.vue-pied kbd { font: inherit; background: #c9d3e6; color: #0a0d16; padding: 0 5px; border-radius: 3px; }
.vue-espace { flex: 1; }
.vue-pied button { border: 1px solid var(--bord2); background: #131928; color: #fff; border-radius: 6px; padding: 3px 10px; font: 12px var(--sans); }
.vue-pied button:hover { border-color: var(--orange); }

/* « Donner mon avis » */
.modale { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; overflow-y: auto; padding: 14px; background: rgba(3, 4, 10, .72); backdrop-filter: blur(5px); }
.avis { position: relative; width: min(520px, 100%); display: flex; flex-direction: column; gap: 7px; padding: 20px 22px 16px; border-radius: 16px; border: 1px solid var(--bord2); background: linear-gradient(180deg, #171d30, #10141f); box-shadow: 0 40px 120px rgba(0, 0, 0, .7); animation: pop .3s ease; text-align: left; }
.avis .sur { margin: 0; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--orange); }
.avis h3 { margin: 0 0 4px; font-size: 22px; }
.avis label { margin-top: 6px; font-weight: 600; font-size: 13.5px; }
.avis-choix { display: flex; gap: 7px; flex-wrap: wrap; }
.avis-choix button { flex: 1; min-width: 86px; border: 1px solid var(--bord2); background: rgba(255, 255, 255, .04); border-radius: 9px; padding: 8px 10px; font-size: 13.5px; }
.avis-choix button:hover { border-color: var(--orange); }
.avis-choix button.pris { border-color: var(--orange); background: rgba(255, 138, 61, .2); color: #fff; font-weight: 700; }
.avis input, .avis textarea { width: 100%; border: 1px solid var(--bord2); background: #0b0e17; color: #fff; border-radius: 9px; padding: 8px 11px; font: 13.5px/1.4 var(--sans); outline: 0; resize: vertical; }
.avis input:focus, .avis textarea:focus { border-color: var(--orange); }
.avis-apercu { font: 12px/1.45 var(--mono) !important; color: #c9d3e6 !important; margin-top: 6px; }
.avis-pied { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 13.5px; color: #cfd8ea; }
.avis-pied span { flex: 1 1 190px; } .avis-pied .btn { flex: none; }
.avis-etat { min-height: 17px; font-size: 12.5px; } .avis-etat.ok { color: var(--vert); } .avis-etat.ko { color: var(--jaune); }
.avis-note { color: var(--pale); font-size: 11.5px; }
.avis-fermer { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--pale); font-size: 21px; line-height: 1; }
.avis-fermer:hover { background: rgba(255, 90, 90, .2); color: #fff; }

/* ---------------------------------------------------------------- petits écrans */
@media (max-width: 859px) {
  #bureau { grid-template: 44px minmax(0, 1fr) 58px / minmax(0, 1fr); }
  .barre { min-width: 0; } .barre-logo { flex: none; } .barre-etat { min-width: 0; flex-shrink: 1; overflow: hidden; } #barre-etat-txt { overflow: hidden; text-overflow: ellipsis; } .barre-etat .pastille { flex: none; }
  .barre-droite { gap: 9px; flex: none; } .dock { min-width: 0; } .dock-btn { min-width: 0; }
  .dock { grid-row: 3; flex-direction: row; justify-content: space-around; border-right: 0; border-top: 1px solid var(--bord); padding: 5px; }
  .dock-btn { flex: 1; } .dock-btn.ouverte::before { display: none; }
  .fenetre { inset: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; border: 0; resize: none; }
  .fenetre:not(.active) { display: none; }
  .fen-fermer { display: none; }
  .barre-mission, .compteur small, .horloge small { display: none; }
  .barre { gap: 9px; padding: 0 9px; } .barre-etat { font-size: 11px; padding: 4px 9px; }
  .term { font-size: 14px; } .term-saisie { font-size: 16px; }   /* 16 px minimum : sinon l'iPhone zoome quand on touche la ligne */
  .bilan-colonnes { grid-template-columns: 1fr; } .score { grid-template-columns: 104px 1fr 46px; } .score small { display: none; }
  .panneau { padding: 18px 16px; } .bilan-chiffres { margin-left: 0; } .page-gagnee i { display: none; }
  .sous-titre { flex-wrap: wrap; } .st-portrait { width: 46px; height: 46px; } .st-suite { margin-left: auto; }
  .vignette { inset: 44px 0 58px 0; }
  .titre-petit-ecran { display: block; }
  .barre .badge-proto { display: none; }
  .barre .btn-son span { display: none; } .barre .btn-son { padding: 0 8px; }
  .btn-son.hors { left: 10px; bottom: auto; top: 58px; }
  .bandeau { top: 50px; width: calc(100vw - 20px); font-size: 14.5px; padding: 10px 14px; } .bandeau small { display: block; margin: 2px 0 0; }
  body.avec-bandeau #toasts { top: 150px; }
}
@media (max-width: 480px) {
  .barre-logo { font-size: 0; gap: 0; } .barre-logo i { display: none; }      /* il reste le petit bol */
  .barre-etat { letter-spacing: 0; }
  .titre-boite { top: -4vh; padding: 16px; }
  .panneau h2 { font-size: 22px; } .bilan-chiffres div { min-width: 0; flex: 1 1 40%; padding: 7px 8px; }
  .final { padding: 18px 4px; } .final-chiffres div { min-width: 0; flex: 1 1 40%; }
  .avis { padding: 18px 14px 14px; } .avis-choix button { min-width: 0; padding: 8px 4px; }
  .vue-pied { gap: 9px; } .vue-tete span:first-child { display: none; }
  .carnet-sommaire { min-width: 104px; } .carnet-page { padding: 14px 12px 18px 26px; }
  .msg-liste { min-width: 0; width: 58px; } .msg-item div { display: none; } .msg-item { justify-content: center; padding: 9px 4px; } .msg-item .badge { position: absolute; top: 3px; right: 3px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }
