@import "maison.css";
:root {
  --bg: var(--paper);      /* crème maison */
  --ink: #222;
  --black-cell: #1a1a1a;
  --hint: var(--g2);
  --user: #333;
  --selected: #fff9c4;
  --highlight: #c8e6c9;
  --grid-line: #888;     /* bord de case maison (cf. maison_grid) */
  --grid-thin: #aaa;
  --error: #d32f2f;
  --success: #388e3c;
  --muted: #888;         /* gris secondaire maison */
  --tap-target: 44px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);   /* Lora (maison) */
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE FIRST (base = smartphone ~360-414px)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Header ─── */
header {
  background: var(--paper);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
}
header h1 {
  margin: 0; font-size: 20px; letter-spacing: 0.5px;
}
header h1 a { color: inherit; text-decoration: none; }
header .subtitle {
  color: var(--muted); font-style: italic; font-size: 13px;
  margin-left: 6px; flex-grow: 1;
}

/* Bouton hamburger visible uniquement sur mobile */
.nav-toggle {
  display: block;
  background: none; border: none;
  font-size: 24px; padding: 4px 8px;
  cursor: pointer; color: var(--ink);
  min-height: var(--tap-target); min-width: var(--tap-target);
  border-radius: 6px;
}
.nav-toggle:active { background: #f0f0ed; }

/* Nav cachée par défaut sur mobile, affichée en dropdown si .open */
header nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--paper);
  flex-direction: column;
  padding: 8px 16px 16px;
  border-bottom: 1px solid var(--line);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
header nav.open { display: flex; }
header nav a {
  padding: 14px 4px !important;
  font-size: 16px !important;
  border-bottom: 1px solid #f5f5f5;
  margin: 0 !important;
  min-height: var(--tap-target);
  display: flex;
  align-items: center;
}
header nav a:last-child { border-bottom: none; }

/* ─── Main ─── */
main {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px;
}

/* ─── Boutons ─── */
button, .btn {
  padding: 12px 14px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.1s;
  font-weight: 500;
  min-height: var(--tap-target);
  font-family: inherit;
}
button.primary { background: var(--hint); color: #fff; }
button.primary:active { background: var(--g2); }
button.secondary { background: #f0f0ed; color: var(--ink); }
button.secondary:active { background: #e0e0dd; }
button.danger { background: #fff; color: var(--error); border: 1px solid var(--error); }
button.danger:active { background: #ffebee; }

/* ─── Accueil : grille puzzles (mobile = 1 colonne) ─── */
.puzzle-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.puzzle-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  min-height: var(--tap-target);
}
.puzzle-card h3 { margin: 0 0 6px 0; font-size: 16px; }
.puzzle-card .meta { color: var(--muted); font-size: 13px; }
.puzzle-card .stars { color: #f9a825; }

/* ─── Page de jeu (mobile = colonne) ─── */
.game {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.game-grid {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.game-grid svg {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}
.game-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.game-info h2 { margin: 0 0 4px 0; font-size: 18px; }
.game-info .puzzle-meta {
  color: var(--muted); font-size: 13px; margin-bottom: 12px;
}

.timer {
  font-size: 26px;
  font-family: "SF Mono", Menlo, monospace;
  text-align: center;
  margin: 12px 0;
  padding: 10px;
  background: #f8f8f5;
  border-radius: 6px;
}

.btn-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.btn-group button { width: 100%; }

/* ─── Numpad (mobile = boutons gros) ─── */
.numpad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.numpad button {
  padding: 16px 0;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 20px;
  font-family: "SF Mono", Menlo, monospace;
  cursor: pointer;
  min-height: 48px;
}
.numpad button:active { background: #f0f0ed; }
.numpad button.erase { background: #fff5f5; color: var(--error); }

/* ─── Cell SVG ─── */
.cell-rect {
  cursor: pointer;
  transition: fill 0.1s;
}
.cell-rect.selected { stroke: var(--hint, var(--g2)); stroke-width: 3; }
.cell-rect.hint-target { fill: var(--highlight); animation: pulse 1.2s ease-in-out infinite; }
.cell-rect.correct { fill: #c8e6c9 !important; }
.cell-rect.incorrect { fill: #ffcdd2 !important; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.cell-text { user-select: none; pointer-events: none; font-family: var(--body); }
.cell-text.hint { fill: var(--hint); }
.cell-text.user { fill: var(--user); }

/* ─── Hint box, feedback ─── */
.hint-explanation {
  background: #fff9c4;
  border-left: 4px solid #f9a825;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.5;
}
.hint-explanation .tech-tag {
  display: inline-block;
  background: #f9a825;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 11px;
  margin-right: 6px;
}
.feedback {
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 14px;
}
.feedback.ok { background: #c8e6c9; color: #1b5e20; }
.feedback.err { background: #ffcdd2; color: #b71c1c; }

/* ─── Tables : scroll horizontal sur mobile ─── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table { font-size: 13px; width: 100%; }

/* ─── Footer ─── */
footer {
  text-align: center;
  padding: 20px 16px 32px;
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:active { text-decoration: underline; }


/* ═══════════════════════════════════════════════════════════════
   TABLET (≥ 600px)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  body { font-size: 16px; }
  
  header { padding: 14px 20px; }
  header h1 { font-size: 22px; }
  header .subtitle { font-size: 14px; }
  
  /* Burger conservé à TOUTES les largeurs (déc. Arnaud) : le tiroir groupé
     s'ouvre aussi sur desktop (panneau aligné à droite, voir plus bas). */
  
  main { padding: 24px; }
  
  .puzzle-list { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  
  .game { display: grid; grid-template-columns: 1fr; gap: 20px; }
  .game-grid { padding: 16px; }
  
  .btn-group { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   DESKTOP (≥ 1024px)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  header { padding: 16px 24px; }
  
  main { max-width: 1100px; padding: 24px; }
  
  /* Page de jeu : grille + sidebar */
  .game {
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
  }
  .game-grid { padding: 24px; }
  .game-grid svg { max-width: 600px; }
}


/* ═══════════════════════════════════════════════════════════════
   Utilitaires globaux
   ═══════════════════════════════════════════════════════════════ */

/* Inputs touch-friendly */
input[type=text], input[type=email], input[type=number], select, textarea {
  font-size: 16px;  /* évite le zoom auto iOS sur focus */
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  min-height: var(--tap-target);
  width: 100%;
  box-sizing: border-box;
}

/* Sticky top sur mobile (timer en haut quand on scrolle) */
.game-info { position: relative; }

/* Hide-on-mobile / hide-on-desktop */
@media (max-width: 599px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 600px) {
  .show-mobile-only { display: none !important; }
}


/* ═══════════════════════════════════════════════════════════════
   Endgame modal (fin de grille)
   ═══════════════════════════════════════════════════════════════ */

.egm-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 20, 30, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: egm-fade-in 0.18s ease-out;
}
@keyframes egm-fade-in { from { opacity: 0; } to { opacity: 1; } }

.egm-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px 20px 20px;
  position: relative;
  animation: egm-pop-in 0.22s cubic-bezier(0.18, 1.2, 0.4, 1);
}
@keyframes egm-pop-in { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.egm-close {
  position: absolute;
  top: 8px; right: 10px;
  background: transparent; border: none;
  font-size: 26px; line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  min-height: var(--tap-target); min-width: var(--tap-target);
}
.egm-close:active { background: #f0f0ed; }

.egm-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0ed;
  margin-bottom: 16px;
}
.egm-emoji { font-size: 42px; line-height: 1; margin-bottom: 6px; }
.egm-title { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.egm-subtitle { color: var(--muted); font-size: 13px; }

.egm-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.egm-stat-card {
  background: #f8f8f5;
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
}
.egm-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.egm-stat-value {
  font-size: 26px; font-weight: 700; color: var(--hint);
  font-family: "SF Mono", Menlo, monospace;
  margin: 4px 0 2px;
}
.egm-stat-sub { font-size: 10px; color: var(--muted); }

.egm-details {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: 13px;
  color: #444;
}
.egm-details li {
  padding: 6px 10px;
  background: #fafaf7;
  border-radius: 6px;
  margin-bottom: 4px;
}

.egm-auth-prompt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, #e3f2fd, #fff9c4);
  border-left: 4px solid var(--hint);
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.egm-auth-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.egm-auth-body { flex: 1; min-width: 0; }
.egm-auth-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.egm-auth-text { font-size: 12px; color: #555; line-height: 1.5; margin-bottom: 10px; }

.egm-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.egm-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 15px; font-weight: 500;
  border: none; cursor: pointer;
  min-height: var(--tap-target);
  font-family: inherit;
  transition: opacity 0.1s, background 0.1s;
}
.egm-btn:disabled { opacity: 0.6; cursor: wait; }
.egm-btn.primary { background: var(--hint); color: #fff; }
.egm-btn.primary:active { background: var(--g2); }
.egm-btn.secondary { background: #f0f0ed; color: var(--ink); }
.egm-btn.secondary:active { background: #e0e0dd; }
.egm-btn.ghost { background: transparent; color: var(--muted); padding: 10px; font-size: 13px; }
.egm-btn.ghost:active { background: #f8f8f5; }

@media (min-width: 600px) {
  .egm-modal { padding: 28px 28px 22px; max-width: 500px; }
  .egm-title { font-size: 22px; }
  .egm-emoji { font-size: 48px; }
  .egm-actions { grid-template-columns: 2fr 1fr 1fr; }
  .egm-btn.ghost { grid-column: 1 / -1; }
}

/* Cache les noms de techniques quand la préférence est désactivée */
body.hide-tech-tags .tech-tag { display: none; }
body.hide-tech-tags .hint-explanation { padding-left: 12px; }

/* Bouton "J'ai fini !" — apparait quand la grille est complète */
.btn-finish-cta {
    background: linear-gradient(135deg, #43a047, #2e7d32) !important;
    box-shadow: 0 3px 8px rgba(67,160,71,0.4);
    animation: finish-pulse 1.8s ease-in-out infinite;
    min-height: 52px !important;
}
.btn-finish-cta:disabled {
    background: #aaa !important;
    box-shadow: none;
    animation: none;
    cursor: wait;
}
.btn-finish-cta:active:not(:disabled) {
    background: #1b5e20 !important;
    transform: translateY(1px);
}
@keyframes finish-pulse {
    0%, 100% { box-shadow: 0 3px 8px rgba(67,160,71,0.4); }
    50% { box-shadow: 0 3px 14px rgba(67,160,71,0.7), 0 0 0 4px rgba(67,160,71,0.15); }
}

/* Spinner inline pour les boutons en chargement */
.btn-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Stats en haut de la sidebar play (score max + cases restantes) */
.game-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}
.game-stats .stat-block {
    background: #f8f8f5;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
}
.game-stats .stat-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.game-stats .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    font-family: "SF Mono", Menlo, monospace;
    margin-top: 2px;
}
.game-stats .stat-block.completed .stat-value { color: var(--success); }


/* ─── Mode compagnon (suggestion + erreur) ───────────────────────────── */
.cell.companion-suggest, rect.companion-suggest {
    fill: #fff59d !important;  /* jaune plus marqué (entre #fff9c4 et #ffeb3b) */
    transition: fill 0.2s ease;
}
.cell.companion-error, rect.companion-error {
    fill: #ffe0b2 !important;  /* orange clair */
    stroke: #fb8c00 !important;
    stroke-width: 2 !important;
}
.cell.companion-suggest.companion-error, rect.companion-suggest.companion-error {
    fill: #ffe0b2 !important;  /* erreur prime sur suggestion */
}

/* Lot 3 : case dont on parle dans l'explication (parmi plusieurs erreurs) */
.cell.companion-current-error, rect.companion-current-error {
    fill: #b39ddb !important;   /* violet doux */
    stroke: #6a1b9a !important; /* violet sombre */
    stroke-width: 2.5 !important;
}

#companion-explain {
    background: #fff3e0;
    border-left: 4px solid #fb8c00;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.45;
    color: #424242;
    display: none;
}
#companion-explain strong { color: #e65100; }
#companion-explain .companion-close {
    float: right;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin-left: 8px;
}

/* ── Système de grades (Lieutenant / Commandant / Général) ─────────────────────────
   Partagé entre livres.html, mes-livres.html et toute future page grade-aware. */

:root {
    /* Couleurs de grade — grades.json maison.colors_by_rank :
       Lieutenant=g2 · Commandant=g4 · Général=g6. */
    --lieutenant: var(--g2);   --commandant: var(--g4);   --general: var(--g6);
    --lieutenant-bg: var(--paper-2); --commandant-bg: var(--paper-2); --general-bg: var(--paper-2);
    --lieutenant-border: var(--g2); --commandant-border: var(--g4); --general-border: var(--g6);
}

/* Pill large (légende de page) */
.grade-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 16px;
    font-size: 12px; font-weight: 600; border: 1px solid;
}
.grade-pill.lieutenant   { background: var(--lieutenant-bg); color: var(--lieutenant); border-color: var(--lieutenant-border); }
.grade-pill.commandant { background: var(--commandant-bg); color: var(--commandant); border-color: var(--commandant-border); }
.grade-pill.general  { background: var(--general-bg); color: var(--general); border-color: var(--general-border); }

/* Mini pill (inside card / upcoming) */
.grade-mini { font-size: 9px; padding: 1px 5px; border-radius: 3px; font-weight: 700; }
.grade-mini.lieutenant   { background: var(--lieutenant-bg); color: var(--lieutenant); }
.grade-mini.commandant { background: var(--commandant-bg); color: var(--commandant); }
.grade-mini.general  { background: var(--general-bg); color: var(--general); }

/* Badge coloré (tag dans carte tome) */
.grade-badge {
    display: inline-block; padding: 3px 9px; border-radius: 4px;
    font-size: 11px; font-weight: 700; color: white; align-self: flex-start;
}
.grade-badge.lieutenant   { background: var(--lieutenant); }
.grade-badge.commandant { background: var(--commandant); }
.grade-badge.general  { background: var(--general); }

/* Séparateur titré (entre sections de grade dans /livres) */
.grade-sep {
    text-align: center; font-size: 12px; letter-spacing: 0.14em;
    text-transform: uppercase; margin: 24px 0 18px; position: relative;
}
.grade-sep::before {
    content: ""; position: absolute; left: 0; right: 0; top: 50%;
    border-top: 1px solid var(--line); z-index: 0;
}
.grade-sep span { padding: 0 14px; position: relative; z-index: 1; background: var(--bg); }
.grade-sep.lieutenant   span { color: var(--lieutenant); }
.grade-sep.commandant span { color: var(--commandant); }
.grade-sep.general  span { color: var(--general); }

/* ── Composants partagés ──────────────────────────────────────────────────────
   Extraits des styles inline en mai 2026 (factorisation).                    */

/* Onglets */
.tabs {
    display: flex; gap: 4px; margin-bottom: 20px;
    border-bottom: 2px solid var(--line); flex-wrap: wrap;
}
.tab {
    padding: 12px 18px; cursor: pointer; border: none;
    background: transparent; color: var(--muted); font-weight: 500;
    font-size: 14px; border-bottom: 3px solid transparent;
    margin-bottom: -2px; transition: all 0.15s;
}
.tab:hover { color: #333; }
.tab.active { color: var(--hint); border-bottom-color: var(--hint); }

/* Section card */
.section-card {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 20px 24px; margin-bottom: 20px;
}
.section-card h3 { margin: 0 0 14px 0; }

/* Stat card */
.stat-card {
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    padding: 16px; text-align: center;
}
.stat-card .label {
    font-size: 12px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.stat-card .value { font-size: 28px; font-weight: 600; margin-top: 6px; color: var(--g2); }
.stat-card .unit { font-size: 14px; color: var(--muted); font-weight: 400; }

/* Share bar */
.share-bar {
    background: #e3f2fd; padding: 10px 14px; border-radius: 8px;
    display: flex; gap: 8px; align-items: center; margin-bottom: 20px; font-size: 13px;
}
.share-bar input {
    flex: 1; padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px;
    font-family: monospace; font-size: 11px; background: #fff;
}
.share-bar button {
    padding: 6px 12px; background: var(--hint); color: #fff;
    border: none; border-radius: 4px; cursor: pointer;
}

/* Feedback message */
.feedback {
    padding: 12px 14px; border-radius: 6px; font-size: 14px;
    margin-top: 10px; display: none;
}
.feedback.success { background: #e8f5e9; color: #2e7d32; }
.feedback.error   { background: #ffebee; color: #c62828; }

/* Login prompt */
.login-prompt {
    background: #fff8e1; border: 1px solid #ffe082; padding: 20px;
    border-radius: 8px; text-align: center;
}
.login-prompt a {
    display: inline-block; margin-top: 10px;
    padding: 8px 16px; background: var(--hint); color: #fff;
    border-radius: 6px; text-decoration: none;
}

/* Empty states */
.empty-state, .empty-msg {
    text-align: center; color: var(--muted); padding: 24px; font-style: italic;
}


/* ─── Sélecteur mode d'aide (play.html) ─────────────────────────────────────
   Déplacé depuis le <style> inline de play.html (audit fix n°6).          */
#assist-selector .assist-btn.active {
    background: #fff;
    color: #1a1a1a;
    border-color: var(--hint, var(--g2));
    box-shadow: 0 2px 6px rgba(25,118,210,0.25);
}
#assist-selector .assist-btn:not(.active):not(:disabled):hover {
    background: rgba(255,255,255,0.55);
    color: #1a1a1a;
}
#assist-selector .assist-btn:disabled {
    cursor: not-allowed;
}
/* ═══════════════════════════════════════════════════════════════
   Nav — refonte menu (juin 2026, Tsukuru) : Jouer + groupes + compte
   Mobile-first : drawer empilé avec libellés de section.
   ═══════════════════════════════════════════════════════════════ */
.nav-cta {
  background: var(--hint); color: #fff !important;
  border-radius: 6px; font-weight: 600;
}
/* Lien retour vitrine (bas du drawer nav) */
.nav-vitrine { padding: 10px 4px; border-top: 1px solid #f0f0ec; margin-top: 4px; }
.nav-vitrine a { font-size: 13px; color: var(--muted); text-decoration: none; }
.nav-vitrine a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
header nav .nav-group { display: flex; flex-direction: column; }
header nav .nav-group-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); padding: 14px 4px 2px; font-weight: 600;
}

@media (min-width: 600px) {
  /* Desktop : le tiroir burger devient un PANNEAU net, aligné à droite ;
     les groupes restent EMPILÉS avec leur libellé de section. */
  header nav {
    left: auto; right: 16px; width: 300px; max-width: calc(100% - 32px);
    border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-cta { padding: 6px 12px !important; }
}

/* Titres en Fraunces (maison) */
h1, h2, h3 { font-family: var(--display); }

/* ── Mode EMBED (jeu dans l'iframe de la modale vitrine) : header + footer masqués ── */
body.embed #app-header, body.embed footer { display: none !important; }
body.embed main { padding: 8px !important; max-width: 100% !important; }
body.embed #daily-banner { margin-top: 4px; }

/* ── Cartes en CRÈME (déc. Arnaud) : plus de fonds blancs qui tranchent sur le crème ── */
.game-grid, .game-info, .puzzle-card, .section-card, .stat-card { background: var(--paper); }
.numpad button { background: var(--paper); }
.timer, .game-stats .stat-block, .egm-stat-card { background: var(--paper-2); }
