/* ============================================================
   Evenements DCS — Dangote Cement Senegal
   Mobile first (≈ 360 px) · media queries min-width : 600 / 900 / 1200
   Thèmes : [data-theme="festif"] (base AmisInvisibles) · [data-theme="corporate"] (base WallOfFame)
   Préfixe des classes : ev-
   ============================================================ */

:root,
[data-theme="corporate"] {
    --brand:        #CC2929;
    --brand-deep:   #8B1A1A;
    --accent:       #0B2454;   /* bleu Dangote */
    --accent-2:     #1C3F7C;
    --bg:           #F9F9F8;
    --paper:        #FFFFFF;
    --ink:          #1F2937;
    --muted:        #5F6B7A;   /* AA sur blanc et sur --bg */
    --line:         #E3E5E8;
    --ok:           #1E7B45;
    --ok-bg:        #E6F4EC;
    --warn:         #9A5B00;
    --warn-bg:      #FFF4DD;
    --danger:       #B42318;
    --danger-bg:    #FCEBEB;
    --info-bg:      #E8EEF8;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow:       0 6px 24px -12px rgba(11, 36, 84, .25);
    --tap:          48px;
    --font-display: 'Outfit', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --font-body:    'Outfit', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --display-weight: 700;
    --hero-bg:      linear-gradient(150deg, #0B2454 0%, #1C3F7C 100%);
}

[data-theme="festif"] {
    --brand:        #CC2929;
    --brand-deep:   #8F1717;
    --brand-night:  #4A0D0D;
    --accent:       #D9A441;   /* or */
    --accent-2:     #2E5E42;   /* sapin */
    --bg:           #FAF5EC;   /* crème */
    --ink:          #2A1F1B;
    --muted:        #6E6058;
    --line:         rgba(74, 13, 13, .12);
    --radius:       16px;
    --shadow:       0 10px 30px -12px rgba(74, 13, 13, .25);
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --display-weight: 700;
    --hero-bg:
        radial-gradient(1000px 380px at 80% -60%, rgba(217, 164, 65, .28), transparent 60%),
        radial-gradient(700px 320px at 8% 120%, rgba(0, 0, 0, .35), transparent 60%),
        linear-gradient(150deg, #8F1717 0%, #4A0D0D 100%);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.ev-hidden { display: none !important; }
.ev-muted { color: var(--muted); }
.ev-small { font-size: .875rem; }
.ev-center { text-align: center; }
.ev-stack > * + * { margin-top: 16px; }
.ev-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mise en page ---------- */

.ev-container { width: 100%; max-width: 560px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left)); }
.ev-container--wide { max-width: 1200px; }

.ev-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 16px;
}

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

.ev-field { margin-bottom: 16px; }
.ev-field label, .ev-label { display: block; font-weight: 600; margin-bottom: 6px; }
.ev-hint { display: block; font-size: .875rem; color: var(--muted); margin-top: 4px; }
.ev-input, .ev-select, .ev-textarea {
    width: 100%;
    min-height: var(--tap);
    padding: 10px 14px;
    font-size: 16px;            /* pas de zoom iOS */
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
}
.ev-textarea { min-height: 96px; resize: vertical; }
.ev-input:focus, .ev-select:focus, .ev-textarea:focus { border-color: var(--accent-2); outline: none; box-shadow: 0 0 0 3px rgba(28, 63, 124, .15); }

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

.ev-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: var(--tap);
    padding: 10px 20px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: var(--paper);
    color: var(--ink);
    border-color: var(--line);
}
.ev-btn:disabled { opacity: .55; cursor: not-allowed; }
.ev-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ev-btn--primary:hover:not(:disabled) { background: var(--brand-deep); border-color: var(--brand-deep); }
.ev-btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.ev-btn--ghost { background: transparent; border-color: transparent; }
.ev-btn--sm { min-height: 44px; padding: 8px 14px; font-size: .9rem; }
.ev-btn--block { width: 100%; }
[data-theme="festif"] .ev-btn--accent { color: var(--brand-night); }

/* ---------- Alertes et badges ---------- */

.ev-alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.ev-alert--error   { background: var(--danger-bg); color: var(--danger); }
.ev-alert--success { background: var(--ok-bg); color: var(--ok); }
.ev-alert--warn    { background: var(--warn-bg); color: var(--warn); }
.ev-alert--info    { background: var(--info-bg); color: var(--accent); }

.ev-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--info-bg); color: var(--accent); }
.ev-badge--ok { background: var(--ok-bg); color: var(--ok); }
.ev-badge--warn { background: var(--warn-bg); color: var(--warn); }
.ev-badge--off { background: #EEE; color: var(--muted); }

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

.ev-login { min-height: 100vh; display: flex; flex-direction: column; }
.ev-login__hero { background: var(--hero-bg); color: #fff; padding: 28px 16px 56px; text-align: center; }
.ev-login__logo { height: 40px; }
.ev-login__hero h1 { margin-top: 16px; }
.ev-login__hero p { opacity: .9; font-size: .95rem; }
.ev-login__card { margin-top: -36px; }
.ev-login__links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: .9rem; }

/* ---------- En-tête admin et onglets ---------- */

.ev-appbar { background: var(--accent); color: #fff; padding-top: env(safe-area-inset-top); }
.ev-appbar__inner { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.ev-appbar__logo { height: 30px; }
.ev-appbar__title { flex: 1; font-weight: 700; line-height: 1.2; }
.ev-appbar__title small { display: block; font-weight: 400; font-size: .8rem; opacity: .85; }
.ev-appbar .ev-btn--ghost { color: #fff; }

.ev-tabs {
    display: flex; gap: 4px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0 12px;
}
.ev-tab {
    flex: 0 0 auto;
    min-height: var(--tap);
    padding: 10px 14px;
    background: none; border: 0; border-bottom: 3px solid transparent;
    color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.ev-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--brand); }

.ev-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ev-placeholder { padding: 32px 16px; text-align: center; color: var(--muted); }

/* ---------- Tableaux admin : cartes empilées sous 900 px ---------- */

.ev-table { width: 100%; border-collapse: collapse; }
.ev-table thead { display: none; }
.ev-table tr { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; }
.ev-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.ev-table td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; }
.ev-table td.ev-actions { justify-content: flex-end; flex-wrap: wrap; }
.ev-table td.ev-actions::before { content: none; }

/* ---------- Fenêtre « envoi en cours » (showSending) ---------- */

.ev-sending { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .55); padding: 16px; }
.ev-sending__box { background: var(--paper); border-radius: var(--radius); padding: 24px; max-width: 360px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.ev-spinner { width: 40px; height: 40px; margin: 0 auto 12px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: ev-spin .8s linear infinite; }
@keyframes ev-spin { to { transform: rotate(360deg); } }

/* ---------- Feuille basse (modales) ---------- */

.ev-sheet-backdrop { position: fixed; inset: 0; z-index: 1500; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; }
.ev-sheet { width: 100%; max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: var(--radius) var(--radius) 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.ev-sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ev-sheet__foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ============================================================ */

@media (min-width: 600px) {
    .ev-card { padding: 28px 28px; }
    .ev-login__hero { padding: 40px 16px 64px; }
    .ev-sheet-backdrop { align-items: center; justify-content: center; }
    .ev-sheet { max-width: 560px; border-radius: var(--radius); }
}

@media (min-width: 900px) {
    .ev-table thead { display: table-header-group; }
    .ev-table tr { display: table-row; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; margin: 0; }
    .ev-table th { text-align: left; font-size: .85rem; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); }
    .ev-table td { display: table-cell; padding: 10px 12px; vertical-align: middle; }
    .ev-table td::before { content: none; }
    .ev-table td.ev-actions { text-align: right; white-space: nowrap; }
}

@media (min-width: 1200px) {
    .ev-container--wide { padding-left: 24px; padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Notification de repli (sans SweetAlert2) */
.ev-toast { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 3000; box-shadow: var(--shadow); }

/* ============================================================
   Lot 1 — administration : sélecteur d'événement, formulaires en sections, catalogues
   ============================================================ */

.ev-eventbar { background: var(--accent-2); color: #fff; }
.ev-eventbar__inner { max-width: 1200px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ev-eventbar__label { font-size: .85rem; opacity: .9; }
.ev-eventbar__select { flex: 1 1 220px; min-height: 44px; color: var(--ink); }

.ev-section { margin-bottom: 16px; }
.ev-section > h2 { margin-bottom: 12px; }
.ev-fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 14px 2px; margin-bottom: 16px; background: var(--paper); }
.ev-fieldset legend { font-weight: 700; padding: 0 6px; color: var(--accent); }
.ev-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }

.ev-check { display: flex; align-items: flex-start; gap: 10px; min-height: var(--tap); padding: 10px 0; cursor: pointer; }
.ev-check input { width: 22px; height: 22px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--brand); }
.ev-check small { display: block; color: var(--muted); font-size: .85rem; }

.ev-actionbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ev-actionbar--sticky {
    position: sticky; bottom: 0; z-index: 10;
    background: var(--paper); border-top: 1px solid var(--line);
    margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.ev-list { display: grid; gap: 12px; }
.ev-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.ev-item__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ev-item__title { font-weight: 700; font-size: 1.05rem; }
.ev-item__meta { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.ev-item__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ev-item--off { opacity: .65; }

.ev-badge--danger { background: var(--danger-bg); color: var(--danger); }
.ev-badge--brand { background: var(--brand); color: #fff; }

.ev-checklist { list-style: none; }
.ev-checklist li { padding: 6px 0 6px 26px; position: relative; }
.ev-checklist li::before { position: absolute; left: 0; top: 6px; font-weight: 700; }
.ev-checklist .is-error::before { content: "✕"; color: var(--danger); }
.ev-checklist .is-warn::before { content: "!"; color: var(--warn); }
.ev-checklist .is-ok::before { content: "✓"; color: var(--ok); }

.ev-logo { width: 56px; height: 56px; flex: 0 0 auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; object-fit: contain; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.ev-row { display: flex; align-items: center; gap: 12px; }
.ev-row > .ev-grow { flex: 1; min-width: 0; }
.ev-amount { font-weight: 700; font-size: 1.15rem; color: var(--accent); white-space: nowrap; }

.ev-axe { margin-bottom: 16px; }
.ev-drivers { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.ev-drivers h4 { margin: 0; font-size: 15px; }
.ev-axe__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.ev-point { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.ev-point:first-of-type { border-top: 0; }
.ev-point__fields { display: grid; grid-template-columns: 1fr; gap: 8px; }

.ev-history { font-size: .9rem; }
.ev-history li { padding: 4px 0; border-bottom: 1px dashed var(--line); list-style: none; }

@media (min-width: 600px) {
    .ev-grid { grid-template-columns: 1fr 1fr; }
    .ev-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .ev-point__fields { grid-template-columns: 120px 1fr auto; align-items: end; }
}
@media (min-width: 900px) {
    .ev-list--2 { grid-template-columns: 1fr 1fr; }
    .ev-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
    .ev-actionbar--sticky { margin: 0; border-radius: var(--radius-sm); border: 1px solid var(--line); }
}

/* ============================================================
   Public — héro, faits clés, bandeau d'aperçu (décors festifs complets au lot 7)
   ============================================================ */

.ev-preview-banner { background: #111827; color: #FDE68A; text-align: center; font-weight: 700; font-size: .85rem; letter-spacing: .5px; padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); }
.ev-hero { position: relative; overflow: hidden; background: var(--hero-bg); color: #fff; padding: 24px 16px 64px; padding-top: calc(24px + env(safe-area-inset-top)); text-align: center; }
.ev-hero__logo { height: 36px; position: relative; }
.ev-hero__eyebrow { position: relative; margin-top: 20px; font-size: .75rem; letter-spacing: 1.5px; text-transform: uppercase; opacity: .9; }
.ev-hero__title { position: relative; font-size: 1.75rem; margin-top: 6px; }
.ev-hero__sub { position: relative; margin-top: 8px; opacity: .92; }
[data-theme="festif"] .ev-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: repeating-linear-gradient(90deg, var(--accent) 0 18px, #b9832b 18px 36px); }
[data-theme="festif"] .ev-hero__eyebrow { color: #F3E3C3; }
.ev-overlap { margin-top: -40px; position: relative; }
.ev-section-title { color: var(--ink); margin: 8px 0 12px; }
.ev-prose p + p { margin-top: 10px; }
.ev-prose ul, .ev-prose ol { padding-left: 22px; }
.ev-facts { list-style: none; border-top: 1px solid var(--line); }
.ev-facts li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ev-facts__k { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.ev-footer { margin: 24px 0 8px; }

@media (min-width: 600px) {
    .ev-hero { padding: 40px 16px 80px; }
    .ev-hero__title { font-size: 2.2rem; }
    .ev-facts li { flex-direction: row; justify-content: space-between; gap: 16px; }
    .ev-facts li > span:last-child { text-align: right; }
}

/* Corrections après revue visuelle (lot 1) */
.ev-input:disabled, .ev-select:disabled, .ev-textarea:disabled { background: #F1F2F4; color: var(--muted); cursor: not-allowed; }
.ev-item__title .ev-badge { margin-left: 8px; vertical-align: 2px; }
.ev-card h3 { margin-top: 20px; }
.ev-card h3:first-child { margin-top: 0; }
.ev-catpoint { padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ============================================================
   Lot 2 — parcours employé : identification, formulaire par étapes, invitation
   ============================================================ */

.ev-alert--ok { background: var(--ok-bg); color: var(--ok); }
.ev-hero--compact { padding-bottom: 56px; }
.ev-hero--compact .ev-hero__title { font-size: 1.4rem; }
.ev-hero--compact .ev-hero__eyebrow { margin-top: 12px; }
.ev-card--link { display: block; color: inherit; text-decoration: none; }
.ev-card--link:focus-visible, .ev-card--link:hover { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.ev-card + .ev-card, .ev-card + .ev-alert, .ev-alert + .ev-card { margin-top: 16px; }

/* Date de naissance : trois listes */
.ev-dob { border: 0; padding: 0; margin: 0; }
.ev-dob legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.ev-dob__row { display: grid; grid-template-columns: 1fr 1.6fr 1.3fr; gap: 8px; }

/* Progression */
.ev-progress { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 12px; }
.ev-progress__text { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.ev-progress__text strong { color: var(--ink); }
.ev-progress__track { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.ev-progress__bar { height: 100%; background: var(--brand); border-radius: 3px; transition: width .3s ease; }
.ev-w-5 { width: 5%; }
.ev-w-10 { width: 10%; }
.ev-w-15 { width: 15%; }
.ev-w-20 { width: 20%; }
.ev-w-25 { width: 25%; }
.ev-w-30 { width: 30%; }
.ev-w-35 { width: 35%; }
.ev-w-40 { width: 40%; }
.ev-w-45 { width: 45%; }
.ev-w-50 { width: 50%; }
.ev-w-55 { width: 55%; }
.ev-w-60 { width: 60%; }
.ev-w-65 { width: 65%; }
.ev-w-70 { width: 70%; }
.ev-w-75 { width: 75%; }
.ev-w-80 { width: 80%; }
.ev-w-85 { width: 85%; }
.ev-w-90 { width: 90%; }
.ev-w-95 { width: 95%; }
.ev-w-100 { width: 100%; }

/* Cartes de choix (radio / case) */
.ev-choices { display: flex; flex-direction: column; gap: 10px; }
.ev-choice { display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 12px 14px; border: 1.5px solid var(--line);
             border-radius: var(--radius-sm); background: var(--paper); cursor: pointer; }
.ev-choice input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.ev-choice:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--paper)); }
.ev-choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.ev-choice.is-disabled { cursor: not-allowed; opacity: .65; background: transparent; }
.ev-choice__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-choice__title { font-weight: 600; overflow-wrap: anywhere; }
.ev-choice__desc { font-size: .88rem; color: var(--muted); }

/* Personnes */
.ev-person { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ev-person__name { font-weight: 600; }
.ev-person--check { flex-direction: column; align-items: stretch; }
.ev-person--check > .ev-input { margin-left: 34px; width: calc(100% - 34px); }
.ev-person--check > .ev-input:disabled { display: none; }
.ev-person--added { align-items: stretch; padding: 12px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); }
.ev-person--added .ev-btn { align-self: flex-start; }
.ev-counter { font-weight: 700; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 4px 12px; font-size: .9rem; white-space: nowrap; }
.ev-counter.is-over { color: var(--danger); background: var(--danger-bg); }

/* Offres de bons */
.ev-offers { display: flex; flex-direction: column; gap: 10px; }
.ev-offer { display: grid; grid-template-columns: auto 56px 1fr; grid-template-areas: "radio logo body" "radio value value";
            align-items: center; gap: 8px 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
            background: var(--paper); cursor: pointer; }
.ev-offer input { grid-area: radio; width: 22px; height: 22px; margin: 0; accent-color: var(--brand); align-self: start; }
.ev-offer:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--paper)); }
.ev-offer:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.ev-offer__logo { grid-area: logo; width: 56px; height: 56px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.ev-offer__logo--txt { display: grid; place-items: center; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.ev-offer__body { grid-area: body; display: flex; flex-direction: column; min-width: 0; }
.ev-offer__name { font-weight: 700; }
.ev-offer__desc { font-size: .88rem; color: var(--muted); }
.ev-offer__value { grid-area: value; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap;
                   border-top: 1px solid var(--line); padding-top: 8px; }
.ev-offer__value strong { font-size: 1.35rem; color: var(--brand); white-space: nowrap; }
.ev-offer__value small { color: var(--muted); }

/* Barre d'actions du formulaire */
.ev-actionbar--wizard { display: flex; gap: 10px; margin-top: 16px; }
.ev-actionbar--wizard .ev-btn { min-height: var(--tap); }

/* Récapitulatif */
.ev-recap { padding: 12px 0; border-top: 1px solid var(--line); }
.ev-recap:first-of-type { border-top: 0; }
.ev-recap__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ev-recap h3 { margin: 0 0 4px; font-size: 1rem; }
.ev-recap__list { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 4px; }

/* Invitation */
.ev-qrcard { align-items: center; }
.ev-qr { width: min(300px, 100%); height: auto; aspect-ratio: 1; image-rendering: pixelated; background: #fff; border-radius: var(--radius-sm);
         border: 1px solid var(--line); margin: 4px auto; display: block; }
.ev-qr__name { font-weight: 700; font-size: 1.15rem; }

@media (min-width: 600px) {
    .ev-wizard, .ev-overlap > .ev-card, .ev-overlap > .ev-alert { max-width: 640px; margin-left: auto; margin-right: auto; }
}

/* Thème festif : --accent est l'or, illisible en texte sur fond clair */
[data-theme="festif"] .ev-alert--info { background: #F6ECDA; color: #6B4A12; }

/* Lot 3 — dossier famille dans le formulaire */
.ev-linkbtn { align-self: flex-start; background: none; border: 0; padding: 10px 0 8px 34px; min-height: 44px; color: var(--muted);
              font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.ev-linkbtn:hover, .ev-linkbtn:focus-visible { color: var(--brand); }
.ev-pending { margin-top: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--warn-bg); }
.ev-pending h3 { margin: 0 0 6px; font-size: .95rem; color: var(--warn); }
.ev-pending__item { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ev-strong { font-weight: 600; }
.ev-filter .ev-select { min-width: 160px; }
.ev-item > p { margin: 4px 0 0; overflow-wrap: anywhere; }
.ev-person--added { flex-direction: column; flex-wrap: nowrap; }
.ev-person--added > .ev-field, .ev-person--added > .ev-choice { width: 100%; }

/* Lot 4 — admin « pour le compte de » dans le formulaire public */
.ev-preview-banner--admin { background: #0B2454; color: #fff; }
.ev-preview-banner--admin a { color: #FDE68A; margin-left: 4px; }

/* Lot 4 — administration des inscriptions et communications */
.ev-actionbar--wrap { align-items: center; }
.ev-filters { margin-top: 4px; }
.ev-filters > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--brand); }
.ev-filters .ev-grid { margin-top: 8px; }
.ev-break { overflow-wrap: anywhere; }
.ev-text-warn { color: var(--warn); }
.ev-row--wrap { flex-wrap: wrap; }
.ev-table-wrap { margin-bottom: 12px; }
.ev-table th[scope="row"] { display: block; text-align: left; padding-bottom: 4px; }
.ev-item .ev-select, .ev-item .ev-input { margin-top: 6px; }
@media (min-width: 900px) {
    .ev-table th[scope="row"] { display: table-cell; color: var(--ink); font-size: inherit; padding: 10px 12px; }
}

/* ── Lot 5 : tableau de bord et rapports ─────────────────── */
.ev-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); min-width: 0; }
.ev-kpi__label { font-size: .85rem; color: var(--muted); }
.ev-kpi__value { font-size: 1.5rem; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.ev-kpi__sub { font-size: .8rem; color: var(--muted); }
.ev-gauge { margin-bottom: 14px; }
.ev-gauge__text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.ev-gauge .ev-progress__track { height: 10px; border-radius: 5px; }
.ev-gauge--ok .ev-progress__bar { background: var(--ok); }
.ev-gauge--warn .ev-progress__bar { background: var(--warn); }
.ev-gauge--danger .ev-progress__bar { background: var(--danger); }
.ev-gauge--danger .ev-gauge__text strong { color: var(--danger); }
.ev-gauge .ev-text-warn { display: block; margin-top: 4px; font-size: .9rem; }
.ev-report td { word-break: break-word; }
.ev-report td.ev-empty { display: none; }
.ev-report td.ev-num { font-variant-numeric: tabular-nums; }
.ev-report .ev-row-sub { background: var(--bg, #F3F4F6); font-weight: 600; }
.ev-report .ev-row-total { font-weight: 700; border-color: var(--ink); }
.ev-filters.ev-card > summary { color: var(--ink); }

@media (min-width: 600px) {
    .ev-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .ev-kpis { grid-template-columns: repeat(5, 1fr); }
    .ev-report th.ev-num, .ev-report td.ev-num { text-align: right; white-space: nowrap; }
    .ev-report .ev-row-total td { border-top: 2px solid var(--ink); }
    .ev-report td { word-break: normal; }
    .ev-report td.ev-empty { display: table-cell; }
    .ev-report td:first-child { min-width: 12em; }
    .ev-table-wrap { overflow-x: auto; }
}

/* ── Bons : « En savoir plus sur le fournisseur » ────────── */
.ev-offer-wrap { display: flex; flex-direction: column; }
.ev-offer__more { align-self: flex-start; min-height: 44px; padding: 8px 4px; border: 0; background: none; color: var(--brand);
    font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ev-offer__more:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.ev-supplier__head { display: flex; align-items: center; gap: 12px; }
.ev-supplier__head .ev-offer__logo { width: 64px; height: 64px; flex: none; }
.ev-supplier__head > div { display: flex; flex-direction: column; }
.ev-supplier__value { font-size: 1.4rem; color: var(--brand); }
.ev-supplier__text { white-space: pre-line; line-height: 1.55; }
.ev-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.ev-gallery__item { flex: 0 0 78%; scroll-snap-align: start; border-radius: var(--radius-sm); overflow: hidden; background: var(--line); }
.ev-gallery__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ev-links { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ev-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line);
    border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; background: var(--paper); }
.ev-link:hover, .ev-link:focus-visible { border-color: var(--brand); color: var(--brand); }
.ev-link::before { content: "↗"; margin-right: 6px; color: var(--brand); }
/* Administration : vignettes des photos */
.ev-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.ev-thumb { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }

@media (min-width: 600px) {
    .ev-gallery__item { flex-basis: 46%; }
}

/* ============================================================
   Lot 7 — décors festifs (thème festif uniquement, repris d'AmisInvisibles)
   Purement décoratifs : pseudo-éléments ou aria-hidden ; coupés par prefers-reduced-motion (bloc plus haut).
   ============================================================ */

/* Confettis discrets sur le fond crème */
body[data-theme="festif"] {
    background-image:
        radial-gradient(circle at 12% 18%, rgba(204, 41, 41, .05) 0 6px, transparent 7px),
        radial-gradient(circle at 78% 32%, rgba(217, 164, 65, .08) 0 5px, transparent 6px),
        radial-gradient(circle at 34% 74%, rgba(46, 94, 66, .05) 0 5px, transparent 6px),
        radial-gradient(circle at 90% 82%, rgba(204, 41, 41, .05) 0 4px, transparent 5px);
    background-size: 620px 620px;
}
/* Étoiles scintillantes dans le héro */
[data-theme="festif"] .ev-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(255, 255, 255, .55) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 40% 15%, rgba(255, 255, 255, .4) 0 1px, transparent 2px),
        radial-gradient(circle at 65% 40%, rgba(255, 255, 255, .5) 0 1.4px, transparent 2.4px),
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .45) 0 1.2px, transparent 2.2px),
        radial-gradient(circle at 25% 70%, rgba(255, 255, 255, .35) 0 1px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, .4) 0 1.3px, transparent 2.3px),
        radial-gradient(circle at 55% 60%, rgba(255, 215, 140, .5) 0 1.5px, transparent 2.5px);
    background-size: 340px 340px;
    animation: ev-twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes ev-twinkle { from { opacity: .45; } to { opacity: 1; } }

/* Apparition douce des cartes */
[data-theme="festif"] .ev-overlap > .ev-card { animation: ev-rise .45s ease both; }
[data-theme="festif"] .ev-overlap > .ev-card + .ev-card { animation-delay: .08s; }
@keyframes ev-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Carte du QR : liseré doré */
[data-theme="festif"] .ev-qrcard { border: 2px solid var(--accent); box-shadow: 0 0 0 6px #F6ECDA, var(--shadow); }
[data-theme="festif"] .ev-qr__name { font-family: var(--font-display); }

/* Pluie de confettis à la confirmation (une seule fois, ≈ 3 s) — <div class="ev-celebrate" aria-hidden="true"> + 14 <i> */
.ev-celebrate { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 2000; }
.ev-celebrate i {
    position: absolute; top: -16px; left: 50%; width: 9px; height: 14px; border-radius: 2px; opacity: 0;
    background: var(--brand); animation: ev-fall 2.8s cubic-bezier(.25, .6, .45, 1) forwards;
}
.ev-celebrate i:nth-child(3n)   { background: var(--accent); }
.ev-celebrate i:nth-child(3n+1) { background: var(--accent-2); width: 7px; height: 7px; border-radius: 50%; }
.ev-celebrate i:nth-child(1)  { left: 6%;  animation-delay: .05s; }
.ev-celebrate i:nth-child(2)  { left: 13%; animation-delay: .35s; }
.ev-celebrate i:nth-child(3)  { left: 21%; animation-delay: .15s; }
.ev-celebrate i:nth-child(4)  { left: 28%; animation-delay: .55s; }
.ev-celebrate i:nth-child(5)  { left: 35%; animation-delay: .25s; }
.ev-celebrate i:nth-child(6)  { left: 43%; animation-delay: .65s; }
.ev-celebrate i:nth-child(7)  { left: 50%; animation-delay: .1s; }
.ev-celebrate i:nth-child(8)  { left: 57%; animation-delay: .45s; }
.ev-celebrate i:nth-child(9)  { left: 64%; animation-delay: .2s; }
.ev-celebrate i:nth-child(10) { left: 71%; animation-delay: .6s; }
.ev-celebrate i:nth-child(11) { left: 78%; animation-delay: .3s; }
.ev-celebrate i:nth-child(12) { left: 85%; animation-delay: .5s; }
.ev-celebrate i:nth-child(13) { left: 91%; animation-delay: .15s; }
.ev-celebrate i:nth-child(14) { left: 96%; animation-delay: .4s; }
@keyframes ev-fall {
    0%   { opacity: 1; transform: translateY(0) rotate(0); }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(100vh) translateX(-40px) rotate(540deg); }
}
.ev-celebrate i:nth-child(even) { animation-name: ev-fall-r; }
@keyframes ev-fall-r {
    0%   { opacity: 1; transform: translateY(0) rotate(0); }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(100vh) translateX(40px) rotate(-480deg); }
}
@media (prefers-reduced-motion: reduce) { .ev-celebrate { display: none; } }

/* Lien d'évitement (accessibilité) */
.ev-skip { position: absolute; left: 12px; top: -60px; z-index: 3000; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.ev-skip:focus { top: calc(8px + env(safe-area-inset-top)); }
.ev-progress:focus { outline: none; }
.ev-progress:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 4px; border-radius: 6px; }
