/* ==========================================================================
   Agenda commun — tous les calendriers FullCalendar du produit
   (js/eb_agenda.js pose .eb-agenda sur la racine et --ev / --ev-rgb sur
   chaque activité : couleur de son type, pleine et en composantes).

   Modèle : les étiquettes du planning de ménage de Léa — fond teinté de la
   couleur, liseré plein à gauche, texte sombre. La couleur reste lisible pour
   TOUS les types (le blanc sur orange ou sur jaune ne l'était pas), et un mur
   de dix activités le même jour ne fait plus un aplat rouge.
   ========================================================================== */

.eb-agenda {
    --ag-soft: .14;
    --ag-soft-hover: .24;
    --ag-radius: 6px;
    --ag-text: var(--eb-text, #1E293B);
    --ag-muted: var(--eb-text-secondary, #64748B);
    --ag-line: var(--eb-border, #E2E8F0);
    --ag-surface: var(--eb-surface, #fff);
    --ag-weekend: var(--eb-surface-muted, #F8FAFC);
    --ag-accent: var(--eb-primary, #2563EB);
}
:root.dark .eb-agenda {
    --ag-soft: .26;
    --ag-soft-hover: .36;
}

/* ── Grille ─────────────────────────────────────────────────────────────── */
.eb-agenda .fc-theme-standard td,
.eb-agenda .fc-theme-standard th,
.eb-agenda.fc-theme-standard td,
.eb-agenda.fc-theme-standard th,
.eb-agenda .fc-theme-standard .fc-scrollgrid,
.eb-agenda.fc-theme-standard .fc-scrollgrid {
    border-color: var(--ag-line);
}
.eb-agenda .fc-day-sat:not(.fc-col-header-cell),
.eb-agenda .fc-day-sun:not(.fc-col-header-cell) {
    background: var(--ag-weekend);
}
.eb-agenda .fc-daygrid-day.fc-day-today,
.eb-agenda .fc-timegrid-col.fc-day-today {
    background: var(--eb-primary-bg) !important;
}
.eb-agenda .fc-col-header-cell-cushion {
    font-size: var(--eb-fs-sm);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ag-muted);
    text-decoration: none !important;
}

/* ── Étiquette d'activité ───────────────────────────────────────────────── */
.eb-agenda .fc .fc-event.eb-ag-ev,
.eb-agenda.fc .fc-event.eb-ag-ev,
#calendar.eb-agenda .fc-event.eb-ag-ev {
    background: rgba(var(--ev-rgb, 100, 116, 139), var(--ag-soft)) !important;
    border: 0 !important;
    border-inline-start: 3px solid var(--ev, #64748B) !important;
    border-radius: var(--ag-radius) !important;
    color: var(--ag-text) !important;
    box-shadow: none;
    padding: 0 !important;
    margin: 1px 4px 2px !important;
    text-decoration: none !important;
    transition: background-color .12s ease;
}
@media (hover: hover) {
    .eb-agenda .fc .fc-event.eb-ag-ev:hover,
    .eb-agenda.fc .fc-event.eb-ag-ev:hover,
    #calendar.eb-agenda .fc-event.eb-ag-ev:hover {
        background: rgba(var(--ev-rgb, 100, 116, 139), var(--ag-soft-hover)) !important;
        filter: none;
    }
}
/* Activité sur plusieurs jours, coupée en début ou en fin de semaine : le
   liseré ne se répète pas sur le morceau qui continue. */
.eb-agenda .fc-event.eb-ag-ev.fc-event-start { margin-inline-start: 4px !important; }
.eb-agenda .fc-event.eb-ag-ev:not(.fc-event-start) {
    border-inline-start-color: transparent !important;
    border-start-start-radius: 0 !important;
    border-end-start-radius: 0 !important;
    margin-inline-start: 0 !important;
}
.eb-agenda .fc-event.eb-ag-ev:not(.fc-event-end) {
    border-start-end-radius: 0 !important;
    border-end-end-radius: 0 !important;
    margin-inline-end: 0 !important;
}

.eb-ag-chip {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    padding: 2px 6px;
    font-size: var(--eb-fs-sm);
    line-height: 17px;
    color: var(--ag-text, #1E293B);
}
.eb-ag-chip .eb-ag-time {
    flex: 0 0 auto;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ag-muted, #64748B);
}
.eb-ag-chip .eb-ag-title {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eb-ag-chip .eb-ag-sub {
    font-size: var(--eb-fs-xs);
    color: var(--ag-muted, #64748B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Semaine / jour : heure, titre (sur deux lignes au plus), lieu. */
.eb-ag-chip--grille {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: 100%;
    overflow: hidden;
}
.eb-ag-chip--grille .eb-ag-time { font-size: var(--eb-fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-agenda .fc-timegrid-event .fc-event-main { container-type: inline-size; height: 100%; }
/* Étiquette étroite (activités côte à côte) : ni lieu ni heure de fin, et le
   titre coupé au mot, pas à la lettre. */
@container (max-width: 90px) {
    .eb-ag-chip--grille { padding: 2px 4px; }
    .eb-ag-chip--grille .eb-ag-sub { display: none; }
    .eb-ag-chip--grille .eb-ag-title { font-size: var(--eb-fs-xs); line-height: 14px; -webkit-line-clamp: 3; word-break: normal; overflow-wrap: anywhere; }
}
.eb-ag-chip--grille .eb-ag-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.eb-agenda .fc-timegrid-event.eb-ag-ev { margin: 0 1px 1px !important; }
.eb-agenda .fc-timegrid-event-harness-inset .fc-timegrid-event.eb-ag-ev {
    box-shadow: 0 0 0 1px var(--ag-surface);
}

/* « +N » : une pastille, pas un lien gris de 10 px. */
.eb-agenda .fc .fc-daygrid-more-link,
.eb-agenda.fc .fc-daygrid-more-link {
    display: inline-block;
    margin: 1px 4px 0;
    padding: 1px 9px;
    border-radius: var(--eb-radius-pill);
    background: var(--ag-weekend);
    border: 1px solid var(--ag-line);
    color: var(--ag-text) !important;
    font-size: var(--eb-fs-xs);
    font-weight: 700;
    line-height: 16px;
    text-decoration: none !important;
}
@media (hover: hover) {
    .eb-agenda .fc .fc-daygrid-more-link:hover,
    .eb-agenda.fc .fc-daygrid-more-link:hover {
        background: var(--ag-accent);
        border-color: var(--ag-accent);
        color: var(--eb-on-fill, #fff) !important;
    }
}

/* « +N » de la vue semaine/jour : FullCalendar le place sur la plage horaire
   couverte ; une fine colonne teintée, le nombre en haut. */
.eb-agenda .fc .fc-timegrid-more-link,
.eb-agenda.fc .fc-timegrid-more-link {
    background: var(--ag-weekend);
    border: 1px solid var(--ag-line);
    border-radius: var(--ag-radius);
    box-shadow: none;
    color: var(--ag-text) !important;
    font-size: var(--eb-fs-xs);
    font-weight: 700;
    text-decoration: none !important;
}
.eb-agenda .fc .fc-timegrid-more-link-inner { padding: 4px 2px; text-align: center; }

/* Fenêtre « toutes les activités du jour » */
.eb-agenda .fc .fc-more-popover,
.eb-agenda.fc .fc-more-popover {
    border: 1px solid var(--ag-line);
    border-radius: var(--eb-radius);
    box-shadow: var(--eb-shadow-lg);
    overflow: hidden;
    min-width: 240px;
    max-width: 340px;
    background: var(--ag-surface);
}
.eb-agenda .fc .fc-more-popover .fc-popover-header,
.eb-agenda.fc .fc-more-popover .fc-popover-header {
    background: var(--ag-weekend);
    padding: 8px 12px;
    font-weight: 600;
    color: var(--ag-text);
}
.eb-agenda .fc .fc-more-popover .fc-popover-body,
.eb-agenda.fc .fc-more-popover .fc-popover-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 6px 4px;
}
.eb-agenda .fc-more-popover .eb-ag-chip .eb-ag-title { white-space: normal; }

/* Liste : pastille de la couleur du type, ligne aérée. */
.eb-agenda .fc-list-event.eb-ag-ev,
#calendar.eb-agenda .fc-list-event.eb-ag-ev {
    background: transparent !important;
    border: 0 !important;
    margin: 0 !important;
}
.eb-agenda .fc-list-event-dot { border-color: var(--ev) !important; }
.eb-agenda .fc-list-event-title a { color: var(--ag-text) !important; font-weight: 600; }

/* ==========================================================================
   Téléphone (≤ 768 px) — mois compact à pastilles + liste du jour dessous
   ========================================================================== */
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day-events,
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day-bottom,
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-week-number {
    display: none !important;
}
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day-frame {
    min-height: 46px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3px 0 4px;
    cursor: pointer;
}
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day-top {
    justify-content: center;
    flex-direction: row !important;
}
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: var(--eb-fs-base);
    font-weight: 500;
    color: var(--ag-text) !important;
    background: transparent !important;
    text-decoration: none !important;
}
.eb-agenda--mobile .eb-ag-compact .eb-ag-has .fc-daygrid-day-number { font-weight: 700; }
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day.fc-day-today .fc-daygrid-day-top .fc-daygrid-day-number {
    background: transparent !important;

    box-shadow: inset 0 0 0 2px var(--ag-accent);
    color: var(--ag-accent) !important;
}
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day.eb-ag-selected .fc-daygrid-day-top .fc-daygrid-day-number {
    background: var(--ag-accent) !important;
    color: var(--eb-on-fill, #fff) !important;
    box-shadow: none;
}
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day.fc-day-today { background: transparent !important; }
.eb-agenda--mobile .eb-ag-compact .fc-col-header-cell-cushion { font-size: var(--eb-fs-xs); padding: 6px 0; }
.eb-agenda--mobile .eb-ag-compact .fc-daygrid-day:hover { background: inherit !important; }

.eb-ag-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 8px;
    margin-top: 2px;
}
.eb-ag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ev, #64748B);
}
.eb-ag-dots-more {
    font-size: calc(var(--eb-fs-xs) - 2px);
    font-weight: 700;
    line-height: 1;
    color: var(--eb-text-secondary, #64748B);
}

/* Liste du jour */
.eb-ag-day {
    margin: 10px 0 4px;
    border: 1px solid var(--eb-border, #E2E8F0);
    border-radius: var(--eb-radius);
    background: var(--eb-surface, #fff);
    overflow: hidden;
}
.eb-ag-day[hidden] { display: none; }
.eb-ag-day-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--eb-border, #E2E8F0);
}
.eb-ag-day-title {
    flex: 1 1 auto;
    font-weight: 700;
    font-size: var(--eb-fs-md);
    color: var(--eb-text, #1E293B);
}
.eb-ag-day-count:not(:empty) {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: var(--eb-radius-pill);
    background: var(--eb-primary, #2563EB);
    color: var(--eb-on-fill, #fff);
    font-size: var(--eb-fs-sm);
    font-weight: 700;
    text-align: center;
}
.eb-ag-day-add {
    width: 36px;
    height: 36px;
    border: 1px solid var(--eb-border, #E2E8F0);
    border-radius: var(--eb-radius-md);
    background: var(--eb-surface, #fff);
    color: var(--eb-primary, #2563EB);
}
.eb-ag-day-empty {
    padding: 14px 12px;
    color: var(--eb-text-secondary, #64748B);
    font-size: var(--eb-fs-md);
}
.eb-ag-day-list { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.eb-ag-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px 10px;
    border-radius: var(--eb-radius-md);
    border-inline-start: 4px solid var(--ev, #64748B);
    background: rgba(var(--ev-rgb, 100, 116, 139), .12);
    color: var(--eb-text, #1E293B) !important;
    text-decoration: none !important;
}
:root.dark .eb-ag-item { background: rgba(var(--ev-rgb, 100, 116, 139), .24); }
.eb-ag-item:active { background: rgba(var(--ev-rgb, 100, 116, 139), .24); }
.eb-ag-item-time {
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    font-size: var(--eb-fs-sm);
    line-height: 16px;
    font-variant-numeric: tabular-nums;
    color: var(--eb-text-secondary, #64748B);
}
.eb-ag-item-time b { color: var(--eb-text, #1E293B); font-weight: 700; }
.eb-ag-item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.eb-ag-item-title {
    font-weight: 600;
    font-size: var(--eb-fs-md);
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.eb-ag-item-sub {
    font-size: var(--eb-fs-sm);
    color: var(--eb-text-secondary, #64748B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eb-ag-item-badge {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: var(--eb-radius-pill);
    background: var(--eb-surface, #fff);
    border: 1px solid var(--eb-border, #E2E8F0);
    font-size: var(--eb-fs-xs);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

@media print {
    .eb-agenda .fc-event.eb-ag-ev,
    .eb-ag-item {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .eb-ag-day { display: none; }
}
.eb-ag-day, .eb-ag-day-head, .eb-ag-item { text-align: start; }

/* ==========================================================================
   Fiche d'une activité (téléphone) — feuille qui monte du bas
   ========================================================================== */
html.eb-ag-sheet-lock, html.eb-ag-sheet-lock body { overflow: hidden; }
.eb-ag-sheet {
    position: fixed;
    inset: 0;
    /* Au-dessus des onglets de vue flottants (9998), sous les toasts. */
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    --ag-voile: rgba(15, 23, 42, .45);
    background: transparent;
    transition: background-color .2s ease;
}
.eb-ag-sheet.is-open { background: var(--ag-voile); }
.eb-ag-sheet-card {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 82vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--eb-radius-lg) var(--eb-radius-lg) 0 0;
    background: var(--eb-surface, #fff);
    color: var(--eb-text, #1E293B);
    box-shadow: var(--eb-shadow-lg);
    border-top: 5px solid var(--ev, #64748B);
    transform: translateY(100%);
    transition: transform .22s cubic-bezier(.2, .8, .2, 1);
    text-align: start;
}
.eb-ag-sheet.is-open .eb-ag-sheet-card { transform: translateY(0); }
.eb-ag-sheet-grip {
    width: 40px;
    height: 4px;
    margin: 2px auto 12px;
    border-radius: var(--eb-radius-pill);
    background: var(--eb-border, #E2E8F0);
}
.eb-ag-sheet-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--eb-radius-pill);
    background: rgba(var(--ev-rgb, 100, 116, 139), .14);
    font-size: var(--eb-fs-sm);
    font-weight: 600;
}
.eb-ag-sheet-title {
    margin: 8px 0 10px;
    font-size: var(--eb-fs-xl);
    line-height: 26px;
    font-weight: 700;
    color: var(--eb-text, #1E293B);
}
.eb-ag-sheet-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.eb-ag-sheet-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--eb-fs-md);
    line-height: 20px;
}
.eb-ag-sheet-row i {
    flex: 0 0 18px;
    margin-top: 3px;
    text-align: center;
    color: var(--ev, #64748B);
}
.eb-ag-sheet-fill {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: var(--eb-radius);
    background: var(--eb-surface-muted, #F8FAFC);
    border: 1px solid var(--eb-border, #E2E8F0);
}
.eb-ag-sheet-fill-head {
    display: flex;
    justify-content: space-between;
    font-size: var(--eb-fs-base);
    color: var(--eb-text-secondary, #64748B);
}
.eb-ag-sheet-fill-head b { color: var(--eb-text, #1E293B); font-variant-numeric: tabular-nums; }
.eb-ag-sheet-bar {
    height: 6px;
    margin-top: 8px;
    border-radius: var(--eb-radius-pill);
    background: var(--eb-border, #E2E8F0);
    overflow: hidden;
}
.eb-ag-sheet-bar span { display: block; height: 100%; border-radius: inherit; background: var(--ev, #64748B); }
.eb-ag-sheet-bar.is-full span { background: var(--eb-success, #16A34A); }
.eb-ag-sheet-label {
    margin: 4px 0 6px;
    font-size: var(--eb-fs-sm);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--eb-text-secondary, #64748B);
}
.eb-ag-sheet-people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.eb-ag-person {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--eb-radius-pill);
    border: 1px solid var(--eb-border, #E2E8F0);
    background: var(--eb-surface, #fff);
    font-size: var(--eb-fs-base);
}
.eb-ag-person.is-more { color: var(--eb-text-secondary, #64748B); }
.eb-ag-person-status {
    padding: 0 6px;
    border-radius: var(--eb-radius-pill);
    font-size: calc(var(--eb-fs-xs) - 1px);
    font-weight: 700;
    white-space: nowrap;
}
.eb-ag-sheet-desc {
    margin-bottom: 14px;
    font-size: var(--eb-fs-md);
    line-height: 20px;
}
.eb-ag-sheet-actions {
    position: sticky;
    bottom: calc(-16px - env(safe-area-inset-bottom, 0px));
    display: flex;
    gap: 8px;
    padding: 10px 0 0;
    background: var(--eb-surface, #fff);
}
.eb-ag-sheet-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: var(--eb-radius);
    border: 1px solid var(--eb-border, #E2E8F0);
    background: var(--eb-surface, #fff);
    color: var(--eb-text, #1E293B) !important;
    font-size: var(--eb-fs-md);
    font-weight: 600;
    text-decoration: none !important;
}
.eb-ag-sheet-btn.is-primary {
    flex-grow: 2;
    border-color: var(--eb-primary, #2563EB);
    background: var(--eb-primary, #2563EB);
    color: var(--eb-on-fill, #fff) !important;
}
@media (prefers-reduced-motion: reduce) {
    .eb-ag-sheet, .eb-ag-sheet-card { transition: none; }
}

/* Activité courte (moins d'une heure environ) en semaine/jour : une ligne. */
.eb-agenda .fc-timegrid-event-short .eb-ag-chip--grille { flex-direction: row; align-items: baseline; gap: 4px; }
.eb-agenda .fc-timegrid-event-short .eb-ag-chip--grille .eb-ag-sub { display: none; }
.eb-agenda .fc-timegrid-event-short .eb-ag-chip--grille .eb-ag-title { -webkit-line-clamp: 1; }

/* Vue Liste */
.eb-ag-list { display: flex; align-items: center; gap: 10px; min-width: 0; }
.eb-ag-list-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
/* Le titre devient un lien quand l'activité en a un (eb_agenda.js) : il garde sa
   couleur contre « .fc .fc-list-event-title a { color: inherit } » de FullCalendar. */
.eb-ag-list-title, .fc .fc-list-event-title a.eb-ag-list-title { font-weight: 600; color: var(--eb-text, #1E293B); }
.eb-ag-list-sub {
    font-size: var(--eb-fs-sm);
    color: var(--eb-text-secondary, #64748B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eb-agenda .fc-list-event-title a { display: block; text-decoration: none !important; }
#calendar.eb-agenda .fc-list-event-dot,
.eb-agenda .fc-list-event .fc-list-event-dot {
    border-color: var(--ev) !important;
    background: var(--ev) !important;
}

/* Liste au téléphone : colonne des heures de largeur fixe, sur deux lignes au
   besoin — « Toute la journée » et « 17:00 - 23:59 » mordaient sur la pastille. */
@media (max-width: 768px) {
    #calendar.eb-agenda .fc-list-event-time,
    .eb-agenda .fc-list-event-time {
        flex: 0 0 64px;
        width: 64px;
        min-width: 64px;
        white-space: normal;
        line-height: 1.25;
        font-size: var(--eb-fs-xs);
    }
    #calendar.eb-agenda .fc-list-event-graphic,
    .eb-agenda .fc-list-event-graphic {
        flex: 0 0 20px;
        width: 20px;
        min-width: 20px;
    }
}

/* ==========================================================================
   Barre d'outils au téléphone : DEUX lignes au lieu de trois
   1) ‹ › [Aujourd'hui] Novembre 2026
   2) Mois | Jour | Liste   [filtre ▾] [⟳]
   « Aujourd'hui » grisé (on y est déjà) ne prend plus de place. Le filtre de
   l'écran (#toolbar, glissé dans la barre par calendar.php) partage la ligne
   des vues au lieu d'en occuper une à lui seul.
   ========================================================================== */
@media (max-width: 768px) {
    .eb-agenda--mobile .fc-toolbar.fc-header-toolbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        margin: 2px 0 10px !important;
    }
    .eb-agenda--mobile .fc-toolbar.fc-header-toolbar > .fc-toolbar-chunk {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 6px;
        width: auto !important;
        margin: 0 !important;
    }
    /* Ligne 1 */
    .eb-agenda--mobile .fc-header-toolbar > .fc-toolbar-chunk:has(.fc-prev-button) { order: 1; flex: 0 0 auto !important; }
    .eb-agenda--mobile .fc-header-toolbar > .fc-toolbar-chunk:has(.fc-toolbar-title) {
        order: 2;
        flex: 1 1 0 !important;
        min-width: 0;
        justify-content: flex-start !important;
    }
    .eb-agenda--mobile .fc-toolbar-title {
        margin: 0 !important;
        font-size: var(--eb-fs-lg) !important;
        font-weight: 700;
        text-align: start !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .eb-agenda--mobile .fc-today-button:disabled { display: none !important; }
    .eb-agenda--mobile .fc-header-toolbar .fc-prev-button,
    .eb-agenda--mobile .fc-header-toolbar .fc-next-button {
        min-width: 38px;
        min-height: 38px;
        padding: 4px 8px !important;
    }
    /* Saut de ligne */
    .eb-agenda--mobile .fc-toolbar.fc-header-toolbar::after {
        content: '';
        order: 3;
        flex: 0 0 100%;
        height: 0;
    }
    /* Ligne 2 : les vues, puis le filtre de l'écran qui prend le reste */
    .eb-agenda--mobile .fc-header-toolbar > .fc-toolbar-chunk:has(.fc-dayGridMonth-button) {
        order: 4;
        flex: 0 0 auto !important;
    }
    .eb-agenda--mobile .fc-header-toolbar .fc-button-group > .fc-button,
    .eb-agenda--mobile .fc-header-toolbar .btn-group > .btn {
        padding: 6px 10px !important;
        min-height: 38px;
    }
    .eb-agenda--mobile .fc-header-toolbar > #toolbar {
        order: 5;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .eb-agenda--mobile .fc-header-toolbar > #toolbar .bootstrap-select { margin: 0 !important; }
    .eb-agenda--mobile .fc-header-toolbar > #toolbar .bootstrap-select {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
    }
    .eb-agenda--mobile .fc-header-toolbar > #toolbar .bootstrap-select > .dropdown-toggle {
        min-height: 38px;
        padding-top: 4px;
        padding-bottom: 4px;
    }
    .eb-agenda--mobile .fc-header-toolbar > #toolbar .filter-option-inner-inner {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* Synchroniser : l'icône seule, le libellé reste pour les lecteurs d'écran */
    .eb-agenda--mobile .fc-header-toolbar > #toolbar .rotate-button {
        flex: 0 0 38px !important;
        width: 38px !important;
        min-height: 38px;
        padding: 0 !important;
        overflow: hidden;
    }
    /* Sans filtre d'écran, les vues se centrent */
    .eb-agenda--mobile .fc-header-toolbar:not(:has(> #toolbar)) > .fc-toolbar-chunk:has(.fc-dayGridMonth-button) {
        flex: 1 1 100% !important;
        justify-content: center !important;
    }
}
