/* ─────────────────────────────────────────────────────────────────────────────
   Thème « donjon émeraude » — pierre sombre, émeraude, or de torche.
   Tout est statique (aucune animation) pour rester fluide sur les vieux ordinateurs.
   Les couleurs et polices se changent dans :root.
   ───────────────────────────────────────────────────────────────────────────── */
@font-face { font-family: "Uncial"; src: url(/fonts/uncial-antiqua-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Almendra"; font-weight: 700; src: url(/fonts/almendra-latin-700-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Cardo"; font-weight: 700; src: url(/fonts/cardo-greek-700-normal.woff2) format("woff2"); font-display: swap; unicode-range: U+0370-03FF, U+1F00-1FFF; }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; src: url(/fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; src: url(/fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans SC"; font-weight: 700; src: url(/fonts/alegreya-sans-sc-latin-700-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --bg: #0a1210;
  --joint: #121e1b;
  --panel: #0f1b19;
  --panel-hi: #142625;
  --edge: #243d38;
  --edge-hi: #3f6b5f;
  --em: #4aa58d;
  --em-deep: #1f6b5a;
  --em-dark: #0d3a31;
  --gold: #e3b653;
  --text: #d9e8de;
  --mute: #8aa59d;
  --bad: #ef7a66;

  --f-title: "Uncial", "Palatino Linotype", Georgia, serif;
  --f-name: "Almendra", "Palatino Linotype", Georgia, serif; /* noms d'énigmes : lisible */
  --f-body: "Alegreya Sans", "Gill Sans", "Trebuchet MS", sans-serif;
  --f-label: "Alegreya Sans SC", "Alegreya Sans", sans-serif;
}

* { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 18px/1.5 var(--f-body);
  background-color: var(--bg);
  /* Dalles de pierre : une seule tuile SVG, aucune image à charger */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cpath d='M0 .5H120M0 30.5H120M.5 0V30M60.5 30V60' stroke='%23121e1b' fill='none'/%3E%3C/svg%3E");
}
a { color: var(--em); }
a:hover { color: #86c9b5; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.muted { color: var(--mute); }

/* ───────── Barre du haut ───────── */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1100px; margin: 0 auto; padding: 14px 16px;
}
.bar-links { display: flex; gap: 6px; }
.nav-link {
  font: 700 15px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase;
  color: var(--mute); text-decoration: none; padding: 10px 12px; border: 2px solid transparent;
}
.nav-link:hover { color: var(--text); }
.nav-link[aria-current="page"] { color: var(--em); border-color: var(--edge); }

/* ───────── Titre ───────── */
.hero { text-align: center; padding: 28px 16px 12px; }
.brand {
  margin: 0; font: 400 clamp(56px, 12vw, 120px)/1 var(--f-title); letter-spacing: .06em;
  color: var(--em); text-shadow: 0 0 22px rgba(74, 165, 141, .28), 0 3px 0 #04110e;
}
.hero-sm { padding-top: 8px; }
.brand-sm { font-size: clamp(36px, 7vw, 60px); }
.rune { /* filet orné : ligne – losange – ligne */
  display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px auto 8px; max-width: 360px; height: 14px;
}
.rune::before, .rune::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--em-deep)); }
.rune::after { transform: scaleX(-1); }
.rune i { width: 10px; height: 10px; background: var(--em); transform: rotate(45deg); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--em-deep); }
.tagline { margin: 0; color: var(--mute); font: 400 20px/1.4 var(--f-body); font-style: italic; }

/* ───────── Mise en page ───────── */
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 16px 40px; }
.wrap-narrow { max-width: 720px; }
.lead { color: var(--mute); margin: 0 0 14px; }
.lead.center { text-align: center; }

/* ───────── Cartes d'énigmes ───────── */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px 32px; justify-content: center; grid-template-columns: repeat(auto-fill, minmax(260px, 340px)); }
.card {
  position: relative; display: block; text-decoration: none; color: var(--text);
  background: var(--panel); border: 2px solid var(--edge); padding: 10px 10px 16px;
  outline: 1px solid var(--edge); outline-offset: 4px;
}
a.card:hover, a.card:focus-visible { border-color: var(--em); outline-color: var(--em-deep); background: var(--panel-hi); }
.shot { display: block; aspect-ratio: 16 / 10; background: #050a08; border: 2px solid var(--edge); overflow: hidden; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.name { display: block; margin-top: 14px; text-align: center; font: 400 26px/1.15 var(--f-title); letter-spacing: .02em; color: var(--text); }
a.card:hover .name { color: var(--em); }
.stars { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.star { width: 22px; height: 22px; fill: var(--gold); }
.star.off { fill: #1f2e2a; }
.badge-solved {
  position: absolute; top: 18px; right: 18px; padding: 4px 9px; background: var(--em-dark);
  border: 2px solid var(--em); color: var(--em); font: 700 13px/1 var(--f-label); letter-spacing: .1em; text-transform: uppercase;
}
.card-sealed { border-style: dashed; background: transparent; outline-color: transparent; }
.card-sealed .name { color: var(--mute); }
.shot.sealed { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #0c1513 0 10px, #0e1917 10px 20px); border-style: dashed; }
.shot.sealed svg { width: 64px; height: 64px; fill: var(--edge-hi); }
.soon { display: block; text-align: center; margin-top: 6px; color: var(--mute); font-size: 16px; }

/* ───────── Boutons & formulaires ───────── */
.btn {
  font: 700 15px/1 var(--f-label); letter-spacing: .09em; text-transform: uppercase; cursor: pointer;
  color: #04130f; background: var(--em); border: 2px solid var(--em); padding: 13px 18px; min-height: 44px;
  box-shadow: 0 3px 0 var(--em-deep); text-decoration: none; display: inline-block;
}
.btn:hover { background: #6fbfa8; border-color: #6fbfa8; color: #04130f; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--em-deep); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 3px 0 var(--em-deep); }
.btn-ghost { background: transparent; color: var(--em); border-color: var(--edge-hi); box-shadow: none; }
.btn-ghost:hover { background: var(--em-dark); color: #86c9b5; border-color: var(--em); }
.btn-ghost:active { box-shadow: none; }
.btn-danger { background: transparent; color: var(--bad); border-color: #5a2a22; box-shadow: none; }
.btn-danger:hover { background: #2a1411; color: #ff9a88; border-color: var(--bad); }
.btn-sm { padding: 9px 13px; min-height: 38px; font-size: 14px; }
.chip {
  font: 700 15px/1 var(--f-label); letter-spacing: .06em; cursor: pointer; color: var(--text);
  background: var(--panel); border: 2px solid var(--edge-hi); padding: 9px 12px; min-height: 38px;
  display: inline-flex; gap: 10px; align-items: baseline;
}
.chip:hover { border-color: var(--em); }
.chip .pts { color: var(--gold); font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

label { display: block; margin: 0 0 14px; font: 700 15px/1.3 var(--f-label); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
label small { font: 400 14px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--mute); }
input[type="text"], input[type="email"], input:not([type]) {
  display: block; width: 100%; margin-top: 6px; padding: 12px; min-height: 46px;
  font: 400 18px var(--f-body); color: var(--text); background: #060c09; border: 2px solid var(--edge-hi);
}
input:focus { outline: none; border-color: var(--em); box-shadow: 0 0 0 2px var(--em-dark); }
label.check { display: flex; gap: 10px; align-items: flex-start; font: 400 16px/1.4 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--mute); }
label.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--em); }
.err { min-height: 1.4em; margin: 0 0 10px; color: var(--bad); font-size: 16px; }
.fine { margin: 14px 0 0; font-size: 14px; color: var(--mute); }

/* ───────── Fenêtres (dialog) ───────── */
dialog.modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: calc(100vw - 24px); width: 480px; }
dialog.modal::backdrop { background: rgba(2, 6, 4, .82); }
.modal-box { position: relative; background: var(--panel); border: 2px solid var(--em-deep); outline: 1px solid var(--edge); outline-offset: 4px; padding: 26px 22px 22px; }
.modal-title { margin: 0 34px 14px 0; font: 400 28px/1.15 var(--f-title); color: var(--em); }
.x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; cursor: pointer; font-size: 18px; color: var(--mute); background: transparent; border: 2px solid transparent; }
.x:hover { color: var(--text); border-color: var(--edge-hi); }
.tabs { display: flex; margin: 0 0 18px; border-bottom: 2px solid var(--edge); }
.tabs button { flex: 1; cursor: pointer; padding: 12px 8px; font: 700 15px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); background: transparent; border: 0; border-bottom: 4px solid transparent; margin-bottom: -2px; }
.tabs button[aria-selected="true"] { color: var(--em); border-bottom-color: var(--em); }
.code { margin: 8px 0; padding: 16px 10px; text-align: center; font: 700 28px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--gold); background: #060c09; border: 2px dashed var(--edge-hi); user-select: all; }
.who { margin: 0 0 4px; font: 400 26px var(--f-title); color: var(--text); }
.stat { margin: 0 0 18px; color: var(--gold); }

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; width: min(520px, calc(100vw - 24px));
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--em-dark); border: 2px solid var(--em); color: var(--text);
}
.toast[hidden] { display: none; }
body.play .toast { bottom: auto; top: 64px; }
.toast button { cursor: pointer; }

/* ───────── Classement ───────── */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 2px solid var(--edge); }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--edge); }
.table th { font: 700 14px/1 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); background: #0c1613; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.rank { width: 56px; font: 400 22px var(--f-title); color: var(--gold); }
.table tr.me td { background: var(--em-dark); }
.table tbody tr:last-child td { border-bottom: 0; }

.prose h2 { font: 400 26px/1.2 var(--f-title); color: var(--em); margin: 28px 0 8px; }
.prose li { margin-bottom: 6px; }

.foot { display: flex; gap: 10px; justify-content: center; padding: 28px 16px 36px; color: var(--mute); font-size: 15px; }
.foot a { color: var(--mute); }

/* ───────── Page d'énigme ───────── */
.play-shell { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.play-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 8px 12px; background: #060c09; border-bottom: 2px solid var(--edge);
}
.play-top #auth-slot { justify-self: end; }
.back { justify-self: start; font: 700 15px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--mute); padding: 10px 6px; }
.back:hover { color: var(--em); }
.play-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.play-title h1 { margin: 0; font: 400 24px/1 var(--f-title); color: var(--em); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-title .stars { margin: 0; gap: 2px; }
.play-title .star { width: 16px; height: 16px; }
.play-frame { min-height: 0; background: #f3eedf; }
.play-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.dock { background: #060c09; border-top: 2px solid var(--em-deep); }
.dock-toggle {
  width: 100%; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
  padding: 12px 16px; min-height: 48px; color: var(--text); background: transparent; border: 0;
  font: 700 16px/1 var(--f-label); letter-spacing: .1em; text-transform: uppercase;
}
.dock-toggle:hover { background: var(--panel); }
.dock-count { color: var(--gold); }
.chev { margin-left: auto; width: 10px; height: 10px; border-right: 3px solid var(--em); border-top: 3px solid var(--em); transform: rotate(-45deg); }
.dock-toggle[aria-expanded="true"] .chev { transform: rotate(135deg); }
.dock-body { max-height: min(46vh, 380px); overflow: auto; padding: 4px 16px 16px; }
.dock-help { margin: 0 0 12px; color: var(--mute); font-size: 16px; }
.hint-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; padding: 0; }
.hint {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  width: 84px; height: 66px; color: var(--text); background: var(--panel); border: 2px solid var(--edge-hi);
}
.hint:hover { border-color: var(--em); background: var(--panel-hi); }
.hint-n { font: 400 24px/1 var(--f-title); }
.hint-state { font: 700 12px/1 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.hint.seen { border-color: var(--em); background: var(--em-dark); }
.hint.seen .hint-state { color: var(--em); }
.hint[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gold); }
.note { padding: 14px 16px; background: #0d1715; border: 2px solid var(--edge-hi); border-left: 6px solid var(--gold); }
.note h3 { margin: 0 0 6px; font: 700 14px/1 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.note p { margin: 0 0 6px; }
.note p:last-child { margin-bottom: 0; }

.ad-slot { display: grid; place-items: center; text-align: center; width: 100%; min-height: 250px; padding: 16px; color: var(--mute); background: repeating-linear-gradient(45deg, #0c1513 0 12px, #0e1917 12px 24px); border: 2px dashed var(--edge-hi); }
.meter { height: 8px; margin-top: 12px; background: #060c09; border: 2px solid var(--edge-hi); }
.meter span { display: block; height: 100%; width: 0; background: var(--em); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .bar { padding: 10px 8px; gap: 6px; flex-wrap: wrap; }
  .bar-links { gap: 0; }
  .nav-link { padding: 9px 8px; font-size: 13px; letter-spacing: .05em; }
  .chip { padding: 7px 9px; gap: 7px; font-size: 14px; max-width: 100%; }
  .chip span:first-child { overflow: hidden; text-overflow: ellipsis; max-width: 11ch; }
  .play-top { grid-template-columns: auto 1fr auto; padding: 6px 8px; }
  .back span { display: none; }
  .play-title { flex-direction: column; align-items: flex-start; gap: 4px; }
  .play-title h1 { font-size: 19px; white-space: normal; line-height: 1.1; }
  .play-top .chip .pts { display: none; }
  .play-title .star { width: 14px; height: 14px; }
  .hint { width: calc(25% - 8px); min-width: 64px; }
  .dock-body { max-height: 52vh; }
  .modal-box { padding: 22px 16px 18px; }
  .table th, .table td { padding: 10px 8px; }
}

/* ───────── Textes de présentation (utiles aux lecteurs ET au référencement) ───────── */
.about { max-width: 760px; margin-left: auto; margin-right: auto; margin-top: 56px; padding-top: 30px; border-top: 2px solid var(--edge); }
.about h2 { margin: 0 0 12px; font: 400 28px/1.2 var(--f-title); color: var(--em); }
.about h3, .prose h3 { margin: 22px 0 6px; font: 700 16px/1.2 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.about p { margin: 0 0 10px; max-width: 72ch; }
.wrap-narrow.about { margin-top: 0; border-top: 0; padding-top: 36px; }
.prose p { max-width: 72ch; }

/* ───────── Contact, groupes, mot de passe, admin ───────── */
.center { text-align: center; }
.prose .btn { margin-top: 8px; }
.inline-form label { margin-bottom: 6px; }
.inline-row { display: flex; gap: 8px; margin-top: 6px; }
.inline-row input { margin-top: 0; flex: 1; min-width: 0; }
details.more { margin: 4px 0 14px; border: 2px solid var(--edge); padding: 10px 12px; }
details.more summary { cursor: pointer; font: 700 14px/1.3 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
details.more[open] summary { margin-bottom: 12px; color: var(--em); }
.group-list { list-style: none; margin: 0 0 16px; padding: 0; }
.group-list li { padding: 10px 0; border-bottom: 1px solid var(--edge); }
.invite { margin-top: 34px; }
.invite input { font-size: 15px; }
input[type="search"] { display: block; width: 100%; margin-top: 6px; padding: 12px; min-height: 46px; font: 400 18px var(--f-body); color: var(--text); background: #060c09; border: 2px solid var(--edge-hi); }
input[type="password"] { display: block; width: 100%; margin-top: 6px; padding: 12px; min-height: 46px; font: 400 18px var(--f-body); color: var(--text); background: #060c09; border: 2px solid var(--edge-hi); }
input[type="password"]:focus, input[type="search"]:focus { outline: none; border-color: var(--em); box-shadow: 0 0 0 2px var(--em-dark); }

.admin { max-width: 1100px; }
.admin h2 { margin: 34px 0 10px; font: 400 26px/1.2 var(--f-title); color: var(--em); }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.admin-card { max-width: 420px; padding: 18px; background: var(--panel); border: 2px solid var(--edge); }
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-card { padding: 14px; background: var(--panel); border: 2px solid var(--edge); display: flex; flex-direction: column; gap: 2px; }
.stat-card b { font: 400 34px/1 var(--f-title); color: var(--gold); }
.stat-card span { color: var(--mute); font-size: 15px; }
.stat-card small { color: var(--mute); font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 8px; background: var(--panel); border: 2px solid var(--edge); }
.cbar { flex: 1; background: var(--em); min-height: 2px; }
.table-wrap { overflow-x: auto; }
.table-wrap .table { min-width: 620px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ───────── Guides ───────── */
.guide-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 22px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; text-decoration: none; color: var(--text); background: var(--panel); border: 2px solid var(--edge); outline: 1px solid var(--edge); outline-offset: 4px; }
.guide-card:hover, .guide-card:focus-visible { border-color: var(--em); background: var(--panel-hi); }
.guide-card .name { margin: 0; text-align: left; font-size: 26px; }
.guide-kicker { margin: 0 0 6px; font: 700 14px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; }
.guide-kicker a { color: var(--mute); }
.guide-h1 { font-size: clamp(30px, 5.5vw, 52px); line-height: 1.1; padding: 0 8px; }
.prose article > p.lead { font-size: 20px; }

/* ───────── Noms d'énigmes (Almendra) et ombre grecque du titre ───────── */
.card .name { font-family: var(--f-name); font-weight: 700; font-size: 28px; line-height: 1.15; }
.play-title h1 { font-family: var(--f-name); font-weight: 700; font-size: 26px; }
.puzzle-name { font-family: var(--f-name); font-weight: 700; }
.brand[data-greek] { position: relative; isolation: isolate; }
.brand[data-greek]::before { /* « καιρός » en écho derrière « Kairos » (décoratif, absent du texte indexé) */
  content: attr(data-greek); position: absolute; left: 0; right: 0; top: 0; z-index: -1;
  transform: translate(.07em, -.1em); font: 700 1.22em/1 "Cardo", Georgia, serif; letter-spacing: .05em;
  color: #2b8a73; opacity: .6; text-shadow: none; pointer-events: none; user-select: none;
}

/* ───────── Énigmes simples (énoncé dans la page), avis, partage, contact ───────── */
body.simple { padding-bottom: 56px; }
body.simple .play-top { position: sticky; top: 0; z-index: 20; }
.dock-fixed { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; }
.simple-main { padding-top: 34px; }
.statement { font-size: 20px; line-height: 1.6; }
.statement p, .statement ul, .statement blockquote, .statement figure, .statement pre { margin: 0 0 18px; }
.statement h2 { margin: 28px 0 10px; font: 400 26px/1.2 var(--f-title); color: var(--em); }
.statement blockquote { padding: 14px 20px; font-style: italic; background: var(--panel); border: 2px solid var(--edge); border-left: 6px solid var(--em); }
.statement .fig img { display: block; max-width: 100%; height: auto; border: 2px solid var(--edge); background: #050a08; }
.statement figcaption { margin-top: 6px; color: var(--mute); font-size: 15px; }
.cipher { padding: 14px 18px; overflow-x: auto; font: 500 18px/1.6 ui-monospace, Menlo, Consolas, monospace; color: var(--gold); background: #060c09; border: 2px dashed var(--edge-hi); }
.callout { padding: 12px 16px; background: var(--em-dark); border: 2px solid var(--em-deep); }
.answer-form { margin: 30px 0 18px; padding: 18px; background: var(--panel); border: 2px solid var(--edge); }
.answer-form label { margin-bottom: 0; }
.success { margin: 24px 0; padding: 18px 22px; background: var(--em-dark); border: 2px solid var(--em); }
.success h2 { margin: 0 0 8px; font: 400 28px/1.2 var(--f-title); color: var(--text); }
.puzzle-stats { margin: 0 0 14px; font-size: 16px; }
.puzzle-stats:empty { display: none; }

.bubble { position: fixed; right: 16px; bottom: 64px; z-index: 40; width: min(340px, calc(100vw - 24px)); padding: 16px 16px 14px; background: var(--panel); border: 2px solid var(--em); outline: 1px solid var(--edge); outline-offset: 3px; }
.bubble[hidden] { display: none; }
.bubble .x { top: 4px; right: 4px; width: 34px; height: 34px; }
.bubble-title { margin: 0 28px 2px 0; font: 400 22px/1.2 var(--f-title); color: var(--em); }
.bubble-sub { margin: 0 0 8px; color: var(--mute); font-size: 16px; }
.bubble textarea { display: block; width: 100%; margin: 6px 0 4px; padding: 10px; font: 400 16px var(--f-body); color: var(--text); background: #060c09; border: 2px solid var(--edge-hi); resize: vertical; }
.bubble textarea:focus { outline: none; border-color: var(--em); }
.bubble .row { margin-top: 8px; }
.bubble .err { margin-bottom: 0; min-height: 0; }
.rate { display: flex; gap: 2px; margin: 4px 0 8px; }
.rate-star { width: 40px; height: 40px; padding: 4px; cursor: pointer; background: transparent; border: 2px solid transparent; }
.rate-star svg { width: 100%; height: 100%; fill: transparent; stroke: var(--edge-hi); stroke-width: 1.4; }
.rate-star.on svg { fill: var(--gold); stroke: var(--gold); }
.rate-star:hover { border-color: var(--edge-hi); }

label.scope { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
select { padding: 10px 12px; min-height: 44px; font: 400 17px var(--f-body); color: var(--text); background: #060c09; border: 2px solid var(--edge-hi); }
.contact-form { margin: 18px 0; }
.contact-form input:not([type="checkbox"]), .contact-form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font: 400 18px var(--f-body); color: var(--text); background: #060c09; border: 2px solid var(--edge-hi); }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--em); box-shadow: 0 0 0 2px var(--em-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin: 0 0 12px; padding: 12px 14px; background: var(--panel); border: 2px solid var(--edge); }
.msg.unread { border-color: var(--em); }
.msg p { margin: 0 0 8px; }
.msg-body { white-space: pre-wrap; }

@media (max-width: 640px) {
  .bubble { right: 12px; left: 12px; width: auto; bottom: 58px; }
  .statement { font-size: 18px; }
}

/* ───────── Énigme résolue : contour plus lumineux ───────── */
.card.is-solved { border-color: var(--em); outline-color: var(--em); background: var(--panel-hi); box-shadow: 0 0 0 1px var(--em-deep), 0 0 22px rgba(74, 165, 141, .38); }
.card.is-solved .shot { border-color: var(--em-deep); }
.card.is-solved .badge-solved { background: var(--em); color: #04130f; }
