/* =========================================================
   KAIROS — Design sobre, minimaliste & moderne
   ========================================================= */
:root {
    /* Palette — encre + neutres chauds + accent ambre subtil */
    --ink:            #0a0a0a;
    --ink-2:          #171717;
    --text:           #111111;
    --text-soft:      #404040;
    --muted:          #737373;
    --muted-2:        #a3a3a3;
    --border:         #e7e5e4;
    --border-strong:  #d6d3d1;
    --bg:             #fafaf9;
    --bg-subtle:      #f5f5f4;
    --card:           #ffffff;

    /* Accent chaud très contenu */
    --accent:         #c2410c;
    --accent-soft:    #fef3ec;
    --accent-border:  #fed7aa;

    /* États */
    --success:        #166534;
    --success-bg:     #f0fdf4;
    --success-border: #bbf7d0;
    --warn:           #854d0e;
    --warn-bg:        #fefce8;
    --warn-border:    #fde68a;
    --danger:         #991b1b;
    --danger-bg:      #fef2f2;
    --danger-border:  #fecaca;
    --info-bg:        #f5f5f4;

    /* Rayons */
    --radius-xs:      4px;
    --radius-sm:      8px;
    --radius:         12px;
    --radius-lg:      18px;
    --radius-xl:      24px;

    /* Ombres — discrètes, juste la profondeur */
    --shadow-sm:      0 1px 2px rgba(10, 10, 10, 0.04);
    --shadow:         0 1px 3px rgba(10, 10, 10, 0.06), 0 1px 2px rgba(10, 10, 10, 0.04);
    --shadow-lg:      0 8px 24px -8px rgba(10, 10, 10, 0.12), 0 2px 6px -2px rgba(10, 10, 10, 0.06);

    --focus-ring:     0 0 0 3px rgba(10, 10, 10, 0.10);

    /* Typographie */
    --font-sans:      "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono:      ui-monospace, "SF Mono", Menlo, Consolas, "Cascadia Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "cv11";
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--ink);
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color .15s, opacity .15s;
}
a:hover { opacity: .7; text-decoration: underline; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 {
    margin: 0 0 12px;
    line-height: 1.2;
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.022em;
}
h1 { font-size: 32px; letter-spacing: -0.03em; }
h2 { font-size: 21px; margin-top: 4px; }
h3 { font-size: 17px; }
p  { margin: 0 0 12px; color: var(--text-soft); }

.muted { color: var(--muted); }
.mono  { font-family: var(--font-mono); font-size: 13px; }
code   { background: var(--bg-subtle); padding: 2px 6px; border-radius: var(--radius-xs); font-size: 13px; color: var(--ink); font-family: var(--font-mono); }

/* ---------- Header / Footer --------------------------------------------- */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px;
    gap: 16px;
    max-width: 1040px;
    margin: 0 auto;
}
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: 18px; color: var(--ink);
    letter-spacing: -0.02em;
}
.logo:hover { opacity: 1; text-decoration: none; }
.logo-img   { display: block; height: 32px; width: auto; }
.logo-img--mark { height: 32px; width: 32px; border-radius: 8px; }
.logo-img--long { display: none; } /* long logo reservé au footer par défaut */

.site-nav {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

main.container { padding-top: 48px; padding-bottom: 72px; flex: 1; }

.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13.5px;
    margin-top: auto;
}
.footer-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 44px 28px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.footer-brand .footer-logo {
    display: inline-block;
    margin-bottom: 12px;
}
.footer-brand .footer-logo img { display: block; height: 40px; width: auto; }
.footer-tagline { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 320px; line-height: 1.6; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--text-soft); font-size: 13.5px; }
.footer-nav a:hover { color: var(--ink); text-decoration: none; opacity: 1; }
.footer-bottom {
    max-width: 1040px;
    margin: 0 auto;
    padding: 18px 28px 24px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.02em;
}

/* ---------- Hero + features --------------------------------------------- */
.hero {
    text-align: center;
    padding: 80px 16px 56px;
    max-width: 760px;
    margin: 0 auto;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-soft);
    letter-spacing: 0.01em;
    margin-bottom: 20px;
}
.hero-eyebrow::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.hero h1 {
    font-size: 52px;
    color: var(--ink);
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 22px;
    font-weight: 600;
}
.hero .lead {
    font-size: 18px;
    color: var(--text-soft);
    max-width: 580px;
    margin: 0 auto 32px;
    line-height: 1.55;
}
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 24px;
}
.feature {
    background: var(--card);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--ink);
    font-size: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.feature h3 { margin-bottom: 6px; font-size: 16px; }
.feature p  { margin: 0; font-size: 14.5px; line-height: 1.55; }

/* ---------- Card --------------------------------------------------------- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.card-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.head-badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
    text-decoration: none;
    line-height: 1.2;
    letter-spacing: -0.005em;
    -webkit-appearance: none;
    font-family: inherit;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--ink); color: #ffffff; border-color: var(--ink); }
.btn-primary:hover { background: #262626; border-color: #262626; text-decoration: none; opacity: 1; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-subtle); border-color: var(--muted-2); text-decoration: none; opacity: 1; }

.btn-danger { background: #ffffff; color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); text-decoration: none; opacity: 1; }

.btn-accent { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.btn-accent:hover { background: #9a3412; border-color: #9a3412; text-decoration: none; opacity: 1; }

.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ---------- Forms ------------------------------------------------------- */
.form .field { margin-bottom: 22px; }
.form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 13.5px;
    color: var(--ink);
    letter-spacing: -0.005em;
}
.form input[type=text],
.form input[type=email],
.form input[type=password],
.form input[type=date],
.form input[type=time],
.form input[type=datetime-local],
.form textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    font-size: 14.5px;
    background: #ffffff;
    color: var(--ink);
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form input:hover, .form textarea:hover { border-color: var(--muted-2); }
.form input:focus, .form textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: var(--focus-ring);
}
.form textarea { resize: vertical; min-height: 88px; line-height: 1.55; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ---------- Sélecteurs heure/minute (15 min) --------------------------- */
.form select,
.builder-row select,
.datetime-group select,
.time-select select {
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    font-size: 14.5px;
    background: #ffffff;
    color: var(--ink);
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    min-width: 64px;
}
.form select:hover,
.builder-row select:hover,
.datetime-group select:hover,
.time-select select:hover { border-color: var(--muted-2); }
.form select:focus,
.builder-row select:focus,
.datetime-group select:focus,
.time-select select:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: var(--focus-ring);
}

.time-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}
.time-select select { flex: 1 1 auto; }
.time-sep {
    color: var(--muted);
    font-weight: 500;
    padding: 0 2px;
}

.datetime-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.datetime-group input[type=date] {
    flex: 1 1 180px;
    min-width: 160px;
}
.datetime-group select { flex: 0 1 84px; }
.datetime-group.has-error input,
.datetime-group.has-error select {
    border-color: var(--danger);
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 28px;
}
.error { color: var(--danger); font-size: 13px; margin-top: 6px; display: block; }

/* ---------- Mode switch (réunion / séjour) ------------------------------ */
.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.mode-option {
    display: flex;
    gap: 12px;
    padding: 18px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    align-items: center;
    background: #ffffff;
}
.mode-option:hover { border-color: var(--ink); }
.mode-option input { display: none; }
.mode-option.is-active {
    border-color: var(--ink);
    background: var(--bg-subtle);
    box-shadow: inset 0 0 0 1px var(--ink);
}
.mode-option .mode-icon { font-size: 22px; flex-shrink: 0; }
.mode-option .mode-label { display: flex; flex-direction: column; gap: 2px; }
.mode-option .mode-label strong { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.mode-option .mode-label small { color: var(--muted); font-size: 12.5px; }

/* ---------- Slot builder ------------------------------------------------ */
.mode-panel { display: none; }
.mode-panel.is-visible { display: block; }

.builder {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: var(--radius);
}
.builder-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.builder-row > div { flex: 1 1 140px; }
.builder-row > div small { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.builder-row input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    background: #ffffff;
    font-family: inherit;
}
.builder-row input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: var(--focus-ring);
}
.builder-row .btn-add { flex: 0 0 auto; align-self: flex-end; }
.builder-hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

.moments {
    display: flex; flex-wrap: wrap; gap: 8px;
    align-items: center;
    margin-top: 14px;
}
.moment-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    background: #ffffff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    transition: background .15s, border-color .15s, color .15s;
    user-select: none;
    color: var(--text-soft);
}
.moment-chip input { accent-color: var(--ink); }
.moment-chip:has(input:checked),
.moment-chip.is-checked {
    background: var(--ink);
    border-color: var(--ink);
    color: #ffffff;
    font-weight: 500;
}

/* ---------- Slot chips (selected) --------------------------------------- */
.slot-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #ffffff;
    min-height: 56px;
}
.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 8px 6px 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink);
    max-width: 100%;
    font-weight: 500;
}
.chip-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.chip-remove {
    border: none; background: transparent;
    width: 22px; height: 22px; border-radius: 50%;
    font-size: 15px; line-height: 1;
    cursor: pointer;
    color: var(--muted);
    transition: background .15s, color .15s;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.chip-remove:hover { background: var(--ink); color: #ffffff; }
.chip-empty { color: var(--muted); font-style: italic; padding: 4px 6px; font-size: 13px; }
.slot-chips:has(.chip) .chip-empty { display: none; }

/* ---------- Alerts ------------------------------------------------------ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.55;
}
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.alert-warn    { background: var(--warn-bg);    border-color: var(--warn-border);    color: var(--warn); }
.alert-info    { background: var(--bg-subtle);  border-color: var(--border);         color: var(--text-soft); }

/* ---------- Pills / badges ---------------------------------------------- */
.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-soft);
}
.pill-active { background: var(--ink); color: #ffffff; border-color: var(--ink); }
.pill-warn   { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.pill-done   { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.pill-trip   { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 500;
    border: 1px solid var(--border);
}
.badge-muted { background: var(--bg-subtle); color: var(--muted); }

/* ---------- Copy row ---------------------------------------------------- */
.copy-row { display: flex; gap: 8px; flex-wrap: nowrap; }
.copy-row input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--bg-subtle);
    color: var(--ink);
}

/* ---------- Matrix table (admin) ---------------------------------------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
}
.matrix {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 14px;
}
.matrix th, .matrix td {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 11px 14px;
    text-align: left;
    vertical-align: middle;
}
.matrix th:last-child, .matrix td:last-child { border-right: 0; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix th {
    background: var(--bg-subtle);
    font-weight: 600;
    white-space: nowrap;
    position: sticky; top: 0; z-index: 1;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
}
.matrix td.cell { text-align: center; font-size: 18px; min-width: 60px; }
.cell-yes   { background: var(--success-bg); }
.cell-maybe { background: var(--warn-bg); }
.cell-no    { background: var(--danger-bg); }
.best       { background: var(--accent-soft) !important; position: relative; }
.matrix th.best::after { content: " ★"; color: var(--accent); }
.matrix td.best { background: var(--accent-soft) !important; }

.sticky-col {
    position: sticky; left: 0;
    background: #ffffff;
    z-index: 2;
    box-shadow: 2px 0 4px -2px rgba(10, 10, 10, 0.05);
    min-width: 180px;
}
.matrix thead .sticky-col { background: var(--bg-subtle); z-index: 3; }

.row-unconfirmed td { opacity: 0.7; }
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
    border: 1px solid transparent;
}
.tag-ok   { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.tag-wait { background: var(--warn-bg);    color: var(--warn); border-color: var(--warn-border); }

.row-totals td { background: var(--bg-subtle); font-weight: 600; }
.row-totals td.sticky-col { background: var(--bg-subtle); }
.count-cell {
    display: flex; gap: 6px; flex-wrap: wrap;
    justify-content: center; font-size: 12px;
}
.ct { padding: 3px 8px; border-radius: var(--radius-xs); font-weight: 500; }
.ct-yes   { background: var(--success-bg); color: var(--success); }
.ct-maybe { background: var(--warn-bg);    color: var(--warn); }
.ct-no    { background: var(--danger-bg);  color: var(--danger); }

.best-line {
    margin-top: 18px;
    padding: 16px 20px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--ink);
}

/* ---------- Mobile summary cards (admin) -------------------------------- */
.slot-summary { display: flex; flex-direction: column; gap: 12px; }
.slot-summary-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    background: #ffffff;
}
.best-slot-card {
    background: var(--accent-soft);
    border-color: var(--accent-border);
}
.slot-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}
.voters-list {
    list-style: none;
    padding: 10px 0 0;
    margin: 10px 0 0;
    border-top: 1px dashed var(--border);
    font-size: 13.5px;
}
.voters-list li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    gap: 6px;
}
.voters-list li.v-unconfirmed { opacity: 0.7; }

.desktop-only { display: block; }
.mobile-only  { display: none; }
@media (max-width: 720px) {
    .desktop-only { display: none; }
    .mobile-only  { display: block; }
}

/* ---------- Vote items (participant) ------------------------------------ */
.vote-list {
    display: flex; flex-direction: column; gap: 10px;
}
.vote-item {
    display: flex; align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #ffffff;
    transition: border-color .15s, background .15s;
}
.vote-item[data-status="yes"]   { border-color: var(--success-border); background: var(--success-bg); }
.vote-item[data-status="maybe"] { border-color: var(--warn-border);    background: var(--warn-bg); }
.vote-item[data-status="no"]    { border-color: var(--danger-border);  background: var(--danger-bg); }

.vote-info { flex: 1 1 auto; min-width: 0; }
.vote-title {
    font-weight: 600;
    display: block;
    font-size: 15px;
    line-height: 1.35;
    word-wrap: break-word;
    color: var(--ink);
}
.vote-meta {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 4px;
    display: inline-block;
}

.vote-btns {
    display: flex;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-strong);
    background: #ffffff;
}
.vote-btn {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #ffffff;
    border: none;
    border-right: 1px solid var(--border);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: background .15s, color .15s;
    -webkit-appearance: none;
    font-family: inherit;
}
.vote-btn:last-child  { border-right: none; }
.vote-btn:hover       { background: var(--bg-subtle); color: var(--ink); }
.vote-btn .vote-emoji { font-size: 15px; }
.vote-yes[aria-pressed="true"]   { background: var(--success); color: #ffffff; }
.vote-maybe[aria-pressed="true"] { background: var(--warn);    color: #ffffff; }
.vote-no[aria-pressed="true"]    { background: var(--danger);  color: #ffffff; }

/* ---------- Success page ------------------------------------------------ */
.success-card { text-align: center; }
.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    font-size: 34px;
    margin-bottom: 20px;
    border: 1px solid var(--success-border);
}

/* ---------- Legal pages ------------------------------------------------- */
.legal-card { max-width: 780px; margin-left: auto; margin-right: auto; }
.legal-card h2 {
    font-size: 18px;
    margin-top: 32px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.legal-card h2:first-of-type { margin-top: 22px; }
.legal-card ul { padding-left: 20px; margin: 0 0 12px; color: var(--text-soft); }
.legal-card li { margin-bottom: 5px; }
.legal-breadcrumb {
    font-size: 13px;
    margin-bottom: 8px;
}
.legal-breadcrumb a { color: var(--muted); }
.legal-breadcrumb a:hover { color: var(--ink); }

/* =========================================================
   MON ESPACE & PANEL ADMIN
   ========================================================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    text-align: left;
    transition: border-color .15s;
}
.stat-card:hover { border-color: var(--border-strong); }
.stat-card .stat-val {
    font-size: 32px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.1;
    display: block;
    letter-spacing: -0.03em;
}
.stat-card .stat-lbl {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    display: block;
    letter-spacing: 0.02em;
}

.stat-card .stat-kicker {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.panel-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: start;
    padding: 32px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.panel-hero h1 {
    margin: 10px 0 12px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.panel-hero-copy p {
    max-width: 640px;
    margin: 0;
}

.panel-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.panel-stat-grid {
    margin-bottom: 22px;
}

.panel-edit-card {
    scroll-margin-top: 96px;
    background: #ffffff;
    border-color: var(--border-strong);
}

.panel-list-card {
    overflow: hidden;
}

.panel-section-head {
    align-items: end;
}

.panel-section-note {
    margin: 6px 0 0;
    font-size: 13px;
}

.panel-search {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.panel-search input[type="search"] {
    width: 280px;
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #ffffff;
    color: var(--ink);
}

.panel-search input[type="search"]:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: var(--focus-ring);
}

.data-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}
.data-table th {
    background: var(--bg-subtle);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    color: var(--text-soft);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-soft);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-subtle); }

.badge-active   { background: var(--ink); color: #ffffff; border-color: var(--ink); }
.badge-expired  { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.badge-done     { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-trip     { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }

.action-group { display: flex; gap: 6px; flex-wrap: wrap; }

.panel-action-group {
    align-items: center;
}

.panel-action-group .btn,
.panel-action-group form,
.panel-card-actions .btn,
.panel-card-actions form {
    margin: 0;
}

.panel-delete-form {
    display: inline-flex;
}

.edit-form-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
}
.edit-form-card h2 { margin-bottom: 16px; font-size: 17px; color: var(--ink); }

.login-card {
    max-width: 440px;
    margin: 72px auto;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: 19px; }

.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--muted);
    font-size: 14px;
}
.empty-state .empty-icon { font-size: 34px; margin-bottom: 10px; opacity: .6; }

.panel-meeting-list {
    gap: 12px;
}

.mobile-only.panel-meeting-list {
    display: none;
}

.panel-meeting-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
    padding: 18px;
}

.panel-meeting-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: start;
}

.panel-meeting-card h3 {
    margin: 6px 0 0;
    font-size: 17px;
}

.panel-meeting-eyebrow {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 600;
}

.panel-meeting-owner,
.panel-meeting-location {
    margin: 12px 0 0;
    font-size: 13px;
}

.panel-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.panel-meta-card {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
}

.panel-meta-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.panel-meta-value {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink);
}

.panel-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.panel-card-actions form {
    display: inline-flex;
}

.meeting-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.meeting-row:first-child { padding-top: 4px; }
.meeting-row:last-child { border-bottom: none; padding-bottom: 4px; }
.meeting-row-info { min-width: 0; }
.meeting-row-info .mr-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    display: block;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.meeting-row-info .mr-meta { font-size: 12.5px; color: var(--muted); display: block; }
.meeting-row-actions { flex-shrink: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.portal-hero {
    text-align: center;
    padding: 8px 0 24px;
}
.portal-hero .portal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--ink);
    font-size: 26px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}
.portal-hero h1 { font-size: 26px; margin-bottom: 8px; }

.alert-warning-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-size: 13px;
    color: var(--warn);
    margin-bottom: 16px;
}

/* ---------- Responsive (≤ 720px) --------------------------------------- */
@media (max-width: 720px) {
    html, body { font-size: 15px; }
    h1 { font-size: 26px; }
    h2 { font-size: 18px; }
    .hero { padding: 52px 12px 36px; }
    .hero h1 { font-size: 36px; }
    .hero .lead { font-size: 16px; }

    .container { padding: 0 20px; }
    main.container { padding-top: 28px; padding-bottom: 44px; }
    .card { padding: 24px 22px; }
    .header-inner { padding: 12px 20px; }

    .grid-2      { grid-template-columns: 1fr; gap: 10px; }
    .mode-switch { grid-template-columns: 1fr; }

    .actions    { justify-content: stretch; }
    .actions .btn { flex: 1 1 140px; }
    .btn-lg     { width: 100%; }

    .builder-row { flex-direction: column; align-items: stretch; }
    .builder-row > div, .builder-row .btn-add { width: 100%; flex: 1 1 auto; }
    .btn-add { width: 100%; }

    .copy-row { flex-direction: column; }
    .copy-row input { width: 100%; }

    .vote-item { flex-direction: column; align-items: stretch; gap: 10px; }
    .vote-btns { width: 100%; }
    .vote-btn  { flex: 1; padding: 12px 6px; font-size: 13px; min-height: 44px; }
    .vote-btn .vote-text { display: inline; }

    .chip-label { max-width: 200px; }

    .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px 18px; }
    .footer-nav   { flex-direction: row; flex-wrap: wrap; gap: 10px 20px; }

    .panel-hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .panel-hero h1 {
        font-size: 24px;
    }

    .panel-hero-actions {
        justify-content: stretch;
    }

    .panel-hero-actions .btn {
        flex: 1 1 180px;
    }

    .panel-search {
        width: 100%;
    }

    .panel-search input[type="search"] {
        width: 100%;
        flex: 1 1 100%;
    }

    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .data-table th, .data-table td { padding: 8px 10px; font-size: 13px; }
    .meeting-row { flex-direction: column; }
    .panel-meta-grid { grid-template-columns: 1fr; }
    .mobile-only.panel-meeting-list { display: flex; flex-direction: column; }
}

@media (max-width: 380px) {
    .vote-btn .vote-text { display: none; }
    .vote-btn .vote-emoji { font-size: 20px; }
    .hero h1 { font-size: 30px; }
}

/* ── Sélecteur de créneau pour confirmation (admin.php) ── */
.slot-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
label.slot-pick-row,
.slot-pick-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s, border-color .15s;
    margin-bottom: 0;
    font-weight: 400;
    font-size: inherit;
    color: inherit;
}
.slot-pick-row:hover { background: #ffffff; border-color: var(--border-strong); }
.slot-pick-row.is-top {
    background: var(--accent-soft);
    border-color: var(--accent-border);
}
.slot-pick-row input[type="radio"] { margin: 0; accent-color: var(--ink); }
.slot-pick-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.slot-pick-info .muted { font-size: 13px; }

/* ── Toggle switch (activer une option) ─────────────────────────────────── */
.toggle-field { margin-top: 8px; }
.switch {
    display: flex;
    position: relative;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-subtle);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
    margin-bottom: 0;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
}
label.switch { display: flex; }
.switch:hover { border-color: var(--border-strong); }
.switch input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch-slider {
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--border-strong);
    position: relative;
    transition: background .15s ease;
    margin-top: 2px;
}
.switch-slider::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform .18s ease;
    box-shadow: 0 1px 2px rgba(10, 10, 10, 0.2);
}
.switch input:checked ~ .switch-slider { background: var(--ink); }
.switch input:checked ~ .switch-slider::after { transform: translateX(18px); }
.switch-text { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.switch-text strong { font-size: 14px; color: var(--ink); font-weight: 600; }
.switch-text small { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* ── Propositions de créneaux ───────────────────────────────────────────── */
.propose-card .card-head { margin-bottom: 8px; }
.propose-details summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: inline-block;
}
.propose-details summary::-webkit-details-marker { display: none; }
.propose-details[open] summary { margin-bottom: 16px; }
.propose-form { margin-top: 12px; }

.proposal-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.proposal-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
}
.proposal-item.proposal-pending { background: var(--warn-bg); border-color: var(--warn-border); }
.proposal-item.proposal-accepted { background: var(--success-bg); border-color: var(--success-border); }
.proposal-item.proposal-rejected { background: var(--bg-subtle); opacity: .75; }
.proposal-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.proposal-slot { font-size: 15px; color: var(--ink); }
.proposal-meta { font-size: 13px; }
.proposal-reason {
    margin-top: 6px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-soft);
}
.proposal-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Vote unifié : historique intégré dans la ligne ────────────────────── */
.vote-history-note {
    margin: 14px 0 4px;
    font-size: 13px;
}
.vote-list--unified.has-history .vote-item { align-items: flex-start; }
.vote-history {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-size: 12.5px;
    color: var(--text-soft);
}
.vote-history .ct { font-size: 11.5px; }
.vote-history-line {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    max-width: 100%;
}
.vote-history-icon { flex: 0 0 auto; font-size: 12px; }
.vote-history-names {
    word-break: break-word;
    color: var(--text-soft);
}

/* ── Panel admin : tableau compact ──────────────────────────────────────── */
.panel-table-compact th,
.panel-table-compact td { padding: 10px 14px; vertical-align: top; }
.panel-table-compact .cell-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--ink);
}
.panel-table-compact .cell-title strong {
    font-weight: 600;
    line-height: 1.3;
}
.panel-table-compact .cell-id { font-size: 12px; font-weight: 500; }
.panel-table-compact .cell-sub {
    font-size: 12px;
    line-height: 1.4;
    margin-top: 2px;
}
.panel-table-compact .nowrap { white-space: nowrap; }
.panel-table-compact .ta-center { text-align: center; }
.panel-table-compact .ta-right  { text-align: right; }
.panel-table-compact td.ta-center { vertical-align: middle; }
.panel-table-compact td.ta-right  { vertical-align: middle; }

.icon-actions {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}
.icon-actions .inline-form { display: inline-flex; margin: 0; }
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-strong);
    background: #ffffff;
    color: var(--text-soft);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
    font-family: inherit;
    padding: 0;
}
.icon-btn:hover {
    border-color: var(--ink);
    color: var(--ink);
    background: var(--bg-subtle);
    text-decoration: none;
}
.icon-btn-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
}

@media (max-width: 1024px) {
    .panel-table-compact th:nth-child(2),
    .panel-table-compact td:nth-child(2) { display: none; }
}

/* ── Utility ────────────────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Vote table (lignes = créneaux, colonnes = participants) ────────────── */
.vote-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
    position: relative;
    /* Indice visuel de scroll : ombres aux bords gauche/droit quand le contenu déborde */
    background-image:
        linear-gradient(to right, #ffffff, transparent 24px),
        linear-gradient(to left,  #ffffff, transparent 24px),
        linear-gradient(to right, rgba(10,10,10,0.12), transparent 12px),
        linear-gradient(to left,  rgba(10,10,10,0.12), transparent 12px);
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size: 24px 100%, 24px 100%, 12px 100%, 12px 100%;
    background-attachment: local, local, scroll, scroll;
    /* Scrollbar un peu plus visible (WebKit) */
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
.vote-table-wrap::-webkit-scrollbar { height: 10px; }
.vote-table-wrap::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
}
.vote-table-wrap::-webkit-scrollbar-track { background: transparent; }

.vote-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 14px;
}
.vote-table th,
.vote-table td {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 10px 12px;
    vertical-align: middle;
    text-align: left;
    background: #ffffff;
}
.vote-table tbody tr:last-child th,
.vote-table tbody tr:last-child td { border-bottom: 0; }
.vote-table th:last-child,
.vote-table td:last-child { border-right: 0; }

.vote-table thead th {
    background: var(--bg-subtle);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
}

/* Sticky: 1ère colonne (créneau) et 2ème colonne (boutons d'action) */
.vote-table .vt-col-slot {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    white-space: normal;
    word-break: break-word;
}
.vote-table thead .vt-col-slot { z-index: 5; background: var(--bg-subtle); }
.vote-table tbody .vt-col-slot {
    font-weight: 600;
    color: var(--ink);
}
.vote-table .vt-slot-label { display: block; line-height: 1.3; }
.vote-table .vt-slot-meta {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 2px;
}

.vote-table .vt-col-action {
    position: sticky;
    left: 180px;
    z-index: 3;
    width: 270px;
    min-width: 270px;
    max-width: 270px;
    box-shadow: 4px 0 6px -3px rgba(10, 10, 10, 0.08);
    background: #ffffff;
}
.vote-table thead .vt-col-action { z-index: 5; background: var(--bg-subtle); }

.vote-table .vt-col-voter {
    text-align: center;
    min-width: 96px;
    width: 96px;
    font-size: 18px;
    vertical-align: middle;
}
.vote-table thead .vt-col-voter {
    font-size: 12px;
    font-weight: 600;
    max-width: 140px;
    min-width: 96px;
    padding: 8px 10px;
    text-transform: none;
    letter-spacing: 0;
}
.vote-table thead .vt-col-voter .vt-voter-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    color: var(--text-soft);
}
.vote-table thead .vt-col-voter .vt-voter-self-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: 999px;
}
/* Colonne "Vous" : léger fond pour la distinguer visuellement */
.vote-table .vt-col-voter.vt-col-self {
    background: var(--accent-soft) !important;
}
.vote-table tbody .vt-col-voter.vt-col-self {
    background: color-mix(in srgb, var(--accent-soft) 70%, #ffffff) !important;
}

.vote-table-hint {
    margin: 8px 0 0;
    font-size: 12.5px;
    color: var(--muted);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.vote-table-hint::before,
.vote-table-hint::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
    max-width: 80px;
}

.vote-mobile-counts {
    margin-top: 10px;
    justify-content: flex-start;
}

.vote-mobile-public-label {
    display: none;
}

/* Vote-item compact : boutons sans labels "Oui/Peut-être/Non" par défaut en petit */
.vote-item.vote-item--compact {
    padding: 0;
    border: 0;
    background: transparent;
}
.vote-item.vote-item--compact .vote-btns {
    display: inline-flex;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #ffffff;
}
.vote-item.vote-item--compact .vote-btn {
    flex: 1 1 0;
    padding: 8px 10px;
    min-height: 38px;
    font-size: 13px;
}

/* Responsive : sur tablette et mobile, le tableau scrolle, on compresse les colonnes */
@media (max-width: 1024px) {
    .vote-table .vt-col-slot   { width: 160px; min-width: 160px; max-width: 160px; }
    .vote-table .vt-col-action { left: 160px; width: 270px; min-width: 270px; max-width: 270px; }
}

@media (max-width: 720px) {
    .vote-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        background-image: none;
        box-shadow: none;
    }
    .vote-table {
        display: block;
        width: 100%;
        min-width: 0;
        font-size: 13.5px;
    }
    .vote-table thead {
        display: none;
    }
    .vote-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .vote-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px;
        border: 1px solid var(--border-strong);
        border-radius: var(--radius);
        background: #ffffff;
    }
    .vote-table tbody tr[data-status="yes"] {
        border-color: var(--success-border);
        background: var(--success-bg);
    }
    .vote-table tbody tr[data-status="maybe"] {
        border-color: var(--warn-border);
        background: var(--warn-bg);
    }
    .vote-table tbody tr[data-status="no"] {
        border-color: var(--danger-border);
        background: var(--danger-bg);
    }
    .vote-table { font-size: 13.5px; }
    .vote-table th, .vote-table td {
        padding: 0;
        border: 0;
        background: transparent;
    }
    .vote-table .vt-col-slot,
    .vote-table .vt-col-action {
        position: static;
        left: auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        box-shadow: none;
        background: transparent;
    }
    .vote-table .vt-col-action {
        padding-top: 2px;
    }
    .vote-mobile-public-label {
        display: block;
        margin-top: 10px;
        font-size: 11px;
        font-weight: 600;
        color: var(--text-soft);
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }
    .vote-table .vt-col-voter {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        width: auto;
        min-width: 0;
        max-width: 100%;
        padding: 6px 10px;
        border: 1px solid var(--border);
        border-radius: 999px;
        font-size: 13px;
        line-height: 1.2;
        text-align: left;
        vertical-align: middle;
    }
    .vote-table tbody .vt-col-voter.cell-yes { background: var(--success-bg); }
    .vote-table tbody .vt-col-voter.cell-maybe { background: var(--warn-bg); }
    .vote-table tbody .vt-col-voter.cell-no { background: var(--danger-bg); }
    .vote-table .vt-col-voter::after {
        content: attr(data-voter-label);
        display: inline-block;
        max-width: 16ch;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
        color: var(--text-soft);
    }
    .vote-item.vote-item--compact .vote-btn .vote-text { display: none; }
    .vote-item.vote-item--compact .vote-btn .vote-emoji { font-size: 18px; }
    .vote-item.vote-item--compact .vote-btn { padding: 8px; min-height: 40px; flex: 1; }
}

@media (max-width: 480px) {
    .vote-table tbody tr {
        padding: 12px;
    }
    .vote-table .vt-col-voter { font-size: 12px; }
    .vote-table .vt-col-voter::after { max-width: 12ch; font-size: 11.5px; }
}

/* ── Pending participants (en attente de vote) ──────────────────────────── */
.pending-participants {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
}
.pending-participants > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-soft);
    list-style: none;
    user-select: none;
}
.pending-participants > summary::-webkit-details-marker { display: none; }
.pending-participants > summary::after {
    content: "▸";
    margin-left: 8px;
    font-size: 11px;
    transition: transform 0.15s ease;
    display: inline-block;
}
.pending-participants[open] > summary::after { transform: rotate(90deg); }
.pending-list {
    list-style: none;
    padding: 12px 0 0;
    margin: 10px 0 0;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pending-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Comments card (page de suivi admin) ────────────────────────────────── */
.comments-card .comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.comments-card .comment-item {
    padding: 14px 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.comments-card .comment-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.comments-card .comment-body {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- Badges additionnels ---------------------------------------- */
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }

/* ---------- Participations (my-meetings.php) --------------------------- */
.participation-group {
    margin-top: 18px;
}
.participation-group:first-of-type { margin-top: 4px; }

.participation-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
    padding: 6px 0;
}
details.participation-group > summary.participation-group-title {
    cursor: pointer;
    list-style: none;
    user-select: none;
}
details.participation-group > summary.participation-group-title::-webkit-details-marker { display: none; }
details.participation-group > summary.participation-group-title::after {
    content: '▸';
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    transition: transform .18s ease;
}
details.participation-group[open] > summary.participation-group-title::after {
    transform: rotate(90deg);
}

.participation-group-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.participation-group-dot--todo      { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.participation-group-dot--active    { background: var(--ink); }
.participation-group-dot--finalized { background: var(--success); }
.participation-group-dot--expired   { background: var(--muted); }

.participation-list {
    display: grid;
    gap: 10px;
}

.participation-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg, #fff);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.participation-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.participation-card--todo {
    border-left: 3px solid var(--warn);
}
.participation-card--finalized {
    background: var(--success-bg);
    border-color: var(--success-border);
}
.participation-card--expired {
    opacity: 0.85;
}

.participation-head {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.participation-mode {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}
.participation-title-wrap {
    flex: 1 1 220px;
    min-width: 0;
}
.participation-title {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    word-break: break-word;
}
.participation-meta {
    font-size: 12.5px;
    color: var(--muted);
}

.participation-body {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    font-size: 13px;
}

.participation-vote-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.participation-vote-todo    { color: var(--warn); }
.participation-vote-done    { color: var(--success); }
.participation-vote-closed  { color: var(--ink); }
.participation-vote-expired { color: var(--muted); }

.participation-best-slot {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid var(--success-border);
    border-radius: var(--radius-sm);
}
.participation-best-slot-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--success);
    font-weight: 600;
}
.participation-best-slot strong {
    color: var(--ink);
    font-size: 13px;
}

.participation-stats {
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-size: 12.5px;
}
.participation-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.participation-stat-value {
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.participation-actions {
    grid-column: 2;
    align-self: center;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .participation-card {
        grid-template-columns: 1fr;
    }
    .participation-actions {
        grid-column: 1;
        justify-content: stretch;
    }
    .participation-actions .btn {
        flex: 1 1 auto;
    }
    .participation-head {
        flex-wrap: wrap;
    }
    .participation-head .badge {
        margin-left: auto;
    }
}

/* =========================================================
   Responsive — passe intermédiaire tablette et petits mobiles
   ========================================================= */

/* Tablette : 721–1024px */
@media (min-width: 721px) and (max-width: 1024px) {
    .container        { padding: 0 24px; }
    .header-inner     { padding: 14px 24px; }
    main.container    { padding-top: 32px; padding-bottom: 48px; }
    .card             { padding: 26px; }
    .panel-hero       { padding: 28px; }
    .grid-2           { gap: 12px; }
    .vote-table .vt-col-slot   { width: 160px; min-width: 160px; max-width: 160px; }
    .vote-table .vt-col-action { left: 160px; width: 270px; min-width: 270px; max-width: 270px; }
}

/* Mobile : ≤ 720px — compléments */
@media (max-width: 720px) {
    .header-inner   { padding: 10px 16px; gap: 10px; }
    .logo           { font-size: 16px; }
    .logo-img,
    .logo-img--mark { height: 28px; width: 28px; }
    .site-nav       { gap: 4px; }
    .site-nav .btn  { padding: 6px 10px; font-size: 13px; }

    .section-head { margin-bottom: 14px; }
    .section-head h2 { font-size: 17px; }

    /* Copy row : rajout du bouton "Ouvrir" qui doit s'étirer sur mobile */
    .copy-row .btn { width: 100%; }

    /* Meeting rows (réunions organisées) */
    .meeting-row         { gap: 8px; align-items: flex-start; }
    .meeting-row-actions { width: 100%; justify-content: flex-start; }
    .meeting-row-actions .btn { flex: 1 1 auto; }

    /* Footer */
    .footer-inner { padding: 24px 16px 16px; }
}

/* Petit mobile : ≤ 480px */
@media (max-width: 480px) {
    .container              { padding: 0 14px; }
    main.container          { padding-top: 20px; padding-bottom: 32px; }
    .card                   { padding: 18px 16px; border-radius: var(--radius-sm); }
    .header-inner           { padding: 8px 12px; }
    .logo span              { display: none; } /* juste le mark en très petit */
    h1                      { font-size: 22px; }
    h2                      { font-size: 17px; }
    .section-head           { flex-direction: column; align-items: flex-start; gap: 8px; }
    .section-head .btn      { width: 100%; }
    .participation-card     { padding: 12px; }
    .participation-title    { font-size: 14.5px; }
    .participation-head     { gap: 8px; }
    .pending-participants   { padding: 10px 12px; }
    .comments-card .comments-list { gap: 8px; }
}

/* =========================================================
   Motion system — discret, épuré, moderne
   ========================================================= */
:root {
    --motion-fast: 160ms;
    --motion-base: 280ms;
    --motion-slow: 560ms;
    --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --motion-ease-soft: cubic-bezier(0.2, 0.65, 0.3, 1);
}

@keyframes kairos-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes kairos-soft-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes kairos-spin {
    to { transform: rotate(360deg); }
}

@keyframes kairos-check-pop {
    0% {
        opacity: 0;
        transform: scale(0.88);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Base interactive */
.btn,
.icon-btn,
.vote-btn,
.chip,
.chip-remove,
.moment-chip,
.slot-pick-row,
.switch,
.meeting-row,
.footer-nav a,
.logo,
.footer-brand .footer-logo img,
.card,
.feature,
.stat-card,
.panel-meeting-card,
.panel-meta-card,
.proposal-item,
.slot-summary-card,
.participation-card,
.comments-card .comment-item,
.pending-participants {
    transition:
        transform var(--motion-base) var(--motion-ease-soft),
        box-shadow var(--motion-base) var(--motion-ease-soft),
        border-color var(--motion-base) ease,
        background-color var(--motion-base) ease,
        color var(--motion-fast) ease,
        opacity var(--motion-fast) ease;
}

.btn,
.icon-btn,
.vote-btn,
.chip,
.moment-chip,
.slot-pick-row,
.switch,
.meeting-row,
.footer-nav a,
.logo,
.footer-brand .footer-logo img {
    will-change: transform;
}

.btn:hover,
.icon-btn:hover,
.vote-btn:hover,
.chip:hover,
.moment-chip:hover,
.slot-pick-row:hover,
.switch:hover {
    transform: translateY(-1px);
}

.btn:active:not(:disabled),
.icon-btn:active,
.vote-btn:active,
.chip:active {
    transform: translateY(0);
}

.btn-primary:hover,
.btn-accent:hover {
    box-shadow: 0 10px 24px -14px rgba(10, 10, 10, 0.35);
}

.logo:hover,
.footer-brand .footer-logo:hover img {
    transform: translateY(-1px);
}

.footer-nav a:hover {
    transform: translateX(2px);
}

.card:hover,
.feature:hover,
.stat-card:hover,
.panel-meeting-card:hover,
.panel-meta-card:hover,
.proposal-item:hover,
.slot-summary-card:hover,
.participation-card:hover,
.comments-card .comment-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.meeting-row:hover {
    transform: translateX(2px);
}

.copy-row input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="number"],
textarea,
select {
    transition:
        border-color var(--motion-fast) ease,
        box-shadow var(--motion-fast) ease,
        background-color var(--motion-fast) ease;
}

*:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-xs);
}

/* Header */
.site-header {
    animation: kairos-fade-up .48s var(--motion-ease) both;
    transition:
        background-color var(--motion-base) ease,
        border-color var(--motion-base) ease,
        box-shadow var(--motion-base) ease,
        transform var(--motion-base) var(--motion-ease-soft);
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: rgba(214, 211, 209, 0.92);
    box-shadow: 0 10px 28px -24px rgba(10, 10, 10, 0.45);
}

/* Hero */
.hero-eyebrow,
.hero h1,
.hero .lead,
.hero-actions {
    opacity: 0;
    animation: kairos-fade-up .7s var(--motion-ease) both;
}

.hero-eyebrow { animation-delay: 40ms; }
.hero h1 { animation-delay: 110ms; }
.hero .lead { animation-delay: 180ms; }
.hero-actions { animation-delay: 250ms; }

.hero-eyebrow::before,
.participation-group-dot--todo {
    animation: kairos-soft-pulse 2.8s ease-in-out infinite;
    transform-origin: center;
}

/* Scroll reveal */
html.js-motion .reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity var(--motion-slow) var(--motion-ease),
        transform var(--motion-slow) var(--motion-ease);
    transition-delay: var(--reveal-delay, 0ms);
}

html.js-motion .reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: none;
}

/* Etats utilitaires */
.alert,
.empty-state {
    animation: kairos-fade-up .42s var(--motion-ease) both;
}

.badge,
.pill,
details summary::after,
.participation-vote-status,
.participation-best-slot,
.vt-voter-self-tag {
    transition:
        transform var(--motion-fast) ease,
        color var(--motion-fast) ease,
        background-color var(--motion-fast) ease,
        border-color var(--motion-fast) ease;
}

.participation-card:hover .badge,
.participation-card:hover .participation-vote-status {
    transform: translateY(-1px);
}

details.participation-group > summary.participation-group-title:hover {
    color: var(--ink);
}

details.participation-group > summary.participation-group-title:hover .participation-group-dot {
    transform: scale(1.12);
}

.vote-table tbody tr {
    transition: background-color var(--motion-fast) ease;
}

/* Utilitaires motion */
.kairos-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: kairos-spin .7s linear infinite;
    vertical-align: -2px;
}

.kairos-check {
    display: inline-block;
    animation: kairos-check-pop .28s var(--motion-ease) both;
}

/* Accessibilité motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    html.js-motion .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}
