/* ============================================================
   Module Prestations — Design Dental Addict
   Brand Book v1.0 : Grey #214152 / Purple #2c2d55 / Pink #e8327c
   Typographie : Ubuntu (Light 300 / Regular 400 / Medium 500 / Bold 700)
   ============================================================ */

/* === Logo Dental Addict ===
   Le logo officiel (multicolor grey + pink) est peu lisible sur fond sombre.
   `filter: brightness(0) invert(1)` reproduit la version MONOCHROME WHITE
   officielle (brand book p.11) — tout en blanc, conservant les proportions. */
.brand-logo,
.brand-logo-sm {
    display: flex;
    align-items: center;
}

.brand-logo {
    justify-content: center;
    margin-bottom: 28px;
}

.brand-logo img,
.brand-logo-sm img {
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-logo img {
    height: 44px;
    width: auto;
}

.brand-logo-sm img {
    height: 22px;
    width: auto;
}

.brand-logo-sm:hover img {
    opacity: 1;
    transform: scale(1.03);
}

/* === Container global : plus de respiration === */
.prestations-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 100px;
}

.prestations-admin {
    max-width: 1400px;
}

/* === Header : layout premium === */
.prestations-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(232,50,124,0.10);
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.header-title .brand-logo-sm {
    margin-bottom: 4px;
}

.prestations-header h1 {
    font-size: 42px;
    line-height: 1.05;
    font-weight: 300;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 0;
}

.month-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.month-nav-btn .month-nav-label {
    text-transform: capitalize;
}
.month-nav-prev { padding-right: 16px; }
.month-nav-next { padding-left: 16px; }

.month-nav-btn:hover {
    background: rgba(232,50,124,0.10);
    border-color: rgba(232,50,124,0.50);
    color: var(--brand-pink);
    transform: translateY(-1px);
}

.prestations-header h1 i {
    color: var(--brand-pink);
    font-size: 0.7em;
    margin-right: 8px;
    vertical-align: middle;
}

.prestations-header .back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    transition: color 0.2s ease, gap 0.2s ease;
}

.prestations-header .back-link:hover {
    color: var(--brand-pink);
    gap: 12px;
}

.employee-meta {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 400;
}

.employee-meta strong {
    color: var(--text-primary);
    font-weight: 500;
}

.logout-form { margin: 0; }

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* === Badges (entité, statut, admin) === */
.entity-badge,
.status-badge,
.admin-badge,
.canton {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.entity-be {
    background: rgba(33,65,82,0.35);
    color: #2d4453;
    border: 1px solid rgba(33,65,82,0.60);
}

.entity-ch {
    background: rgba(232,50,124,0.12);
    color: #bd1758;
    border: 1px solid rgba(232,50,124,0.35);
}

.canton {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.admin-badge {
    background: rgba(245,158,11,0.12);
    color: var(--warning);
    border: 1px solid rgba(245,158,11,0.30);
}

.status-draft     { background: rgba(139,143,163,0.15); color: #52768a; border: 1px solid rgba(139,143,163,0.25); }
.status-submitted { background: rgba(232,50,124,0.12);  color: #bd1758; border: 1px solid rgba(232,50,124,0.40); }
.status-validated { background: rgba(16,185,129,0.14);  color: #15803d; border: 1px solid rgba(16,185,129,0.35); }
.status-locked    { background: rgba(44,45,85,0.45);    color: #6d28d9; border: 1px solid rgba(139,92,246,0.30); }

/* === Cards : esthétique glass Dental Addict ===
   Chaque card porte un border-top gradient 3 stops (Grey→Purple→Pink)
   quasi-invisible au repos, qui s'intensifie au hover. Élévation subtile
   via box-shadow multicouche. */
.current-month-card,
.history-card,
.section-card,
.submit-card,
.balance-card,
.totals-card,
.filters-card,
.exports-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 246, 248, 0.92));
    border: 1px solid rgba(232,50,124,0.08);
    border-radius: 16px;
    padding: 28px 30px;
    margin-bottom: 20px;
    box-shadow:
        0 1px 0 0 rgba(33, 65, 82, 0.03) inset,
        0 10px 30px -15px rgba(0,0,0,0.5);
    transition: border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.current-month-card::before,
.balance-card::before,
.section-card::before,
.history-card::before,
.submit-card::before,
.totals-card::before,
.filters-card::before,
.exports-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-grey), var(--brand-purple), var(--brand-pink));
    opacity: 0.35;
    border-radius: 0 0 2px 2px;
    transition: opacity 0.3s ease;
}

.current-month-card:hover::before,
.balance-card:hover::before,
.section-card:hover::before,
.history-card:hover::before {
    opacity: 0.85;
}

.current-month-card h2,
.history-card h2,
.section-card h2,
.balance-card h2,
.exports-card h2 {
    margin: 0 0 10px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-month-card h2 i,
.history-card h2 i,
.section-card h2 i,
.balance-card h2 i,
.exports-card h2 i {
    color: var(--brand-pink);
    font-size: 14px;
}

.current-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.current-month-header h2 {
    margin: 0;
}

.current-month-card p,
.section-help {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0 20px;
}

/* === Historique : liste premium === */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.history-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.60);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.history-list a:hover {
    border-color: rgba(232,50,124,0.40);
    background: rgba(232,50,124,0.04);
    transform: translateY(-1px);
}

.history-month {
    font-weight: 500;
}

.empty-help {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
    margin: 0;
}

.locked-banner {
    background: linear-gradient(90deg, rgba(44,45,85,0.25), rgba(44,45,85,0.10));
    border: 1px solid rgba(139,92,246,0.25);
    border-left: 3px solid var(--brand-pink);
    color: #6d28d9;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.locked-banner i {
    color: var(--brand-pink);
    font-size: 16px;
}

/* === Solde congés : hero number + barre marque === */
.balance-card {
    padding-top: 24px;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 18px;
}

.balance-remaining {
    font-family: 'Ubuntu', sans-serif;
    font-size: 42px;
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, #10b981, var(--brand-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-bar-wrapper {
    height: 8px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(232,50,124,0.10);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 16px;
}

.balance-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-grey), var(--brand-purple), var(--brand-pink));
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(232,50,124,0.4);
}

.balance-legend {
    display: flex;
    gap: 24px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
    letter-spacing: 0.02em;
}

.balance-legend strong {
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Inter', 'Ubuntu', sans-serif;
    font-variant-numeric: tabular-nums;
    margin-right: 4px;
}

.balance-legend .legend-validated strong { color: #15803d; }
.balance-legend .legend-submitted strong { color: #bd1758; }
.balance-legend .legend-draft strong     { color: var(--text-muted); }

/* === Compteurs annuels (maladie, recup ferie, abs. autorisee, swaps) === */
.counters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(232,50,124,0.10);
}

.counter-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.counter-tile .counter-value {
    font-family: 'Ubuntu', sans-serif;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.counter-tile .counter-max {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 4px;
}

.counter-tile .counter-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.counter-tile .counter-label i {
    color: var(--brand-pink);
    font-size: 0.9em;
    margin-right: 4px;
}

.counter-tile.counter-alert {
    border-color: rgba(239, 68, 68, 0.40);
}

.counter-tile.counter-alert .counter-value {
    color: #ef4444;
}

/* === Calendrier : cases raffinées === */
.calendar-wrapper {
    overflow-x: auto;
    margin: 8px -4px;
}

.calendar-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    table-layout: fixed;
}

.calendar-grid th {
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-align: center;
    padding: 8px 0 10px;
}

.calendar-grid th.weekend-col { color: var(--text-muted); }

.calendar-day {
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid var(--border);
    border-radius: 10px;
    height: 86px;
    padding: 6px 8px;
    vertical-align: top;
    font-size: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.calendar-day:not(.out-of-month):hover {
    border-color: rgba(232,50,124,0.35);
    transform: translateY(-1px);
}

/* Etat pendant la sauvegarde AJAX : case legerement pale + cursor wait */
.calendar-day.saving {
    opacity: 0.65;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.calendar-day.saving::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-pink);
    box-shadow: 0 0 0 0 rgba(232,50,124,0.6);
    animation: cell-saving-pulse 0.9s ease-in-out infinite;
}

@keyframes cell-saving-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232,50,124,0.6); }
    50%      { transform: scale(1.4); box-shadow: 0 0 0 4px rgba(232,50,124,0); }
}

/* Micro-flash rose apres sauvegarde reussie (feedback bref) */
.calendar-day.saved-flash {
    animation: cell-saved-flash 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cell-saved-flash {
    0%   { box-shadow: 0 0 0 0 rgba(232,50,124,0); }
    30%  { box-shadow: 0 0 0 6px rgba(232,50,124,0.35); }
    100% { box-shadow: 0 0 0 0 rgba(232,50,124,0); }
}

.calendar-day.out-of-month {
    opacity: 0.20;
    pointer-events: none;
    background: transparent;
    border-color: transparent;
}

.calendar-day.weekend {
    background: rgba(244, 246, 248, 0.60);
}

.calendar-day.holiday {
    background: rgba(245,158,11,0.08);
    border-color: rgba(245,158,11,0.25);
}

.calendar-day .day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 2px;
}

.calendar-day .day-num {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1;
}

/* Chip heures attendues (8h/6h/?/—) selon le systeme d'horaires.
   Aligne sur le style des chips km/overtime (meme taille, meme typo,
   meme padding) pour coherence visuelle. */
.calendar-day .hours-chip {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: rgba(232,50,124,0.18);
    color: #bd1758;
    border: 1px solid rgba(232,50,124,0.40);
}

.calendar-day .hours-chip.hours-6 {
    background: rgba(139,92,246,0.14);
    color: #6d28d9;
    border-color: rgba(139,92,246,0.30);
}

.calendar-day .hours-chip.hours-0 {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.calendar-day.weekend .hours-chip,
.calendar-day.out-of-month .hours-chip {
    opacity: 0.5;
}

.calendar-day.weekend .day-num,
.calendar-day.out-of-month .day-num {
    color: var(--text-muted);
    font-weight: 400;
}

.calendar-day .holiday-label {
    font-size: 9px;
    letter-spacing: 0.05em;
    color: var(--warning);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.calendar-day-form { margin: 6px 0 0; }

.calendar-day-form select {
    width: 100%;
    padding: 4px 6px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    background: rgba(244, 246, 248, 0.80);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day-form select:hover,
.calendar-day-form select:focus {
    border-color: var(--brand-pink);
    outline: none;
    box-shadow: 0 0 0 2px rgba(232,50,124,0.20);
}

.calendar-day .absence-label {
    margin-top: 6px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calendar-day .pending-label {
    margin-top: 2px;
    font-size: 9px;
    font-style: italic;
    color: var(--brand-pink);
    letter-spacing: 0.05em;
}

/* Charte couleurs (nomenclature Acerta, cf. services/prestations/absence_catalog) :
 *   Vacances légales (230-V)      -> Jaune
 *   Maladie (50-M)                -> Rouge
 *   Nouvelle maladie (51-NM)      -> Orange-rouge (distinct de 50-M)
 *   Petit chômage (221-PC)        -> Violet
 *   Récup jour férié (2205-RJF)   -> Vert
 *   Absence autorisée (428-AA)    -> Bleu
 *   Vacances jeunes (462-VJ)      -> Jaune-vert (proche vacances)
 *   Homeworking (1020-HW)         -> Teal (neutre brand)
 *   Travail WE (hors Acerta)      -> Vert soutenu
 */
.calendar-day.has-absence { border-width: 1px; }

.calendar-day.absence-conge {
    background: rgba(250,204,21,0.12);
    border-color: rgba(250,204,21,0.55);
}
.calendar-day.absence-maladie {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.55);
}
.calendar-day.absence-nouvelle_maladie {
    background: rgba(249,115,22,0.14);
    border-color: rgba(249,115,22,0.55);
}
.calendar-day.absence-chome {
    background: rgba(139,92,246,0.15);
    border-color: rgba(139,92,246,0.55);
}
.calendar-day.absence-recup_ferie {
    background: rgba(16,185,129,0.14);
    border-color: rgba(16,185,129,0.55);
}
.calendar-day.absence-absence_autorisee {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.55);
}
.calendar-day.absence-rtt {
    background: rgba(6,182,212,0.13);
    border-color: rgba(6,182,212,0.55);
}
.calendar-day.absence-pas_de_prestation {
    background: rgba(148,163,184,0.18);
    border-color: rgba(148,163,184,0.60);
}
.calendar-day.absence-vacances_jeunes {
    background: rgba(163,230,53,0.16);
    border-color: rgba(163,230,53,0.60);
}
.calendar-day.absence-homeworking {
    background: rgba(20,184,166,0.12);
    border-color: rgba(20,184,166,0.50);
}
.calendar-day.absence-travail_we {
    background: rgba(16,185,129,0.18);
    border-color: rgba(16,185,129,0.60);
}

/* === Chips coin de case : km bas-gauche bleu, heures supp bas-droite orange === */
.calendar-day {
    position: relative;  /* assure le positionnement absolu des chips */
}

.day-chip-km,
.day-chip-overtime {
    position: absolute;
    bottom: 4px;
    z-index: 5;  /* au-dessus du select/form (z-index auto) */
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1.1;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.02em;
}

.day-chip-km {
    left: 4px;
    background: rgba(59,130,246,0.20);
    color: #1d4ed8;
    border: 1px solid rgba(59,130,246,0.45);
}

.day-chip-overtime {
    right: 4px;
    background: rgba(251,146,60,0.22);
    /* Orange fonce lisible sur fond clair (pendant du bleu #1d4ed8 du chip km) */
    color: #c2410c;
    border: 1px solid rgba(251,146,60,0.55);
    box-shadow: 0 0 8px rgba(251,146,60,0.20);
}

/* PENDING (en attente d'approbation admin) : dash border + sablier mini.
   Le sablier suit le numero du jour (top-left) pour ne pas chevaucher le
   chip d'heures "8h" qui occupe le coin top-right. */
.calendar-day.pending {
    border-style: dashed;
    position: relative;
}
.calendar-day.pending .day-num::after {
    content: "\f252"; /* fa-hourglass-half */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 9px;
    margin-left: 4px;
    vertical-align: 1px;
    color: var(--brand-pink);
    opacity: 0.85;
}

/* === Tables entrées (heures supp, km, notes) === */
.entry-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13px;
}

.entry-table th,
.entry-table td {
    padding: 12px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(232,50,124,0.08);
}

.entry-table th {
    font-family: 'Ubuntu', sans-serif;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding-bottom: 10px;
}

.entry-table td { color: var(--text-primary); }

.entry-table tr:last-child td {
    border-bottom: none;
}

.entry-table tr:hover td {
    background: rgba(232,50,124,0.03);
}

.inline-form { display: inline; margin: 0; }

.btn-danger-sm {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-sm:hover {
    background: rgba(239,68,68,0.12);
    color: #b91c1c;
    border-color: rgba(239,68,68,0.30);
}

/* === Formulaires d'ajout : inputs premium === */
.add-entry-form {
    margin-top: 14px;
    padding: 18px 20px;
    background: rgba(244, 246, 248, 0.60);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s ease;
}

.add-entry-form:focus-within {
    border-color: rgba(232,50,124,0.40);
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.form-row:last-child { margin-bottom: 0; }

.form-row label.checkbox-inline {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}
.form-row label.checkbox-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.form-row label.checkbox-inline .hint {
    color: var(--text-muted, #888);
    font-weight: 400;
    font-size: 12px;
}

.form-row label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
}

.form-row label.grow { flex: 1 1 220px; }

.form-row input,
.form-row select {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Inter', 'Ubuntu', sans-serif;
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    transition: all 0.2s ease;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 3px rgba(232,50,124,0.15);
}

/* === Boutons : vraies variantes brand === */
.btn-primary,
.btn-primary-sm,
.btn-submit-declaration {
    background: var(--brand-pink);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px -4px rgba(232,50,124,0.50);
}

.btn-primary {
    padding: 13px 28px;
    font-size: 14px;
}

.btn-primary-sm {
    padding: 10px 18px;
    font-size: 13px;
}

.btn-primary:hover,
.btn-primary-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px -4px rgba(232,50,124,0.70);
    filter: brightness(1.08);
}

.btn-primary:active,
.btn-primary-sm:active {
    transform: translateY(0);
}

.btn-secondary,
.btn-secondary-sm {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary {
    padding: 12px 22px;
    font-size: 13px;
}

.btn-secondary-sm {
    padding: 8px 14px;
    font-size: 12px;
}

.btn-secondary:hover,
.btn-secondary-sm:hover {
    border-color: var(--brand-pink);
    color: var(--brand-pink);
    background: rgba(232,50,124,0.05);
}

/* === Configuration semaine (dropdown S1-S4) === */
.schedule-config .schedule-week-form {
    margin-top: 12px;
}

.schedule-week-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.schedule-week-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 110px;
    padding: 12px 14px;
    background: rgba(244, 246, 248, 0.60);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.schedule-week-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.schedule-week-option .week-num {
    font-family: 'Ubuntu', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.schedule-week-option .week-hint {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

.schedule-week-option:hover {
    border-color: rgba(232,50,124,0.50);
    background: rgba(232,50,124,0.06);
}

/* Etat coche : feedback immediat au clic (sans reload), via CSS :has().
   Supporte par tous les navigateurs modernes (Safari 15.4+, Chrome 105+,
   Firefox 121+). Fallback .selected conserve pour l'etat persistant. */
.schedule-week-option:has(input:checked),
.schedule-week-option.selected {
    border-color: var(--brand-pink);
    background: rgba(232,50,124,0.18);
    box-shadow: 0 0 0 3px rgba(232,50,124,0.25), 0 4px 14px -4px rgba(232,50,124,0.35);
}

.schedule-week-option:has(input:checked) .week-num,
.schedule-week-option.selected .week-num {
    color: var(--brand-pink);
    font-weight: 700;
}

.schedule-week-option:has(input:checked) .week-hint,
.schedule-week-option.selected .week-hint {
    color: #bd1758;
}

/* Petit check rose dans le coin quand coche (indicateur visuel fort) */
.schedule-week-option:has(input:checked)::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 10px;
    color: var(--brand-pink);
}

.schedule-locked-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

.schedule-locked-label strong {
    color: var(--text-primary);
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
}

/* === Live sync note (sous le calendrier) === */
.live-sync-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 0 0 18px;
    max-width: max-content;
    background: linear-gradient(135deg, rgba(232,50,124,0.10), rgba(44,45,85,0.10));
    border: 1px solid rgba(232,50,124,0.25);
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.live-sync-note i {
    color: var(--brand-pink);
    font-size: 14px;
}

.live-sync-note strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* === Submit card : hero call-to-action === */
.submit-card {
    background: linear-gradient(135deg, rgba(33,65,82,0.25), rgba(44,45,85,0.20), rgba(232,50,124,0.12));
    border: 1px solid rgba(232,50,124,0.25);
    text-align: center;
    padding: 36px 30px;
}

.submit-card::before {
    opacity: 0.70;
}

.btn-submit-declaration {
    padding: 16px 36px;
    font-size: 15px;
    letter-spacing: 0.05em;
}

.submit-intro {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 10px auto 20px;
    max-width: 540px;
}

.submit-help {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
    margin: 16px auto 0;
    max-width: 560px;
    font-style: italic;
}

/* === Notes === */
.note-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 16px;
}

.note-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(244, 246, 248, 0.60);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    transition: border-color 0.2s ease;
}

.note-item:hover {
    border-color: rgba(232,50,124,0.25);
}

.note-cat {
    font-family: 'Ubuntu', sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.note-cat-materiel  .note-cat {
    background: rgba(33,65,82,0.40);
    color: #2d4453;
    border-color: rgba(33,65,82,0.60);
}
.note-cat-formation .note-cat {
    background: rgba(16,185,129,0.14);
    color: #15803d;
    border-color: rgba(16,185,129,0.35);
}
.note-cat-autre .note-cat {
    background: rgba(44,45,85,0.40);
    color: #6d28d9;
    border-color: rgba(139,92,246,0.30);
}

.note-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ============================================================
   ADMIN — tableau, totaux, filtres, détail
   ============================================================ */

.totals-card {
    padding: 22px 28px;
}

.totals-grid {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
}

.total-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.total-item strong {
    font-family: 'Inter', 'Ubuntu', sans-serif;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.total-item span {
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
}

.total-submitted strong {
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filters-card {
    padding: 18px 24px;
}

.filters-form {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filters-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
}

.filters-form input,
.filters-form select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    font-family: 'Inter', 'Ubuntu', sans-serif;
    transition: all 0.2s ease;
}

.filters-form input:focus,
.filters-form select:focus {
    outline: none;
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 3px rgba(232,50,124,0.15);
}

.all-clear-card {
    background: linear-gradient(135deg, rgba(16,185,129,0.10), rgba(16,185,129,0.03));
    border: 1px solid rgba(16,185,129,0.30);
    border-left: 4px solid #10b981;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.all-clear-icon {
    font-size: 32px;
    color: var(--success);
    flex-shrink: 0;
}

.all-clear-card strong {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    font-family: 'Ubuntu', sans-serif;
}

.all-clear-card p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.action-needed-card {
    background: linear-gradient(135deg, rgba(232,50,124,0.10), rgba(44,45,85,0.15));
    border: 1px solid rgba(232,50,124,0.30);
    border-left: 4px solid var(--brand-pink);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #bd1758;
    font-size: 14px;
}

.action-needed-card i {
    font-size: 18px;
    color: var(--brand-pink);
}

.action-needed-card strong {
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Ubuntu', sans-serif;
}

.exports-card h2 {
    margin-bottom: 10px;
}

.exports-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.admin-grid-wrapper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 246, 248, 0.92));
    border: 1px solid rgba(232,50,124,0.08);
    border-radius: 16px;
    overflow-x: auto;
    margin-bottom: 16px;
    box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
    position: relative;
}

.admin-grid-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-grey), var(--brand-purple), var(--brand-pink));
    opacity: 0.40;
    border-radius: 0 0 2px 2px;
}

.admin-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-grid-table th,
.admin-grid-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(232,50,124,0.06);
    white-space: nowrap;
}

.admin-grid-table thead th {
    background: rgba(244, 246, 248, 0.95);
    color: var(--text-secondary);
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
    position: sticky;
    top: 0;
    padding: 14px 12px;
}

.admin-grid-table .sticky-col {
    text-align: left;
    position: sticky;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    z-index: 2;
}

.admin-grid-table thead .sticky-col {
    z-index: 3;
    background: rgba(244, 246, 248, 0.95);
}

.admin-grid-table .employee-name {
    color: var(--text-primary);
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
}

.admin-grid-table .pole-col {
    color: var(--text-muted);
    font-size: 12px;
}

.admin-grid-table tbody tr:hover td {
    background: rgba(232,50,124,0.03);
}

.month-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.month-header .month-year {
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.grid-cell {
    padding: 8px;
    width: 46px;
}

.cell-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 6px 0;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.cell-link:hover {
    transform: scale(1.15);
}

.cell-status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--border);
    transition: all 0.2s ease;
}

.cell-empty .cell-status-dot     { background: transparent; border-color: rgba(33, 65, 82, 0.08); }
.cell-draft .cell-status-dot     { background: rgba(139,143,163,0.50); border-color: rgba(139,143,163,0.70); }
.cell-submitted .cell-status-dot { background: var(--brand-pink); border-color: var(--brand-pink); box-shadow: 0 0 0 3px rgba(232,50,124,0.20), 0 0 12px rgba(232,50,124,0.50); }
.cell-validated .cell-status-dot { background: #10b981; border-color: #10b981; }
.cell-locked .cell-status-dot    { background: var(--brand-purple); border-color: rgba(139,92,246,0.60); }

.admin-legend {
    display: flex;
    gap: 24px;
    padding: 14px 20px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.60);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.admin-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cell-empty-dot     { background: transparent; border: 1.5px solid rgba(33, 65, 82, 0.10); width: 12px; height: 12px; display: inline-block; border-radius: 50%; }
.cell-draft-dot     { background: rgba(139,143,163,0.50); width: 12px; height: 12px; display: inline-block; border-radius: 50%; }
.cell-submitted-dot { background: var(--brand-pink); width: 12px; height: 12px; display: inline-block; border-radius: 50%; box-shadow: 0 0 8px rgba(232,50,124,0.40); }
.cell-validated-dot { background: #10b981; width: 12px; height: 12px; display: inline-block; border-radius: 50%; }
.cell-locked-dot    { background: var(--brand-purple); width: 12px; height: 12px; display: inline-block; border-radius: 50%; }

/* === Admin detail === */
.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.detail-summary {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item strong {
    font-family: 'Inter', 'Ubuntu', sans-serif;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.summary-item span {
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
}

.detail-timestamps {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 12px 0 0;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* === Login card premium === */
.login-container {
    max-width: 440px;
    margin: 80px auto;
    padding: 0 24px;
}

.login-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 246, 248, 0.92));
    border: 1px solid rgba(232,50,124,0.12);
    border-radius: 20px;
    padding: 48px 40px 40px;
    box-shadow:
        0 1px 0 0 rgba(33, 65, 82, 0.05) inset,
        0 20px 60px -20px rgba(232,50,124,0.25),
        0 25px 80px -30px rgba(0,0,0,0.6);
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-grey), var(--brand-purple), var(--brand-pink));
    opacity: 0.80;
    border-radius: 0 0 2px 2px;
}

.login-card .brand-logo {
    margin-bottom: 24px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-family: 'Ubuntu', sans-serif;
    font-size: 36px;
    font-weight: 500;
    color: var(--brand-pink);
    margin-bottom: 0;
    letter-spacing: -0.02em;
}
.login-header h1 i {
    color: var(--brand-pink);
    margin-right: 12px;
    font-size: 0.85em;
    vertical-align: -2px;
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-container .form-group label {
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.login-container .form-group label i {
    color: var(--brand-pink);
}

.login-container .form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(244, 246, 248, 0.80);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Inter', 'Ubuntu', sans-serif;
    font-size: 14px;
    transition: all 0.2s ease;
}

.login-container .form-input::placeholder {
    color: var(--text-muted);
}

.login-container .form-input:focus {
    outline: none;
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 3px rgba(232,50,124,0.15);
    background: rgba(244, 246, 248, 0.95);
}

.login-container .btn-full {
    width: 100%;
    padding: 15px 24px;
    font-size: 14px;
    letter-spacing: 0.05em;
}

.login-help {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    margin-top: 18px;
    line-height: 1.6;
    font-style: italic;
}

/* === Flash messages premium === */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 420px;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 12px;
    font-size: 13px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 248, 0.95));
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand-pink);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    animation: flash-slide-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.flash-message.flash-success {
    border-left-color: #10b981;
}

.flash-message.flash-error {
    border-left-color: #ef4444;
}

.flash-message.flash-warning {
    border-left-color: var(--warning);
}

@keyframes flash-slide-in {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* === Admin edit hint dans detail === */
.admin-edit-hint {
    margin-left: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--brand-pink);
    font-style: italic;
}

/* === Danger zone : purge tests === */
.danger-zone {
    margin: 20px 0;
}

.danger-zone details {
    background: rgba(239,68,68,0.05);
    border: 1px solid rgba(239,68,68,0.20);
    border-radius: 12px;
    padding: 14px 18px;
}

.danger-zone summary {
    cursor: pointer;
    color: #b91c1c;
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    user-select: none;
}

.danger-zone summary i { margin-right: 6px; }

.danger-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(239,68,68,0.15);
}

.danger-form p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.danger-form strong { color: #b91c1c; }

.danger-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.danger-form code {
    background: rgba(239,68,68,0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #b91c1c;
    text-transform: none;
    letter-spacing: normal;
}

.danger-form input {
    padding: 8px 12px;
    background: rgba(244, 246, 248, 0.80);
    border: 1px solid rgba(239,68,68,0.30);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    max-width: 300px;
    text-transform: none;
    letter-spacing: normal;
}

/* === Certificat medical (employee card) === */
.medical-card {
    border-top: 1px dashed rgba(239,68,68,0.22);
}

.medical-card .medical-form input[type="file"] {
    padding: 8px 10px;
    background: rgba(244, 246, 248, 0.60);
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}

.medical-card .medical-form input[type="file"]::file-selector-button {
    background: rgba(232,50,124,0.12);
    border: 1px solid rgba(232,50,124,0.30);
    color: var(--brand-pink);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    margin-right: 10px;
}

/* === Medical request cards (admin pending) === */
.medical-request-card {
    background: rgba(244, 246, 248, 0.55);
    border: 1px solid rgba(239,68,68,0.20);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    position: relative;
}

.medical-request-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, rgba(239,68,68,0.60), rgba(232,50,124,0.60));
    border-radius: 0 0 2px 2px;
    opacity: 0.55;
}

.medical-request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.medical-request-header strong.employee-name {
    font-family: 'Ubuntu', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    margin-right: 8px;
}

.medical-request-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 14px;
}

.medical-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.medical-ocr-col {
    background: rgba(255, 255, 255, 0.60);
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.medical-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    color: var(--text-primary);
}

.medical-label {
    display: inline-block;
    min-width: 120px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 500;
    flex-shrink: 0;
}

.drive-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(16,185,129,0.10);
    color: #15803d;
    border: 1px solid rgba(16,185,129,0.35);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.drive-link:hover {
    background: rgba(16,185,129,0.18);
}

.no-cert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--warning);
    font-size: 12px;
    font-style: italic;
}

.kind-chip.kind-premiere {
    background: rgba(59,130,246,0.12);
    color: #1d4ed8;
    border-color: rgba(59,130,246,0.40);
}

.kind-chip.kind-prolongation {
    background: rgba(245,158,11,0.14);
    color: #a16207;
    border-color: rgba(245,158,11,0.40);
}

.date-mismatch {
    color: var(--warning);
    font-weight: 700;
    margin-left: 6px;
    cursor: help;
}

.medical-approve-form {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.medical-approve-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.medical-approve-row label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.medical-approve-row input {
    padding: 9px 12px;
    background: rgba(244, 246, 248, 0.90);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.medical-approve-row input:focus {
    outline: none;
    border-color: var(--brand-pink);
    box-shadow: 0 0 0 3px rgba(232,50,124,0.15);
}

.medical-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 700px) {
    .medical-request-body {
        grid-template-columns: 1fr;
    }
}

/* === Swap horaires (employee card + admin KPI) === */
.swap-card .swap-form .form-row input[type="date"] {
    padding: 10px 12px;
}

.swap-card {
    border-top: 1px dashed rgba(232,50,124,0.20);
}

/* === Layout 2 colonnes : certificat + swap cote a cote (desktop) === */
.requests-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.requests-row > .section-card {
    margin: 0;
}

/* Sur 2 colonnes, le swap n'est plus "sous" le medical : retirer le separateur */
.requests-row .swap-card {
    border-top: none;
}

@media (max-width: 900px) {
    .requests-row {
        grid-template-columns: 1fr;
    }
}

/* === Carte cong&eacute;s (declaration mensuelle) === */
.leaves-card .leaves-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}
.leaves-card .leaves-head h2 {
    margin: 0;
}
.leaves-card .entry-table {
    margin-bottom: 16px;
}
.leaves-card .leave-inline-form {
    border: 1px dashed rgba(232,50,124,0.25);
    border-radius: 10px;
    padding: 0;
    margin-top: 12px;
    background: rgba(232,50,124,0.04);
}
.leaves-card .leave-inline-form > summary.leave-toggle {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    margin: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.leaves-card .leave-inline-form > summary.leave-toggle::-webkit-details-marker {
    display: none;
}
.leaves-card .leave-inline-form[open] > summary.leave-toggle {
    border-bottom: 1px solid rgba(232,50,124,0.20);
    border-radius: 10px 10px 0 0;
    width: 100%;
    justify-content: flex-start;
}
.leaves-card .leave-form {
    padding: 14px 16px 16px;
}
.leaves-card .leave-form .form-row {
    margin-bottom: 10px;
}
.leaves-card .btn-link-sm {
    color: var(--brand-pink, #e8327c);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
}
.leaves-card .btn-link-sm:hover {
    background: rgba(232,50,124,0.10);
}

/* === Configuration semaine du mois : collapsible (details/summary) === */
.schedule-config-details {
    padding: 0;
    overflow: hidden;
}

.schedule-config-summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
}

.schedule-config-summary::-webkit-details-marker {
    display: none;
}

.schedule-config-summary::after {
    content: "\f078"; /* fa-chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.2s;
    margin-left: auto;
}

.schedule-config-details[open] .schedule-config-summary::after {
    transform: rotate(180deg);
}

.schedule-config-summary h2 {
    margin: 0;
    flex: 1;
}

.schedule-config-current {
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 13px;
    color: var(--brand-pink);
    background: rgba(232, 50, 124, 0.10);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.schedule-config-details > p,
.schedule-config-details > form {
    padding: 0 24px;
}

.schedule-config-details > form:last-child,
.schedule-config-details > p:last-child {
    padding-bottom: 18px;
}

.swap-col {
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}

.swap-col .col-sub {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: none;
    margin-top: 2px;
}

.swap-counter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
}

.swap-counter .swap-sub {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 11px;
}

.swap-counter.swap-active {
    color: #1d4ed8;
    border-color: rgba(59,130,246,0.40);
    background: rgba(59,130,246,0.08);
}

.swap-counter.swap-alert {
    color: #b91c1c;
    border-color: rgba(239,68,68,0.55);
    background: rgba(239,68,68,0.12);
    box-shadow: 0 0 0 2px rgba(239,68,68,0.10);
}

.swap-counter.swap-alert .swap-sub {
    color: #b91c1c;
}

.swap-counter.swap-alert i {
    margin-left: 2px;
    font-size: 11px;
}

/* === Colonnes compteurs annuels du grid admin (congés, mal., RJF, AA) === */
.counter-col {
    white-space: nowrap;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}

.counter-col .col-sub {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: none;
    margin-top: 2px;
}

.counter-cell {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.counter-cell .counter-cell-sub {
    font-weight: 400;
    font-size: 11px;
    color: var(--text-muted);
}

.counter-cell.counter-cell-active {
    color: #b45309;
}

.counter-cell.counter-cell-alert {
    color: #b91c1c;
}

/* === Pending badge dans header admin === */
.pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    background: var(--brand-pink);
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 8px rgba(232,50,124,0.45);
}

/* === Page "Demandes en attente" === */
.pending-list-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 246, 248, 0.92));
    border: 1px solid rgba(232,50,124,0.08);
    border-radius: 16px;
    padding: 8px 18px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
    position: relative;
    overflow-x: auto;
}

.pending-list-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-grey), var(--brand-purple), var(--brand-pink));
    opacity: 0.55;
}

.pending-table {
    width: 100%;
    min-width: 760px;
}

.pending-table td, .pending-table th {
    vertical-align: middle;
}

.pending-table .nowrap { white-space: nowrap; }
.pending-table .text-muted { color: var(--text-muted); font-size: 11px; }
.pending-table .action-col { text-align: right; white-space: nowrap; }

.kind-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.kind-chip.kind-conge {
    background: rgba(250,204,21,0.14);
    color: #a16207;
    border-color: rgba(250,204,21,0.40);
}
.kind-chip.kind-maladie {
    background: rgba(239,68,68,0.14);
    color: #b91c1c;
    border-color: rgba(239,68,68,0.45);
}
.kind-chip.kind-chome {
    background: rgba(139,92,246,0.16);
    color: #6d28d9;
    border-color: rgba(139,92,246,0.45);
}
.kind-chip.kind-recup_ferie {
    background: rgba(16,185,129,0.14);
    color: #15803d;
    border-color: rgba(16,185,129,0.40);
}
.kind-chip.kind-homeworking {
    background: rgba(20,184,166,0.14);
    /* Teal fonce lisible sur fond clair (ancien #5eead4 illisible) */
    color: #0f766e;
    border-color: rgba(20,184,166,0.40);
}
.kind-chip.kind-nouvelle_maladie {
    background: rgba(249,115,22,0.14);
    color: #c2410c;
    border-color: rgba(249,115,22,0.45);
}
.kind-chip.kind-absence_autorisee {
    background: rgba(59,130,246,0.14);
    color: #1d4ed8;
    border-color: rgba(59,130,246,0.45);
}
.kind-chip.kind-rtt {
    background: rgba(6,182,212,0.14);
    color: #0e7490;
    border-color: rgba(6,182,212,0.45);
}
.kind-chip.kind-pas_de_prestation {
    background: rgba(148,163,184,0.18);
    color: #475569;
    border-color: rgba(148,163,184,0.50);
}
.kind-chip.kind-vacances_jeunes {
    background: rgba(163,230,53,0.18);
    color: #4d7c0f;
    border-color: rgba(163,230,53,0.50);
}

.btn-approve {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
    transition: filter 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 14px -4px rgba(16,185,129,0.45);
}

.btn-approve:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-approve:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-approve.btn-approve-sm {
    padding: 6px 10px;
    font-size: 11px;
    margin-right: 4px;
}

/* === Bulk approve : barre d'action sticky === */
.pending-form { margin: 0; }

.bulk-action-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 20px;
    margin-bottom: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(232,50,124,0.20);
    border-radius: 14px;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 20px -10px rgba(0,0,0,0.6);
}

.bulk-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.bulk-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-pink);
    cursor: pointer;
}

.bulk-counter {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    flex: 1;
}

.bulk-approve-btn {
    padding: 10px 20px;
    font-size: 13px;
    margin-right: 0;
}

/* Checkbox dans le tableau */
.pending-table .checkbox-col {
    width: 36px;
    text-align: center;
}

.pending-table .absence-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-pink);
    cursor: pointer;
    vertical-align: middle;
}

.pending-table tbody tr:has(.absence-checkbox:checked) {
    background: rgba(232,50,124,0.04);
}

.hidden-form { display: none; }

.btn-reject {
    background: transparent;
    color: #b91c1c;
    border: 1px solid rgba(239,68,68,0.35);
    padding: 8px 11px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reject:hover {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.60);
    color: #fecaca;
}

/* === Responsive === */
@media (max-width: 640px) {
    .prestations-container {
        padding: 24px 16px 60px;
    }
    .prestations-header {
        flex-direction: column;
        margin-bottom: 28px;
    }
    .prestations-header h1 {
        font-size: 32px;
    }
    .balance-remaining {
        font-size: 34px;
    }
    .calendar-day {
        height: 72px;
        font-size: 11px;
    }
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .form-row label.grow {
        flex: 1 1 auto;
    }
    .totals-grid {
        gap: 20px;
    }
    .total-item strong {
        font-size: 28px;
    }
}

/* =========================================================================
   Calendar peek (admin pending.html) : modal + bouton
   ========================================================================= */

.btn-cal-peek {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(59,130,246,0.10);
    border: 1px solid rgba(59,130,246,0.30);
    color: #1d4ed8;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-cal-peek:hover {
    background: rgba(59,130,246,0.20);
    border-color: rgba(59,130,246,0.55);
    color: #1d4ed8;
}
.btn-cal-peek-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.cal-peek-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}
.cal-peek-modal {
    position: relative;
    width: min(720px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
    padding: 16px;
}
.cal-peek-close {
    position: absolute;
    top: 10px; right: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
}
.cal-peek-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}
body.cal-peek-open { overflow: hidden; }

.emp-cal-panel {
    color: var(--text-primary);
}
.emp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 36px;
}
.emp-cal-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
    font-size: 14px;
    flex: 1;
}
.emp-cal-title strong { font-size: 15px; }
.emp-cal-month {
    color: var(--text-secondary);
    text-transform: capitalize;
    font-size: 13px;
}
.emp-cal-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    text-transform: capitalize;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.emp-cal-nav-btn:hover {
    background: rgba(232,50,124,0.10);
    border-color: rgba(232,50,124,0.50);
    color: var(--brand-pink);
}

.emp-cal-readonly .calendar-day {
    cursor: default;
    pointer-events: none;
}
.emp-cal-readonly .absence-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.emp-cal-footer {
    margin-top: 12px;
    text-align: right;
}
.emp-cal-deeplink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-pink);
    text-decoration: none;
    font-size: 13px;
}
.emp-cal-deeplink:hover { text-decoration: underline; }
.emp-cal-deeplink[aria-disabled="true"] {
    color: var(--text-muted);
    pointer-events: none;
}

.emp-cal-loading,
.emp-cal-error {
    padding: 32px;
    text-align: center;
    color: var(--text-secondary);
}
.emp-cal-error { color: var(--danger); }

.status-empty {
    background: rgba(95,99,122,0.20);
    color: var(--text-muted);
}

/* Nav mois dans le cadre Absences (declaration.html) */
.calendar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.calendar-section-header h2 { margin: 0; }
.calendar-month-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.calendar-month-current {
    font-weight: 500;
    color: var(--text-primary);
    text-transform: capitalize;
    font-size: 14px;
    padding: 0 8px;
}

/* Cloture mensuelle : checkbox ACERTA + texte bloque */
.acerta-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 12px;
    padding: 12px 14px;
    background: rgba(232,50,124,0.08);
    border: 1px solid rgba(232,50,124,0.20);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 13.5px;
    line-height: 1.5;
}
.acerta-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-pink);
    flex-shrink: 0;
    cursor: pointer;
}
.acerta-checkbox-label:hover {
    background: rgba(232,50,124,0.12);
    border-color: rgba(232,50,124,0.35);
}
.submit-blocked {
    margin: 12px 0 0;
    padding: 14px 16px;
    background: rgba(95,99,122,0.10);
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
}
.submit-blocked i {
    color: var(--text-muted);
    margin-right: 6px;
}

/* Filtres + compteur swap dans pending.html */
.pending-filters-card { margin-bottom: 24px; }
.pending-filters-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.pending-filters-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 500;
}
.pending-filters-form label.grow { flex: 1; min-width: 180px; }
.pending-filters-form input,
.pending-filters-form select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
}
.pending-filters-form input:focus,
.pending-filters-form select:focus {
    border-color: var(--brand-pink);
    outline: none;
}
.pending-filters-form .filters-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.swap-count-cell { text-align: center; }
.swap-counter {
    display: inline-block;
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}
.swap-counter-low  { background: rgba(16,185,129,0.15); color: #15803d; }
.swap-counter-mid  { background: rgba(245,158,11,0.15); color: #b45309; }
.swap-counter-high { background: rgba(239,68,68,0.15);  color: #b91c1c; }

/* === Popover heures "Travail WE" (remplace window.prompt) ===
   Rendu par static/js/prestations/we_hours_popover.js, position: fixed
   ancre sur la case cliquee. */
.we-hours-popover {
    position: fixed;
    z-index: 300;
    width: 210px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(33, 65, 82, 0.18);
    padding: 12px;
    font-family: 'Inter', sans-serif;
    animation: we-pop-in 0.15s ease;
}
@keyframes we-pop-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}
.we-hours-popover__title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
}
.we-hours-popover__title i { color: var(--brand-pink); margin-right: 4px; }
.we-hours-popover__label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.we-hours-popover__input {
    width: 100%;
    margin-top: 4px;
    padding: 7px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.we-hours-popover__input:focus {
    outline: 2px solid var(--brand-pink);
    outline-offset: -1px;
}
.we-hours-popover__quick {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.we-hours-popover__chip {
    flex: 1;
    padding: 4px 0;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-grey-500);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
}
.we-hours-popover__chip:hover {
    border-color: var(--brand-pink);
    color: var(--brand-pink);
}
.we-hours-popover__error {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
}
.we-hours-popover__actions {
    display: flex;
    gap: 8px;
}
.we-hours-popover__btn {
    flex: 1;
    padding: 7px 0;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}
.we-hours-popover__btn--cancel {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.we-hours-popover__btn--cancel:hover { background: var(--bg-card-hover); }
.we-hours-popover__btn--ok {
    background: var(--brand-pink);
    color: #fff;
    border: 1px solid var(--brand-pink);
}
.we-hours-popover__btn--ok:hover {
    background: var(--brand-pink-dark);
    border-color: var(--brand-pink-dark);
}

/* === Recap notes sous l'agenda (visibilite immediate, gestion dans la
   section Notes plus bas) === */
.notes-recap {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--brand-pink-50);
    border: 1px solid var(--brand-pink-100);
    border-left: 3px solid var(--brand-pink);
    border-radius: 10px;
}
.notes-recap-title {
    margin: 0 0 8px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-pink-700);
}
.notes-recap-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.notes-recap-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
}
.notes-recap-text { line-height: 1.4; }

/* === Jour ferie (220-JF) : label impose sur les cases feriees, a la place
   du select (un ferie reste toujours un ferie) === */
.calendar-day .jour-ferie-label {
    color: var(--text-muted);
    font-weight: 600;
}

/* === Grille admin : section "Anciens employés" repliee (modele /rh) === */
.former-grid-details {
    margin-top: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.former-grid-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.former-grid-summary::-webkit-details-marker { display: none; }
.former-grid-summary i.fa-box-archive { margin-right: 6px; }
.former-grid-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}
.former-grid-chevron { transition: transform 0.2s ease; }
.former-grid-details[open] .former-grid-chevron { transform: rotate(180deg); }
.former-grid-body {
    border-top: 1px solid var(--border-soft);
    opacity: 0.85;  /* leger voile : ce sont des sorties */
}

/* === Grille admin : sections BE / CH separees === */
.grid-entity-section { margin-top: 18px; }
.grid-entity-section:first-of-type { margin-top: 0; }
.grid-entity-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.grid-entity-count {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

/* === Config groupee des semaines de cycle (page tableau admin) === */
.cycle-weeks-details {
    margin-top: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.cycle-weeks-details > .former-grid-summary { border-bottom: 1px solid var(--border-soft); }
.cycle-weeks-body { padding: 14px 16px; }
.cycle-weeks-table select {
    padding: 4px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}
.cycle-weeks-table select:focus { outline: 2px solid var(--brand-pink); outline-offset: -1px; }

.cycle-resync-form { margin-bottom: 12px; }

/* Fix overlap : les libelles longs (Homeworking · 1020-HW) passaient sous
   la fleche du select. Ellipse + reserve pour le chevron. */
.calendar-day-form select {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
}

/* Chip homeworking partiel (regime mixte Rebecca : 4h bureau + 4h HW).
   Bas-gauche comme le chip km, teinte teal homeworking. */
.day-chip-hw {
    position: absolute;
    bottom: 4px;
    left: 4px;
    z-index: 5;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1.1;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.02em;
    background: rgba(20,184,166,0.16);
    color: #0f766e;
    border: 1px solid rgba(20,184,166,0.45);
}

/* Toast discret du calendrier (retour "demande de congé envoyée") */
.cal-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #134e4a;
    color: #ccfbf1;
    border: 1px solid #14b8a6;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 90vw;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.cal-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Navigation de la fenetre de mois sur la grille admin */
.grid-month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.grid-month-current { font-size: 0.95rem; }


/* === Agenda equipe (partage /me/ + /me/equipe) — JC 2026-07-29 === */
/* === Agenda commun du mois (JC 2026-07-29) ==============================
   - barres CONTINUES pour les absences multi-jours (lanes par semaine)
   - COULEUR = equipe (teinte HSL unique), INTENSITE = motif :
     Homeworking clair -> Vacances moyen -> Maladie fonce, Absent discret
   - la legende et les toggles utilisent les MEMES classes que les barres
     (aucune couleur dupliquee en dur -> plus de divergence possible). */

.team-agenda-toolbar {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin: 18px 0 10px;
}
.team-agenda-toolbar .month-nav { display: flex; align-items: center; gap: 8px; }
.team-agenda-toolbar .month-nav a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: #fff; border: 1px solid #f3cad9; color: #d63384;
    text-decoration: none; font-weight: 700;
}
.team-agenda-toolbar .month-nav a:hover { background: #fdf0f5; }
.team-agenda-toolbar .month-label {
    font-size: 18px; font-weight: 700; color: #2d3436;
    min-width: 170px; text-align: center; text-transform: capitalize;
}
.team-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.team-chips a {
    padding: 6px 14px; border-radius: 999px; font-size: 13px;
    text-decoration: none; border: 1px solid #f3cad9; color: #6c5b63;
    background: #fff;
}
.team-chips a.active {
    background: #d63384; border-color: #d63384; color: #fff; font-weight: 600;
}
.entity-switch { margin-left: auto; display: flex; gap: 6px; }
.entity-switch a { padding: 5px 12px; border-radius: 8px; font-size: 12px;
    text-decoration: none; border: 1px solid #f3cad9; color: #6c5b63; }
.entity-switch a.active { background: #2d3436; color: #fff; border-color: #2d3436; }

/* --- Teintes d'equipe : une variable de teinte par equipe, toutes les
       nuances derivent de la meme formule -> palette harmonisee. --- */
.ta-marketing { --h: 262; --s: 60%; }
.ta-sales     { --h: 212; --s: 62%; }
.ta-customer  { --h: 28;  --s: 70%; }
.ta-compta    { --h: 168; --s: 48%; }
.ta-boss      { --h: 336; --s: 58%; }
.ta-it        { --h: 218; --s: 18%; }
.ta-ch        { --h: 145; --s: 45%; }  /* equipe Suisse (vue CH) */
.ta-autre     { --h: 0;   --s: 0%;  }
.ta-cat-homeworking { background: hsl(var(--h) var(--s) 93%);
    color: hsl(var(--h) 40% 34%); }
.ta-cat-vacances { background: hsl(var(--h) var(--s) 78%);
    color: hsl(var(--h) 55% 24%); }
.ta-cat-maladie { background: hsl(var(--h) var(--s) 42%); color: #fff; }
.ta-cat-absent { background: hsl(var(--h) 14% 88%);
    color: hsl(var(--h) 12% 38%); }

/* --- Grille calendrier en CSS grid : cases jour en fond, barres
       par-dessus. --- */
.ta-cal { background: #fff; border-radius: 14px; padding: 12px;
    box-shadow: 0 2px 10px rgba(214, 51, 132, .08); overflow-x: auto; }
.ta-cal-inner { min-width: 760px; }
.ta-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
    margin-bottom: 6px; }
.ta-head span { text-align: center; font-size: 11px; font-weight: 700;
    letter-spacing: .08em; color: #8d7f86; text-transform: uppercase;
    padding: 6px 0; }
.ta-week { display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 0 6px; margin-bottom: 6px; position: relative;
    grid-auto-rows: minmax(24px, auto); }
.ta-daybg {
    grid-row: 1 / span var(--rows, 2); border-radius: 10px;
    background: #fdfbfc; border: 1px solid #f5e9ee; min-height: 84px;
}
.ta-daybg.weekend { background: #f6f3f5; border-color: #efe9ec; }
.ta-daybg.holiday { background: #fff4e3; border-color: #f5dcb2; }
.ta-daybg.out-of-month { background: transparent; border-color: transparent; }
.ta-daybg.today { border: 2px solid #d63384; }
.ta-daynum { grid-row: 1; z-index: 1; padding: 6px 9px 2px;
    font-weight: 700; font-size: 13px; color: #2d3436; pointer-events: none; }
.ta-daynum.muted { color: #cbbfc5; font-weight: 500; }
.ta-daynum .holiday-name { display: block; font-size: 9.5px; font-weight: 600;
    color: #c07f1f; text-transform: uppercase; letter-spacing: .03em;
    white-space: normal; }
.ta-bar {
    z-index: 1; margin: 2px 4px; padding: 3px 9px; border-radius: 8px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; align-self: start;
}
.ta-bar small { font-weight: 400; opacity: .8; }
.ta-bar.cont-before { border-top-left-radius: 0; border-bottom-left-radius: 0;
    margin-left: 0; }
.ta-bar.cont-after { border-top-right-radius: 0; border-bottom-right-radius: 0;
    margin-right: 0; }

/* --- Toggles motifs + legende (memes classes que les barres) --- */
.cat-toggles { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.cat-toggles button {
    padding: 5px 12px; border-radius: 999px; font-size: 12.5px;
    border: 1px solid #eadfe5; background: #fff; color: #6c5b63;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.cat-toggles button.off { opacity: .4; text-decoration: line-through; }
.hide-cat-homeworking .ta-cat-homeworking,
.hide-cat-vacances .ta-cat-vacances,
.hide-cat-maladie .ta-cat-maladie,
.hide-cat-absent .ta-cat-absent { visibility: hidden; }
.swatch { display: inline-block; width: 14px; height: 14px;
    border-radius: 4px; border: 1px solid rgba(0,0,0,.06); }
.team-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-top: 14px;
    align-items: center; font-size: 12px; color: #6c5b63; }
.team-legend .lg-item { display: inline-flex; align-items: center; gap: 5px; }
.team-legend .lg-sep { color: #d9ccd2; margin: 0 4px; }

/* Carte "Agenda equipe" sur la premiere page /me/ (JC 2026-07-29) */
.team-agenda-home-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(214, 51, 132, .08);
}
.team-agenda-home-card .ta-cal { box-shadow: none; padding: 0; }
.team-agenda-home-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.team-agenda-home-head h2 { margin: 0; }
