/* ============================================================
   ConstellationGuesser — theme "annee 2000 / code"
   Carre, monospace, sobre. Aucun arrondi, ombres franches.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;700;800&display=swap');

:root {
    --bg: #04070f;
    --panel: rgba(9, 15, 31, 0.92);
    --panel-solid: #0a1122;
    --panel-2: #0e1730;
    --line: #223258;
    --line-dim: rgba(110, 160, 255, 0.14);
    --accent: #6ea8ff;
    --accent-soft: rgba(110, 168, 255, 0.10);
    --gold: #f4c66a;
    --star: #eaf1ff;
    --text: #c9d7f8;
    --dim: #7d90bf;
    --good: #5fd39a;
    --bad: #ff6b7d;
    --mono: Consolas, 'Courier New', ui-monospace, Menlo, monospace;
    --title: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    --shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    overflow: hidden;
}

a { color: var(--accent); text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }

button {
    font-family: var(--mono);
}

/* Tactile : pas de zoom double-tap sur les controles, pas de halo gris iOS */
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ---------- Top bar (barre style "fenetre 2000") ---------- */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 40;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

/* Groupe de gauche : "LeBonJeu / <jeu>" (fil d'Ariane) */
.brand-group {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.home-brand {
    font-family: var(--title);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: var(--star);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .12s;
}
.home-brand::before { content: "> "; color: var(--accent); }
.home-brand:hover { color: var(--accent); }
.brand-sep { color: var(--line); flex-shrink: 0; }

.brand {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--dim);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    transition: color .12s;
}
.brand:hover { color: var(--accent); }

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--dim);
    background: transparent;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: color .12s, border-color .12s, background .12s;
}
.top-btn::before { content: "[ "; color: var(--line); }
.top-btn::after  { content: " ]"; color: var(--line); }
.top-btn:hover, .top-btn.active {
    color: var(--star);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.lang-switch {
    display: flex;
    border: 1px solid var(--line);
}
.lang-switch a {
    display: inline-block;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--dim);
    border-right: 1px solid var(--line);
    transition: color .12s, background .12s;
}
.lang-switch a:last-child { border-right: none; }
.lang-switch a.active { background: var(--accent); color: var(--bg); }
.lang-switch a:hover:not(.active) { color: var(--star); background: var(--accent-soft); }

/* ---------- Sky canvas ---------- */
#sky {
    position: fixed;
    inset: 0;
    display: block;
    cursor: grab;
    z-index: 1;
    /* Tactile : le doigt pilote la sphere, jamais le scroll/zoom du navigateur */
    touch-action: none;
}
#sky.dragging { cursor: grabbing; }

/* Vignette + scanlines discretes (cachet retro) */
.vignette {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(0,0,0,0.10) 0 1px, transparent 1px 3px),
        radial-gradient(ellipse at center, transparent 55%, rgba(4, 7, 15, 0.85) 100%);
}

/* ---------- Hero (accueil) ---------- */
.hero {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
    pointer-events: none;
}
.hero h1 {
    margin: 0 0 24px;
    font-size: clamp(22px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--star);
    text-shadow: 0 0 24px rgba(110, 168, 255, 0.4);
}
.btn-play {
    pointer-events: auto;
    padding: 14px 46px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    border: 1px solid var(--accent);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background .12s, transform .1s;
}
.btn-play::before { content: "> "; }
.btn-play:hover { background: #8dbaff; }
.btn-play:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0,0,0,0.5); }

/* ---------- Hints (bas gauche, style commentaire) ---------- */
.hints {
    position: fixed;
    bottom: 18px; left: 18px;
    z-index: 20;
    font-size: 11px;
    color: var(--dim);
    line-height: 1.9;
    pointer-events: none;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.hints span { display: block; }
.hints span::before { content: "// "; color: var(--line); }
.hints b { color: var(--accent); font-weight: 400; }

/* ---------- Selecteur d'hemisphere (bas droite) ---------- */
.hemi-select {
    position: fixed;
    bottom: 18px; right: 18px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.hemi-label {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dim);
}
.hemi-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--star);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: border-color .12s, background .12s;
}
.hemi-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.hemi-btn .swap { color: var(--dim); font-size: 11px; }

/* ---------- Retour au jeu (mode focus) ---------- */
.back-game {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: none;
    padding: 12px 26px;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--star);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: var(--shadow);
    transition: border-color .12s, background .12s;
}
.back-game::before { content: "< "; color: var(--accent); }
.back-game.visible { display: inline-block; }
.back-game:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--star); }

/* ---------- Carte d'information constellation ---------- */
.const-card {
    position: fixed;
    top: 50%; right: 32px;
    transform: translateY(-50%) translateX(30px);
    width: 350px;
    max-width: calc(100vw - 40px);
    max-height: 82vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 35;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}
.const-card.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}
.const-card .cc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1;
}
.cc-head .cc-titles { min-width: 0; }
.cc-head .cc-sup {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: lowercase;
    color: var(--dim);
    margin-bottom: 3px;
}
.cc-head .cc-sup::before { content: "// "; color: var(--line); }
.const-card h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--star);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    overflow-wrap: break-word;
}
.const-card .cc-close {
    background: none;
    border: 1px solid var(--line);
    color: var(--dim);
    width: 30px; height: 30px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .12s, border-color .12s;
}
.const-card .cc-close:hover { color: var(--star); border-color: var(--accent); }

.cc-mini {
    display: block;
    width: 100%;
    height: 150px;
    background: rgba(3, 7, 20, 0.6);
    border-bottom: 1px solid var(--line);
}
.cc-body { padding: 2px 16px 16px; }
.cc-row {
    padding: 11px 0;
    border-bottom: 1px dashed var(--line-dim);
}
.cc-row:last-child { border-bottom: none; padding-bottom: 4px; }
.cc-row .cc-k {
    display: block;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: lowercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.cc-row .cc-v {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text);
}
/* Etoiles principales : une puce par etoile */
.cc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.cc-chips .chip {
    display: inline-block;
    padding: 3px 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--star);
    font-size: 11px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
/* Mythe : bloc de lecture, legerement en retrait */
.cc-row .cc-v.cc-myth-text {
    color: var(--dim);
    border-left: 2px solid var(--line);
    padding-left: 10px;
}
.cc-sign {
    display: inline-block;
    padding: 3px 9px;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---------- Warp overlay ---------- */
#warp {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    background: #000;
    transition: opacity .2s ease;
}
#warp.active { opacity: 1; }
#warp canvas { width: 100%; height: 100%; display: block; }

/* ---------- Loader ---------- */
#loader {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    background: var(--bg);
    color: var(--dim);
    transition: opacity .6s ease;
    letter-spacing: 2px;
    font-size: 11px;
    text-transform: uppercase;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-orbit {
    width: 34px; height: 34px;
    border: 1px solid var(--line);
    border-top-color: var(--accent);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PAGE JEU (guesser.php)
   ============================================================ */
.game-wrap {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 66px 16px 30px;
    overflow-y: auto;
}
.game-col {
    width: min(560px, 92vw);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* Centre verticalement quand ca tient a l'ecran ; si le contenu est plus
       haut (petits ecrans), il reste defilable normalement. */
    margin-top: auto;
    margin-bottom: auto;
}

.scoreboard {
    display: flex;
    border: 1px solid var(--line);
    background: var(--panel);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.score-item {
    flex: 1;
    text-align: center;
    padding: 12px 10px 10px;
    border-right: 1px solid var(--line);
}
.score-item:last-child { border-right: none; }
.score-item .sv {
    font-size: 24px;
    font-weight: 700;
    color: var(--star);
    line-height: 1;
}
.score-item .sk {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: lowercase;
    color: var(--dim);
    margin-top: 6px;
}
.score-item.gold .sv { color: var(--gold); }
.score-item .sv small { font-size: 11px; font-weight: 400; color: var(--dim); }

.q-title {
    font-size: 12px;
    color: var(--dim);
    letter-spacing: 1.5px;
    text-transform: lowercase;
    margin: 0 0 8px;
    text-align: center;
}
.q-title::before { content: "// "; color: var(--line); }

#guessCanvas {
    width: 100%;
    height: min(340px, 42vh);
    background: radial-gradient(ellipse at center, rgba(14, 23, 48, 0.5), rgba(4, 7, 15, 0.2));
    border: 1px solid var(--line);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0 0;
    width: 100%;
}
.option {
    width: 100%;
    padding: 13px 16px;
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}
.option:hover:not(.locked) { border-color: var(--accent); background: var(--accent-soft); }
.option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 3px 0 0 var(--accent);
    color: var(--star);
}
.option.correct {
    border-color: var(--good);
    background: rgba(95, 211, 154, 0.10);
    box-shadow: inset 3px 0 0 var(--good);
    color: #d6ffe9;
}
.option.wrong {
    border-color: var(--bad);
    background: rgba(255, 107, 125, 0.08);
    box-shadow: inset 3px 0 0 var(--bad);
    color: #ffd9de;
}
.option.locked { cursor: default; }

/* Option "Pas une vraie constellation" (toujours en dernier, style a part) */
.option.option-unknown {
    border-style: dashed;
    color: var(--dim);
    background: transparent;
}
.option.option-unknown:hover:not(.locked) {
    color: var(--star);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.btn-validate {
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    border: 1px solid var(--accent);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background .12s, opacity .12s;
}
.btn-validate:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }
.btn-validate:not(:disabled):hover { background: #8dbaff; }

.result-banner {
    min-height: 22px;
    margin: 12px 0 2px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
}
.result-banner.good { color: var(--good); }
.result-banner.bad { color: var(--bad); }
.result-sub {
    font-size: 12px;
    color: var(--dim);
    text-align: center;
}

.post-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}
.post-actions > * { flex: 1; }

/* ---------- Boutons generiques ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    transition: border-color .12s, color .12s, background .12s;
    text-align: center;
}
.btn:hover { border-color: var(--accent); color: var(--star); background: var(--accent-soft); }
.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
.btn-primary:hover { background: #8dbaff; color: var(--bg); }

/* ---------- Modals (fin de partie + classement) ---------- */
.modal-back {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(2, 4, 12, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-back.open { display: flex; }
.modal {
    width: 440px;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0;
    text-align: center;
}
.modal h2 {
    margin: 0;
    padding: 12px 16px;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    color: var(--star);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: left;
}
.modal h2::before { content: "# "; color: var(--accent); }
.modal-body { padding: 22px 24px 24px; }
.modal .go-score {
    font-size: 40px;
    font-weight: 700;
    color: var(--gold);
    margin: 10px 0;
    line-height: 1;
}
.modal p { color: var(--dim); font-size: 12.5px; margin: 4px 0 14px; }
.modal input[type=text] {
    width: 100%;
    padding: 12px 14px;
    background: rgba(4, 7, 15, 0.7);
    border: 1px solid var(--line);
    color: var(--star);
    font-size: 13px;
    text-align: center;
    letter-spacing: 1px;
    font-family: var(--mono);
    margin-bottom: 6px;
}
.modal input[type=text]:focus { outline: none; border-color: var(--accent); }
.form-msg { font-size: 11.5px; min-height: 16px; margin-bottom: 8px; }
.form-msg.err { color: var(--bad); }
.form-msg.ok { color: var(--good); }

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}
.modal-actions .btn { flex: 1; min-width: 120px; }

/* ---------- Table du classement ---------- */
.lb-dim { color: var(--dim); }
.lb-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 12.5px;
}
.lb-table th {
    text-align: left;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: lowercase;
    color: var(--accent);
    padding: 7px 9px;
    border-bottom: 1px solid var(--line);
}
.lb-table td {
    padding: 9px;
    border-bottom: 1px solid var(--line-dim);
    color: var(--text);
    text-align: left;
}
.lb-table tr:hover td { background: var(--accent-soft); }
.lb-table .rk { color: var(--dim); width: 46px; }
.lb-table .rk.top { color: var(--gold); font-weight: 700; }
.lb-table .sc { text-align: right; font-weight: 700; color: var(--star); }
.lb-me td { background: rgba(244, 198, 106, 0.07); }

/* ============================================================
   PAGE STATIQUE (about.php)
   ============================================================ */
.page-static { overflow-y: auto; }
.static-wrap {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 76px 16px 40px;
}
.panel {
    width: 440px;
    max-width: 100%;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.panel h2 {
    margin: 0;
    padding: 12px 16px;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    color: var(--star);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.panel h2::before { content: "# "; color: var(--accent); }
.panel-body { padding: 20px 22px; }
.kv {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line-dim);
    font-size: 13px;
}
.kv:last-child { border-bottom: none; }
.kv .k {
    color: var(--accent);
    text-transform: lowercase;
    letter-spacing: 1px;
    white-space: nowrap;
}
.kv .k::before { content: "-- "; color: var(--line); }
.kv .v { color: var(--star); margin-left: auto; text-align: right; }
.panel-footer {
    padding: 0 22px 20px;
    display: flex;
    justify-content: center;
}

/* ============================================================
   PAGE ADMIN (stats — pulsar.php)
   ============================================================ */
.admin-wrap {
    position: fixed;
    inset: 0;
    z-index: 10;
    overflow-y: auto;
    padding: 66px 16px 40px;
}
.admin-col {
    width: min(980px, 95vw);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.admin-h {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: lowercase;
    color: var(--dim);
    margin: 10px 0 -6px;
}
.admin-h::before { content: "// "; color: var(--line); }

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 8px;
}
.tile {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 14px 12px 12px;
}
.tile .tv {
    font-size: 26px;
    font-weight: 700;
    color: var(--star);
    line-height: 1;
    word-break: break-all;
}
.tile .tk {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: lowercase;
    color: var(--dim);
    margin-top: 6px;
}
.tile.gold .tv { color: var(--gold); }
.tile.good .tv { color: var(--good); }

/* Graphique en barres (une seule serie, teinte accent) */
.chart-panel { background: var(--panel); border: 1px solid var(--line); padding: 14px 14px 8px; }
.bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 130px;
}
.bars .bcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bars .bval {
    font-size: 9px;
    color: var(--dim);
    text-align: center;
    margin-bottom: 2px;
}
.bars .bar {
    background: var(--accent);
    min-height: 2px;
}
.bars .bcol:hover .bar { background: #8dbaff; }
.bar-x {
    display: flex;
    gap: 3px;
    margin-top: 6px;
    border-top: 1px solid var(--line);
    padding-top: 5px;
}
.bar-x span {
    flex: 1;
    font-size: 8.5px;
    color: var(--dim);
    text-align: center;
    white-space: nowrap;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}
.admin-grid .panel { width: auto; }
.panel .panel-body.tight { padding: 8px 14px 14px; }
@media (max-width: 700px) {
    .admin-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE — petits ecrans / mobiles (iPhone, etc.)
   ============================================================ */
@media (max-width: 640px) {
    /* Topbar compacte : on ne garde que "LeBonJeu" a gauche */
    .topbar { padding: 0 8px; height: 44px; gap: 6px; }
    .home-brand { font-size: 13px; }
    .brand-sep, .brand { display: none; }
    .top-actions { gap: 5px; flex-shrink: 0; }
    .top-btn { padding: 6px 7px; font-size: 10px; letter-spacing: 0.5px; }
    .top-btn::before, .top-btn::after { content: ""; }  /* pas de crochets [ ] */
    .lang-switch a { padding: 6px 9px; font-size: 10px; }

    /* Accueil */
    .hero h1 { letter-spacing: 2px; margin-bottom: 20px; }
    .btn-play { padding: 13px 38px; font-size: 13px; }
    .hints {
        left: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        font-size: 10px;
        max-width: 46vw;
        line-height: 1.7;
    }
    .hemi-select {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        gap: 5px;
    }
    .hemi-btn { padding: 9px 12px; font-size: 11px; }
    .back-game {
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        padding: 11px 20px;
        font-size: 11px;
        max-width: 60vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Carte constellation : feuille en bas d'ecran */
    .const-card {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        max-height: 62vh;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
        transform: translateY(30px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .const-card.open { transform: translateY(0); }
    .cc-mini { height: 110px; }

    /* Page jeu */
    .game-wrap { padding: 56px 10px 24px; }
    #guessCanvas { height: min(300px, 36vh); }
    .option { padding: 12px 10px; font-size: 12.5px; }
    .score-item { padding: 10px 6px 9px; }
    .score-item .sv { font-size: 20px; }
    .post-actions { flex-direction: column; }

    /* Modals */
    .modal-back { padding: 12px; align-items: flex-end; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .modal { max-height: 80vh; }
    .modal-body { padding: 18px 16px 20px; }
    .modal-actions .btn { min-width: 0; }

    /* Pages statiques / admin */
    .static-wrap { padding: 60px 10px 30px; }
    .admin-wrap { padding: 56px 10px 30px; }
    .tiles { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .tile .tv { font-size: 20px; }
}

/* Tres petits ecrans (iPhone SE etc.) */
@media (max-width: 380px) {
    .home-brand { font-size: 12px; }
    .top-btn { padding: 5px 5px; font-size: 9px; }
    .lang-switch a { padding: 5px 7px; font-size: 9px; }
    .hints { display: none; }  /* le geste tactile est evident, on libere l'ecran */
}
