/* La Nuit des Crocs */
:root {
  --bg: #0e1322;
  --bg-2: #141b30;
  --panel: #182039;
  --panel-2: #1f2946;
  --line: #2c3757;
  --text: #ece6d6;
  --muted: #9aa3bd;
  --accent: #e3b85c;
  --accent-ink: #1b1406;
  --danger: #c8443a;
  --ok: #6cc28a;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font-title: 'Cinzel', Georgia, serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
body.is-day {
  --bg: #e9dcc0;
  --bg-2: #e2d2b1;
  --panel: #f8f1e1;
  --panel-2: #efe4cc;
  --line: #d4c19c;
  --text: #2d2417;
  --muted: #6f604a;
  --accent: #9b2f22;
  --accent-ink: #fff7ea;
  --shadow: 0 8px 24px rgba(80, 55, 20, .18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(227, 184, 92, .10), transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, rgba(90, 110, 190, .12), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  transition: background-color .6s ease, color .6s ease;
}
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Barre du haut */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-weight: 800; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.brand-moon { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6d8, #e3b85c 60%, #a87a2a); box-shadow: 0 0 14px rgba(227, 184, 92, .6); }
.topbar nav { display: flex; gap: 16px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.topbar nav a:hover { color: var(--text); }

/* Composants */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: 600 15px var(--font); cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.08); border-color: transparent; }
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.form label, label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 16px var(--font);
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.error { color: #ff8a7a; font-size: 14px; margin: 6px 0 0; }
body.is-day .error { color: #a3261a; }
.form .btn-block { margin-top: 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.segmented { border: 0; padding: 0; margin: 0 0 4px; }
.segmented legend { font-weight: 600; margin-bottom: 8px; }
.segmented label { display: inline-flex; align-items: center; gap: 8px; margin: 0 16px 0 0; font-weight: 500; }
.segmented input { width: auto; min-height: 0; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 20px; min-height: 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.code-chip { display: inline-block; font: 700 14px ui-monospace, monospace; letter-spacing: .12em; padding: 3px 8px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }

.narrow { max-width: 440px; margin: 40px auto; padding: 0 16px; }

/* Accueil */
.home { max-width: 1120px; margin: 0 auto; padding: 32px 16px 64px; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; margin-bottom: 48px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; margin-bottom: .3em; text-shadow: 0 0 30px rgba(227, 184, 92, .25); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.code-input { font: 700 24px ui-monospace, monospace; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.join-box .btn-block { margin-top: 16px; }
.roles-showcase { margin-bottom: 40px; }
.card-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.card-row .card-title { font-size: 13px; letter-spacing: 0; }
.how ol { margin: 0; padding-left: 20px; }
.how li { margin-bottom: 8px; }

/* Cartes */
.card {
  --c: #3c6fb0; --c-light: #cfe0f4;
  position: relative; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: #f3e6c8; border: 3px solid #5b4630; box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 0 0 2px #e8d4a8;
  color: #2b2114; text-align: center;
}
.card-blue { --c: #3c6fb0; --c-light: #d6e5f6; }
.card-red { --c: #a8302a; --c-light: #f3d2cd; }
.card-gold { --c: #c49a2c; --c-light: #f6e8bf; }
.card-purple { --c: #6b3f9a; --c-light: #e5d7f2; }
.card-green { --c: #4c7a35; --c-light: #dcebcf; }
.card-pink { --c: #c4577e; --c-light: #f8dbe5; }
.card-orange { --c: #c7702a; --c-light: #f7e0c9; }
.card-title {
  font: 800 clamp(13px, 1.4vw, 16px) var(--font-title); text-transform: uppercase; letter-spacing: .04em;
  padding: 7px 6px; background: var(--c-light); border-bottom: 2px solid var(--c); color: #2b2114;
}
.card-art { flex: none; aspect-ratio: 276 / 160; overflow: hidden; border-bottom: 2px solid var(--c); background: #222; }
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-power { padding: 8px 10px 12px; font-size: 12.5px; line-height: 1.35; background: var(--c-light); flex: 1; overflow: hidden; }
.card-power strong { display: block; font: 700 13px var(--font-title); text-transform: uppercase; color: var(--c); margin-bottom: 4px; filter: brightness(.8); }
.card.is-dead { filter: grayscale(.9) brightness(.8); }

.card-back { background: #ecdcb8; height: 100%; justify-content: center; align-items: center; padding: 16px; gap: 8px;
  background-image: repeating-linear-gradient(45deg, rgba(91, 70, 48, .06) 0 6px, transparent 6px 12px); }
.back-emblem { width: 80%; border-radius: 50% / 40%; overflow: hidden; box-shadow: 0 0 0 3px #5b4630; }
.back-emblem img { width: 100%; display: block; }
.back-title { font: 800 22px/1.1 var(--font-title); text-transform: uppercase; color: #2b2114; letter-spacing: .04em; }
.back-hint { font-size: 12px; color: #6f604a; }

/* Partie */
.game { max-width: 1280px; margin: 0 auto; padding: 16px 16px 48px; }
.phase-bar {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px 18px; margin-bottom: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.phase-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.phase-icon { font-size: 28px; }
.phase-label { font: 700 1.1rem var(--font-title); }
.phase-sub { color: var(--muted); font-size: 13px; }
.timer { font: 700 1.6rem ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.timer.is-urgent { color: var(--danger); }
.timer-track { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--bg-2); }
.timer-fill { height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }

/* Salon */
.lobby { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.invite-grid { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
.qr { background: #fff; border-radius: 10px; padding: 8px; aspect-ratio: 1; }
.qr svg { width: 100%; height: 100%; display: block; }
.big-code { font: 800 2.2rem ui-monospace, monospace; letter-spacing: .25em; color: var(--accent); margin-bottom: 12px; }
.copy-row { display: flex; gap: 8px; margin-bottom: 10px; }
.copy-row input { font-size: 13px; min-height: 36px; }
.lobby-players { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.lobby-players li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); }
.lobby-players .pname { flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; position: relative; }
.lobby-players li.is-online .avatar::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg-2); }
.count { color: var(--muted); font-family: var(--font); font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.lobby-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Plateau */
.board { display: grid; grid-template-columns: 260px 1fr 340px; gap: 16px; align-items: start; }
.col-me { display: grid; gap: 16px; }
.my-card-wrap { perspective: 1000px; }
.flip { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; aspect-ratio: 5 / 6.6; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .7s cubic-bezier(.3, .7, .2, 1); transform-style: preserve-3d; }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-face > .card { height: 100%; }
.flip-front { transform: rotateY(180deg); }
.card-badge { position: absolute; left: 50%; transform: translateX(-50%); top: 44px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, .7); color: #fff; }
.card-badge.dead { top: 72px; }

.action h3, .spy h3 { margin-bottom: .4em; }
.action p:last-child { margin-bottom: 0; }
.ok { color: var(--ok); font-weight: 600; }
body.is-day .ok { color: #2f7a46; }
.victim { padding: 8px 10px; border-radius: 8px; background: rgba(200, 68, 58, .15); border: 1px solid rgba(200, 68, 58, .4); }
.pack-votes, .whispers { margin: 0 0 10px; padding-left: 18px; font-size: 14px; }
.whispers li { font-style: italic; color: var(--muted); }
.risk { height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; margin-bottom: 4px; }
.risk-fill { height: 100%; background: linear-gradient(90deg, var(--ok), #e3b85c, var(--danger)); transition: width .4s ease; }

.village-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.p-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; min-height: 64px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit;
}
button.p-btn { cursor: pointer; transition: border-color .15s ease, background-color .15s ease, transform .1s ease; }
.player.is-selectable button.p-btn { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.player.is-selectable button.p-btn:hover { border-color: var(--accent); }
.player.is-selected .p-btn { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--bg-2)); box-shadow: 0 0 0 2px var(--accent) inset; }
.player.is-me .p-btn { border-style: dashed; }
.player.is-dead .p-btn { opacity: .55; }
.player.is-dead .p-name { text-decoration: line-through; }
.p-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-2); border: 2px solid var(--line); font-weight: 700; }
.p-avatar img { width: 100%; height: 100%; object-fit: cover; }
.role-red .p-avatar { border-color: #a8302a; }
.p-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-name em { font-weight: 400; color: var(--muted); font-style: normal; }
.p-role, .voted-for { font-size: 12.5px; color: var(--muted); }
.p-badges { display: flex; gap: 4px; align-items: center; }
.votes { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.votes.wolfv { background: #5b1e1a; }

/* Journal & chat */
.col-side { padding: 0; display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 420px; position: sticky; top: 74px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; min-height: 46px; background: none; border: 0; color: var(--muted); font: 600 14px var(--font); cursor: pointer; border-bottom: 2px solid transparent; }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; }
.tab-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.log, .chat { list-style: none; margin: 0; padding: 12px 14px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ev { display: flex; gap: 8px; font-size: 14px; }
.ev time, .msg time { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; flex: none; padding-top: 2px; }
.ev.is-private span { color: var(--accent); }
.ev-death span { font-weight: 600; }
.ev-end span { font-weight: 700; }
.ev-night span, .ev-day span { font-family: var(--font-title); font-weight: 700; }
.ev-votecast span, .ev-join span { color: var(--muted); }
.channels { display: flex; gap: 6px; padding: 10px 14px 0; }
.chan { min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.chan.is-active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.msg { max-width: 88%; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.msg.is-mine { align-self: flex-end; background: color-mix(in srgb, var(--accent) 16%, var(--bg-2)); }
.msg.ch-wolves { border-color: rgba(200, 68, 58, .6); }
.msg.ch-dead { border-style: dashed; }
.msg-head { font-size: 12.5px; display: flex; gap: 6px; align-items: baseline; }
.chan-tag { font-size: 11px; color: var(--danger); font-weight: 700; }
.msg-body { overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.chat-form input { min-height: 40px; }
#chatHint { padding: 0 14px 10px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(92vw, 520px);
  padding: 12px 16px; border-radius: 10px; background: #111827; color: #f4efe2; box-shadow: var(--shadow); border: 1px solid #374151; font-size: 14px;
}
.toast.is-error { background: #5b1e1a; border-color: #8b2b24; }

/* Tableau de bord */
.dash { max-width: 1040px; margin: 0 auto; padding: 32px 16px 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.compo { margin-top: 16px; font-size: 14px; }
.compo summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.compo table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.compo th, .compo td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.game-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.game-list li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--bg-2); }
.game-link { flex: 1; display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }

/* Mort */
body.is-dead .phase-bar { border-color: #555; }

/* Responsive */
@media (max-width: 1100px) {
  .board { grid-template-columns: 240px 1fr; }
  .col-side { grid-column: 1 / -1; position: static; height: 520px; }
}
@media (max-width: 760px) {
  .hero, .lobby, .dash { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .col-me { grid-template-columns: 140px 1fr; align-items: start; }
  .col-me .spy { grid-column: 1 / -1; }
  .invite-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .qr { width: 200px; }
  .players { grid-template-columns: 1fr 1fr; }
  .p-btn { padding: 8px; gap: 8px; }
  .p-avatar { width: 36px; height: 36px; }
  .card-power { font-size: 11px; }
  .col-me .card-power span { display: none; }
  .col-me .card-power { display: grid; place-items: center; }
  .card-title { font-size: 11px; }
  .back-title { font-size: 15px; }
  .back-hint { display: none; }
  .timer { font-size: 1.3rem; }
  .topbar nav { gap: 12px; font-size: 14px; }
}
@media (max-width: 420px) {
  .players { grid-template-columns: 1fr; }
  .col-me { grid-template-columns: 120px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* Statut du joueur dans la barre de phase */
.phase-right { display: flex; align-items: center; gap: 14px; }
.status-chip { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.status-chip.is-option { color: var(--text); border-color: var(--accent); }
.status-chip.is-todo { background: var(--accent); color: var(--accent-ink); border-color: transparent; animation: pulse-ring 1.6s ease-out infinite; }

/* Panneau d'action en attente : pulsation */
.action.is-pending { border-color: var(--accent); animation: pulse-ring 1.6s ease-out infinite; }
.action.is-flash { box-shadow: 0 0 0 4px var(--accent); }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 65%, transparent); }
  70% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* Fenêtres du meneur */
.modal {
  width: min(92vw, 460px); max-height: 88vh; padding: 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); overflow: auto;
}
.modal::backdrop { background: rgba(5, 8, 18, .72); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-body { padding: 26px 24px 8px; text-align: center; }
.modal-actions { padding: 12px 24px 24px; display: flex; justify-content: center; }
.modal-actions .btn { min-width: 160px; }
.modal-icon { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.modal-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.modal h2 { font-size: 1.45rem; margin-bottom: .5em; }
.modal-story { font-style: italic; font-size: 1.02rem; }
.modal-you { font-weight: 600; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); }
.modal-lead { font: 700 1.05rem var(--font-title); }
.modal-how { font-size: 14px; color: var(--muted); }
.modal-time { font-size: 14px; font-weight: 600; color: var(--danger); }
.modal-news { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; text-align: left; }
.modal-news li { padding: 8px 10px; border-radius: 8px; background: var(--bg-2); border-left: 3px solid var(--danger); font-size: 14px; }
.modal-card { width: 200px; margin: 0 auto 12px; }
.modal.is-action { border: 2px solid var(--accent); animation: modal-in .28s cubic-bezier(.2, .8, .2, 1), pulse-ring 1.6s ease-out .3s infinite; }
.modal.is-reminder { border-color: var(--danger); }
.modal-icon.pulse { display: inline-block; animation: icon-beat 1s ease-in-out infinite; }
@keyframes icon-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (max-width: 760px) {
  .status-chip { font-size: 11.5px; padding: 4px 9px; }
  .phase-right { gap: 8px; }
}

@media (max-width: 480px) {
  .brand { font-size: .92rem; white-space: nowrap; }
  .topbar nav { gap: 10px; }
  .topbar nav a { font-size: 13px; white-space: nowrap; }
}

/* ---------- Ambiances ---------- */
.showcase-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.showcase-head h2 { margin: 0; }
.theme-select { display: flex; align-items: center; gap: 10px; }
.theme-select label { margin: 0; }
.theme-select select { width: auto; min-width: 180px; }
.theme-tagline { margin: 8px 0 16px; }
.theme-cta { margin-top: 16px; }
.back-edition { font: 700 12px var(--font-title); text-transform: uppercase; letter-spacing: .08em; color: #8a2a1e; }

.theme-pick { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.theme-pick legend { font-weight: 600; margin-bottom: 8px; }
.form .theme-option, .theme-option { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; font-weight: 400; }
.theme-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.theme-option input { width: 18px; min-height: 18px; flex: none; accent-color: var(--accent); }
.theme-thumbs { display: flex; flex: none; }
.theme-thumbs img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--panel); margin-left: -8px; }
.theme-thumbs img:first-child { margin-left: 0; }
.theme-text { display: flex; flex-direction: column; min-width: 0; }
.theme-text small { color: var(--muted); font-size: 12.5px; }

.theme-entreprise .card-art img, .theme-entreprise .p-avatar img, .theme-thumbs img { object-position: center 30%; }
.theme-entreprise .card-art { background: #fff; }

body.theme-rock:not(.is-day) { --bg: #120b1c; --bg-2: #1a1027; --panel: #1f132f; --panel-2: #2a1a3f; --line: #3b2757; --accent: #e14bd8; --accent-ink: #1a0618; }
body.theme-rock.is-day { --accent: #a1238f; --accent-ink: #fff; }
body.theme-entreprise:not(.is-day) { --bg: #0d1520; --bg-2: #13202f; --panel: #172638; --panel-2: #1e3047; --line: #2a405b; --accent: #4f9cf9; --accent-ink: #06121f; }
body.theme-entreprise.is-day { --bg: #e7ecf3; --bg-2: #dde4ee; --panel: #f8fafd; --panel-2: #eef2f8; --line: #cdd7e4; --text: #1d2939; --muted: #5b6b80; --accent: #1d5fbf; --accent-ink: #fff; }
body.theme-arthurien.is-day { --accent: #7a1f2b; --accent-ink: #fff7ea; }
