/* Grande Tournée GR - Styles mobile-first */
:root {
    --primary: #0a1b36;
    --primary-dark: #06101f;
    --accent: #b38a45;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app {
    max-width: 540px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
}

.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 24px 20px 28px;
    text-align: center;
    box-shadow: var(--shadow);
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.header .subtitle {
    margin-top: 4px;
    opacity: 0.85;
    font-size: 0.9rem;
}

.content {
    padding: 20px 16px 40px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.card h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: var(--primary);
}

.card p {
    margin: 0 0 12px;
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: var(--radius);
    border: 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
    width: 100%;
    min-height: 48px; /* tap target */
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:active { background: var(--primary-dark); transform: scale(.98); }

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:active { transform: scale(.98); }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    width: auto;
    padding: 8px 14px;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Formulaires */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color .15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 27, 54, .15);
}

/* Badge / chip */
.entries-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent), #8f6a2f);
    color: white;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
}

/* Question card */
.question-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: opacity .2s;
}

.question-card.completed {
    opacity: 0.6;
    border-left-color: var(--success);
    background: #f0fdf4;
}

.question-card .cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.question-card .icon {
    font-size: 1.6rem;
    line-height: 1;
}

.question-card .cat-name {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.question-card .question-text {
    font-size: 1rem;
    margin: 8px 0 14px;
    color: var(--text);
}

.question-card .check-icon {
    color: var(--success);
    font-size: 1.4rem;
    margin-left: auto;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: white;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all .3s ease;
    z-index: 100;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* Loading */
.loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

/* Section masquage */
.hidden { display: none !important; }

/* Footer info */
.footer {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Stats summary */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.stat-box {
    background: var(--surface);
    padding: 14px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-box .num {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-box .lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th, .admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.admin-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: #f8fafc; }

@media (min-width: 768px) {
    .app { max-width: 720px; }
    .admin-only { max-width: 1100px; }
}

/* ============================================================
   INTRO CINÉMA — Fade in + zoom doux + fond adaptatif par scène
   ============================================================ */

.cinema {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: hidden;
    background: #0a0a0f; /* Fallback pendant le chargement */
    transition: opacity .8s ease-out, visibility .8s;
}

.cinema.cinema-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Couche de fond qui transite entre scènes (sous les scènes) */
.cinema-bg {
    position: absolute;
    inset: 0;
    background: #0a0a0f;
    transition: background-color .6s ease;
    z-index: 1;
}

.cinema-scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.cinema-scene.cinema-active {
    /* 2 secondes par scène : fade in (.4s) -> hold (1.2s) -> fade out (.4s) */
    animation: cinemaSceneFade 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cinemaSceneFade {
    0%   { opacity: 0; transform: scale(0.92); }
    20%  { opacity: 1; transform: scale(1); }
    80%  { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0; transform: scale(1.08); }
}

/* === Thème SOMBRE (fond noir, texte clair) === */
.cinema-theme-light .cinema-label {
    color: rgba(255, 255, 255, 0.55);
}
.cinema-theme-light .cinema-sub {
    color: rgba(255, 255, 255, 0.65);
}
.cinema-theme-light .cinema-logo {
    filter: drop-shadow(0 4px 24px rgba(255, 255, 255, 0.08));
}
.cinema-theme-light .cinema-logo-fallback {
    color: white;
}

/* === Thème CLAIR (fond blanc, texte sombre) === */
.cinema-theme-dark .cinema-label {
    color: rgba(0, 0, 0, 0.5);
}
.cinema-theme-dark .cinema-sub {
    color: rgba(0, 0, 0, 0.65);
}
.cinema-theme-dark .cinema-logo {
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.12));
}
.cinema-theme-dark .cinema-logo-fallback {
    color: #1a1a1a;
}

/* Styles communs */
.cinema-label {
    font-size: 0.75rem;
    letter-spacing: 0.35em;
    margin-bottom: 24px;
    text-transform: uppercase;
    font-weight: 500;
}

.cinema-logo {
    max-width: 75%;
    max-height: 45vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cinema-logo-title {
    max-width: 85%;
    max-height: 50vh;
}

.cinema-logo-fallback {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    padding: 0 20px;
}

.cinema-logo-title-fallback {
    font-size: 2.8rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cinema-sub {
    font-size: 0.9rem;
    margin-top: 16px;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.cinema-skip {
    position: absolute;
    bottom: 24px;
    right: 20px;
    background: rgba(127, 127, 127, 0.18);
    color: rgba(127, 127, 127, 0.95);
    border: 1px solid rgba(127, 127, 127, 0.25);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.05em;
    opacity: 0;
    z-index: 3;
    /* Apparaît après 1.5s pour ne pas distraire trop tôt */
    animation: cinemaSkipShow .4s ease 1.5s forwards;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(8px);
}

@keyframes cinemaSkipShow {
    to { opacity: 1; }
}

.cinema-skip:active {
    background: rgba(127, 127, 127, 0.35);
}

/* Sur mobile : adapter la taille des logos textuels */
@media (max-width: 380px) {
    .cinema-logo-fallback { font-size: 2rem; }
    .cinema-logo-title-fallback { font-size: 2.3rem; }
    .cinema-label { font-size: 0.7rem; letter-spacing: 0.25em; }
}

/* Pour les utilisateurs qui préfèrent moins d'animation */
@media (prefers-reduced-motion: reduce) {
    .cinema-scene.cinema-active {
        animation: cinemaSceneFadeReduced 1.5s ease forwards;
    }
    @keyframes cinemaSceneFadeReduced {
        0%, 100% { opacity: 0; }
        20%, 80% { opacity: 1; }
    }
}


/* ===== Jeu du Réseautage — identité et défis par événement ===== */
.header-logo-wrap { margin: 0; line-height: 0; }
.header-logo { height: 120px; width: auto; max-width: 80%; object-fit: contain; }

.event-hero { border-top: 4px solid var(--accent); }
.event-kicker {
    font-size: .78rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 4px;
}
.event-title { margin: 0 0 8px; color: var(--primary); }
.event-intro { margin: 0 0 12px; color: var(--text); }

.question-card { border-left-color: var(--defi-color, var(--primary)); }
.question-card .defi-num {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--defi-color, var(--primary)); color: #fff;
    font-weight: 700; font-size: .9rem; line-height: 1;
}
.question-card .defi-title { font-weight: 700; font-size: 1.02rem; color: var(--text); }
.question-card.completed .defi-num { background: var(--success); }

.suite-card { background: #fbf7ef; border: 1px dashed var(--accent); box-shadow: none; }
.suite-title {
    font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--accent); font-size: .85rem; margin-bottom: 8px;
}
.suite-text { margin: 0 0 8px; }
.suite-note { margin: 0; font-size: .78rem; color: var(--text-muted); }


/* ===== Accueil « Le Jeu du Réseautage » (maquette 2026-09-24) ===== */
:root {
    --ink: #14100b;
    --gold: #c49a52;
    --gold-light: #e2bd6f;
    --cream: #f6f1e8;
    --paper: #fffdf9;
    --rose: #fbeef0;
}
body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--cream);
}
.app { max-width: none; background: transparent; }
.home .display, .display { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }

/* Bandeau */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(ellipse at 50% 120%, #3a2a14 0%, #0b0906 60%) #0b0906;
    padding: 30px 16px 110px; text-align: center;
}
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; }
.hn-lines path { fill: none; stroke: #c49a52; stroke-opacity: .55; stroke-width: 1.4; }
.hn-nodes circle { fill: #e0a64a; }
.hn-person circle:first-child { fill: rgba(20, 14, 6, .55); stroke: #c49a52; stroke-width: 3; }
.hn-head, .hn-body { fill: #d9a95a; }
.hero-logo-wrap { position: relative; margin: 0; line-height: 0; }
.hero-logo { height: 220px; width: auto; max-width: 70%; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .6)); }

.content { max-width: 1100px; margin: -64px auto 0; padding: 0 16px 32px; position: relative; }
#register-section, #game-section { max-width: 560px; margin: 0 auto; }

.home .card { background: var(--paper); border-radius: 18px; box-shadow: 0 10px 30px rgba(60, 40, 10, .08); }

/* Bienvenue */
.welcome-card { display: flex; gap: 28px; align-items: center; padding: 28px 32px; max-width: 900px; margin: 0 auto 18px; }
.welcome-medal {
    flex: 0 0 auto; width: 150px; height: 150px; border-radius: 50%;
    background: radial-gradient(circle, #1a150d 0 44%, #fbf0dc 45% 100%);
    display: flex; align-items: center; justify-content: center;
}
.welcome-medal svg { width: 70px; height: 70px; fill: none; stroke: var(--gold-light); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.welcome-medal .cup { fill: var(--gold); stroke: var(--gold-light); }
.welcome-body h2 { font-size: 2.6rem; margin: 0 0 8px; line-height: 1.1; }
.welcome-body p { margin: 0 0 6px; font-size: 1.1rem; color: #3b3328; line-height: 1.5; }
.welcome-body strong { color: var(--ink); }
.welcome-chips { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-radius: 10px; font-weight: 500; color: var(--ink); line-height: 1.3; flex: 1 1 220px; }
.chip svg { width: 30px; height: 30px; flex: 0 0 auto; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip-gold { background: #fbf1dc; }
.chip-gold svg { stroke: var(--gold); }
.chip-rose { background: var(--rose); }
.chip-rose svg { stroke: #d6453d; }

/* Comment ça marche */
.steps-card { padding: 26px 32px 30px; margin-bottom: 20px; }
.steps-card h2 { font-size: 2.1rem; margin: 0 0 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; }
.steps li + li::before {
    content: ''; position: absolute; left: -10px; top: 30px; width: 10px; height: 10px;
    border-top: 2px solid #8a8378; border-right: 2px solid #8a8378; transform: rotate(45deg);
}
.step-num {
    position: absolute; top: 0; left: calc(50% - 72px);
    width: 30px; height: 30px; border-radius: 50%; background: #c08f3e; color: #fff;
    font-weight: 700; font-size: .95rem; display: flex; align-items: center; justify-content: center;
}
.step-icon { width: 64px; height: 64px; border-radius: 50%; background: #fbf0dc; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.step-icon svg { width: 32px; height: 32px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.steps strong { font-size: 1.1rem; color: var(--ink); margin-bottom: 4px; }
.step-text { color: #4a4238; font-size: .98rem; line-height: 1.35; }

/* Bouton or */
.btn-gold {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    max-width: 560px; margin: 0 auto; padding: 16px 24px; border: 0; border-radius: 10px;
    background: linear-gradient(180deg, #d7b062 0%, #b8893c 100%); color: var(--ink);
    font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; font-weight: 700;
    box-shadow: 0 8px 20px rgba(150, 105, 35, .3); cursor: pointer;
}
.btn-gold svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-gold:active { transform: scale(.99); }
.btn-gold:focus-visible, .btn:focus-visible { outline: 3px solid #7a5a22; outline-offset: 3px; }

.footer { background: transparent; }

/* Mobile */
@media (max-width: 760px) {
    .hero { padding: 22px 12px 76px; }
    .hero-logo { height: 140px; }
    .content { margin-top: -52px; }
    .welcome-card { flex-direction: column; text-align: center; padding: 24px 20px; gap: 14px; }
    .welcome-medal { width: 110px; height: 110px; }
    .welcome-medal svg { width: 52px; height: 52px; }
    .welcome-body h2 { font-size: 2.1rem; }
    .welcome-body p { font-size: 1rem; }
    .chip { text-align: left; }
    .steps-card { padding: 22px 20px; }
    .steps-card h2 { font-size: 1.7rem; text-align: center; }
    .steps { grid-template-columns: 1fr; gap: 14px; }
    .steps li { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 14px; text-align: left; align-items: start; }
    .steps li + li::before { display: none; }
    .step-icon { grid-row: 1 / span 2; width: 56px; height: 56px; margin: 0; }
    .step-num { top: -4px; left: -4px; width: 24px; height: 24px; font-size: .8rem; }
    .steps strong { margin: 4px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .btn-gold:active { transform: none; } }


/* ===== Page du joueur (maquette 2026-09-24 15:25) ===== */
.hero::after {
    content: ''; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 120px;
    background: var(--cream); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-home { display: inline-block; }
.hero-home .hero-logo { max-width: none; object-fit: contain; }
.player-card { text-align: center; padding: 30px 32px 26px; border-radius: 18px; background: var(--paper); box-shadow: 0 12px 34px rgba(60, 40, 10, .10); }
#game-section { max-width: 760px; }
.player-card .player-hello { font-size: 2rem; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.player-sub { color: #5d6b7c; font-size: 1.1rem; margin: 0 0 22px; }

.btn-scan {
    display: flex; align-items: center; justify-content: center; gap: 12px; position: relative;
    width: 100%; max-width: 440px; margin: 0 auto 24px; padding: 15px 56px 15px 24px;
    border: 0; border-radius: 999px; cursor: pointer;
    background: linear-gradient(180deg, #d0a65a 0%, #a97c33 100%); color: #fff;
    font-family: inherit; font-size: 1.15rem; font-weight: 600;
    box-shadow: 0 8px 20px rgba(150, 105, 35, .32);
}
.btn-scan svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-scan .ico { width: 24px; height: 24px; }
.btn-scan .arrow { width: 22px; height: 22px; position: absolute; right: 22px; }
.btn-scan:focus-visible { outline: 3px solid #7a5a22; outline-offset: 3px; }

.player-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.player-stat {
    display: flex; align-items: center; gap: 18px; padding: 18px 22px;
    border: 1px solid #efe6d6; border-radius: 12px; background: #fffefb; text-align: left;
}
.stat-ico { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; background: #fbf0dc; display: flex; align-items: center; justify-content: center; }
.stat-ico svg { width: 32px; height: 32px; fill: #d4a24c; stroke: #b8862f; stroke-width: 1.2; stroke-linejoin: round; }
.stat-txt strong { display: block; font-size: 1.9rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat-txt small { display: block; text-transform: uppercase; color: #5d6b7c; font-size: .9rem; letter-spacing: .02em; }
.player-tip { margin: 0; padding: 12px 16px; border-radius: 10px; background: #fbf6ee; border: 1px solid #f1e7d6; color: #4a4238; }

/* Lecteur QR */
.qr-scanner { position: fixed; inset: 0; z-index: 2000; background: #000; display: none; }
.qr-scanner.open { display: block; }
.qr-scanner video { width: 100%; height: 100%; object-fit: cover; }
.qr-frame {
    position: absolute; top: 50%; left: 50%; width: min(70vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%);
    border: 3px solid var(--gold-light); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);
}
.qr-hint { position: absolute; left: 0; right: 0; top: calc(50% + min(35vw, 150px) + 20px); text-align: center; color: #fff; font-weight: 500; }
.qr-close {
    position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%);
    padding: 12px 34px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .6);
    background: rgba(0, 0, 0, .4); color: #fff; font: inherit; font-weight: 600;
}

@media (max-width: 760px) {
    .player-card { padding: 24px 18px 20px; }
    .player-card .player-hello { font-size: 1.7rem; }
    .player-stats { gap: 10px; }
    .player-stat { flex-direction: column; text-align: center; gap: 8px; padding: 14px 8px; }
    .stat-ico { width: 52px; height: 52px; }
    .stat-ico svg { width: 26px; height: 26px; }
    .stat-txt strong { font-size: 1.6rem; }
    .stat-txt small { font-size: .78rem; }
    .btn-scan { font-size: 1.05rem; }
}


/* ===== Accueil v2 (maquette 16:06) : réseau lumineux animé ===== */
.hero { padding-bottom: 120px; }
path.hn-lines { fill: none; stroke: #c9a15a; stroke-opacity: .6; stroke-width: 1.5; }
.hn-node { fill: #e7ad55; }
.hn-ring { fill: rgba(20, 14, 6, .6); stroke: #d4a856; stroke-width: 3; }
.hn-arrive { fill: none; }

/* Lumière qui voyage d'un contact à l'autre */
.hn-comet {
    fill: none; stroke: #fff1c9; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 9 200; stroke-dashoffset: 9; opacity: 0;
    animation: hn-travel 7s linear infinite;
}
@keyframes hn-travel {
    0%   { stroke-dashoffset: 9;    opacity: 0; }
    3%   { opacity: 1; }
    40%  { stroke-dashoffset: -96;  opacity: 1; }
    43%  { stroke-dashoffset: -100; opacity: 0; }
    100% { stroke-dashoffset: -100; opacity: 0; }
}
/* Le contact s'illumine quand la lumière arrive */
.hn-flash {
    fill: rgba(255, 214, 140, .18); stroke: #ffe3a6; stroke-width: 3; opacity: 0;
    transform-box: fill-box; transform-origin: center;
    animation: hn-flash 7s ease-out infinite;
}
@keyframes hn-flash {
    0%, 38% { opacity: 0; transform: scale(1); }
    42%     { opacity: 1; transform: scale(1.02); }
    60%     { opacity: 0; transform: scale(1.35); }
    100%    { opacity: 0; transform: scale(1.35); }
}
@media (prefers-reduced-motion: reduce) {
    .hn-comet, .hn-flash { animation: none; opacity: 0; }
}

/* Fond crème avec facettes dorées */
body {
    background-color: var(--cream);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1536 1024' preserveAspectRatio='none'%3E%3Cpath d='M0 300 L360 600 L0 980Z' fill='%23efe3cc' opacity='.55'/%3E%3Cpath d='M1536 300 L1176 600 L1536 980Z' fill='%23efe3cc' opacity='.55'/%3E%3Cpath d='M0 300 L360 600 L0 980 M1536 300 L1176 600 L1536 980' fill='none' stroke='%23c9a15a' stroke-width='1.5' opacity='.45'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-attachment: fixed;
}

/* Carte de bienvenue */
.welcome-medal {
    background: radial-gradient(circle, #0f0b06 0 43%, #f6e4c2 44% 47%, #fbf1dd 48% 100%);
    box-shadow: inset 0 0 0 1px #f0dfbd;
}
.welcome-medal svg { width: 76px; height: 76px; }
.welcome-body p { color: #4a4f5a; }
.welcome-body strong { color: var(--ink); font-weight: 600; }
.welcome-body strong.gold { color: #b07d2c; font-weight: 600; }
.chip { border: 1px solid transparent; }
.chip-gold { background: #fbf2de; border-color: #f0dfb8; }
.chip-rose { background: #fbecee; border-color: #f4cfd4; }
.chip svg { width: 34px; height: 34px; }
.chip-gold svg { fill: #e0b04f; stroke: #b8862f; }
.chip-rose svg { fill: #d63a36; stroke: #a82420; }
.chip span { font-weight: 600; }

.step-icon { box-shadow: inset 0 0 0 1px #f0dfbd; }
.steps-card { max-width: 1240px; margin-left: auto; margin-right: auto; }
.btn-gold { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1.35rem; }

/* Mobile : on rapproche le réseau du logo pour garder deux contacts et les lumières visibles */
@media (max-width: 760px) {
    .hero-net { width: 190%; height: auto; top: 40px; left: -45%; right: auto; bottom: auto; }
    .hero-net .hn-bg { display: none; }
}

/* ===== Fond fourni (image 2026-09-24 16:13) + lumières calées sur son réseau ===== */
body { background: #f3e7d7; background-image: none; }
.page-bg { position: absolute; top: 0; left: 0; width: 100%; overflow: hidden; z-index: 0; pointer-events: none; }
.page-bg svg { display: block; width: 100%; height: auto; }
.page-bg::after {                    /* fondu vers la couleur de la page */
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18%;
    background: linear-gradient(to bottom, rgba(243, 231, 215, 0), #f3e7d7);
}
.app { position: relative; z-index: 1; }
.hero { background: transparent; box-shadow: none; }
.hero::after { display: none; }

.bg-comet {
    fill: none; stroke: #fff3cf; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 8 200; stroke-dashoffset: 8; opacity: 0;
    animation: bg-travel 8s linear infinite;
}
@keyframes bg-travel {
    0%   { stroke-dashoffset: 8;    opacity: 0; }
    2%   { opacity: 1; }
    36%  { stroke-dashoffset: -96;  opacity: 1; }
    38%  { stroke-dashoffset: -100; opacity: 0; }
    100% { stroke-dashoffset: -100; opacity: 0; }
}
.bg-flash {
    fill: rgba(255, 220, 150, .22); stroke: #ffe7b0; stroke-width: 3.5; opacity: 0;
    transform-box: fill-box; transform-origin: center;
    animation: bg-flash 8s ease-out infinite;
}
.bg-flash-node { stroke-width: 2; }
@keyframes bg-flash {
    0%, 34% { opacity: 0; transform: scale(1); }
    38%     { opacity: 1; transform: scale(1.03); }
    56%     { opacity: 0; transform: scale(1.4); }
    100%    { opacity: 0; transform: scale(1.4); }
}
@media (prefers-reduced-motion: reduce) { .bg-comet, .bg-flash { animation: none; opacity: 0; } }

@media (max-width: 760px) {
    /* On garde un contact de chaque côté du logo */
    .page-bg svg { width: 185%; margin-left: -42.5%; }
}

/* ===== Sondage (2026-09-28) ===== */
.btn-survey {
    display: flex; align-items: center; gap: 14px; position: relative;
    width: 100%; max-width: 440px; margin: 0 auto 18px; padding: 14px 56px 14px 22px;
    border-radius: 14px; border: 1.5px solid #d9b877; background: #fffaf0;
    color: var(--ink); text-decoration: none; text-align: left;
    box-shadow: 0 6px 16px rgba(150, 105, 35, .12);
}
.btn-survey svg { fill: none; stroke: #a97c33; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-survey .ico { width: 30px; height: 30px; flex: 0 0 auto; }
.btn-survey .arrow { width: 22px; height: 22px; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
.btn-survey-txt strong { display: block; font-size: 1.1rem; font-weight: 600; }
.btn-survey-txt small { display: block; color: #6b5a3e; font-size: .92rem; }
.btn-survey:focus-visible { outline: 3px solid #7a5a22; outline-offset: 3px; }

.survey-done {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    max-width: 440px; margin: 0 auto 18px; padding: 12px 16px; border-radius: 12px;
    background: #e8f5ec; border: 1px solid #c7e6d0; color: #1f6b3a; font-weight: 500;
}
.survey-check {
    width: 26px; height: 26px; border-radius: 50%; background: #2e8b50; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; flex: 0 0 auto;
}

.survey-end { text-align: center; border-top: 4px solid var(--accent); }
.survey-end-title { font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-bottom: 4px; }
.survey-end-text { color: #4a4238; }
.survey-end-done { border-top-color: #2e8b50; background: #f3faf5; }
.btn-survey-event { font-size: 1.2rem; text-decoration: none; }

/* Page sondage.php */
.sv-wrap { max-width: 760px; margin: 0 auto; }
.sv-card { padding: 26px 28px; border-radius: 18px; background: var(--paper, #fff); box-shadow: 0 12px 34px rgba(60, 40, 10, .10); }
.sv-card h2 { font-size: 1.6rem; color: var(--ink); margin: 0 0 6px; }
.sv-lead { color: #5d6b7c; margin: 0 0 18px; }
.sv-alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 500; }
.sv-alert-error { background: #fbecee; border: 1px solid #f4cfd4; color: #9b2320; }
.sv-alert-success { background: #e8f5ec; border: 1px solid #c7e6d0; color: #1f6b3a; }
.sv-alert-info { background: #fbf6ee; border: 1px solid #f1e7d6; color: #4a4238; }

.sv-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sv-event { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border: 1px solid #efe6d6; border-radius: 12px; background: #fffefb; }
.sv-event-name { font-weight: 600; color: var(--ink); }
.sv-event-meta { font-size: .9rem; color: #5d6b7c; }
.sv-event .btn { width: auto; min-height: 44px; padding: 10px 18px; }
.sv-badge-done { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #e8f5ec; color: #1f6b3a; font-weight: 600; white-space: nowrap; }

.sv-q { padding: 18px 0; border-top: 1px solid #efe6d6; margin: 0; border-left: 0; border-right: 0; border-bottom: 0; }
.sv-q:first-of-type { border-top: 0; padding-top: 4px; }
.sv-q legend { padding: 0; font-weight: 600; color: var(--ink); font-size: 1.05rem; line-height: 1.4; margin-bottom: 12px; }
.sv-num { color: var(--accent); margin-right: 4px; }
.sv-opt { font-weight: 400; color: #8a7d68; font-size: .9rem; }

.sv-scale { display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 6px; }
.sv-scale label, .sv-choice label { position: relative; cursor: pointer; }
.sv-scale input, .sv-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sv-scale span {
    display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 10px;
    border: 1.5px solid #e2d3b6; background: #fffefb; font-weight: 600; color: var(--ink);
}
.sv-scale input:checked + span { background: linear-gradient(180deg, #d0a65a 0%, #a97c33 100%); border-color: #a97c33; color: #fff; }
.sv-scale input:focus-visible + span, .sv-choice input:focus-visible + span { outline: 3px solid #7a5a22; outline-offset: 2px; }
.sv-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: .82rem; color: #6b5a3e; }
.sv-ends span:last-child { text-align: right; }

.sv-choice { display: grid; gap: 8px; }
.sv-choice span {
    display: block; padding: 12px 16px; border-radius: 10px; border: 1.5px solid #e2d3b6; background: #fffefb; color: var(--ink);
}
.sv-choice input:checked + span { border-color: #a97c33; background: #fbf0dc; font-weight: 600; }

.sv-text { width: 100%; min-height: 110px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid #e2d3b6; font: inherit; resize: vertical; background: #fffefb; }
.sv-text:focus, .sv-input:focus { outline: none; border-color: #a97c33; box-shadow: 0 0 0 3px rgba(196, 154, 82, .25); }
.sv-input { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1.5px solid #e2d3b6; font: inherit; background: #fffefb; }
.sv-field { margin-bottom: 16px; }
.sv-field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.sv-hint { font-size: .85rem; color: #6b5a3e; margin-top: 4px; }
.sv-actions { margin-top: 20px; }
.sv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; font-size: .9rem; color: #5d6b7c; flex-wrap: wrap; }
.sv-foot a, .sv-link { color: #7a5a22; }
.sv-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: #7a5a22; text-decoration: underline; cursor: pointer; }

@media (max-width: 560px) {
    .sv-card { padding: 22px 18px; }
    .sv-scale { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .sv-event { flex-direction: column; align-items: stretch; }
    .sv-event .btn { width: 100%; }
}

/* ===== Missions oui / non (2026-09-28) ===== */
.mission-ask { margin: 0 0 8px; font-weight: 600; color: var(--ink, #14100b); }
.mission-answer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mission-answer .btn { width: 100%; }
.mission-state { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: var(--radius, 12px); font-weight: 600; margin-bottom: 8px; }
.mission-done { background: #e8f5ec; color: #1f6b3a; }
.mission-no { background: #f3f1ed; color: #6b6259; }
.question-card.skipped { opacity: .92; }

/* ===== Logos et intro (2026-09-28) ===== */
/* Rôle au-dessus de chaque logo : italique Playfair entre deux filets dorés */
.cinema-label {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 700;
    font-size: clamp(1.05rem, 3.6vw, 1.45rem); letter-spacing: .03em; text-transform: none;
    margin-bottom: 28px;
    opacity: 0; animation: cinemaLabelIn .5s ease .15s forwards;
}
.cinema-label::before, .cinema-label::after {
    content: ''; width: clamp(28px, 9vw, 64px); height: 1px; background: currentColor; opacity: .55;
}
.cinema-theme-dark .cinema-label { color: #a97c33; }
.cinema-theme-light .cinema-label { color: #d7b062; }
@keyframes cinemaLabelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cinema-logo { max-width: min(78vw, 560px); max-height: 38vh; }
.cinema-logo-wide { max-width: min(88vw, 720px); }
.cinema-logo-title { max-width: 60vw; max-height: 52vh; }
.cinema-theme-dark .cinema-logo { filter: drop-shadow(0 6px 18px rgba(60, 40, 10, .14)); }
.cinema-tagline {
    font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
    font-size: clamp(1.1rem, 4.4vw, 1.7rem); letter-spacing: .01em; line-height: 1.25;
    margin-top: 22px; max-width: 90vw;
    background: linear-gradient(180deg, #c89b4c 0%, #8a6424 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Accueil : logo de la Communauté de la Carte + devise */
.hero-brand { display: inline-flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; }
.hero-logo.hero-logo-carte { height: 250px; max-width: none; filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .55)); }
.hero-tagline { display: flex; flex-direction: column; align-items: center; line-height: 1.15; text-align: center; }
.hero-tagline-kicker {
    font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .95rem; letter-spacing: .32em; text-transform: uppercase;
    color: #f3dfae; text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}
.hero-tagline-main {
    font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: clamp(1.4rem, 4.2vw, 2.2rem);
    background: linear-gradient(180deg, #f6e2ad 0%, #d4a24c 55%, #a97c33 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .55));
}
@media (max-width: 760px) {
    .hero-logo.hero-logo-carte { height: 170px; }
    .hero-tagline-kicker { font-size: .78rem; letter-spacing: .24em; }
}
@media (prefers-reduced-motion: reduce) { .cinema-label { animation: none; opacity: 1; } }
