/* =====================================================================
   BreizhCamp 2026 × ASI — refresh visuel
   Branding ASI : rouge de marque (#D42F34, comme le logo & les assets
   efficy/retail/km) en accent, encre sombre, surfaces blanches.
   Accent or pour le clin d'œil "glitch / reveal". Mobile-first.
   Mêmes noms de classes que les templates (swap CSS pur).
   ===================================================================== */

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

:root {
    --brand: #d42f34;          /* rouge ASI — couleur du logo */
    --brand-deep: #a8242a;
    --brand-light: #fdecec;
    --accent: #e0a32a;         /* or chaud — accents "reveal", réservé */

    --green: #16a34a;
    --orange: #f59e0b;
    --red: #dc2626;

    --ink: #14181f;            /* texte principal, encre sombre */
    --muted: #5b6471;
    --line: #e6e8ec;
    --surface: #ffffff;
    --bg: #f6f7f9;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(20,24,31,.06), 0 8px 24px -12px rgba(20,24,31,.18);
    --shadow-lg: 0 12px 40px -16px rgba(212,47,52,.45);
    --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, monospace;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background:
        radial-gradient(1100px 520px at 50% -10%, var(--brand-light), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== Layout ===== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 32px 16px 40px;
}

/* ===== Header ===== */
.site-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo {
    width: 72px;
    height: auto;
    margin-bottom: 16px;
}

.site-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
    margin-bottom: 6px;
}

.tagline {
    color: var(--muted);
    font-size: .95rem;
}
.tagline span { color: var(--brand); font-weight: 600; }

/* ===== Game zone ===== */
.game-section {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin-bottom: 22px;
    overflow: hidden;
}
/* fil "glitch / reveal" en haut de la carte */
.game-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand));
    background-size: 200% 100%;
    animation: glitch-line 6s linear infinite;
}
@keyframes glitch-line { to { background-position: 200% 0; } }

/* ===== Letter boxes ===== */
.word-section { margin-bottom: 24px; }

.word-label {
    display: block;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: center;
    color: var(--ink);
}

.letter-boxes {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.letter {
    width: 52px;
    height: 62px;
    font-family: var(--mono);
    font-size: 1.7rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: var(--ink);
    background: #fbfafa;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .18s, box-shadow .18s, transform .18s, background .18s;
    caret-color: transparent;
}
.letter:hover { border-color: #d9c0c0; }
.letter:focus {
    border-color: var(--brand);
    background: #fff;
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px rgba(212,47,52,.16);
}
/* case remplie */
.letter:not(:placeholder-shown) {
    border-color: var(--brand);
    background: var(--brand-light);
}

/* ===== Form groups ===== */
.form-group { margin-bottom: 18px; }

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

.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--ink);
    background: #fbfafa;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.form-group input:focus {
    border-color: var(--brand);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(212,47,52,.12);
}

.checkbox-group { margin-bottom: 14px; }
.checkbox-group .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .88rem;
    color: var(--muted);
    cursor: pointer;
}
.checkbox-label a { color: var(--brand); }

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
    cursor: pointer;
}

.required { color: var(--red); }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 26px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    letter-spacing: .01em;
    transition: transform .16s, box-shadow .16s, opacity .16s, filter .16s;
}

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

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
    background: #fff;
    color: var(--brand-deep);
    border: 1px solid var(--line);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); }

.btn-warning {
    background: linear-gradient(135deg, var(--orange), #d97706);
    color: #fff;
}
.btn-warning:hover:not(:disabled) { transform: translateY(-2px); }

/* ===== Alerts ===== */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: .9rem;
    border: 1px solid transparent;
    border-left-width: 3px;
}

.alert-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-info    { background: var(--brand-light); color: var(--brand-deep); border-color: #f6d2d3; }

/* ===== Confirmation ===== */
.confirmation-block { text-align: center; padding: 12px 8px; }

.confirmation-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--green), #15803d);
    color: #fff;
    border-radius: 50%;
    font-size: 2.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 10px 30px -10px rgba(22,163,74,.6);
    animation: pop .4s cubic-bezier(.18,.89,.32,1.28);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.confirmation-block h2 { color: #15803d; margin-bottom: 12px; }
.confirmation-text { font-size: 1.02rem; margin-bottom: 8px; }
.confirmation-subtext { color: var(--muted); font-size: .9rem; }

/* ===== Closed ===== */
.closed-block { text-align: center; padding: 12px 8px; }
.closed-icon { font-size: 3rem; margin-bottom: 12px; }
.closed-block h2 { margin-bottom: 12px; color: var(--ink); }
.closed-subtext { color: var(--muted); font-size: .9rem; margin-top: 12px; }

/* ===== Footer ===== */
.site-footer { text-align: center; font-size: .8rem; color: var(--muted); }
.site-footer nav { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }

/* ===== Legal pages ===== */
.legal-page h1 { font-size: 1.5rem; margin: 16px 0 24px; color: var(--ink); }
.legal-page h2 { font-size: 1.1rem; margin: 20px 0 8px; color: var(--brand); }
.legal-page p { margin-bottom: 12px; }
.legal-page a { color: var(--brand); }
.back-link { color: var(--brand); text-decoration: none; font-size: .9rem; font-weight: 600; }
.back-link:hover { text-decoration: underline; }

/* ===== Admin ===== */
.admin-body { background: var(--bg); }

.admin-login {
    max-width: 360px;
    margin: 80px auto;
    background: var(--surface);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.admin-login h1 { margin-bottom: 24px; font-size: 1.4rem; color: var(--ink); }

.admin-container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-header h1 { font-size: 1.35rem; color: var(--ink); }

.day-filter {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.day-filter a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    text-decoration: none;
    color: var(--ink);
    font-size: .9rem;
    background: #fff;
    transition: border-color .15s, background .15s, color .15s;
}
.day-filter a:hover { border-color: var(--brand); }
.day-filter a.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.stats-row { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    text-align: center;
    flex: 1;
    min-width: 84px;
    box-shadow: var(--shadow);
}
.stat-card.highlight {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
    border-color: transparent;
}
.stat-number { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.stat-label { font-size: .78rem; opacity: .72; text-transform: uppercase; letter-spacing: .04em; }

.admin-actions { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }

.table-wrapper { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

.participations-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    overflow: hidden;
    font-size: .9rem;
}
.participations-table th {
    background: var(--ink);
    color: #fff;
    padding: 11px 12px;
    text-align: left;
    white-space: nowrap;
    font-weight: 600;
}
.participations-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.participations-table tbody tr:hover { background: #fbfafa; }
.participations-table .row-winner { background: #fffbeb; }
.participations-table .row-valid { background: #f0fdf4; }

.badge { padding: 2px 9px; border-radius: 12px; font-size: .78rem; font-weight: 700; }
.badge-valide   { background: #dcfce7; color: #166534; }
.badge-gagnante { background: #fef3c7; color: #92400e; }
.badge-refusee  { background: #fee2e2; color: #991b1b; }

.badge-etat-open        { background: #dcfce7; color: #166534; }
.badge-etat-closed      { background: #fee2e2; color: #991b1b; }
.badge-etat-winned      { background: #fef3c7; color: #92400e; }
.badge-etat-mailed      { background: #e0e7ff; color: #3730a3; }
.badge-etat-mail_failed { background: #fecaca; color: #7f1d1d; }

/* ===== Accessibilité : couper les animations si demandé ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
