/* =====================================================================
   ResAmicale — design system du site membres
   Marine + rouge sapeur. Aucune dépendance externe.
   ===================================================================== */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
    --navy-950: #061330;
    --navy-900: #0a1a3d;
    --navy-800: #102654;
    --navy-700: #1a356c;
    --navy-100: #e6ebf4;
    --navy-50:  #f1f4f9;

    --red-700: #a8070f;
    --red-600: #c8101a;
    --red-500: #e0242d;
    --red-100: #fbe3e4;
    --red-50:  #fdf1f1;

    --ink:     #0d1b2e;
    --ink-2:   #33425a;
    --muted:   #64748b;
    --line:    #e2e7ef;
    --line-2:  #cfd7e3;
    --bg:      #f3f5f9;
    --surface: #ffffff;

    --green-700: #166534; --green-100: #dcfce7; --green-600: #16a34a;
    --amber-700: #92400e; --amber-100: #fef3c7; --amber-500: #f59e0b;
    --blue-700:  #1e40af; --blue-100:  #dbeafe;

    --radius: 10px;
    --radius-sm: 7px;
    --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
    --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--red-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; color: var(--ink); }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.ic { width: 18px; height: 18px; flex: none; }
.ic-lg { width: 22px; height: 22px; }
.ic-sm { width: 15px; height: 15px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 860px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Bandeau impersonation ─────────────────────────────────────── */
.imp-bar {
    background: var(--amber-500);
    color: var(--navy-950);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.imp-bar a { color: var(--navy-950); text-decoration: underline; font-weight: 700; }

/* ── En-tête ───────────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--navy-900);
    color: #fff;
    border-top: 4px solid var(--red-600);
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; flex: none; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 8px; background: #fff;
    display: grid; place-items: center; overflow: hidden;
}
.brand-mark img { width: 30px; height: 30px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: .3px; }
.brand-name b { color: #ff4b52; font-weight: 700; }

.main-nav { display: flex; align-items: stretch; gap: 2px; height: 100%; flex: 1; }
.main-nav > a, .main-nav .nav-drop > button {
    display: flex; align-items: center; gap: 8px;
    padding: 0 14px; height: 100%;
    color: rgba(255,255,255,.78); font-weight: 600; font-size: 15px;
    background: none; border: 0; cursor: pointer;
    border-bottom: 3px solid transparent; margin-bottom: -0px;
    text-decoration: none;
}
.main-nav > a:hover, .main-nav .nav-drop > button:hover { color: #fff; text-decoration: none; }
.main-nav > a.is-active, .main-nav .nav-drop.is-active > button { color: #fff; border-bottom-color: var(--red-500); }
.nav-drop { position: relative; display: flex; }
.nav-drop .ic-sm { opacity: .7; }
.drop-menu {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(10, 26, 61, .14);
    padding: 6px; display: none; z-index: 60;
}
.drop-menu.right { left: auto; right: 0; }
.nav-drop.open .drop-menu { display: block; }
.drop-menu a {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px;
    color: var(--ink-2); font-weight: 500; font-size: 15px; text-decoration: none;
}
.drop-menu a:hover { background: var(--navy-50); color: var(--ink); }
.drop-menu a .ic { color: var(--muted); }
.drop-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.drop-menu .danger, .drop-menu .danger .ic { color: var(--red-600); }

.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn-admin-link {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
    border: 1px solid rgba(255,255,255,.25); border-radius: 8px; color: #fff; font-weight: 600; font-size: 14px;
}
.btn-admin-link:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.user-btn {
    display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 8px 0 4px;
    background: none; border: 0; color: #fff; cursor: pointer; border-radius: 8px;
}
.user-btn:hover { background: rgba(255,255,255,.08); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; flex: none;
    background: var(--red-600); color: #fff;
    font-weight: 700; font-size: 13px; letter-spacing: .3px;
}
.user-btn .name { font-weight: 600; font-size: 15px; }

.header-guest { display: flex; gap: 8px; margin-left: auto; }

/* ── Navigation mobile (barre du bas, comme l'application) ─────── */
.tabbar { display: none; }

@media (max-width: 900px) {
    .main-nav, .user-btn .name, .btn-admin-link span { display: none; }
    .site-header .container { gap: 12px; }
    body.has-tabbar { padding-bottom: 72px; }
    .tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        background: var(--surface); border-top: 1px solid var(--line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .tabbar a {
        display: flex; flex-direction: column; align-items: center; gap: 3px;
        font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0;
    }
    .tabbar a .ic { width: 22px; height: 22px; }
    .tabbar a.is-active { color: var(--red-600); }
}

/* ── Titres de page ────────────────────────────────────────────── */
.page-head { padding: 34px 0 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-display); font-weight: 700; font-size: 14px;
    letter-spacing: 1.6px; text-transform: uppercase; color: var(--red-600); margin-bottom: 6px;
}
.page-title { font-family: var(--font-display); font-weight: 700; font-size: 40px; letter-spacing: .2px; text-transform: uppercase; }
.page-sub { color: var(--muted); margin-top: 6px; font-size: 16px; }
@media (max-width: 640px) { .page-title { font-size: 31px; } .page-head { padding: 24px 0 16px; } }

.section-title {
    font-family: var(--font-display); font-weight: 700; font-size: 21px; text-transform: uppercase; letter-spacing: .4px;
    display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
}
.section-title .ic { color: var(--red-600); }

/* ── Cartes ────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 22px; }
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 {
    font-family: var(--font-display); font-weight: 700; font-size: 19px; text-transform: uppercase; letter-spacing: .4px;
    display: flex; align-items: center; gap: 9px;
}
.card-head h2 .ic, .card-head h3 .ic { color: var(--red-600); }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--navy-50); border-radius: 0 0 var(--radius) var(--radius); }
.link-more { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-aside { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
@media (max-width: 1080px) { .grid-aside { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* ── Boutons ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
    font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none !important; white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--red-600); color: #fff; }
.btn-primary:hover { background: var(--red-700); }
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover { background: var(--navy-800); }
.btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--navy-50); }
.btn-danger-ghost { background: transparent; color: var(--red-600); border-color: var(--red-100); }
.btn-danger-ghost:hover { background: var(--red-50); }
.btn-on-dark { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-on-dark:hover { background: rgba(255,255,255,.18); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 7px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Formulaires ───────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
    width: 100%; max-width: 100%; height: 44px; padding: 0 12px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
    font-size: 16px; color: var(--ink); outline: none;
}
.field textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
    border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(26, 53, 108, .14);
}
.field input[type=date], .field input[type=time] { -webkit-appearance: none; appearance: none; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row .field { min-width: 0; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red-600); }

/* ── Badges et pastilles ───────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    height: 24px; padding: 0 9px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; white-space: nowrap;
    background: var(--navy-50); color: var(--ink-2);
}
.badge .ic { width: 13px; height: 13px; }
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-amber { background: var(--amber-100); color: var(--amber-700); }
.badge-red   { background: var(--red-100);   color: var(--red-700); }
.badge-blue  { background: var(--blue-100);  color: var(--blue-700); }
.badge-navy  { background: var(--navy-900);  color: #fff; }

/* ── Alertes ───────────────────────────────────────────────────── */
.notice {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line);
    background: var(--surface); margin-bottom: 14px;
}
.notice .ic { margin-top: 2px; }
.notice strong { display: block; }
.notice-info    { border-left: 4px solid var(--navy-700); }
.notice-info .ic { color: var(--navy-700); }
.notice-success { border-left: 4px solid var(--green-600); }
.notice-success .ic { color: var(--green-600); }
.notice-warning { border-left: 4px solid var(--amber-500); background: #fffbeb; }
.notice-warning .ic { color: var(--amber-700); }
.notice-danger  { border-left: 4px solid var(--red-600); background: var(--red-50); }
.notice-danger .ic { color: var(--red-600); }

/* ── Toasts ────────────────────────────────────────────────────── */
.toasts { position: fixed; top: 82px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 380px;
    padding: 13px 14px; border-radius: var(--radius); background: var(--navy-900); color: #fff;
    font-weight: 500; font-size: 15px; box-shadow: 0 10px 30px rgba(6,19,48,.25);
    animation: toast-in .25s ease-out;
}
.toast .ic { color: #4ade80; }
.toast.error .ic { color: #ff6b70; }
.toast button { margin-left: auto; background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer; padding: 2px; display: flex; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .toasts { left: 12px; right: 12px; top: 76px; } .toast { min-width: 0; max-width: none; } }

/* ── Listes ────────────────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; }
.list-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; color: var(--ink); }
.list-meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.list-meta span { display: inline-flex; align-items: center; gap: 5px; }
.list-meta .ic { width: 14px; height: 14px; }
.list-side { flex: none; display: flex; align-items: center; gap: 8px; }

.date-tile {
    width: 50px; flex: none; text-align: center; border-radius: 8px;
    border: 1px solid var(--line); overflow: hidden; background: var(--surface);
}
.date-tile .m { background: var(--red-600); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 2px 0; }
.date-tile .d { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.25; padding: 2px 0; }

.empty {
    text-align: center; color: var(--muted); padding: 34px 20px;
}
.empty .ic { width: 30px; height: 30px; color: var(--line-2); margin: 0 auto 8px; display: block; }

.scroll-y { max-height: 440px; overflow-y: auto; }

/* ── Tableau de bord : bandeau ─────────────────────────────────── */
.hero-band { background: var(--navy-900); color: #fff; position: relative; overflow: hidden; }
.hero-band .container { padding-top: 30px; padding-bottom: 34px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero-band .eyebrow { color: #ff6b70; }
.hero-band h1 { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 42px; text-transform: uppercase; }
.hero-band p { color: rgba(255,255,255,.72); margin: 6px 0 0; }
.kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi {
    min-width: 132px; padding: 12px 16px; border-radius: var(--radius);
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
}
.kpi .v { font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1; }
.kpi .l { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 4px; }
.kpi.is-alert { border-color: #ff6b70; background: rgba(224, 36, 45, .18); }
@media (max-width: 640px) {
    .hero-band h1 { font-size: 32px; }
    .kpis { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
    .kpi { min-width: 0; padding: 10px 12px; }
    .kpi .v { font-size: 26px; }
}

/* ── Calendrier (même format : grille du mois, réservations dans les cases) ── */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cal-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; text-transform: uppercase; letter-spacing: .4px; text-align: center; }
.cal-title small { display: block; font-family: var(--font); font-weight: 500; font-size: 13px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 12px; }
.cal-dow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); text-align: center; padding: 2px 0 4px; }
.calendar-day {
    min-height: 112px; min-width: 0; padding: 6px; border-radius: 8px;
    background: var(--navy-50); border: 1px solid transparent; position: relative;
}
.calendar-day.is-empty { background: transparent; }
.calendar-day.is-weekend { background: #eceff5; }
.calendar-day.is-past { opacity: .62; }
.calendar-day.is-today { background: #fff; border-color: var(--red-600); box-shadow: inset 0 0 0 1px var(--red-600); opacity: 1; }
.day-num { font-weight: 700; font-size: 14px; color: var(--ink-2); display: block; margin-bottom: 4px; }
.calendar-day.is-today .day-num { color: var(--red-600); }
.calendar-event {
    display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
    margin-top: 3px; padding: 4px 6px; border-radius: 5px;
    color: #fff; font-size: 12px; line-height: 1.25; overflow: hidden;
}
.calendar-event:hover { filter: brightness(1.08); }
.calendar-event .event-title { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event .event-meta { display: block; font-size: 11px; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event.is-event { color: #fff; }
.calendar-event.is-block {
    background: repeating-linear-gradient(-45deg, #fff1f1 0 6px, #fde0e1 6px 12px);
    color: var(--red-700); border: 1px solid #f6b8bb;
}
.calendar-event.is-block.amicale { background: repeating-linear-gradient(-45deg, #fffbeb 0 6px, #fdefc4 6px 12px); color: var(--amber-700); border-color: #f4d58a; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 0 16px 14px; font-size: 13px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
@media (max-width: 760px) {
    .calendar { gap: 3px; padding: 8px; }
    .calendar-day { min-height: 64px; padding: 3px; border-radius: 6px; }
    .day-num { font-size: 12px; margin-bottom: 2px; }
    .calendar-event { padding: 2px 3px; font-size: 9.5px; margin-top: 2px; border-radius: 3px; }
    .calendar-event .event-meta { display: none; }
    .cal-dow { font-size: 10px; letter-spacing: 0; }
}

/* ── Modale ────────────────────────────────────────────────────── */
.modal {
    position: fixed; inset: 0; z-index: 150; display: none;
    background: rgba(6, 19, 48, .55); padding: 20px; align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 12px; width: 100%; max-width: 440px; overflow: hidden; animation: toast-in .18s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--font-display); font-weight: 700; font-size: 21px; text-transform: uppercase; }
.modal-body { padding: 18px 20px 20px; }
.modal-close { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; display: flex; border-radius: 6px; }
.modal-close:hover { background: var(--navy-50); color: var(--ink); }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 9px 12px; margin: 0; font-size: 15px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; }
.color-strip { height: 6px; }

/* ── Réservation : sélecteur de matériel ───────────────────────── */
.truck-note {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--navy-50); border-radius: 8px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); margin-bottom: 14px;
}
.truck-note .ic { color: var(--navy-700); margin-top: 2px; }

/* ── Mes réservations ──────────────────────────────────────────── */
.resa-item { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.resa-item:last-child { border-bottom: 0; }
.resa-swatch { width: 4px; border-radius: 4px; flex: none; background: var(--line-2); }
.resa-item .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ── Événements ────────────────────────────────────────────────── */
.event-card { display: flex; flex-direction: column; overflow: hidden; }
.event-top { display: flex; gap: 16px; padding: 20px; align-items: flex-start; }
.event-top .date-tile { width: 62px; }
.event-top .date-tile .d { font-size: 28px; }
.event-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 23px; text-transform: uppercase; letter-spacing: .2px; }
.event-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; margin-top: 6px; }
.event-facts span { display: inline-flex; align-items: center; gap: 6px; }
.event-facts .ic { width: 15px; height: 15px; }
.event-desc { padding: 0 20px 14px; color: var(--ink-2); }
.event-instr { margin: 0 20px 16px; padding: 10px 12px; background: var(--navy-50); border-radius: 8px; font-size: 14px; color: var(--ink-2); display: flex; gap: 9px; }
.event-instr .ic { color: var(--navy-700); margin-top: 2px; }
.capacity { padding: 0 20px 16px; }
.capacity-bar { height: 6px; border-radius: 6px; background: var(--navy-100); overflow: hidden; }
.capacity-bar i { display: block; height: 100%; background: var(--navy-700); }
.capacity-bar.full i { background: var(--red-600); }
.capacity-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.event-action { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--navy-50); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.event-action form { display: flex; gap: 10px; align-items: center; width: 100%; flex-wrap: wrap; }
.event-action .qty { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.event-action .qty input { width: 76px; height: 42px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; font-size: 16px; }
.registered { display: flex; align-items: center; gap: 10px; color: var(--green-700); font-weight: 600; }
.registered .ic { color: var(--green-600); }

/* ── Sondages ──────────────────────────────────────────────────── */
.poll { padding: 22px; }
.poll-q { font-family: var(--font-display); font-weight: 700; font-size: 23px; text-transform: uppercase; letter-spacing: .2px; margin-bottom: 4px; }
.poll-meta { color: var(--muted); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.poll-meta span { display: inline-flex; gap: 6px; align-items: center; }
.poll-option {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 13px 14px; margin-bottom: 8px;
    border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface);
    cursor: pointer; font-weight: 600; text-align: left;
}
.poll-option:hover { border-color: var(--navy-700); }
.poll-option input { width: 18px; height: 18px; accent-color: var(--red-600); margin: 0; }
.poll-option:has(input:checked) { border-color: var(--red-600); background: var(--red-50); }
.result { position: relative; margin-bottom: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.result-fill { position: absolute; inset: 0 auto 0 0; background: var(--navy-100); }
.result.is-mine { border-color: var(--red-600); }
.result.is-mine .result-fill { background: var(--red-100); }
.result.is-top .result-fill { background: #d5ddeb; }
.result.is-mine.is-top .result-fill { background: #f7cfd1; }
.result-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 600; }
.result-row .pct { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.result-row .n { color: var(--muted); font-weight: 500; font-size: 13px; }
.result-row .ic { color: var(--red-600); }

/* ── Personnes (bureau, commissions) ───────────────────────────── */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.person .avatar { width: 46px; height: 46px; font-size: 16px; background: var(--navy-800); }
.person.is-lead .avatar { background: var(--red-600); }
.person img.avatar { object-fit: cover; }
.person-name { font-weight: 700; }
.person-role { color: var(--muted); font-size: 14px; }

/* ── Documents ─────────────────────────────────────────────────── */
.doc-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-icon { width: 42px; height: 42px; border-radius: 8px; background: var(--red-50); color: var(--red-600); display: grid; place-items: center; flex: none; }

/* ── Paiement / camion ─────────────────────────────────────────── */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.figure { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--navy-50); }
.figure .l { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.figure .v { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.1; margin-top: 4px; }
.figure.accent { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.figure.accent .l { color: rgba(255,255,255,.7); }
.copy-field { display: flex; align-items: center; gap: 8px; border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; background: var(--surface); margin-bottom: 12px; word-break: break-all; }
.copy-field button { margin-left: auto; flex: none; font-family: var(--font); }

/* ── Onglets / filtres ─────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px;
    color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none;
}
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--red-600); }
.tabs .count { background: var(--navy-50); color: var(--ink-2); border-radius: 999px; font-size: 12px; padding: 1px 7px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none !important; }
.chip.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* ── Tableaux simples ──────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--navy-50); }
.table td { padding: 13px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Pages d'authentification ──────────────────────────────────── */
.auth {
    flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; min-height: calc(100vh - var(--header-h) - 4px);
}
.auth-side {
    background: var(--navy-900); color: #fff; padding: 56px; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
}
.auth-side h2 { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 50px; line-height: 1; text-transform: uppercase; max-width: 520px; }
.auth-side h2 em { font-style: normal; color: #ff4b52; }
.auth-side p { color: rgba(255,255,255,.72); font-size: 18px; max-width: 460px; margin-top: 18px; }
.auth-points { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.88); font-weight: 500; }
.auth-points .ic { color: #ff6b70; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-family: var(--font-display); font-weight: 700; font-size: 38px; text-transform: uppercase; margin-bottom: 6px; }
.auth-card .page-sub { margin-bottom: 26px; }
.auth-alt { margin-top: 20px; color: var(--muted); font-size: 15px; text-align: center; }
details.forgot { margin-top: 14px; }
details.forgot summary { cursor: pointer; color: var(--red-600); font-weight: 600; font-size: 14px; list-style: none; }
details.forgot summary::-webkit-details-marker { display: none; }
details.forgot[open] summary { margin-bottom: 12px; }
@media (max-width: 900px) {
    .auth { grid-template-columns: 1fr; }
    .auth-side { padding: 34px 22px 40px; }
    .auth-side h2 { font-size: 36px; }
    .auth-side p { font-size: 16px; }
    .auth-points { display: none; }
}

/* ── Accueil public ────────────────────────────────────────────── */
.landing-hero { background: var(--navy-900); color: #fff; position: relative; overflow: hidden; }
.landing-hero .container { padding-top: 72px; padding-bottom: 84px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.landing-hero h1 { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 64px; line-height: .98; text-transform: uppercase; }
.landing-hero h1 em { font-style: normal; color: #ff4b52; }
.landing-hero p { color: rgba(255,255,255,.75); font-size: 19px; margin: 22px 0 30px; max-width: 520px; }
.preview {
    background: var(--surface); border-radius: 12px; color: var(--ink); overflow: hidden;
    border: 1px solid rgba(255,255,255,.2);
}
.preview-head { background: var(--navy-50); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; text-transform: uppercase; }
.preview-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 10px; }
.preview-grid div { height: 44px; border-radius: 5px; background: var(--navy-50); position: relative; }
.preview-grid div i { position: absolute; left: 3px; right: 3px; bottom: 4px; height: 9px; border-radius: 2px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 56px 0; }
.feature { padding: 22px; }
.feature .ic { width: 28px; height: 28px; color: var(--red-600); margin-bottom: 14px; }
.feature h3 { font-family: var(--font-display); font-weight: 700; font-size: 21px; text-transform: uppercase; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15px; }
.store-row { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 980px) {
    .landing-hero .container { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 56px; }
    .landing-hero h1 { font-size: 44px; }
    .features { grid-template-columns: 1fr 1fr; padding: 32px 0; }
    .preview { display: none; }
}
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ── Aide ──────────────────────────────────────────────────────── */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before {
    content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 50%;
    background: var(--navy-900); color: #fff; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.faq details { border-bottom: 1px solid var(--line); padding: 14px 20px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .15s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* ── Pied de page ──────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 48px; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.made-by { display: inline-flex; align-items: center; gap: 8px; }
.made-by img { height: 16px; width: auto; }

.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }
.hide-mobile { }
@media (max-width: 640px) { .hide-mobile { display: none !important; } }

@media print {
    .site-header, .tabbar, .site-footer, .toasts, .btn, .imp-bar { display: none !important; }
    body { background: #fff; }
    .card { border-color: #bbb; }
}
