    :root {
        --bleu: #3a5a72;
        --bleu-light: #4e728f;
        --bleu-pale: #d8e5ed;
        --coral: #c47e6b;
        --coral-light: #d9a090;
        --coral-pale: #f2ddd7;
        --creme: #faf7f4;
        --dark: #1e2d38;
        --radius: 10px;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    }

    *,
    *::before,
    *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    body {
        font-family: 'DM Sans', sans-serif;
        background: var(--creme);
        color: var(--dark);
        min-height: 100vh;
    }

    /* ── TOPBAR ── */
    .topbar {
        background: var(--bleu);
        color: white;
        padding: 0.75rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .topbar-logo {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.25rem;
        font-weight: 600;
        letter-spacing: 0.05em;
        color: white;
        text-decoration: none;
    }

    .topbar-logo em {
        color: var(--coral-light);
        font-style: normal;
    }

    .topbar-nav {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.45rem 1rem;
        border-radius: 6px;
        font-size: 0.82rem;
        font-family: 'DM Sans', sans-serif;
        font-weight: 500;
        cursor: pointer;
        border: none;
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
    }

    .btn-ghost {
        background: rgba(255, 255, 255, 0.12);
        color: white;
    }

    .btn-ghost:hover {
        background: rgba(255, 255, 255, 0.22);
    }

    .btn-coral {
        background: var(--coral);
        color: white;
    }

    .btn-coral:hover {
        background: var(--coral-light);
    }

    .btn-bleu {
        background: var(--bleu);
        color: white;
        border: 1px solid var(--bleu-pale);
    }

    .btn-bleu:hover {
        background: var(--bleu-light);
    }

    .topbar-client {
        font-size: 0.82rem;
        color: rgba(255, 255, 255, 0.7);
    }

    /* ── MAIN ── */
    .agenda-wrap {
        max-width: 1200px;
        margin: 0 auto;
        padding: 1.5rem 1rem 3rem;
    }

    /* ── EN-TÊTE ── */
    .agenda-header {
        margin-bottom: 1.25rem;
    }

    .agenda-title {
        font-family: 'Cormorant Garamond', serif;
        font-size: 2rem;
        font-weight: 600;
        color: var(--bleu);
        margin-bottom: 0.75rem;
    }

    .agenda-controls {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    .btn-nav {
        background: var(--bleu);
        color: white;
        border: none;
        border-radius: 6px;
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1rem;
        transition: background 0.2s;
        text-decoration: none;
    }

    .btn-nav:hover {
        background: var(--bleu-light);
    }

    .btn-today {
        background: #e8eef4;
        color: var(--bleu);
        border: none;
        border-radius: 6px;
        padding: 0.4rem 0.9rem;
        font-size: 0.82rem;
        font-family: 'DM Sans', sans-serif;
        cursor: pointer;
        transition: background 0.2s;
        text-decoration: none;
    }

    .btn-today:hover {
        background: var(--bleu-pale);
    }

    .periode-label {
        font-weight: 600;
        font-size: 1.05rem;
        margin: 0 0.5rem;
        color: var(--dark);
    }

    .mode-btns {
        margin-left: auto;
        display: flex;
        border-radius: 7px;
        overflow: hidden;
        border: 1px solid var(--bleu-pale);
    }

    .mode-btn {
        padding: 0.4rem 0.85rem;
        font-size: 0.82rem;
        background: white;
        color: var(--bleu);
        border: none;
        cursor: pointer;
        font-family: 'DM Sans', sans-serif;
        text-decoration: none;
        transition: background 0.15s;
    }

    .mode-btn.active,
    .mode-btn:hover {
        background: var(--bleu);
        color: white;
    }

    /* ── GRILLE SEMAINE ── */
    .cal-grid {
        display: grid;
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow);
        background: white;
        border: 1px solid #e0eaf2;
    }

    .cal-grid.semaine {
        grid-template-columns: repeat(7, 1fr);
    }

    .cal-grid.jour {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .cal-col-header {
        background: var(--bleu);
        color: white;
        text-align: center;
        padding: 0.65rem 0.4rem;
        font-size: 0.82rem;
        font-weight: 500;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cal-col-header:last-child {
        border-right: none;
    }

    .cal-col-header.today {
        background: var(--coral);
    }

    .cal-col-header a {
        color: white;
        text-decoration: underline;
        text-underline-offset: 2px;
        opacity: 0.9;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.1rem;
    }

    .cal-col-header a:hover {
        opacity: 1;
    }

    .cal-col-header>span {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.1rem;
    }

    .lj-day {
        display: block;
        font-weight: 600;
    }

    .lj-date {
        display: block;
        font-weight: 400;
        opacity: 0.85;
    }

    .cal-col-body {
        padding: 0.5rem 0.4rem;
        border-right: 1px solid #e8f0f6;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        vertical-align: top;
    }

    .cal-col-body:last-child {
        border-right: none;
    }

    .cal-col-body.today-col {
        background: #fffbf5;
    }

    /* ── CARTE CRÉNEAU ── */
    .creneau-card {
        border-radius: 7px;
        padding: 0.45rem 0.55rem 0.5rem;
        cursor: pointer;
        transition: transform 0.15s, box-shadow 0.15s;
        position: relative;
        border-left: 3px solid transparent;
        text-decoration: none;
        display: block;
    }

    .creneau-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.13);
    }

    .cc-heure {
        font-size: 0.72rem;
        font-weight: 700;
        color: inherit;
        display: block;
    }

    .cc-nom {
        font-size: 0.8rem;
        font-weight: 700;
        margin: 0.15rem 0 0.1rem;
        color: var(--dark);
    }

    .cc-prof {
        font-size: 0.71rem;
        color: inherit;
        opacity: 0.8;
    }

    .cc-dispo {
        font-size: 0.68rem;
        font-weight: 700;
        text-align: right;
        margin-top: 0.35rem;
        padding: 0.1rem 0.35rem;
        border-radius: 4px;
        display: inline-block;
        float: right;
    }

    .dispo-ok {
        background: rgba(0, 0, 0, 0.07);
        color: inherit;
    }

    .dispo-low {
        background: #fff3cd;
        color: #856404;
    }

    .dispo-zero {
        background: #f8d7da;
        color: #721c24;
    }

    .dispo-passe {
        background: #e8e8e8;
        color: #999;
        font-style: italic;
    }

    .cal-vide {
        color: #c0c8d0;
        font-size: 0.78rem;
        text-align: center;
        padding: 1rem 0;
    }

    /* ── MODALE RÉSERVATION ── */
    .overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(30, 45, 56, 0.45);
        z-index: 200;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .overlay.open {
        display: flex;
    }

    .modal {
        background: white;
        border-radius: 14px;
        padding: 2rem;
        max-width: 420px;
        width: 100%;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
        position: relative;
    }

    .modal-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        font-size: 1.1rem;
        cursor: pointer;
        color: #aaa;
        line-height: 1;
    }

    .modal-close:hover {
        color: var(--dark);
    }

    .modal-eyebrow {
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--coral);
        margin-bottom: 0.3rem;
    }

    .modal-title {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.4rem;
        font-weight: 600;
        color: var(--bleu);
        margin-bottom: 0.25rem;
    }

    .modal-meta {
        font-size: 0.82rem;
        color: #666;
        margin-bottom: 1.2rem;
        line-height: 1.6;
    }

    .modal-meta strong {
        color: var(--dark);
    }

    .modal-actions {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }

    .btn-full {
        width: 100%;
        text-align: center;
        padding: 0.7rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .modal-note {
        font-size: 0.78rem;
        color: #888;
        text-align: center;
        margin-top: 0.5rem;
    }

    /* ── LÉGENDE ── */
    .legende {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem 1.5rem;
        margin-top: 1.25rem;
    }

    .legende-item {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        font-size: 0.78rem;
        color: #555;
    }

    .legende-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    @media (max-width: 768px) {
        .agenda-controls {
            gap: 0.4rem;
        }

        .periode-label {
            font-size: 0.9rem;
        }
    }


    /* Style spécifique pour le badge de réservation dans la grille */
    .inscrit-badge {
        background: #3a5a72 !important;
        color: white !important;
        padding: 3px 8px;
        border-radius: 4px;
        font-weight: bold;
        font-size: 0.8rem;
        text-transform: uppercase;
    }

    .creneau-card.is-mine {
        box-shadow: inset 0 0 0 1px rgba(58, 90, 114, 0.1);
    }

    @media (max-width: 600px) {

        /* Toujours 7 colonnes, très resserrées */
        .cal-grid.semaine {
            grid-template-columns: repeat(7, minmax(0, 1fr));
        }

        .mode-btns {
            display: none;
        }

        /* Clé : empêcher le contenu de forcer la largeur de colonne */
        .cal-col-header,
        .cal-col-body {
            min-width: 0;
            overflow: hidden;
        }

        /* En-têtes sur 2 lignes */
        .cal-col-header {
            padding: 0.4rem 0.1rem;
            font-size: 0.6rem;
            line-height: 1.2;
        }

        .cal-col-header a {
            font-size: 0.6rem;
        }

        /* Corps : padding minimal */
        .cal-col-body {
            padding: 0.25rem 0.1rem;
            gap: 0.25rem;
            min-height: 60px;
        }

        /* Cartes ultra-compactes */
        .creneau-card {
            padding: 0.25rem 0.2rem;
            border-left-width: 2px;
            border-radius: 4px;
            overflow: hidden;
        }

        .cc-heure {
            font-size: 0.55rem;
            font-weight: 700;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: clip;
        }

        .cc-nom {
            font-size: 0.58rem;
            font-weight: 700;
            margin: 0.08rem 0 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
            display: block;
        }

        .cc-prof {
            display: none;
        }

        .cc-dispo {
            font-size: 0.52rem;
            padding: 0.06rem 0.15rem;
            float: none;
            display: block;
            text-align: center;
            margin-top: 0.15rem;
            white-space: nowrap;
            overflow: hidden;
        }

        /* Titre période */
        .periode-label {
            font-size: 0.78rem;
        }
    }