﻿/* ============================================================
   HEXES — Site CSS partagé · Thème parchemin historique
   ============================================================ */
@import url("https://cdnjs.cloudflare.com/ajax/libs/flag-icons/7.2.3/css/flag-icons.min.css");

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #f0e8d0;
    --surface:  #e8dfca;
    --surface2: #ddd4b8;
    --border:   #c4b690;
    --accent:   #7a5c20;
    --accent-h: #8f6e2a;
    --text:     #2c2210;
    --muted:    #7a7060;
    --err:      #8b2a2a;
    --ok:       #2d6b3a;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ════════════════════════════════════════
   Navigation partagée
   ════════════════════════════════════════ */

.site-nav,
.app-nav {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 40px; height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.nav-logo {
    font-size: 19px; font-weight: 800;
    letter-spacing: 0.15em; color: var(--accent);
    text-decoration: none; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    padding: 6px 13px; border-radius: 6px;
    font-size: 15px; font-weight: 500;
    color: var(--muted); text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.nav-links a:hover         { color: var(--text); background: var(--surface2); }
.nav-links a.nav-cta       { background: var(--accent); color: #f5ece0; font-weight: 700; }
.nav-links a.nav-cta:hover { background: var(--accent-h); }
.nav-links a.nav-premium       { color: var(--accent); font-weight: 700; border: 1px solid var(--accent); }
.nav-links a.nav-premium:hover { background: rgba(122,92,32,.10); color: var(--accent); }
/* ── Sélecteur de langue site ─────────────────────────────── */
.site-lang-picker { position:relative; display:flex; align-items:center; margin-left:6px; }
.site-lang-trigger {
    display:flex; align-items:center; gap:5px;
    padding:5px 10px; border-radius:6px; cursor:pointer;
    font-size: 15px; font-weight:600; color:var(--muted);
    background:transparent; border:1px solid transparent;
    transition:all .15s;
}
.site-lang-trigger:hover,
.site-lang-picker.open .site-lang-trigger {
    border-color:var(--border); color:var(--text); background:var(--surface2);
}
.site-lang-arrow { font-size: 10px; opacity:.6; }
.site-lang-code  { font-size: 14px; }

.site-lang-list {
    display:none; position:absolute; top:calc(100% + 6px); right:0;
    background:var(--surface); border:1px solid var(--border);
    border-radius:8px; box-shadow:0 6px 20px rgba(0,0,0,.15);
    min-width:150px; z-index:9999; overflow:hidden;
}
.site-lang-picker.open .site-lang-list { display:block; }
.site-lang-item {
    display:flex; align-items:center; gap:10px;
    padding:9px 14px; font-size: 15px; color:var(--text);
    text-decoration:none; border-bottom:1px solid var(--border);
    cursor:pointer; transition:background .1s;
}
.site-lang-item:last-child  { border-bottom:none; }
.site-lang-item:hover       { background:var(--surface2); }
.site-lang-item.active      { color:var(--accent); font-weight:600; }
.nav-user {
    font-size: 15px; color: var(--muted); padding: 0 4px;
}
.nav-user strong { color: var(--text); }
.nav-premium { color: #f0b800; font-size: 22px; margin-left: 5px; line-height: 1; text-shadow: 0 0 6px rgba(240,184,0,0.6); }
.nav-admin   { color: #c04040; font-size: 16px; margin-left: 4px; }

/* ════════════════════════════════════════
   Auth pages (login / register / verify)
   ════════════════════════════════════════ */

.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.auth-card {
    width: 100%; max-width: 400px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 44px 48px;
}
.auth-logo { text-align: center; margin-bottom: 36px; }
.auth-logo-symbol { font-size: 26px; color: var(--accent); margin-bottom: 8px; }
.auth-logo-name {
    font-size: 26px; font-weight: 800;
    letter-spacing: 0.16em; color: var(--accent); text-transform: uppercase;
}
.auth-logo-sub {
    font-size: 12px; color: var(--muted);
    letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px;
}
.auth-title {
    font-size: 17px; font-weight: 600; color: var(--text);
    margin-bottom: 22px; padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

/* Fields */
.field { margin-bottom: 16px; }
.field label {
    display: block; font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.09em;
    color: var(--muted); margin-bottom: 6px;
}
.field input {
    width: 100%; padding: 10px 13px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 7px; color: var(--text); font-size: 16px;
    outline: none; transition: border-color 0.15s; -webkit-appearance: none;
}
.field input::placeholder { color: var(--muted); }
.field input:focus         { border-color: var(--accent); }
.field input.f-err         { border-color: var(--err); }
.field input.f-ok          { border-color: var(--ok); }
.field-msg { font-size: 13px; margin-top: 5px; min-height: 15px; color: var(--muted); }
.field-msg.err { color: var(--err); }
.field-msg.ok  { color: var(--ok);  }

/* Password strength */
.pwd-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.pwd-bar-fill { height: 100%; width: 0; border-radius: 2px; transition: width 0.3s, background 0.3s; }

/* Alerts */
.alert { padding: 11px 14px; border-radius: 7px; font-size: 15px; line-height: 1.45; margin-bottom: 16px; }
.alert-err { background: rgba(139,42,42,.08); border: 1px solid rgba(139,42,42,.25); color: var(--err); }
.alert-ok  { background: rgba(45,107,58,.08);  border: 1px solid rgba(45,107,58,.2);  color: var(--ok); }

/* Charte communautaire — encadré discret dans les formulaires */
.community-notice {
    background: rgba(122, 92, 32, 0.06);
    border: 1px solid rgba(122, 92, 32, 0.2);
    border-radius: 7px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
    margin-bottom: 16px;
}
.community-notice p { margin: 0 0 8px; }
.community-notice p:last-child { margin-bottom: 0; }

/* Auth footer */
.auth-foot { text-align: center; margin-top: 22px; font-size: 15px; color: var(--muted); }
.auth-foot a { color: var(--accent); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* Success screen */
.success-screen { display: none; text-align: center; }
.success-icon  { font-size: 40px; margin-bottom: 16px; }
.success-title { font-size: 20px; font-weight: 700; color: var(--ok); margin-bottom: 8px; }
.success-sub   { font-size: 15px; color: var(--muted); line-height: 1.6; }

/* Dev verification link */
.dev-box {
    margin-top: 22px; padding: 16px;
    background: rgba(122,92,32,.06); border: 1px dashed rgba(122,92,32,.3);
    border-radius: 8px;
}
.dev-box-label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--accent); margin-bottom: 8px;
}
.dev-box-desc { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.dev-box a {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px; color: var(--text); word-break: break-all;
    text-decoration: underline; text-decoration-color: var(--border);
}

/* ════════════════════════════════════════
   Buttons (partagés)
   ════════════════════════════════════════ */

.btn {
    display: block; width: 100%; padding: 11px; border: none;
    border-radius: 7px; font-size: 15px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
    transition: background 0.15s, opacity 0.15s; margin-top: 8px;
}
.btn-gold { background: var(--accent); color: #f5ece0; }
.btn-gold:hover:not(:disabled) { background: var(--accent-h); }
.btn-gold:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-inline {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: 7px;
    background: var(--accent); color: #f5ece0;
    font-size: 15px; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; text-decoration: none; border: none; cursor: pointer;
    transition: background 0.15s;
}
.btn-inline:hover { background: var(--accent-h); }

.btn-outline {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 7px;
    background: transparent; color: var(--muted);
    font-size: 15px; font-weight: 500;
    text-decoration: none; border: 1px solid var(--border); cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.btn-outline:hover { color: var(--text); border-color: var(--text); }

/* ════════════════════════════════════════
   App pages (dashboard, create…)
   ════════════════════════════════════════ */

.page-wrap { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; }

.page-head {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 36px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text); }

.section { margin-bottom: 36px; }
.section-label {
    font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}

/* Game row cards (dashboard list) */
.gcard {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px;
    margin-bottom: 8px; text-decoration: none; color: inherit;
    transition: border-color 0.15s;
}
.gcard:hover { border-color: var(--accent); }
.gcard-icon  { font-size: 22px; width: 34px; text-align: center; flex-shrink: 0; }
.gcard-main  { flex: 1; min-width: 0; }
.gcard-name  { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.gcard-meta  { font-size: 14px; color: var(--muted); }
.gcard-tags  { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.tag         { font-size: 13px; padding: 2px 7px; border-radius: 4px; font-weight: 500; }
.tag-mode    { background: rgba(30,50,120,.1); color: #2a4080; border: 1px solid rgba(30,50,120,.2); }
.tag-opt     { background: rgba(122,92,32,.12); color: var(--accent); border: 1px solid rgba(122,92,32,.25); }
.gcard-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.gcard-cta   { font-size: 15px; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* Status pills */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pill-myturn  { background: rgba(122,92,32,.12); color: var(--accent); }
.pill-myturn  .pill-dot { background: var(--accent); }
.pill-opp     { background: rgba(122,112,96,.15); color: var(--muted);  }
.pill-opp     .pill-dot { background: var(--muted); }
.pill-waiting { background: rgba(122,112,96,.12); color: var(--muted);  }
.pill-waiting .pill-dot { background: var(--muted); }
.pill-done    { background: rgba(45,107,58,.1);   color: var(--ok);     }
.pill-done    .pill-dot { background: var(--ok);    }

/* Empty state */
.empty-state {
    padding: 32px 20px; text-align: center;
    background: var(--surface); border: 1px dashed var(--border);
    border-radius: 10px; color: var(--muted); font-size: 15px;
}

/* Form card (create game) */
.form-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 36px 40px; max-width: 520px;
}
.form-title {
    font-size: 20px; font-weight: 700; color: var(--text);
    margin-bottom: 24px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.form-select {
    width: 100%; padding: 10px 13px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 7px; color: var(--text); font-size: 16px;
    outline: none; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7060' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
    padding-right: 36px;
}
.form-select:focus { border-color: var(--accent); }
.form-select option { background: var(--surface2); }

/* Boutons de sélection d'adversaire (humain / IA) */
.opp-btn {
    flex: 1; padding: 14px 10px; border: 2px solid var(--border);
    border-radius: 8px; background: var(--surface2); cursor: pointer;
    font-size: 15px; font-weight: 600; color: var(--muted);
    transition: border-color .15s, color .15s, background .15s;
    text-align: center;
}
.opp-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.opp-btn.opp-selected         { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.opp-btn:disabled              { opacity: .4; cursor: not-allowed; }

input[type=checkbox]:disabled + span,
label:has(input[type=checkbox]:disabled) { opacity: .45; cursor: not-allowed; }

.form-check-label {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 15px; color: var(--text); cursor: pointer; line-height: 1.5;
    padding: 12px 14px; background: var(--surface2);
    border: 1px solid var(--border); border-radius: 7px;
    transition: border-color 0.15s;
}
.form-check-label:hover { border-color: var(--accent); }
.form-check-label input[type="checkbox"] {
    width: 16px; height: 16px; margin-top: 2px;
    accent-color: var(--accent); flex-shrink: 0; cursor: pointer;
}
.form-check-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.form-gap { height: 16px; }

.back-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 15px; color: var(--muted); text-decoration: none; margin-top: 16px;
}
.back-link:hover { color: var(--text); }

/* Waiting screen */
.wait-wrap {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 0; padding: 24px;
}
.wait-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 48px 56px; text-align: center; max-width: 420px; width: 100%;
}
.wait-spinner { font-size: 36px; color: var(--muted); margin-bottom: 20px; animation: spin 2.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wait-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.wait-sub   { font-size: 15px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.wait-share {
    padding: 10px 14px; background: var(--surface2);
    border: 1px solid var(--border); border-radius: 7px;
    font-size: 14px; color: var(--muted);
    font-family: 'Consolas', monospace; word-break: break-all;
    margin-bottom: 24px; text-align: left;
}

/* ════════════════════════════════════════
   Index page (hero + slideshow)
   ════════════════════════════════════════ */

.hero { max-width: 680px; margin: 0 auto; padding: 80px 24px 48px; text-align: center; }
.hero-title {
    font-size: 58px; font-weight: 900;
    letter-spacing: 0.14em; color: var(--accent);
    text-transform: uppercase; margin-bottom: 10px;
}
.hero-sub {
    font-size: 14px; letter-spacing: 0.2em;
    color: var(--muted); text-transform: uppercase; margin-bottom: 28px;
}
.hero-desc { font-size: 17px; color: var(--muted); line-height: 1.8; margin-bottom: 24px; }
.hero-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.hero-tag {
    font-size: 12px; font-weight: 600; letter-spacing: 0.07em;
    color: var(--accent); background: rgba(122,92,32,.1);
    border: 1px solid rgba(122,92,32,.3); padding: 4px 12px; border-radius: 20px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-btn {
    padding: 12px 30px; border-radius: 8px;
    font-size: 15px; font-weight: 700; letter-spacing: 0.07em;
    text-transform: uppercase; text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hero-btn-primary  { background: var(--accent); color: #f5ece0; }
.hero-btn-primary:hover { background: var(--accent-h); }
.hero-btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.hero-btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── Diaporama ── */
.slideshow {
    position: relative; overflow: hidden;
    max-width: 960px; margin: 48px auto 0; border-radius: 10px;
    border: 1px solid var(--border);
}
.slideshow-inner { display: flex; transition: transform .5s ease; }
.slide { min-width: 100%; }
.slide img { width: 100%; max-height: 440px; object-fit: cover; display: block; }
.slide-prev, .slide-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.35); color: #fff; border: none;
    padding: 10px 16px; font-size: 22px; cursor: pointer; border-radius: 4px;
    transition: background .15s;
}
.slide-prev:hover, .slide-next:hover { background: rgba(0,0,0,.6); }
.slide-prev { left: 10px; }
.slide-next { right: 10px; }
.slide-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.slide-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.45); border: none; cursor: pointer; padding: 0;
    transition: background .2s;
}
.slide-dot.active { background: #fff; }

/* Game card on index */
.games-section { max-width: 840px; margin: 0 auto; padding: 0 24px 80px; }
.games-label {
    font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.index-game-card {
    display: block; background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 24px 28px; text-decoration: none; color: inherit;
    transition: border-color 0.15s, background 0.15s; max-width: 480px;
}
.index-game-card:hover { border-color: var(--accent); background: var(--surface2); }
.igc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.igc-icon   { font-size: 22px; }
.igc-title  { font-size: 19px; font-weight: 700; color: var(--text); }
.igc-badge  {
    margin-left: auto; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.09em;
    color: var(--accent); background: rgba(122,92,32,.1);
    border: 1px solid rgba(122,92,32,.25); padding: 3px 8px; border-radius: 4px;
}
.igc-desc { font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.igc-cta  { font-size: 15px; font-weight: 700; color: var(--accent); }

/* ── Actualités (index) ── */
.news-section  { max-width: 840px; margin: 0 auto; padding: 0 24px 48px; }
.news-label    { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.news-card     { display: flex; gap: 20px; background: var(--surface, #fff8ee); border: 1px solid var(--border, #c9a96e); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.news-img      { flex-shrink: 0; width: 140px; }
.news-img img  { width: 100%; border-radius: 6px; object-fit: cover; display: block; }
.news-content  { flex: 1; min-width: 0; }
.news-date     { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.news-title    { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.news-body     { font-size: 14px; color: var(--text); line-height: 1.7; }
@media (max-width: 500px) {
    .news-card  { flex-direction: column; }
    .news-img   { width: 100%; }
}


.site-footer {
    text-align: center; padding: 24px;
    font-size: 14px; color: var(--muted);
    border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════
   Breadcrumb
   ════════════════════════════════════════ */

.breadcrumb { font-size: 15px; color: var(--muted); margin-bottom: 24px; display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { opacity: 0.4; }

/* ════════════════════════════════════════
   Game page
   ════════════════════════════════════════ */

.game-page-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 52px 52px 48px;
    margin-bottom: 24px;
    position: relative; overflow: hidden;
}
.game-page-banner::after {
    content: '⚔';
    position: absolute; right: 48px; top: 50%;
    transform: translateY(-50%);
    font-size: 140px; opacity: 0.05; pointer-events: none;
    line-height: 1;
}
.gpb-kicker {
    font-size: 13px; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.gpb-title {
    font-size: 46px; font-weight: 900; color: var(--text);
    margin-bottom: 14px; line-height: 1.1; font-style: italic;
}
.gpb-desc {
    font-size: 17px; color: var(--muted); line-height: 1.75;
    max-width: 520px; margin-bottom: 28px;
}
.gpb-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: #f5ece0; font-weight: 700;
    padding: 10px 22px; border-radius: 7px; text-decoration: none;
    font-size: 16px; transition: background .15s;
}
.btn-primary:hover { background: var(--accent-h); }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--text); font-weight: 600;
    padding: 10px 22px; border-radius: 7px; text-decoration: none;
    font-size: 16px; border: 1px solid var(--border); transition: border-color .15s, color .15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.game-features-bar {
    display: flex; align-items: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 18px 24px;
    margin-bottom: 24px;
}
.gfb-item { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: center; }
.gfb-item i { color: var(--accent); font-size: 17px; }
.gfb-item span { font-size: 15px; font-weight: 500; color: var(--text); }
.gfb-sep { width: 1px; height: 30px; background: var(--border); flex-shrink: 0; }

.game-nav-cards { display: flex; gap: 16px; }
.game-nav-card {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 8px; padding: 28px 16px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 12px;
    text-decoration: none; color: var(--text); transition: border-color .15s, background .15s;
    text-align: center;
}
.game-nav-card:hover { border-color: var(--accent); background: rgba(122,92,32,.05); }
.game-nav-card i { font-size: 28px; color: var(--accent); }
.game-nav-card span { font-size: 18px; font-weight: 600; }
.game-nav-card small { font-size: 14px; color: var(--muted); }

/* ════════════════════════════════════════
   Rules page
   ════════════════════════════════════════ */

.rules-wrap {
    max-width: 780px; margin: 0 auto; padding: 40px 24px 80px;
}
.rules-section {
    margin-bottom: 44px;
}
.rules-section h2 {
    font-size: 19px; font-weight: 700; color: var(--accent);
    text-transform: uppercase; letter-spacing: 0.1em;
    border-bottom: 2px solid var(--border); padding-bottom: 8px; margin-bottom: 18px;
}
.rules-section h3 {
    font-size: 16px; font-weight: 700; color: var(--text);
    margin: 22px 0 10px;
}
.rules-section p {
    line-height: 1.7; margin-bottom: 12px; color: var(--text);
}
.rules-section ul, .rules-section ol {
    padding-left: 20px; margin-bottom: 12px;
}
.rules-section li {
    line-height: 1.7; margin-bottom: 4px;
}
.rules-note {
    background: var(--surface); border-left: 3px solid var(--accent);
    padding: 12px 16px; border-radius: 0 6px 6px 0;
    margin: 14px 0; font-size: 15px; color: var(--text);
}
/* Encadré "raisonnement de conception" — accent plus visible */
.rules-highlight {
    background: #f5efd5; border-left: 4px solid #7a5c20;
    padding: 13px 16px; border-radius: 0 6px 6px 0;
    margin: 14px 0; font-size: 14px; color: #3a2a10;
    font-style: italic;
}
.rules-table {
    width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px;
}
.rules-table th {
    text-align: left; padding: 8px 12px;
    background: var(--surface2); color: var(--accent);
    font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
    border: 1px solid var(--border);
}
.rules-table td {
    padding: 7px 12px; border: 1px solid var(--border);
    vertical-align: top; line-height: 1.5;
}
.rules-table tr:nth-child(even) td { background: var(--surface); }
.rules-table td strong { color: var(--accent); }
.rules-breadcrumb {
    font-size: 15px; color: var(--muted); margin-bottom: 28px;
}
.rules-breadcrumb a { color: var(--accent); text-decoration: none; }
.rules-breadcrumb a:hover { text-decoration: underline; }
.rules-breadcrumb .bc-sep { margin: 0 6px; color: var(--border); }
.rules-title {
    font-size: 24px; font-weight: 800; color: var(--text);
    margin-bottom: 6px;
}
.rules-subtitle {
    font-size: 15px; color: var(--muted); margin-bottom: 40px;
}
.result-tag {
    display: inline-block; padding: 2px 7px; border-radius: 4px;
    font-weight: 700; font-size: 14px; letter-spacing: 0.05em;
    background: var(--surface2); color: var(--accent); border: 1px solid var(--border);
}

/* Legacy placeholder — kept for fallback */
.rules-placeholder {
    text-align: center; padding: 80px 20px;
    color: var(--muted); border: 1px dashed var(--border); border-radius: 12px;
}
.rules-icon { font-size: 48px; color: var(--border); margin-bottom: 16px; display: block; }

/* ════════════════════════════════════════
   Scenarios grid
   ════════════════════════════════════════ */

.scenario-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.scenario-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; text-decoration: none;
    color: var(--text); transition: border-color .15s, transform .15s;
    display: flex; flex-direction: column;
}
.scenario-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.scenario-card-map {
    height: 150px; background-size: cover; background-position: center;
    background-color: #c8b898;
}
.scenario-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.scenario-card-name { font-size: 16px; font-weight: 600; }
.scenario-card-camps { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.scenario-card-camps .vs { color: var(--muted); }
.scenario-card-meta { font-size: 14px; color: var(--muted); }

/* ════════════════════════════════════════
   Scenario detail
   ════════════════════════════════════════ */

.scenario-detail { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.scenario-detail-map img { width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block; }
.scenario-detail-title { font-size: 24px; font-weight: 700; margin: 0 0 20px; }

.scenario-detail-camps { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.detail-camp {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 8px; border: 1px solid;
    font-size: 16px; font-weight: 600;
}
.camp-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.camps-vs { color: var(--muted); font-size: 15px; }
.first-badge {
    margin-left: 4px; font-size: 12px; background: var(--accent);
    color: #f5ece0; padding: 1px 5px; border-radius: 3px; font-weight: 700;
}

.scenario-detail-stats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.detail-stat { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--muted); }
.detail-stat i { color: var(--accent); width: 16px; text-align: center; }

/* ════════════════════════════════════════
   Responsive
   ════════════════════════════════════════ */

@media (max-width: 640px) {
    .auth-card { padding: 36px 24px; }
    .hero-title { font-size: 38px; }
    .site-nav, .app-nav { padding: 0 20px; }
    .page-wrap { padding: 28px 16px 60px; }
    .form-card { padding: 28px 20px; }
    .wait-card { padding: 36px 24px; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .gcard { flex-wrap: wrap; gap: 10px; }
    .gcard-right { width: 100%; justify-content: space-between; }
    .game-features-bar { flex-direction: column; gap: 16px; padding: 20px; }
    .gfb-sep { width: 100%; height: 1px; }
    .game-nav-cards { flex-direction: column; }
    .gpb-title { font-size: 32px; }
    .game-page-banner { padding: 36px 28px; }
    .game-page-banner::after { display: none; }
    .scenario-detail { grid-template-columns: 1fr; }
}

