/* ==========================================================
   PLATEFORME : activités, dons, espaces par rôle
   Réutilise les variables de style.css (thème clair / sombre)
========================================================== */

.pf-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.pf-page--narrow { max-width: 860px; }

.pf-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.4rem;
}

.pf-head { margin-bottom: 2rem; }
.pf-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.2; margin-bottom: 0.5rem; }
.pf-head p { color: var(--text-light); max-width: 720px; }
.pf-head--row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }

.pf-section { margin-top: 2.5rem; }
.pf-section > h2, .pf-section__head h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.pf-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.pf-section__head a { color: var(--primary); font-weight: 600; }

/* ---------- Bandeau image ---------- */
.pf-hero {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: linear-gradient(180deg, rgba(var(--brand-night-rgb), 0.15), rgba(var(--brand-night-rgb), 0.85)), var(--pf-hero-image) center / cover no-repeat, var(--primary-dark);
}
.pf-hero__content { max-width: 1180px; width: 100%; margin: 0 auto; padding: 2.5rem 1.25rem; }
.pf-hero__content h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin: 0.4rem 0 0.6rem; }
.pf-hero__content p { max-width: 700px; opacity: 0.92; }
.pf-hero .pf-eyebrow { color: var(--hope-yellow); }
.pf-hero__facts { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-top: 1rem; font-weight: 600; }
.pf-hero__facts span { display: inline-flex; align-items: center; gap: 0.45rem; }
.pf-hero__facts img { width: 1.15rem; height: 1.15rem; object-fit: contain; flex: 0 0 1.15rem; }

/* ---------- Grilles et cartes ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.5rem; }
.pf-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.pf-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pf-card--link:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 50, 45, 0.12); }
.pf-card__media { aspect-ratio: 16 / 9; background: var(--surface-muted); overflow: hidden; position: relative; }
.pf-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-card__media .pf-tag { position: absolute; top: 0.8rem; left: 0.8rem; }
.pf-card__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.pf-card__body h3 { font-size: 1.12rem; line-height: 1.3; }
.pf-card__body p { color: var(--text-light); font-size: 0.95rem; }
.pf-card__meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.88rem; color: var(--text-light); }
.pf-card__footer { margin-top: auto; padding-top: 0.6rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

.pf-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
}
.pf-panel + .pf-panel { margin-top: 1.25rem; }
/* Dans une grille, les cartes sont côte à côte : même hauteur, pas de décalage */
.pf-grid > .pf-panel + .pf-panel { margin-top: 0; }
.pf-grid > .pf-panel { display: flex; flex-direction: column; height: 100%; }
.pf-panel h2, .pf-panel h3 { margin-bottom: 0.8rem; }
.pf-panel--accent { background: var(--surface-accent); border-color: transparent; }

/* ---------- Étiquettes et statuts ---------- */
.pf-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--surface-accent);
    color: var(--primary-dark);
}
.pf-tag--campaign { background: #CCFBF1; color: #0F766E; }
.pf-tag--caravan { background: #FFEDD5; color: #C2410C; }
.pf-tag--openday { background: #FEF3C7; color: #92400E; }
.pf-tag--blood { background: #FEE2E2; color: #B91C1C; }

.pf-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}
.pf-pill--ok { background: var(--success-bg); color: var(--success-text); }
.pf-pill--pending { background: var(--warning-bg); color: var(--warning-text); }
.pf-pill--ko { background: var(--danger-bg); color: var(--danger-text); }
.pf-pill--neutral { background: var(--surface-muted); color: var(--text-light); }
.pf-pill--progress { background: var(--surface-accent); color: var(--primary); }

/* ---------- Progression ---------- */
.pf-progress { height: 10px; border-radius: 999px; background: var(--surface-muted); overflow: hidden; }
.pf-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); border-radius: inherit; }
.pf-progress-info { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--text-light); }
.pf-progress-info strong { color: var(--text); }

/* ---------- Statistiques ---------- */
.pf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 1rem; }
.pf-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
}
.pf-stat__value { display: block; font-size: 1.7rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.pf-stat__label { display: block; color: var(--text-light); font-size: 0.88rem; margin-top: 0.3rem; }
.pf-stat__hint { display: block; font-size: 0.78rem; color: var(--text-light); margin-top: 0.2rem; }
.pf-stat--alert { border-color: var(--secondary); }
.pf-stat--alert .pf-stat__value { color: var(--secondary); }

/* ---------- Mise en page 2 colonnes ---------- */
.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2rem; align-items: start; }
.pf-layout__aside { position: sticky; top: 96px; }
.pf-prose p { margin-bottom: 1rem; }
.pf-prose ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.pf-prose li { margin-bottom: 0.35rem; }

/* ---------- Navigation d'un espace ---------- */
.pf-space-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 2rem;
    padding: 0.4rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.pf-space-nav a {
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-light);
}
.pf-space-nav a:hover { background: var(--surface-muted); color: var(--text); }
.pf-space-nav a[aria-current="page"] { background: var(--primary); color: var(--on-primary); }

.pf-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1.25rem; }
.pf-filters a {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.88rem;
    background: var(--card);
}
.pf-filters a[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pf-filters form { margin-left: auto; display: flex; gap: 0.5rem; }
.pf-filters input[type="search"] { min-width: 220px; }

/* ---------- Tableaux ---------- */
.pf-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.pf-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.pf-table th, .pf-table td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.pf-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); background: var(--surface-muted); }
.pf-table tr:last-child td { border-bottom: none; }
.pf-table small { color: var(--text-light); display: block; }
.pf-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.88em; }

/* ---------- Formulaires ---------- */
.pf-form { display: grid; gap: 1rem; }
.pf-field label, .pf-label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }
.pf-field .helptext, .pf-help { font-size: 0.82rem; color: var(--text-light); margin-top: 0.3rem; }
.pf-field .errorlist, .pf-errors { list-style: none; color: var(--danger-text); font-size: 0.85rem; margin-top: 0.3rem; }
.pf-field--check { display: flex; gap: 0.6rem; align-items: flex-start; }
.pf-field--check label { margin: 0; font-weight: 500; }
.pf-field--check input { margin-top: 0.3rem; accent-color: var(--primary); }
.pf-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pf-inline-form { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.pf-inline-form input[type="text"] { padding: 0.45rem 0.6rem; font-size: 0.85rem; }
.btn-sm { padding: 0.45rem 0.85rem !important; font-size: 0.85rem !important; }
.btn-danger { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.btn-danger:hover { filter: brightness(0.97); }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-muted); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.pf-checklist { list-style: none; display: grid; gap: 0.4rem; max-height: 280px; overflow: auto; padding: 0.2rem; }
.pf-checklist label { display: flex; gap: 0.6rem; align-items: center; font-weight: 500; }

/* Montants rapides et moyens de paiement */
.pf-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 96px), 1fr)); gap: 0.5rem; margin-bottom: 0.6rem; }
.pf-amounts button {
    padding: 0.65rem 0.4rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}
.pf-amounts button[aria-pressed="true"] { border-color: var(--primary); background: var(--surface-accent); color: var(--primary-dark); }

.pf-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 0.6rem; list-style: none; }
.pf-methods label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    background: var(--card);
}
.pf-methods label:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--surface-accent); }
.pf-methods img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.pf-methods input { accent-color: var(--primary); }

/* ---------- Instructions de paiement ---------- */
.pf-steps { list-style: none; counter-reset: step; display: grid; gap: 1rem; }
.pf-steps > li { counter-increment: step; position: relative; padding-left: 3rem; }
.pf-steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: var(--primary);
    color: var(--on-primary);
}
.pf-steps strong { display: block; margin-bottom: 0.2rem; }

.pf-payto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 14px;
    background: var(--surface-accent);
    margin: 0.6rem 0;
}
.pf-payto span { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); }
.pf-payto strong { font-size: 1.25rem; }
.pf-copy { display: inline-flex; align-items: center; gap: 0.5rem; }
.pf-copy button {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 8px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.pf-notice {
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    background: var(--surface-muted);
    font-size: 0.93rem;
}
.pf-notice--warning { background: var(--warning-bg); }
.pf-notice--danger { background: var(--danger-bg); border-left-color: var(--danger-text); }
.pf-notice--success { background: var(--success-bg); border-left-color: var(--success-text); }
.pf-notice + .pf-notice { margin-top: 0.75rem; }

.pf-receipt { text-align: center; }
.pf-receipt__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    background: var(--surface-accent);
    color: var(--primary);
}
.pf-receipt dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.2rem; text-align: left; margin: 1.5rem auto; max-width: 480px; }
.pf-receipt dt { color: var(--text-light); }
.pf-receipt dd { font-weight: 600; }

/* ---------- Itinéraire (caravane) ---------- */
.pf-timeline { list-style: none; position: relative; padding-left: 1.6rem; }
.pf-timeline::before { content: ""; position: absolute; left: 0.45rem; top: 0.3rem; bottom: 0.3rem; width: 2px; background: var(--border); }
.pf-timeline li { position: relative; padding-bottom: 1.2rem; }
.pf-timeline li::before {
    content: "";
    position: absolute;
    left: -1.42rem;
    top: 0.35rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--secondary);
    border: 3px solid var(--card);
    box-shadow: 0 0 0 1px var(--secondary);
}
.pf-timeline time { font-size: 0.85rem; color: var(--secondary); font-weight: 700; }
.pf-timeline h3 { font-size: 1.02rem; margin: 0.1rem 0; }
.pf-timeline p { color: var(--text-light); font-size: 0.92rem; }

/* ---------- Programme (portes ouvertes) ---------- */
.pf-program { list-style: none; display: grid; gap: 0.5rem; }
.pf-program li {
    padding: 0.7rem 1rem;
    border-radius: 10px;
    background: var(--surface-muted);
}

.pf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 0.75rem; }
.pf-gallery figure { margin: 0; border-radius: 12px; overflow: hidden; background: var(--surface-muted); }
.pf-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pf-gallery figcaption { padding: 0.4rem 0.6rem; font-size: 0.82rem; color: var(--text-light); }

.pf-seats { font-size: 2rem; font-weight: 800; color: var(--primary); }

/* ---------- Agenda ---------- */
.pf-agenda { list-style: none; display: grid; gap: 0.9rem; }
.pf-agenda li {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 1.2rem;
    align-items: center;
    padding: 1rem 1.2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.pf-agenda__date { text-align: center; border-right: 1px solid var(--border); padding-right: 1rem; }
.pf-agenda__date strong { display: block; font-size: 1.8rem; line-height: 1; color: var(--primary); }
.pf-agenda__date span { font-size: 0.8rem; text-transform: uppercase; color: var(--text-light); }
.pf-agenda h3 { font-size: 1.05rem; margin: 0.25rem 0; }
.pf-agenda p { color: var(--text-light); font-size: 0.9rem; }

/* ---------- Listes simples ---------- */
.pf-list { list-style: none; display: grid; gap: 0.75rem; }
.pf-list > li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}
.pf-list > li.is-unread { background: var(--surface-accent); font-weight: 600; }
.pf-list h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.pf-list p, .pf-list small { color: var(--text-light); font-size: 0.9rem; }
.pf-list__side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; flex-shrink: 0; }

.pf-empty {
    padding: 1.6rem;
    text-align: center;
    color: var(--text-light);
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: var(--card);
}

.pf-definition { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.2rem; font-size: 0.93rem; }
.pf-definition dt { color: var(--text-light); }
.pf-definition dd { font-weight: 600; word-break: break-word; }

/* ---------- Sollicitations sponsors ---------- */
.pf-invitation { border: 1px solid var(--secondary); border-radius: 16px; padding: 1.3rem; background: var(--card); }
.pf-invitation + .pf-invitation { margin-top: 1rem; }
.pf-invitation h3 { margin-bottom: 0.3rem; }
.pf-invitation details { margin-top: 1rem; }
.pf-invitation summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.pf-choice { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; }
.pf-choice label { display: flex; gap: 0.4rem; align-items: center; font-weight: 600; }

/* ---------- Notifications (en-tête) ---------- */
.notification-link { position: relative; }
.notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

/* ---------- Maintenance ---------- */
.pf-maintenance { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.pf-maintenance h1 { font-size: 2rem; margin: 1rem 0 0.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .pf-layout { grid-template-columns: minmax(0, 1fr); }
    .pf-layout__aside { position: static; }
}

@media (max-width: 640px) {
    .pf-page { padding: 1.8rem 1rem 3rem; }
    .pf-form-row { grid-template-columns: minmax(0, 1fr); }
    .pf-agenda li { grid-template-columns: 64px 1fr; }
    .pf-agenda li > :last-child { grid-column: 1 / -1; }
    .pf-filters form { margin-left: 0; width: 100%; }
    .pf-filters input[type="search"] { min-width: 0; flex: 1; }
    .pf-list > li { flex-direction: column; }
    .pf-list__side { align-items: flex-start; }
    .pf-hero { min-height: 260px; }
}

:root[data-theme="dark"] .pf-tag--campaign { background: #12352C; color: #5EEAD4; }
:root[data-theme="dark"] .pf-tag--caravan { background: #3A2414; color: #FDBA74; }
:root[data-theme="dark"] .pf-tag--openday { background: #392B17; color: #FCD34D; }
:root[data-theme="dark"] .pf-tag--blood { background: #3B2024; color: #FDA4AF; }

/* ---------- En-tête du site : rien ne passe à la ligne ---------- */
.header-container { gap: 1.5rem; }
.logo { flex-shrink: 0; white-space: nowrap; }
.nav > a,
.nav > .account-menu summary { white-space: nowrap; }
.nav > .btn { padding: 0.6rem 1.1rem; line-height: 1.2; }

@media (max-width: 1280px) and (min-width: 901px) {
    .header-container { padding: 0 1rem; gap: 1rem; }
    .nav { gap: 1.05rem; font-size: 0.9rem; }
    .logo span { display: none; }   /* logo seul pour laisser la place au menu */
    .nav > .btn { padding: 0.5rem 0.85rem; }
}


/* ---------- Actions réservées aux membres (visiteur) ---------- */
.method-card.is-locked {
    position: relative;
    cursor: not-allowed;
    background: var(--surface-muted);
    border-color: var(--border);
    color: var(--text-light);
    box-shadow: none;
    transform: none;
}
.method-card.is-locked img { filter: grayscale(1); opacity: 0.55; }
.method-card.is-locked strong,
.method-card.is-locked span { color: var(--text-light); }
.method-card.is-locked:hover { transform: none; box-shadow: none; border-color: var(--border); }
.method-card.is-locked { padding-top: 2.6rem; }
.method-lock {
    position: absolute;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-light) !important;
}
.method-account-note {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--surface-accent);
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.55;
}
.method-account-note a { color: var(--primary); font-weight: 700; text-decoration: underline; }

/* ---------- Don matériel : écran de connexion pour les visiteurs ---------- */
.material-account-gate {
    max-width: 640px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 12px 30px -18px rgba(var(--brand-rgb), 0.35);
}
.material-account-gate img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 1rem; }
.material-account-gate h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.material-account-gate p { color: var(--text-light); margin-bottom: 1.4rem; }
.material-account-gate__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.material-account-gate small { display: block; margin-top: 1.2rem; color: var(--text-light); }
.material-account-gate small a { color: var(--primary); font-weight: 600; text-decoration: underline; }


/* ---------- Header : menu déroulant « Nos actions » ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary:hover,
.nav-dropdown.is-current summary,
.nav-dropdown[open] summary { color: var(--primary); }
.nav-dropdown__caret { font-size: 0.75em; transition: transform 0.2s ease; }
.nav-dropdown[open] .nav-dropdown__caret { transform: rotate(180deg); }
.nav-dropdown__panel {
    position: absolute;
    z-index: 130;
    top: calc(100% + 0.9rem);
    left: 50%;
    width: 300px;
    display: grid;
    gap: 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    transform: translateX(-50%);
    animation: nav-drop 0.18s ease both;
}
@keyframes nav-drop { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translateX(-50%); } }
.nav-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    color: var(--text);
    transition: background-color 0.15s ease;
}
.nav-dropdown__item:hover { background: var(--surface-accent); }
.nav-dropdown__item img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.nav-dropdown__item strong { display: block; font-size: 0.93rem; color: var(--text); }
.nav-dropdown__item small { display: block; font-size: 0.78rem; color: var(--text-light); font-weight: 400; }



/* ---------- Cartes : image et titre cliquables ---------- */
.card-media-link { display: block; cursor: pointer; overflow: hidden; }
.card-media-link img { transition: transform 0.4s ease; }
.card-media-link:hover img { transform: scale(1.05); }
.card-title-link { color: inherit; }
.card-title-link:hover { color: var(--primary); }

.pf-grid > .pf-panel > .pf-tag { align-self: flex-start; }

/* ==========================================================
   HEROS : toutes les pages ont la même hauteur que le hero
   de la page Don matériel (430 px sur ordinateur).
   Préfixe « body » : passe devant les règles des autres feuilles.
========================================================== */
body .hero,
body .material-hero,
body .page-header,
body .pf-hero,
body .detail-hero,
body .donor-dashboard__hero {
    box-sizing: border-box;
    height: 430px;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

body .hero,
body .page-header {
    display: flex;
    align-items: center;
}

body .hero > .hero-container,
body .page-header > .page-header-content { width: 100%; }

/* Accueil : on garde la place pour le bandeau de chiffres qui chevauche le bas du hero */
body .hero:not(.about-page-hero) { padding-bottom: 2.85rem; }

@media (max-width: 900px) {
    body .hero,
    body .material-hero,
    body .page-header,
    body .pf-hero,
    body .detail-hero,
    body .donor-dashboard__hero {
        height: auto;
        min-height: 360px;
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    body .detail-hero { height: 360px; padding: 0; }
    body .hero:not(.about-page-hero) { padding-bottom: 5rem; }
}

/* ==========================================================
   NOTIFICATIONS : menu déroulant sous la cloche (plus de page)
========================================================== */
.notif-menu { position: relative; flex: 0 0 auto; }
.notif-menu > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.15s;
}
.notif-menu > summary::-webkit-details-marker { display: none; }
.notif-menu > summary:hover,
.notif-menu[open] > summary { background: var(--surface-accent); }
.notif-menu .notification-badge { top: 1px; right: -2px; }

.notif-panel {
    position: absolute;
    z-index: 130;
    top: calc(100% + 0.7rem);
    right: 0;  /* la cloche est au bord droit de l’en-tête */
    width: 380px;
    max-width: calc(100vw - 2rem);
    display: flex;
    flex-direction: column;
    max-height: min(560px, calc(100vh - 110px));
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    box-shadow: 0 22px 50px -18px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    font-size: 0.9rem;
    white-space: normal;
}
.notif-menu[open] .notif-panel { animation: notif-in 0.16s ease-out; }
@keyframes notif-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.notif-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--border);
}
.notif-panel__head strong { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.notif-panel__count {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.72rem;
}
.notif-panel__head form { margin: 0; }
.notif-panel__link {
    border: 0;
    background: none;
    color: var(--primary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.notif-panel__link:hover { text-decoration: underline; }

.notif-list { list-style: none; overflow-y: auto; flex: 1; margin: 0; padding: 0.35rem; }
.notif-item {
    display: flex;
    gap: 0.7rem;
    padding: 0.75rem 0.8rem;
    border-radius: 12px;
    color: var(--text);
    transition: background-color 0.15s;
}
.notif-item:hover { background: var(--surface-muted); }
.notif-item.is-unread { background: color-mix(in srgb, var(--primary) 7%, var(--card)); }
.notif-item.is-unread:hover { background: var(--surface-accent); }
.notif-item__dot { flex: 0 0 9px; height: 9px; margin-top: 0.4rem; border-radius: 50%; background: transparent; }
.notif-item.is-unread .notif-item__dot { background: var(--secondary); }
.notif-item__body { display: grid; gap: 0.2rem; min-width: 0; }
.notif-item__body strong { font-size: 0.88rem; line-height: 1.35; }
.notif-item:not(.is-unread) .notif-item__body strong { font-weight: 600; }
.notif-item__text { color: var(--text-light); font-size: 0.82rem; line-height: 1.4; }
.notif-item__body time { color: var(--text-light); font-size: 0.74rem; }

.notif-empty { display: grid; justify-items: center; gap: 0.6rem; padding: 2rem 1rem; color: var(--text-light); text-align: center; }
.notif-empty img { width: 34px; height: 34px; opacity: 0.45; }

/* Préférence d'e-mail : fixée en bas du menu */
.notif-prefs {
    flex-shrink: 0;
    margin: 0;
    padding: 0.85rem 1.1rem;
    border-top: 1px solid var(--border);
    background: var(--surface-muted);
}
.notif-switch { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; }
.notif-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.notif-switch__track {
    position: relative;
    flex: 0 0 40px;
    height: 22px;
    margin-top: 0.1rem;
    border-radius: 999px;
    background: var(--border);
    transition: background-color 0.2s;
}
.notif-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
}
.notif-switch input:checked + .notif-switch__track { background: var(--primary); }
.notif-switch input:checked + .notif-switch__track::after { transform: translateX(18px); }
.notif-switch input:focus-visible + .notif-switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }
.notif-switch__text { display: grid; gap: 0.15rem; }
.notif-switch__text strong { font-size: 0.85rem; }
.notif-switch__text small { color: var(--text-light); font-size: 0.75rem; line-height: 1.35; }

.notif-panel__count, .notif-panel__link { white-space: nowrap; }

/* ==========================================================
   NOTIFICATIONS EN TEMPS RÉEL : badge animé + annonces à l'écran
========================================================== */
.notification-badge[hidden], .notif-panel__count[hidden], [data-notif-markall][hidden] { display: none; }
.notification-badge.is-pulse { animation: notif-pulse 0.9s ease-out 2; }
@keyframes notif-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--secondary) 60%, transparent); transform: scale(1); }
    40% { transform: scale(1.2); }
    100% { box-shadow: 0 0 0 10px transparent; transform: scale(1); }
}
.notif-toasts {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 400;
    display: grid;
    gap: 0.6rem;
    width: min(360px, calc(100vw - 2rem));
}
.notif-toast {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    box-shadow: 0 20px 44px -18px rgba(15, 23, 42, 0.45);
    animation: toast-in 0.25s ease-out;
    transition: opacity 0.5s, transform 0.5s;
}
.notif-toast.is-leaving { opacity: 0; transform: translateY(8px); }
.notif-toast__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-accent); font-size: 1rem; }
.notif-toast__text { display: grid; gap: 0.15rem; min-width: 0; }
.notif-toast__text strong { font-size: 0.9rem; }
.notif-toast__text small { color: var(--text-light); font-size: 0.8rem; line-height: 1.4; }
.notif-toast__close { border: 0; background: transparent; color: var(--text-light); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ==========================================================
   VISIONNEUSE DE PHOTOS (plein écran, se ferme avec ✕, Échap ou « retour »)
========================================================== */
html.has-lightbox { overflow: hidden; }
a[data-lightbox] { cursor: zoom-in; }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    grid-template-rows: auto minmax(0, 1fr);
    background: rgba(var(--brand-night-rgb), 0.94);
    color: #fff;
    animation: toast-in 0.18s ease-out;
}
.lightbox[hidden] { display: none; }
.lightbox__bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.1rem; }
.lightbox__counter { font-size: 0.9rem; font-weight: 700; opacity: 0.85; }
.lightbox__close {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1rem; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.12);
    color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.lightbox__close:hover, .lightbox__close:focus-visible { background: rgba(255, 255, 255, 0.25); }
.lightbox__figure { grid-column: 2; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; gap: 0.8rem; margin: 0; padding: 0 0 1.5rem; min-height: 0; }
.lightbox__media { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
.lightbox__media img, .lightbox__media video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7); }
.lightbox__caption { max-width: 720px; text-align: center; font-size: 0.95rem; opacity: 0.9; }
.lightbox__nav {
    align-self: center; justify-self: center;
    width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1);
    color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lightbox__nav:hover, .lightbox__nav:focus-visible { background: rgba(255, 255, 255, 0.24); }
.lightbox__nav[hidden] { display: none; }
.lightbox__nav--prev { grid-column: 1; grid-row: 2; }
.lightbox__nav--next { grid-column: 3; grid-row: 2; }
@media (max-width: 700px) {
    .lightbox { grid-template-columns: 0 minmax(0, 1fr) 0; }
    .lightbox__nav { position: fixed; bottom: 1rem; }
    .lightbox__nav--prev { left: 1rem; }
    .lightbox__nav--next { right: 1rem; }
    .lightbox__figure { padding-bottom: 5rem; }
    .lightbox__close span { display: none; }
}

/* Reçu de don : téléchargement du PDF */
.pf-receipt__download { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.6rem 0.9rem; margin: 1.2rem 0; padding: 1rem 1.1rem; border-radius: 14px; background: var(--surface-accent); text-align: left; }
.pf-receipt__download > span { font-size: 1.8rem; }
.pf-receipt__download strong { display: block; }
.pf-receipt__download small { color: var(--text-light); }
.pf-receipt__download .btn { grid-column: 1 / -1; justify-self: start; }
.history-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.history-item__receipt { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.7rem; border-radius: 999px; background: var(--surface-accent); color: var(--primary); font-weight: 700; font-size: 0.82rem; }
.history-item__receipt:hover { background: var(--primary); color: var(--on-primary); }

/* ==========================================================
   « SOUTENU PAR » : logo (ou initiales) + nom ; clic = fiche du partenaire
========================================================== */
.supporters { display: grid; gap: 0.8rem; }
.supporters__title { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); }
.supporters__list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 0; padding: 0; }
.supporters__item {
    display: grid; justify-items: center; gap: 0.45rem; width: 132px; padding: 0.8rem 0.6rem;
    border: 1px solid var(--border); border-radius: 16px; background: var(--card); color: var(--text);
    font: inherit; text-align: center; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
button.supporters__item { cursor: pointer; }
button.supporters__item:hover, button.supporters__item:focus-visible { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 14px 28px -20px rgba(15, 59, 55, 0.7); }
.supporters__logo { display: grid; place-items: center; width: 100%; height: 56px; border-radius: 10px; background: #fff; overflow: hidden; }
.supporters__logo img { max-width: 100%; max-height: 48px; object-fit: contain; }
.supporters__logo.is-initials { width: 56px; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 1.05rem; }
.supporters__name { font-weight: 800; font-size: 0.82rem; line-height: 1.25; }
.supporters__hint { font-size: 0.8rem; color: var(--text-light); }
.supporters__hint a { color: var(--primary); font-weight: 700; }
.pf-section .supporters, .detail-main .supporters { margin-top: 1.5rem; }

.partner-card {
    width: min(460px, calc(100vw - 2rem)); padding: 1.6rem; border: 0; border-radius: 20px;
    background: var(--card); color: var(--text); box-shadow: 0 30px 70px -20px rgba(15, 23, 42, 0.5);
}
.partner-card::backdrop { background: rgba(var(--brand-night-rgb), 0.55); backdrop-filter: blur(3px); }
.partner-card[open] { animation: toast-in 0.2s ease-out; }
.partner-card__close { position: absolute; top: 0.9rem; right: 0.9rem; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-muted); color: var(--text); cursor: pointer; }
.partner-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; padding-right: 2rem; }
.partner-card__logo { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 18px; border: 1px solid var(--border); background: #fff; overflow: hidden; }
.partner-card__logo img { max-width: 64px; max-height: 64px; object-fit: contain; }
.partner-card__logo.is-initials { background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 1.5rem; border: 0; }
.partner-card__eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); }
.partner-card h2 { font-size: 1.3rem; line-height: 1.2; }
.partner-card__sector { color: var(--text-light); font-size: 0.9rem; }
.partner-card__about { margin-top: 1rem; font-size: 0.92rem; line-height: 1.55; }
.partner-card__facts { list-style: none; display: grid; gap: 0.5rem; margin: 1rem 0 0; padding: 0; }
.partner-card__facts li { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; border-radius: 12px; background: var(--surface-muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.partner-card__facts li span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--card); }
.partner-card__facts a { color: var(--primary); font-weight: 700; }
.partner-card__empty { margin-top: 1rem; padding: 0.9rem; border-radius: 12px; background: var(--surface-muted); color: var(--text-light); font-size: 0.9rem; }
.partner-card__thanks { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-light); text-align: center; }

/* ==========================================================
   THÈME SAISONNIER : bandeau et décor animé (choisis par l'informaticien)
========================================================== */
.season-banner {
    position: relative; z-index: 120; display: flex; align-items: center; justify-content: center; gap: 0.8rem;
    padding: 0.5rem 3rem; background: linear-gradient(90deg, var(--brand-deep), rgb(var(--brand-rgb)), var(--brand-deep));
    color: #fff; font-size: 0.9rem; font-weight: 700; text-align: center;
}
.season-banner[hidden] { display: none; }
.season-banner__close { position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #fff; cursor: pointer; }
.season-banner__close:hover { background: rgba(255, 255, 255, 0.3); }
.season-layer { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.season-layer span { position: absolute; top: -30px; animation: season-fall linear infinite; will-change: transform; }
.season-layer.is-paused span { animation-play-state: paused; }
.season-layer--snow span { color: #fff; text-shadow: 0 0 4px rgba(var(--brand-deep-rgb), 0.45); }
.season-layer--hearts span { color: var(--primary); }
.season-layer--ribbons span { filter: saturate(1.2); }
.season-layer--confetti span:nth-child(3n) { color: var(--primary); }
.season-layer--confetti span:nth-child(3n+1) { color: var(--secondary); }
.season-layer--confetti span:nth-child(3n+2) { color: #FCD116; }
@keyframes season-fall {
    from { transform: translate3d(0, -5vh, 0) rotate(0deg); }
    to { transform: translate3d(var(--drift, 0), 105vh, 0) rotate(360deg); }
}
.partner-card { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100vh - 2rem); overflow-y: auto; }

/* ==========================================================
   PAGES D'ERREUR (404) ET PARTAGE D'UNE ACTIVITÉ
========================================================== */
.error-page { display: grid; place-items: center; min-height: 60vh; padding: 3rem 1rem; }
.error-page__card { max-width: 560px; padding: 2.5rem 2rem; border-radius: 24px; border: 1px solid var(--border); background: var(--card); text-align: center; box-shadow: 0 30px 70px -40px rgba(var(--brand-deep-rgb), 0.6); }
.error-page__code { font-size: clamp(4rem, 12vw, 6rem); font-weight: 900; line-height: 1; color: var(--primary); }
.error-page h1 { margin: 0.6rem 0; font-size: 1.6rem; }
.error-page p { color: var(--text-light); line-height: 1.6; }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1.4rem; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.5rem; }
.share__label { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-light); margin-right: 0.3rem; }
.share__btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; text-decoration: none; }
.share__icon { width: 1.05rem; height: 1.05rem; flex: 0 0 1.05rem; object-fit: contain; fill: currentColor; }
.share__btn--whatsapp .share__icon { color: #128C4B; }
.share__btn--facebook .share__icon { border-radius: 50%; }
.share__icon--link { color: var(--primary); }
.share__btn:hover { border-color: var(--primary); color: var(--primary); }
.share__btn--whatsapp:hover { border-color: #128C4B; color: #128C4B; }
.share__btn--facebook:hover { border-color: #1D4ED8; color: #1D4ED8; }
.share__btn.is-copied { background: var(--success-bg); color: var(--success-text); border-color: transparent; }

/* Filtre par catégorie (liste des campagnes) */
.category-filter.category-filter { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.4rem; margin-top: 0.8rem; }
.category-filter a { padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--surface-muted); color: var(--text); font-size: 0.84rem; font-weight: 700; }
.category-filter a.is-active { background: var(--secondary); color: #fff; }

/* Feux d'artifice (thème Bonne année) */
.season-layer--fireworks .firework { position: absolute; width: 0; height: 0; }
.season-layer--fireworks .firework i {
    position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%;
    animation: firework-spark 1.3s cubic-bezier(.15, .7, .3, 1) forwards;
    transform: rotate(var(--angle)) translateY(0);
}
@keyframes firework-spark {
    0% { transform: rotate(var(--angle)) translateY(0) scale(1); opacity: 1; }
    100% { transform: rotate(var(--angle)) translateY(-90px) scale(0.4); opacity: 0; }
}

/* ==========================================================
   PREMIÈRE CONNEXION : remplacer le mot de passe provisoire
========================================================== */
.first-login { display: grid; place-items: center; min-height: calc(100vh - 140px); padding: 2.5rem 1rem;
    background: radial-gradient(70% 60% at 50% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%); }
.first-login__card { width: min(480px, 100%); padding: 2rem 1.8rem; border-radius: 24px; border: 1px solid var(--border); background: var(--card); box-shadow: 0 30px 70px -40px rgba(var(--brand-deep-rgb), 0.6); }
.first-login__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-accent); font-size: 1.6rem; }
.first-login__eyebrow { margin-top: 1rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--secondary); }
.first-login h1 { margin: 0.2rem 0 0.5rem; font-size: 1.5rem; }
.first-login__lead { color: var(--text-light); line-height: 1.55; margin-bottom: 1.2rem; }
.first-login__field { position: relative; }
.first-login__field .form-input { padding-right: 3rem; }
.first-login__eye { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 1.05rem; }
.first-login__meter { height: 6px; margin-top: 0.5rem; border-radius: 99px; background: var(--surface-muted); overflow: hidden; }
.first-login__meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--danger-text); transition: width 0.2s; }
.first-login__meter span[data-tone="medium"] { background: var(--warning-text); }
.first-login__meter span[data-tone="good"] { background: var(--success-text); }
.first-login__strength { color: var(--text-light); font-size: 0.8rem; }
.first-login__tips { margin: 0.4rem 0 1rem; padding-left: 1.1rem; color: var(--text-light); font-size: 0.82rem; line-height: 1.5; }
.first-login__logout { margin-top: 1rem; text-align: center; }
.first-login__logout button { border: 0; background: none; color: var(--text-light); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }

/* ==========================================================
   MODE APERÇU DE L'INFORMATICIEN (simulation)
========================================================== */
.preview-bar {
    position: relative; z-index: 200; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 0.5rem 0.9rem; padding: 0.5rem 1rem; background: repeating-linear-gradient(135deg, #1F2933, #1F2933 14px, #27323D 14px, #27323D 28px);
    color: #fff; font-size: 0.86rem;
}
.preview-bar__badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: #FBBF24; color: #1F2933; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; }
.preview-bar__switch select { padding: 0.3rem 0.6rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.12); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.preview-bar__switch option { color: #1F2933; }
.preview-bar__exit { padding: 0.3rem 0.75rem; border-radius: 8px; background: #fff; color: #1F2933; font-weight: 800; text-decoration: none; }
.preview-bar__exit:hover { background: #FBBF24; }

/* ---- Séances de collecte de sang (page Don de sang, campagnes, caravanes) ---- */
.blood-sessions .pf-tag + .pf-tag { margin-left: 0.35rem; }
.blood-session { scroll-margin-top: 110px; }
.blood-session:target { outline: 2px solid var(--secondary); outline-offset: 3px; }
.blood-session--full, .blood-session--closed { opacity: 0.78; }
.blood-session .pf-list__side .pf-pill { max-width: 240px; text-align: center; white-space: normal; }
.blood-focus { margin: 0 0 0.8rem; padding: 0.7rem 0.9rem; border-radius: 12px; background: var(--surface-accent, var(--surface-muted)); font-size: 0.92rem; }
.blood-focus a { color: var(--primary); font-weight: 700; }


/* ==========================================================
   EN-TÊTE RESPONSIVE : menu burger et tiroir latéral (≤ 900 px)
   Ordinateur : barre classique. Téléphone / tablette : logo + cloche + bouton « menu » ;
   la navigation, le compte, la langue et le thème s'ouvrent dans un tiroir.
========================================================== */
.header-tools { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }
.nav-burger, .nav-drawer__head, .nav-backdrop { display: none; }
.nav-prefs { display: contents; }

@media (max-width: 900px) {
    .header-container { height: 64px; min-height: 0; flex-wrap: nowrap; gap: 0.75rem; padding: 0 1rem; }
    .logo { min-width: 0; font-size: 1.05rem; }
    .logo img { height: 36px !important; }
    .logo span { overflow: hidden; text-overflow: ellipsis; }
    .header-tools { margin-left: auto; }

    .nav-burger {
        display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
        border: 1px solid var(--border); border-radius: 12px; background: transparent; color: var(--text); cursor: pointer;
    }
    .nav-burger:hover, .nav-burger:focus-visible { border-color: var(--primary); color: var(--primary); }
    .nav-burger__bars { display: grid; gap: 4px; width: 20px; }
    .nav-burger__bars span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s ease, opacity 0.2s ease; }
    .nav-burger[aria-expanded="true"] .nav-burger__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-burger[aria-expanded="true"] .nav-burger__bars span:nth-child(2) { opacity: 0; }
    .nav-burger[aria-expanded="true"] .nav-burger__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    /* Le tiroir */
    .nav {
        position: fixed; z-index: 1002; top: 0; right: 0; bottom: 0;
        width: min(86vw, 360px); min-width: 0;
        display: flex; flex-direction: column; align-items: stretch; gap: 0;
        padding: 0 1.1rem 1.25rem; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
        background: var(--card); color: var(--text); box-shadow: -18px 0 40px rgba(15, 23, 42, 0.2);
        font-size: 1rem;
        transform: translateX(104%); visibility: hidden;
        transition: transform 0.28s ease, visibility 0s linear 0.28s;
    }
    .nav.is-open { transform: none; visibility: visible; transition: transform 0.28s ease; }
    .nav-drawer__head {
        position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
        margin: 0 -1.1rem 0.35rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--border);
        background: var(--card); font-weight: 800; font-size: 1.05rem;
    }
    .nav-drawer__close {
        width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px;
        background: transparent; color: var(--text); font-size: 1rem; cursor: pointer;
    }
    .nav > a { display: flex; align-items: center; min-height: 50px; padding: 0.2rem 0.35rem; border-bottom: 1px solid var(--border); white-space: normal; }
    .nav > a:hover { color: var(--primary); }
    .nav > a.btn { justify-content: center; min-height: 48px; margin-top: 1rem; padding: 0.7rem 1rem; border-bottom: 0; }

    .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 1001; background: rgba(15, 23, 42, 0.45); opacity: 0; transition: opacity 0.25s ease; }
    .nav-backdrop.is-visible { opacity: 1; }
    .nav-backdrop[hidden] { display: none; }
    body.nav-locked { overflow: hidden; }

    /* « Nos actions » : les trois liens détaillés, toujours dépliés */
    .nav > .nav-dropdown { padding: 0.6rem 0 0.4rem; border-bottom: 1px solid var(--border); }
    .nav-dropdown summary {
        min-height: 30px; color: var(--text-light); font-size: 0.75rem; font-weight: 800;
        letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none;
    }
    .nav-dropdown__caret { display: none; }
    .nav-dropdown__panel,
    .nav-dropdown:not([open]) > .nav-dropdown__panel {
        position: static; display: grid; width: auto; gap: 0.15rem; padding: 0; border: 0;
        background: none; box-shadow: none; transform: none; animation: none;
    }
    .nav-dropdown__item { padding: 0.55rem 0.35rem; }

    /* Compte : une section du tiroir (toujours dépliée) */
    .nav > .account-menu { order: 5; margin-top: 0.6rem; padding-top: 0.4rem; }
    .account-menu summary { min-height: 40px; font-weight: 800; pointer-events: none; }
    .account-menu summary span { display: none; }
    .account-dropdown { position: static; width: auto; gap: 0.1rem; padding: 0; border: 0; background: none; box-shadow: none; }
    .account-dropdown__action { padding: 0.75rem 0.35rem; font-size: 0.95rem; }

    /* Langue et thème en bas du tiroir */
    .nav-prefs { order: 6; display: flex; align-items: center; gap: 0.6rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
    .nav-prefs .lang-switch__btn, .nav-prefs .theme-toggle { width: 44px; height: 44px; flex: 0 0 44px; }

    /* Notifications : panneau pleine largeur sous l'en-tête */
    .notif-panel {
        position: fixed; top: 72px; left: 0.75rem; right: 0.75rem;
        width: auto; max-width: none; max-height: calc(100dvh - 90px);
    }
}

@media (max-width: 359px) {
    .logo span { display: none; }   /* très petits écrans : le logo seul */
}

:root[data-theme="dark"] .nav-backdrop { background: rgba(0, 0, 0, 0.6); }

/* ---- Accueil : bande des chiffres lisible sur téléphone ---- */
@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -1.75rem 1rem 0; padding: 0; }  /* ne recouvre plus le bouton du bandeau */
    .stat-card { min-width: 0; padding: 1rem; gap: 0.75rem; }
    .stat-text { min-width: 0; }
}
@media (max-width: 480px) {
    .stat-card { flex-direction: column; align-items: flex-start; gap: 0.45rem; padding: 0.9rem 0.85rem; }
    .stat-icon-img { width: 36px; height: 36px; }
    .stat-card .number { font-size: 1.3rem; }
    .stat-card .label { font-size: 0.8rem; }
}

/* ---- Contact : une seule colonne sur téléphone et tablette
   (la règle mobile de style.css était écrasée par la règle de base écrite après elle) ---- */
@media (max-width: 900px) {
    .contact-panel { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================
   DON EN 4 ÉTAPES : montant → mode de paiement → numéro → récapitulatif
   (page d’une campagne, page « Faire un don », versement d’un sponsor)
========================================================== */
.donate { display: grid; gap: 1rem; }
.donate-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.donate-progress li { display: grid; justify-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 700; color: var(--text-light); text-align: center; line-height: 1.2; }
.donate-progress li span {
    display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid var(--border); background: var(--card); font-size: 0.8rem; transition: all 0.2s ease;
}
.donate-progress li.is-current { color: var(--primary); }
.donate-progress li.is-current span { border-color: var(--primary); background: var(--primary); color: #fff; }
.donate-progress li.is-done { color: var(--text); cursor: pointer; }
.donate-progress li.is-done span { border-color: var(--primary); color: var(--primary); font-size: 0; }
.donate-progress li.is-done span::before { content: "✓"; font-size: 0.85rem; }
.donate:not(.is-enhanced) .donate-progress { display: none; }

.donate-step { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 0.55rem; }
.donate-step legend { margin-bottom: 0.4rem; padding: 0; font-weight: 800; font-size: 1rem; color: var(--text); outline: none; }
.donate.is-enhanced .donate-step:not(.is-active) { display: none; }
.donate.is-enhanced .donate-step.is-active { animation: donate-in 0.22s ease both; }
@keyframes donate-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.donate-label { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.donate-hint { margin: 0; font-size: 0.8rem; color: var(--text-light); }
.donate-error { margin: 0; color: var(--danger-text, #B42318); font-size: 0.82rem; font-weight: 600; }
.donate-error[hidden] { display: none; }
.donate-alert { padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--danger-bg, #FEE4E2); color: var(--danger-text, #B42318); font-size: 0.88rem; font-weight: 600; }
.donate-alert p { margin: 0; }
.donate-nav { display: flex; gap: 0.6rem; margin-top: 0.4rem; }
.donate-nav .btn { flex: 1 1 0; justify-content: center; text-align: center; }
.donate:not(.is-enhanced) [data-next], .donate:not(.is-enhanced) [data-prev] { display: none; }

/* Modes de paiement */
.donate-methods { display: grid; gap: 0.55rem; }
.donate-method {
    position: relative; display: grid; grid-template-columns: auto 42px minmax(0, 1fr); align-items: center; gap: 0.75rem;
    padding: 0.7rem 0.85rem; border: 1.5px solid var(--border); border-radius: 14px; background: var(--card); cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.donate-method:hover { border-color: var(--primary); }
.donate-method:has(input:checked) { border-color: var(--primary); background: var(--surface-accent); box-shadow: 0 0 0 3px rgba(var(--brand-rgb, 15, 118, 110), 0.12); }
.donate-method:has(input:focus-visible) { outline: 3px solid var(--secondary); outline-offset: 2px; }
.donate-method input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.donate-method__logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; overflow: hidden; background: #fff; color: var(--primary); border: 1px solid var(--border); }
.donate-method__logo img { width: 100%; height: 100%; object-fit: cover; }
.donate-method__logo svg { width: 26px; height: 26px; }
.donate-method__text { display: grid; gap: 0.1rem; min-width: 0; }
.donate-method__text strong { font-size: 0.95rem; color: var(--text); }
.donate-method__text small { font-size: 0.76rem; color: var(--text-light); }
.donate-method.is-disabled { cursor: not-allowed; opacity: 0.62; background: var(--surface-muted); }
.donate-method.is-disabled:hover { border-color: var(--border); }
.donate-method__soon { display: inline-block; width: fit-content; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--warning-bg, #FEF0C7); color: var(--warning-text, #93370D) !important; font-weight: 700; }

/* Numéro */
.donate-phone { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; }
.donate-phone > span { display: grid; place-items: center; padding: 0 0.8rem; border: 1px solid var(--border); border-right: 0; border-radius: 10px 0 0 10px; background: var(--surface-muted); color: var(--text-light); font-weight: 700; font-size: 0.9rem; }
.donate-phone input { border-radius: 0 10px 10px 0; font-size: 1.05rem; letter-spacing: 0.03em; }
.donate-identity { display: grid; gap: 0.45rem; margin-top: 0.5rem; padding-top: 0.8rem; border-top: 1px dashed var(--border); }
.donate-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text); }
.donate-check input { accent-color: var(--primary); }

/* Récapitulatif */
.recap-ico { display: grid; place-items: center; width: 22px; font-size: 1rem; }
.donate-safety { margin: 0; padding: 0.7rem 0.85rem; border-radius: 12px; background: var(--surface-accent); color: var(--text); font-size: 0.82rem; line-height: 1.5; }
.donate-pay { font-weight: 800; }

/* Carte latérale d’une campagne : plus compacte */
.donate--compact .donate-progress li { font-size: 0.66rem; }
.donate--compact .donate-method { grid-template-columns: auto 36px minmax(0, 1fr); padding: 0.6rem 0.7rem; }
.donate--compact .donate-method__logo { width: 36px; height: 36px; }

/* ==========================================================
   ATTENTE DU PAIEMENT : validation sur le téléphone
========================================================== */
.pay-wait { display: grid; justify-items: center; gap: 0.9rem; margin: 1rem auto 3rem; padding: 2.2rem 1.6rem; border-radius: 22px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 18px 44px -24px rgba(15, 23, 42, 0.35); text-align: center; }
.pay-wait h1 { margin: 0; font-size: clamp(1.35rem, 4vw, 1.8rem); }
.pay-wait__lead { margin: 0; max-width: 34rem; color: var(--text); font-size: 1.02rem; line-height: 1.55; }
.pay-wait__phone { position: relative; display: grid; place-items: center; width: 96px; height: 120px; color: var(--primary); }
.pay-wait__phone svg { width: 64px; height: 96px; position: relative; z-index: 1; }
.pay-wait__pulse { position: absolute; inset: 10px; border-radius: 50%; background: rgba(var(--brand-rgb, 15, 118, 110), 0.15); animation: pay-pulse 1.6s ease-out infinite; }
@keyframes pay-pulse { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.pay-wait__steps { display: grid; gap: 0.5rem; max-width: 32rem; margin: 0; padding: 0; list-style: none; counter-reset: pay; text-align: left; }
.pay-wait__steps li { counter-increment: pay; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0.6rem; align-items: start; font-size: 0.92rem; color: var(--text); }
.pay-wait__steps li::before { content: counter(pay); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-accent); color: var(--primary); font-weight: 800; font-size: 0.8rem; }
.pay-wait__status { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0.3rem 0 0; padding: 0.55rem 1rem; border-radius: 999px; background: var(--surface-muted); font-weight: 700; color: var(--text); }
.pay-wait__spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: pay-spin 0.9s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
.pay-wait.is-success .pay-wait__spinner { animation: none; border-color: var(--primary); }
.pay-wait__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--danger-bg, #FEE4E2); color: var(--danger-text, #B42318); font-size: 2rem; font-weight: 800; }
.pay-wait__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; width: 100%; max-width: 32rem; margin: 0; }
.pay-wait__facts div { padding: 0.6rem; border-radius: 12px; background: var(--surface-muted); }
.pay-wait__facts dt { font-size: 0.72rem; color: var(--text-light); }
.pay-wait__facts dd { margin: 0.15rem 0 0; font-weight: 800; overflow-wrap: anywhere; }
.pay-wait__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
@media (max-width: 520px) {
    .pay-wait { padding: 1.6rem 1.1rem; }
    .pay-wait__facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .pay-wait__pulse, .pay-wait__spinner, .donate.is-enhanced .donate-step.is-active { animation: none; }
}
