/* =====================================================================
   Sou des écoles de Lathuile – plateforme bénévoles
   Lisibilité d'abord : texte foncé, grande taille, contrastes francs,
   couleurs reprises de l'arc-en-ciel du logo.
   ===================================================================== */

:root {
    --primary: #4a5fb5;
    --primary-dark: #34479a;
    --primary-light: #eef0fb;
    --primary-line: #c9d0f0;

    --ink: #1c2540;          /* titres */
    --text: #2e3850;         /* texte courant */
    --muted: #5b6578;        /* texte secondaire (contraste AA) */
    --line: #dfe3ec;
    --bg: #f5f6fa;
    --white: #fff;

    --ok: #2e7d32;
    --ok-light: #e6f4e4;
    --ok-line: #a9d6a4;
    --warn: #a35400;
    --warn-light: #fff1e3;
    --warn-line: #f6c08e;
    --danger: #b3261e;
    --danger-light: #fdecea;
    --danger-line: #efb1ab;

    --rainbow: linear-gradient(90deg, #8c9ee0, #8fd88a, #f1e97a, #f6a177, #ef6f93, #6fd3c9);
    --radius: 10px;
    --radius-small: 6px;
    --shadow: 0 1px 2px rgba(28, 37, 64, .06), 0 2px 8px rgba(28, 37, 64, .06);
    --font: "Nunito", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
}
body.admin { font-size: 16px; }

h1, h2, h3 { color: var(--ink); line-height: 1.25; font-weight: 800; }
h1 { font-size: 1.85rem; margin: 0 0 .5rem; }
h2 { font-size: 1.3rem; margin: 0 0 .8rem; }
h3 { font-size: 1.08rem; margin: 0 0 .4rem; }
p { margin: 0 0 .85rem; }
a { color: var(--primary-dark); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
strong { color: var(--ink); font-weight: 700; }
code { background: #e9ecf4; padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.break { word-break: break-all; }

.muted { color: var(--muted); }
.small, small { font-size: .88rem; }
.center { text-align: center; }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.warn { color: var(--danger); }
.intro { font-size: 1.05rem; color: var(--text); }

:focus-visible { outline: 3px solid #8c9ee0; outline-offset: 2px; }

/* ---------- Boutons ---------- */

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 44px;
    border: 0; border-radius: var(--radius-small);
    background: var(--primary); color: #fff;
    cursor: pointer;
    font: 700 1rem/1.2 var(--font);
    padding: .65rem 1.2rem;
    text-decoration: none;
    transition: background .15s, box-shadow .15s;
}
.button:hover { background: var(--primary-dark); color: #fff; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-light { background: #fff; color: var(--primary-dark); box-shadow: inset 0 0 0 2px var(--primary-line); }
.button-light:hover { background: var(--primary-light); color: var(--primary-dark); box-shadow: inset 0 0 0 2px var(--primary); }
.button-danger { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger-line); }
.button-danger:hover { background: var(--danger-light); color: var(--danger); }
.button-large { font-size: 1.1rem; min-height: 52px; padding: .8rem 1.8rem; }
.button-block { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.button-row form { margin: 0; }

.link-button {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--primary-dark); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}
.link-button.danger { color: var(--danger); }

/* ---------- Formulaires ---------- */

label { display: block; color: var(--ink); font-weight: 700; font-size: .98rem; }
label small { color: var(--muted); font-weight: 400; }
label > small:last-child { display: block; margin-top: .25rem; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=date], input[type=datetime-local], input[type=time], input[type=search], textarea, select {
    display: block; width: 100%;
    margin-top: .35rem;
    min-height: 46px;
    padding: .6rem .8rem;
    border: 2px solid #cdd3df; border-radius: var(--radius-small);
    background: #fff; color: var(--ink);
    font: 400 1rem var(--font);
}
input:hover, textarea:hover, select:hover { border-color: #aeb6c7; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 95, 181, .2); }
input:disabled { background: #f1f3f7; color: var(--muted); }
textarea { resize: vertical; min-height: auto; }

.checkbox { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; margin: 1rem 0 0; color: var(--text); }
.checkbox input { margin-top: .2rem; width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--primary); }

.stack > * + * { margin-top: 1.1rem; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.1rem; margin-bottom: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.narrow { max-width: 640px; }
.form-actions { display: flex; gap: 1rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Blocs ---------- */

.page { max-width: 880px; margin: 0 auto; padding: 2rem 1.1rem 3rem; }
.page-admin { max-width: 1200px; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.3rem;
}
.card > :last-child { margin-bottom: 0; }
details.card > summary { cursor: pointer; color: var(--ink); font-weight: 700; }
details.card[open] > summary { margin-bottom: 1rem; }

.alert { border-radius: var(--radius-small); padding: .9rem 1.1rem; margin: 0 0 1.3rem; border: 1px solid; font-weight: 600; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert a { color: inherit; }
.alert-success { background: var(--ok-light); border-color: var(--ok-line); color: #1d5a21; }
.alert-error { background: var(--danger-light); border-color: var(--danger-line); color: #8a1c16; }
.alert-info { background: var(--warn-light); border-color: var(--warn-line); color: #7a3f00; }

.badge {
    display: inline-block; vertical-align: middle;
    background: #e9ecf3; color: var(--ink);
    border-radius: 99px; font-size: .8rem; font-weight: 700; padding: .2rem .7rem; line-height: 1.4;
}
.badge-success { background: var(--ok-light); color: #1d5a21; }
.badge-warning { background: var(--warn-light); color: #7a3f00; }
.badge-danger { background: var(--danger-light); color: #8a1c16; }
.badge-info { background: var(--primary-light); color: var(--primary-dark); }
.badge-muted { background: #eceef3; color: var(--muted); }

/* ---------- Tableaux ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
thead th { border-bottom: 2px solid var(--line); }
tbody tr:hover td { background: #fafbfe; }
.list-table tr.is-muted td { color: #9aa1af; }
.actions { white-space: nowrap; text-align: right; }
.actions > * { margin-left: .8rem; display: inline-block; }
.actions form { margin: 0; }

/* ---------- En-tête public : fond blanc, logo, arc-en-ciel ---------- */

.hero { background: #fff; position: relative; border-bottom: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 6px; background: var(--rainbow); }
.hero-inner { max-width: 880px; margin: 0 auto; padding: 1.2rem 1.1rem 1.5rem; display: flex; align-items: center; gap: 1.3rem; }
.hero-logo { flex: none; }
.hero-logo img { display: block; width: 104px; height: 104px; object-fit: contain; }
.hero-badge { margin: 0; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--primary); }
.hero-title { margin: .1rem 0 0; font-size: 1.9rem; font-weight: 800; line-height: 1.15; color: var(--ink); }
.hero-subtitle { margin: .3rem 0 0; color: var(--muted); font-size: 1.02rem; }

.site-footer { text-align: center; font-size: .92rem; color: var(--muted); padding: 0 1rem 2.5rem; }
.site-footer a { color: var(--muted); }

/* ---------- Connexion ---------- */

body.auth { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 5rem 1rem 2rem; }
body.auth::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 6px; background: var(--rainbow); }
.auth-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4.4rem 2rem 2rem; width: 100%; max-width: 420px; position: relative; }
.auth-logo { position: absolute; top: -56px; left: 50%; transform: translateX(-50%); width: 112px; height: 112px; object-fit: contain; background: #fff; border-radius: 50%; padding: 6px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-box h1 { text-align: center; margin-bottom: .2rem; }
.auth-box > .muted { text-align: center; margin-bottom: 1.4rem; }

/* ---------- Administration : barre du haut ---------- */

.topbar {
    background: #fff; position: relative;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: .55rem 1.3rem; border-bottom: 1px solid var(--line);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--rainbow); }
.topbar-brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.topbar-brand:hover { color: var(--ink); }
.topbar-brand img { width: 44px; height: 44px; object-fit: contain; }
.topbar-brand small { display: block; font-weight: 600; color: var(--muted); font-size: .8rem; }
.topbar-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; margin-left: auto; }
.topbar-nav a { color: var(--text); text-decoration: none; padding: .5rem .85rem; border-radius: var(--radius-small); font-weight: 700; }
.topbar-nav a:hover { background: var(--bg); color: var(--ink); }
.topbar-nav a.is-active { background: var(--primary-light); color: var(--primary-dark); }
.topbar-nav .logout { margin: 0 0 0 .6rem; padding-left: .8rem; border-left: 1px solid var(--line); }
.topbar-nav .link-button { color: var(--muted); font-size: .88rem; font-weight: 600; text-decoration: none; }
.topbar-nav .link-button:hover { color: var(--danger); }
.menu-toggle { display: none; margin-left: auto; background: var(--primary-light); color: var(--primary-dark); border: 0; border-radius: var(--radius-small); padding: .55rem .9rem; font: 700 .95rem var(--font); cursor: pointer; }

.page-head, .section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.page-head h1, .section-head h2 { margin: 0; }
.breadcrumb { margin-bottom: .5rem; font-size: .95rem; font-weight: 700; }
.breadcrumb a { text-decoration: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.3rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; }
.stat span { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); }
.stat strong { display: block; color: var(--ink); font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.stat small { color: var(--muted); }

.copy-line { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.copy-line input { flex: 1 1 280px; margin: 0; background: var(--bg); }

.filter { margin: 0 0 1rem; max-width: 380px; }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.table-tools .filter { margin: 0; flex: 1 1 240px; }

.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li { padding: .35rem 0 .35rem 1.8rem; position: relative; }
.checklist li::before { content: "•"; position: absolute; left: .5rem; color: var(--muted); }
.checklist li.ok::before { content: "✓"; color: var(--ok); left: .3rem; font-weight: 800; }
.checklist li.ko::before { content: "✗"; color: var(--danger); left: .3rem; font-weight: 800; }

.tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--line); margin-bottom: 1.4rem; flex-wrap: wrap; }
.tabs a { padding: .7rem 1.1rem; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--primary-dark); border-bottom-color: var(--primary); }

.status-form { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.status-form select { margin: 0; width: auto; font-weight: 700; }

/* ---------- Jauge de remplissage ---------- */

.gauge { display: flex; align-items: center; gap: .7rem; min-width: 160px; }
.gauge-bar { flex: 1; height: 10px; border-radius: 99px; background: #e4e7ef; overflow: hidden; }
.gauge-bar span { display: block; height: 100%; border-radius: 99px; background: #e5577f; }
.gauge.is-half .gauge-bar span { background: #f08a3c; }
.gauge.is-full .gauge-bar span { background: #3f9b45; }
.gauge-text { font-size: .92rem; color: var(--ink); white-space: nowrap; font-weight: 800; }
.gauge-big .gauge-bar { height: 14px; }
.gauge-big .gauge-text { font-size: 1.05rem; }

/* ---------- Événements (listes) ---------- */

.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.event-card {
    display: grid; grid-template-columns: auto 1fr auto; gap: 1.3rem; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.2rem 1.4rem; text-decoration: none; color: var(--text);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.event-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(74, 95, 181, .15); color: var(--text); }
a.event-card::after { content: "›"; font-size: 2rem; line-height: 1; color: var(--primary); font-weight: 400; }
.event-card h2 { margin: 0 0 .25rem; font-size: 1.35rem; }
.event-card p { margin: 0 0 .45rem; }
.event-card .gauge { max-width: 380px; }
.event-card.is-past { opacity: .6; }
.date-tile {
    width: 80px; text-align: center; border-radius: var(--radius-small); overflow: hidden;
    background: var(--primary-light); color: var(--primary-dark); line-height: 1.1; border: 1px solid var(--primary-line);
}
.date-tile span { display: block; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .3rem 0; }
.date-tile strong { display: block; font-size: 2rem; font-weight: 800; color: var(--ink); padding: .3rem 0 0; }
.date-tile small { display: block; font-size: .78rem; font-weight: 700; padding-bottom: .45rem; text-transform: uppercase; }
.event-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .98rem; color: var(--muted); font-weight: 600; }

/* ---------- Page publique d'un événement ---------- */

.page-wide { max-width: 1180px; }

.event-hero { display: flex; gap: 1.5rem 2.5rem; align-items: center; flex-wrap: wrap; }
.event-hero-main { flex: 1 1 420px; }
.event-hero-main > :last-child { margin-bottom: 0; }
.event-hero h1 { font-size: 2.1rem; }
.event-hero .event-meta { font-size: 1.05rem; margin-bottom: .7rem; color: var(--text); }
.event-hero-score { flex: 0 1 300px; background: var(--bg); border-radius: var(--radius); padding: 1rem 1.2rem; }
.event-hero-score p { margin: .4rem 0 0; }
.event-hero-score .score { margin: 0 0 .5rem; color: var(--ink); font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.event-hero-score .score strong { display: block; font-size: 2.4rem; line-height: 1; color: #d9496f; }

/* Étapes 1 – 2 – 3 */
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; padding: 0; margin: 0 0 1.1rem; color: var(--muted); font-weight: 700; }
.steps li { display: flex; align-items: center; gap: .5rem; }
.steps span, .step-number {
    display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%;
    background: #e4e7ef; color: var(--muted); font-weight: 800; font-size: .95rem; flex: none;
}
.steps .is-current { color: var(--ink); }
.steps .is-current span, .step-number { background: var(--primary); color: #fff; }
.step-number { vertical-align: 2px; margin-right: .2rem; }

/* Tableau des postes : tout l'événement d'un coup d'œil */
/* Grille : les postes dans l'ordre chronologique, de gauche à droite, cartes d'une même ligne à la même hauteur */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.1rem; margin-bottom: 1.3rem; align-items: stretch; }
.post { display: flex; flex-direction: column; }

.post { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-head { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.1rem .6rem; }
.post-title { min-width: 0; flex: 1; }
.post-head h2 { margin: 0 0 .35rem; font-size: 1.25rem; }
/* Infos du poste : horaires, nombre de créneaux, places libres */
.post-facts { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; }
.post-facts span {
    font-size: .82rem; font-weight: 700; color: var(--ink); background: var(--tint);
    border-radius: 99px; padding: .15rem .6rem; white-space: nowrap;
}
.post-facts .post-free { background: #fff; box-shadow: inset 0 0 0 2px var(--c); }
.post-facts .post-free.is-full { background: #eceef3; color: var(--muted); }
.post-emoji {
    flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: var(--tint);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.post-tasks { margin: 0 1.1rem .7rem; font-size: .92rem; color: var(--muted); line-height: 1.45; }
/* Cases de même taille, sur 2 colonnes : les horaires s'alignent d'un poste à l'autre */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding: .3rem 1.1rem 1.1rem; }

.tile {
    min-height: 128px;
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
    padding: .7rem .8rem; margin: 0; border-radius: var(--radius-small);
    background: var(--tint); border: 2px solid transparent; font-weight: 400;
    transition: transform .12s, border-color .12s, box-shadow .12s, background .12s;
}
label.tile { cursor: pointer; }
label.tile:hover { transform: translateY(-2px); border-color: var(--c); box-shadow: 0 4px 12px rgba(28, 37, 64, .1); }
.tile input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile:focus-within { outline: 3px solid #8c9ee0; outline-offset: 2px; }
.tile-time { color: var(--ink); font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.tile-day { font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: -.3rem; }
.tile-state { font-size: .82rem; font-weight: 700; color: var(--text); margin-top: auto; }
.tile-tasks { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.tile.is-last .tile-state { color: #b3261e; }

/* Pastilles : une par place (initiale = déjà pris, pointillés = libre) */
.seats { display: flex; flex-wrap: wrap; gap: .25rem; }
.seat {
    width: 1.55rem; height: 1.55rem; border-radius: 50%; border: 2px dashed var(--c); background: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; color: #fff;
}
.seat.is-taken { border: 2px solid var(--c); background: var(--c); }
/* La place qu'on vient de prendre en cochant */
.seat.is-you { border: 2px solid var(--primary); background: var(--primary); animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.3); } }
.seat-more { font-size: .78rem; font-weight: 800; color: var(--muted); align-self: center; }

/* Coche en coin quand le créneau est choisi */
.tile-tick {
    position: absolute; top: -.55rem; right: -.55rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 800; font-size: .9rem;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    transform: scale(0); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
/* Créneau choisi : la case passe du clair au foncé, dans la couleur du poste */
.tile.is-checked { background: var(--dark); border-color: var(--dark); box-shadow: 0 4px 14px rgba(28, 37, 64, .25); }
label.tile.is-checked:hover { border-color: var(--dark); }
.tile.is-checked .tile-time, .tile.is-checked .tile-day, .tile.is-checked .tile-state, .tile.is-checked .tile-tasks { color: #fff; }
.tile.is-checked .seat { border-color: rgba(255, 255, 255, .7); background: transparent; }
.tile.is-checked .seat.is-taken { border-color: #fff; background: #fff; color: var(--dark); }
.tile.is-checked .seat.is-you { border-color: #ffd54a; background: #ffd54a; color: var(--dark); }
.tile.is-checked .seat-more { color: #fff; }
.tile.is-checked .tile-tick { transform: scale(1); background: #fff; color: var(--dark); }
.tile.is-mine { background: var(--ok-light); border-color: var(--ok); }
.tile.is-mine .tile-tick { transform: scale(1); background: var(--ok); }
.tile.is-mine .tile-state { color: #1d5a21; }
.tile.is-full { background: #f1f2f6; }
.tile.is-full .tile-time, .tile.is-full .tile-state { color: #8a91a1; }
.tile.is-full .seat { opacity: .55; }

/* Panier : les créneaux choisis, toujours visible en bas */
.basket {
    position: sticky; bottom: .8rem; z-index: 5; background: var(--ink); color: #fff;
    border-radius: 14px; padding: .8rem 1rem .8rem 1.3rem; margin-bottom: 1.3rem;
    display: flex; align-items: center; justify-content: space-between; gap: .8rem 1rem; flex-wrap: wrap;
    box-shadow: 0 8px 28px rgba(28, 37, 64, .3);
}
.basket-text { flex: 1 1 260px; min-width: 0; }
.basket strong { color: #fff; font-size: 1.05rem; }
.basket-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.basket-chips:empty { display: none; }
.basket-chip {
    display: inline-flex; align-items: center; gap: .35rem; background: rgba(255, 255, 255, .14); color: #fff;
    border: 0; border-radius: 99px; padding: .25rem .4rem .25rem .7rem; font: 600 .85rem var(--font); cursor: pointer;
}
.basket-chip:hover { background: rgba(255, 255, 255, .25); }
.basket-chip b { display: inline-flex; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: rgba(255, 255, 255, .2); align-items: center; justify-content: center; font-size: .75rem; }
.basket .button { background: #fff; color: var(--ink); }
.basket .button:hover { background: var(--primary-light); }
.basket.is-empty .button { opacity: .5; pointer-events: none; }
.basket.is-bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.025); } }

.signup-card h2 { font-size: 1.4rem; }

/* Confettis (page de remerciement) */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) {
    .tile, .tile-tick, label.tile:hover { transition: none; transform: none; }
    .basket.is-bump, .seat.is-you { animation: none; }
    .confetti { display: none; }
}

.mine-list { list-style: none; margin: 0; padding: 0; }
.mine-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .9rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mine-list li:first-child { border-top: 0; }
.mine-list form { margin: 0; }

/* ---------- Administration d'un événement ---------- */

.admin-activity { padding: 0; overflow: hidden; }
.admin-activity > header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.4rem; background: var(--primary-light); border-bottom: 1px solid var(--primary-line); }
.admin-activity > header h2 { margin: 0; }
.admin-activity > header p { margin: .1rem 0 0; font-size: .9rem; }
.admin-activity > header .gauge { min-width: 200px; }
.admin-activity > .table-wrap { padding: 0 .9rem .4rem; }
.admin-activity table td { vertical-align: middle; }
.admin-activity tbody tr:hover td { background: transparent; }
.admin-activity .actions > * { margin-left: .6rem; }

.people { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.person {
    display: inline-flex; align-items: center; gap: .35rem; background: #fff; color: var(--ink);
    border: 1px solid var(--primary-line); border-radius: 99px; padding: .2rem .25rem .2rem .75rem; font-size: .92rem; font-weight: 600;
}
.person a { color: var(--ink); text-decoration: none; }
.person a:hover { text-decoration: underline; }
.person form { margin: 0; display: inline; }
.person button { border: 0; background: #eceef3; color: var(--muted); border-radius: 50%; width: 1.5rem; height: 1.5rem; line-height: 1; cursor: pointer; font-size: .9rem; padding: 0; }
.person button:hover { background: var(--danger); color: #fff; }
.person-missing { display: inline-block; border: 2px dashed #cdd3df; color: var(--muted); border-radius: 99px; padding: .15rem .75rem; font-size: .88rem; font-weight: 600; }
.inline-add { display: flex; gap: .45rem; align-items: center; margin: .5rem 0 0; flex-wrap: wrap; }
.inline-add select, .inline-add input { margin: 0; width: auto; max-width: 260px; min-height: 38px; padding: .35rem .6rem; font-size: .92rem; }
.inline-add .button { min-height: 38px; padding: .4rem .8rem; font-size: .9rem; }
details.inline { margin-top: .4rem; }
details.inline > summary { cursor: pointer; color: var(--primary-dark); font-size: .92rem; font-weight: 700; list-style: none; display: inline-block; }
details.inline > summary::-webkit-details-marker { display: none; }

.attendance { display: inline-flex; gap: .3rem; margin: 0 0 .3rem; }
.attendance button { border: 2px solid #cdd3df; background: #fff; border-radius: var(--radius-small); padding: .3rem .7rem; cursor: pointer; font: 700 .85rem var(--font); color: var(--text); }
.attendance button.is-on.yes { background: var(--ok-light); border-color: var(--ok); color: #1d5a21; }
.attendance button.is-on.no { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }

/* ---------- Impression ---------- */

body.print { background: #fff; color: #000; font-size: 13px; }
.print-actions { display: flex; gap: .6rem; justify-content: flex-end; padding: 1rem; }
.print-sheet { padding: 0 1rem 1rem; }
.print-sheet h1 { font-size: 1.4rem; margin-bottom: .2rem; }
.print-table th, .print-table td { border: 1px solid #999; padding: .4rem .5rem; color: #000; text-transform: none; letter-spacing: 0; }
.print-table thead th { background: #eef0fb; border-bottom: 2px solid #555; font-size: .85rem; }
.print-table .sign-col { width: 22%; }
.print-activity { page-break-inside: avoid; margin-bottom: 1.2rem; }
.print-activity h2 { margin: .6rem 0 .3rem; color: #000; font-size: 1.1rem; }

@media print {
    .no-print { display: none !important; }
    body.print { font-size: 11px; }
    .print-sheet { padding: 0; }
    .print-table tr { page-break-inside: avoid; }
    .print-table thead { display: table-header-group; }
    a { color: #000; text-decoration: none; }
}

/* ---------- Petits écrans ---------- */

@media (max-width: 760px) {
    body { font-size: 16px; }
    h1, .event-hero h1 { font-size: 1.55rem; }
    .page { padding-top: 1.3rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .span-2 { grid-column: auto; }
    .card { padding: 1.2rem 1.1rem; }
    .hero-inner { gap: .9rem; padding: 1rem 1rem 1.2rem; }
    .hero-logo img { width: 76px; height: 76px; }
    .hero-title { font-size: 1.35rem; }
    .hero-subtitle { font-size: .92rem; }
    .menu-toggle { display: block; }
    .topbar-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .5rem; }
    .topbar-nav.is-open { display: flex; }
    .topbar-nav .logout { margin: .3rem 0 0; padding: .3rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
    .event-card { grid-template-columns: 1fr; gap: .8rem; }
    a.event-card::after { display: none; }
    .date-tile { width: auto; display: inline-flex; align-items: center; gap: .6rem; padding-right: .8rem; justify-self: start; }
    .date-tile span { padding: .45rem .6rem; }
    .date-tile strong { font-size: 1.2rem; padding: 0; }
    .date-tile small { padding: 0; }
    .event-hero-score { flex-basis: 100%; }

    .board { grid-template-columns: 1fr; }
    .steps { gap: .5rem; font-size: .92rem; flex-wrap: nowrap; }
    .steps li:not(.is-current) { font-size: 0; gap: 0; }
    .basket { bottom: .4rem; padding: .7rem 1rem; }
    .basket.is-empty .button { display: none; }
    .actions { white-space: normal; }
    .actions > * { margin: 0 .6rem .3rem 0; }
}
