@import url(https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap);
/* =========================================================================
   Design tokens
   Outil interne de réservation de salles — palette bleu calendrier + vert
   événement, fond clair, typographie SaaS. Fiable, calme, efficace.
   ========================================================================= */
:root {
    /* Couleurs sémantiques */
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-soft: #eff4ff;
    --color-on-primary: #ffffff;
    --color-accent: #059669;
    --color-accent-hover: #047857;
    --color-accent-soft: #ecfdf5;
    --color-background: #f6f8fc;
    --color-surface: #ffffff;
    --color-foreground: #0f172a;
    --color-muted-foreground: #64748b;
    --color-muted: #f1f5f9;
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-destructive: #dc2626;
    --color-destructive-soft: #fef2f2;
    --color-warning: #b45309;
    --color-warning-soft: #fffbeb;
    --color-ring: #2563eb;

    /* Rayons */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-full: 999px;

    /* Élévation (ombres subtiles, pas de 3D) */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);

    /* Espacement (échelle 4/8) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-8: 48px;

    /* Typographie */
    --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --header-height: 60px;
}

/* =========================================================================
   Reset + base
   ========================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 var(--space-3);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--color-foreground);
}

h1 {
    font-size: 1.6rem;
    font-weight: 800;
}
h2 {
    font-size: 1.25rem;
}
h3 {
    font-size: 1.05rem;
}

p {
    margin: 0 0 var(--space-4);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--color-ring);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* =========================================================================
   App shell : en-tête + navigation + contenu
   ========================================================================= */
.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: 0 var(--space-5);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--color-foreground);
}
.app-brand:hover {
    text-decoration: none;
    color: var(--color-foreground);
}
.app-brand .brand-mark {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: var(--color-on-primary);
}
.app-brand svg {
    width: 18px;
    height: 18px;
}

/* Logo image personnalisé (APP_BRAND_LOGO) : remplit la pastille, sans fond. */
.brand-mark--image {
    background: transparent;
}
.brand-mark--image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-wrap: wrap;
}
.app-nav a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--color-muted-foreground);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.app-nav a:hover {
    background: var(--color-muted);
    color: var(--color-foreground);
    text-decoration: none;
}
.app-nav a.is-active {
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
}
.app-nav .nav-sep {
    width: 1px;
    height: 20px;
    background: var(--color-border);
    margin: 0 var(--space-2);
}

.app-header .header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.app-user {
    font-size: 0.85rem;
    color: var(--color-muted-foreground);
    font-weight: 500;
}

.app-main {
    /* Largeur unique pour TOUTES les pages (calendrier, listes, admin…). */
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-5);
}
/* Pages autonomes plein écran (connexion, inscription, RSVP anonyme) :
   on laisse .auth-shell gérer le centrage et la hauteur. */
.app-main.plain {
    max-width: none;
    padding: 0;
}
/* Pages pleine largeur (calendrier) : on retire le plafond de 1280px mais on
   garde le rembourrage latéral. */
.app-main.wide {
    max-width: none;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}
.page-head h1 {
    margin: 0;
}

/* Badge de compteur (validations en attente) */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    background: var(--color-destructive);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}
.badge.badge-muted {
    background: var(--color-muted);
    color: var(--color-muted-foreground);
}

/* =========================================================================
   Boutons  (stylise <button>, submit, .btn — et les templates sans classes)
   ========================================================================= */
.btn,
button:not(.unstyled),
input[type='submit'],
input[type='button'] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 9px 16px;
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
    text-decoration: none;
}
.btn:hover,
button:not(.unstyled):hover,
input[type='submit']:hover,
input[type='button']:hover {
    background: var(--color-primary-hover);
    text-decoration: none;
}
.btn:active,
button:not(.unstyled):active {
    transform: translateY(1px);
}
.btn:disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary,
button.btn-secondary {
    background: var(--color-surface);
    color: var(--color-foreground);
    border-color: var(--color-border-strong);
}
.btn-secondary:hover,
button.btn-secondary:hover {
    background: var(--color-muted);
}

.btn-accent,
button.btn-accent {
    background: var(--color-accent);
}
.btn-accent:hover {
    background: var(--color-accent-hover);
}

.btn-danger,
button.btn-danger {
    background: var(--color-destructive);
}
.btn-danger:hover {
    background: #b91c1c;
}

.btn-ghost,
button.btn-ghost {
    background: transparent;
    color: var(--color-primary);
    border-color: transparent;
    min-height: auto;
    padding: 4px 8px;
}
.btn-ghost:hover {
    background: var(--color-primary-soft);
}

.btn-sm {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 0.82rem;
}

.btn-link,
button.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    padding: 0;
    min-height: auto;
    font-weight: 600;
    text-decoration: underline;
}
.btn-link:hover {
    color: var(--color-primary-hover);
    background: none;
}

/* =========================================================================
   Cartes / surfaces
   ========================================================================= */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}
.card > :last-child {
    margin-bottom: 0;
}

/* =========================================================================
   Formulaires  (labels, inputs, selects — sélecteurs d'éléments)
   ========================================================================= */
form {
    margin: 0;
}

label {
    display: inline-block;
    margin-bottom: var(--space-1);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-foreground);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='search'],
input[type='tel'],
input[type='url'],
input[type='date'],
input[type='time'],
input[type='datetime-local'],
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
    min-height: 40px;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--color-foreground);
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}
textarea {
    min-height: 90px;
    line-height: 1.5;
    resize: vertical;
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%2364748b%27 stroke-width=%272.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 34px;
}
input[type='checkbox'],
input[type='radio'] {
    width: 16px;
    height: 16px;
    min-height: auto;
    accent-color: var(--color-primary);
    vertical-align: middle;
    cursor: pointer;
}

/* Champ fichier (upload de logo) : bouton au style secondaire. */
input[type='file'] {
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-foreground);
}
input[type='file']::file-selector-button {
    margin-right: var(--space-3);
    padding: 6px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-foreground);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
input[type='file']::file-selector-button:hover {
    background: var(--color-muted);
}

/* Champ = label au-dessus, input en dessous */
.field {
    margin-bottom: var(--space-4);
}
.field label {
    display: block;
}
.form-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    margin-top: var(--space-5);
}
.form-hint {
    margin-top: var(--space-1);
    font-size: 0.8rem;
    color: var(--color-muted-foreground);
}
/* Astérisque « champ obligatoire » saisi à la main (cartes d'auth). */
.req-mark {
    color: var(--color-destructive);
}
/* Labels obligatoires générés par Symfony : texte normal + astérisque rouge. */
label.required::after {
    content: ' *';
    color: var(--color-destructive);
}

/* Rangée de formulaire simple (les templates « label input » en ligne) */
form p {
    margin-bottom: var(--space-4);
}

/* Grille de champs (formulaires à nombreux champs, ex. salle).
   Symfony enveloppe les champs du formulaire racine dans un <div> : la grille
   s'applique donc à cet enfant direct. */
.form-grid > div {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-4);
}
.form-grid .field {
    margin-bottom: 0;
}

/* Paire de champs côte à côte (ex. début/fin dans la modale de réservation) */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.field-row .field {
    margin-bottom: 0;
}

/* Case à cocher en ligne (widget + label) */
.field-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.field-check label {
    margin-bottom: 0;
    font-weight: 500;
}

.field-legend {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-foreground);
}

/* Erreurs de validation sous un champ */
.form-errors {
    list-style: none;
    margin: var(--space-1) 0 0;
    padding: 0;
    color: var(--color-destructive);
    font-size: 0.8rem;
    font-weight: 500;
}
.has-error input,
.has-error select,
.has-error textarea {
    border-color: var(--color-destructive);
}

/* Chips à bascule (jours d'une récurrence) */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-muted-foreground);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    text-transform: capitalize;
}
.chip:hover {
    border-color: var(--color-primary);
    color: var(--color-foreground);
}
.chip.is-on,
.chip:has(input:checked) {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* =========================================================================
   Modale (formulaire de réservation React)
   ========================================================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-6) var(--space-4);
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    animation: modal-fade 0.15s ease;
}
.modal {
    width: 100%;
    max-width: 480px;
    margin: auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: modal-pop 0.16s ease;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
}
.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}
.modal-close {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-muted-foreground);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
}
.modal-close:hover {
    color: var(--color-foreground);
    background: var(--color-muted);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.booking-form {
    padding: var(--space-5);
}
.booking-form .field {
    margin-bottom: var(--space-4);
}
.booking-recurrence {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    background: var(--color-muted);
}
.booking-recurrence .field:last-child {
    margin-bottom: 0;
}

/* Section de récurrence révélée par une case à cocher (formulaire serveur,
   sans JS) : la case et le panneau sont frères directs du formulaire. */
.rec-toggle {
    margin-top: var(--space-2);
}
.rec-label {
    margin-left: 6px;
    font-weight: 500;
    cursor: pointer;
}
.rec-panel {
    display: none;
    margin-top: var(--space-3);
}
.rec-toggle:checked ~ .rec-panel {
    display: block;
}

@keyframes modal-fade {
    from {
        opacity: 0;
    }
}
@keyframes modal-pop {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* =========================================================================
   Tables
   ========================================================================= */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}
thead th {
    text-align: left;
    padding: 11px 16px;
    background: var(--color-muted);
    color: var(--color-muted-foreground);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
tbody tr:last-child td {
    border-bottom: none;
}
tbody tr:hover {
    background: var(--color-primary-soft);
}
td.actions,
th.actions {
    text-align: right;
    white-space: nowrap;
}
td .btn,
td button,
td form {
    display: inline-flex;
}
td form + form {
    margin-left: var(--space-2);
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

/* =========================================================================
   Alertes / messages flash  (role=alert et .flash-*)
   ========================================================================= */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    margin-bottom: var(--space-4);
    font-size: 0.9rem;
    font-weight: 500;
}
.flash-success,
.alert-success {
    background: var(--color-accent-soft);
    border-color: #a7f3d0;
    color: #065f46;
}
.flash-error,
.alert-danger {
    background: var(--color-destructive-soft);
    border-color: #fecaca;
    color: #991b1b;
}
.flash-info {
    background: var(--color-primary-soft);
    border-color: #bfdbfe;
    color: #1e40af;
}
.flash-warning {
    background: var(--color-warning-soft);
    border-color: #fde68a;
    color: var(--color-warning);
}

/* =========================================================================
   Étiquettes de statut
   ========================================================================= */
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
}
.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.status-confirmed {
    background: var(--color-accent-soft);
    color: #047857;
}
.status-pending {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}
.status-rejected,
.status-declined,
.status-cancelled,
.status-released {
    background: var(--color-muted);
    color: var(--color-muted-foreground);
}
/* États "positifs" (invitation acceptée / compte approuvé) : même vert. */
.status-accepted,
.status-approved {
    background: var(--color-accent-soft);
    color: #047857;
}
/* "Peut-être" (RSVP) : bleu informatif. */
.status-maybe {
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
}
/* Compte en attente d'approbation. */
.status-pending_approval {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}
/* Statut neutre (booléens Oui/Non, rôles). */
.status-neutral {
    background: var(--color-muted);
    color: var(--color-foreground);
}
.status-neutral::before {
    display: none;
}

/* =========================================================================
   Pages d'authentification (connexion / inscription)
   ========================================================================= */
.auth-shell {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    background:
        radial-gradient(1200px 500px at 50% -10%, #e8f0ff 0%, transparent 70%),
        var(--color-background);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-6);
}
.auth-card h1 {
    text-align: center;
    margin-bottom: var(--space-2);
}
.auth-card .auth-sub {
    text-align: center;
    color: var(--color-muted-foreground);
    font-size: 0.9rem;
    margin-bottom: var(--space-5);
}
.auth-card .form-actions {
    justify-content: stretch;
}
.auth-card .form-actions button,
.auth-card .form-actions input[type='submit'] {
    width: 100%;
}
.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-4);
}
.auth-brand .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.auth-brand svg {
    width: 26px;
    height: 26px;
}
.auth-alt {
    text-align: center;
    margin-top: var(--space-5);
    font-size: 0.88rem;
    color: var(--color-muted-foreground);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--color-muted-foreground);
}

/* Utilitaires */
.muted {
    color: var(--color-muted-foreground);
}
.stack > * + * {
    margin-top: var(--space-4);
}
.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

/* Sous-titre d'en-tête de page (sous le h1, dans .page-head) */
.page-head .page-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.page-subtitle {
    margin: 0;
    color: var(--color-muted-foreground);
    font-size: 0.92rem;
}

/* Label masqué visuellement mais lu par les lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Barre de filtres (rapport, indisponibilités) : champs alignés en ligne */
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-3);
}
.filters .field {
    margin-bottom: 0;
}
.filters .field input,
.filters .field select {
    min-width: 160px;
}

/* Champ "copier" (lien iCal) : input lecture seule + bouton */
.copy-field {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}
.copy-field input {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    color: var(--color-muted-foreground);
    background: var(--color-muted);
}

/* Actions groupées dans une cellule de tableau */
td.actions .cluster {
    justify-content: flex-end;
    gap: var(--space-2);
}
/* Dans un cluster, le gap gère déjà l'espacement : annuler la marge form+form. */
td.actions .cluster > form + form {
    margin-left: 0;
}

/* Liste de détails (fiche réservation) : libellé à gauche, valeur à droite */
.detail-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-2) var(--space-5);
    margin: 0;
    align-items: baseline;
}
.detail-list dt {
    color: var(--color-muted-foreground);
    font-weight: 600;
    font-size: 0.85rem;
}
.detail-list dd {
    margin: 0;
}

/* Pagination (listes admin) : info à gauche, navigation à droite */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}
.pagination .pages-info {
    color: var(--color-muted-foreground);
    font-size: 0.85rem;
}
.pagination .pages-nav {
    display: inline-flex;
    gap: var(--space-2);
}
/* Bouton de navigation inactif (première/dernière page) : rendu grisé, inerte. */
.pagination .pages-nav span.btn[aria-disabled='true'] {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}
/* Page courante : mise en avant (primaire). */
.pagination .pages-nav .page-num.is-current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    cursor: default;
}
.pagination .pages-nav .page-num {
    min-width: 34px;
}

/* En-têtes de colonne triables (KnpPaginator sortable) : gardent le style
   d'en-tête, avec un indicateur de tri au survol/état actif. */
thead th a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
thead th a:hover {
    color: var(--color-primary);
    text-decoration: none;
}
thead th a.asc::after {
    content: '▲';
    font-size: 0.62em;
}
thead th a.desc::after {
    content: '▼';
    font-size: 0.62em;
}

/* Section de page (titre h2 + tableau/contenu) avec rythme vertical régulier */
.page-section {
    margin-bottom: var(--space-6);
}
.page-section:last-child {
    margin-bottom: 0;
}
.page-section > h2 {
    margin-bottom: var(--space-3);
}
/* Formulaire d'action inline dans une cellule (refus avec motif) : champ + bouton */
.inline-form {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}
.inline-form input[type='text'] {
    min-height: 32px;
    min-width: 150px;
    font-size: 0.82rem;
}

/* =========================================================================
   Calendrier (react-big-calendar) — mise au thème
   ========================================================================= */
.calendar-island {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
}
/* Indicateur de chargement discret (coin haut-droit), sans décaler la grille. */
.calendar-loading {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    background: var(--color-muted);
    color: var(--color-muted-foreground);
    font-size: 0.78rem;
    font-weight: 600;
}
.calendar-loading::before {
    content: '';
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--color-border-strong);
    border-top-color: var(--color-primary);
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* Amorce première visite : enseigne comment réserver, rejetable. */
.calendar-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    border: 1px solid #bfdbfe;
    font-size: 0.88rem;
}
.calendar-hint strong {
    font-weight: 700;
}
.calendar-hint-close {
    flex: none;
    padding: 0 4px;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--color-primary-hover);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.15s ease;
}
.calendar-hint-close:hover {
    color: var(--color-primary);
}

/* Légende du calendrier : couleurs par salle + traitement des statuts */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-4);
    margin-bottom: var(--space-4);
    font-size: 0.82rem;
    color: var(--color-muted-foreground);
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex: none;
    border: 1px solid rgba(15, 23, 42, 0.15);
}
.legend-swatch.legend-confirmed {
    background: var(--color-primary);
}
.legend-swatch.legend-pending {
    background: var(--color-primary);
    opacity: 0.55;
    border: 2px dashed #333;
}
.legend-swatch.legend-blackout {
    background: #d9d9d9;
    opacity: 0.6;
}
.legend-sep {
    width: 1px;
    height: 16px;
    background: var(--color-border);
}

.calendar-error,
.calendar-move-error {
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--color-destructive-soft);
    color: #991b1b;
    border: 1px solid #fecaca;
    margin-bottom: var(--space-3);
    font-weight: 500;
}

/* Boutons INTERNES de react-big-calendar (en-têtes de date cliquables en vue
   Semaine/Mois, "+N de plus"…) : neutraliser le style de bouton générique pour
   qu'ils redeviennent du texte cliquable. La barre d'outils (.rbc-btn-group)
   garde son style, défini juste après avec une spécificité équivalente. */
.rbc-calendar button {
    min-height: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.rbc-calendar button:hover {
    background: transparent;
    color: var(--color-primary);
    text-decoration: none;
}
.rbc-calendar button:active {
    transform: none;
}

.rbc-toolbar {
    margin-bottom: var(--space-4);
    gap: var(--space-2);
    flex-wrap: wrap;
}
.rbc-toolbar .rbc-toolbar-label {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-foreground);
    text-transform: capitalize;
}
.rbc-btn-group {
    display: inline-flex;
    gap: 2px;
    background: var(--color-muted);
    border-radius: var(--radius);
    padding: 3px;
}
.rbc-btn-group button {
    border: none;
    background: transparent;
    color: var(--color-muted-foreground);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    min-height: auto;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.rbc-btn-group button:hover {
    background: #fff;
    color: var(--color-foreground);
}
.rbc-btn-group button.rbc-active,
.rbc-btn-group button.rbc-active:hover {
    background: var(--color-surface);
    color: var(--color-primary-hover);
    box-shadow: var(--shadow-xs);
}

.rbc-calendar {
    font-family: inherit;
}
/* Pas d'événements "journée entière" dans l'app : masquer la rangée all-day
   (bande vide sous les en-têtes en vue Jour/Semaine). */
.rbc-allday-cell {
    display: none;
}
.rbc-header {
    padding: 10px 6px;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--color-foreground);
    border-color: var(--color-border) !important;
    text-transform: capitalize;
}
.rbc-time-view,
.rbc-time-header.rbc-overflowing,
.rbc-time-content,
.rbc-time-header-content,
.rbc-timeslot-group,
.rbc-day-slot,
.rbc-time-column,
.rbc-time-gutter,
.rbc-header + .rbc-header {
    border-color: var(--color-border) !important;
}
.rbc-time-view {
    border-radius: var(--radius);
    overflow: hidden;
    border-color: var(--color-border) !important;
}
.rbc-time-header-cell .rbc-header {
    background: var(--color-muted);
}
.rbc-label,
.rbc-time-gutter .rbc-label {
    color: var(--color-muted-foreground);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}
.rbc-today {
    background: var(--color-primary-soft);
}
.rbc-current-time-indicator {
    background: var(--color-accent);
    height: 2px;
}
.rbc-event {
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}
.rbc-event:focus {
    outline: 2px solid var(--color-ring);
    outline-offset: 1px;
}
.rbc-event-label {
    font-size: 0.68rem;
    opacity: 0.85;
}
.rbc-slot-selection {
    background: rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-sm);
}
.rbc-day-slot .rbc-time-slot {
    border-color: #f1f5f9;
}
.rbc-off-range-bg {
    background: var(--color-muted);
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 720px) {
    .app-header {
        flex-wrap: wrap;
        height: auto;
        padding: var(--space-3);
        gap: var(--space-2);
    }
    .app-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }
    .app-main {
        padding: var(--space-4) var(--space-3);
    }
    .app-header .header-right {
        gap: var(--space-2);
    }
    .app-user {
        display: none;
    }
}

/* =========================================================================
   Accessibilité : mouvement réduit
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

