/* BTP Manager V2.0 - Styles personnalisés */

/*
 * Safari iOS : éviter le décalage progressif vers la droite après portrait ↔ paysage
 * (scroll horizontal résiduel + grilles sans min-width 0).
 */
html {
    overflow-x: clip;
    width: 100%;
}
body {
    overflow-x: clip;
    max-width: 100%;
    position: relative;
}
#app-screen {
    overflow-x: clip;
    max-width: 100%;
}
#main-content {
    overflow-x: clip;
    max-width: 100%;
}

/* Écran de démarrage : logo pendant la restauration de session Firebase */
.auth-boot-logo {
    animation: auth-boot-pulse 1.15s ease-in-out infinite;
}
@keyframes auth-boot-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.72;
        transform: scale(0.96);
    }
}

/* Paie : barre de défilement type Windows (au-dessus des en-têtes) */
#payroll-table-container {
    scrollbar-width: none;
}
#payroll-table-container::-webkit-scrollbar {
    display: none;
}
.payroll-scroll-hint {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 17px;
    min-height: 17px;
    max-height: 17px;
    overflow: hidden;
    background: #f3f3f3;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e0e0e0;
    user-select: none;
    box-sizing: border-box;
}
.payroll-scroll-hint.hidden {
    display: none;
}
/* Annule le min-height 44px des boutons mobile — flèches dans la barre uniquement */
.payroll-scroll-hint-arrow {
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px !important;
    height: 17px !important;
    min-height: 0 !important;
    max-height: 17px;
    padding: 0;
    margin: 0;
    border: none;
    background: #f3f3f3;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 0;
}
.payroll-scroll-hint-arrow:hover {
    background: #eaeaea;
}
.payroll-scroll-hint-arrow:active {
    background: #e0e0e0;
}
.payroll-scroll-hint-arrow-icon {
    display: block;
    width: 0;
    height: 0;
    flex-shrink: 0;
}
.payroll-scroll-hint-arrow-left .payroll-scroll-hint-arrow-icon {
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-right: 5px solid #505050;
}
.payroll-scroll-hint-arrow-right .payroll-scroll-hint-arrow-icon {
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 5px solid #505050;
}
.payroll-scroll-hint-track {
    flex: 1;
    position: relative;
    min-width: 0;
    height: 17px;
    background: #f3f3f3;
    cursor: default;
    touch-action: none;
    box-sizing: border-box;
}
.payroll-scroll-hint-thumb {
    position: absolute;
    left: 0;
    top: 3px;
    height: 11px;
    min-width: 24px;
    background: #c1c1c1;
    border-radius: 4px;
    will-change: transform, width;
    box-sizing: border-box;
}
.payroll-scroll-hint-thumb:hover {
    background: #a6a6a6;
}
.payroll-scroll-hint-thumb:active {
    background: #787878;
}
.payroll-table-card {
    overflow: hidden;
}
.payroll-table-card .payroll-scroll-hint {
    border-radius: 0;
}

/* Variables de couleurs fonctionnelles */
:root {
    --color-success: #10b981; /* Vert */
    --color-warning: #f59e0b; /* Orange */
    --color-danger: #ef4444; /* Rouge */
    --color-info: #3b82f6; /* Bleu */
}

/* Amélioration de l'accessibilité */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Boutons CTA larges pour mobile (exception : barre d'échelle Gantt ci-dessous) */
button, .btn {
    min-height: 44px; /* Taille minimale recommandée pour mobile */
    min-width: 44px;
}

/* Échelle A/M/S/J : cibles tactiles raisonnables sans forcer 4×44px sur une ligne
   (sinon débordement + le select « équipe » peut recouvrir les boutons sur téléphone) */
#view-planning .gantt-scale-pill,
#view-planning .gantt-scale-group button {
    min-width: 0;
    min-height: 2.5rem;
    padding: 0.35rem 0.25rem;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    box-sizing: border-box;
}

#view-planning .gantt-scale-group {
    position: relative;
    z-index: 3;
    isolation: isolate;
}

@media (min-width: 768px) {
    #view-planning .gantt-scale-pill,
    #view-planning .gantt-scale-group button {
        min-width: 1.5rem;
    }
}

/* Navigation mobile - amélioration tactile */
.nav-tab {
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.nav-tab.active {
    border-top: 2px solid currentColor;
}

/* Cards : rendu sobre, sans effet de "flottement" — juste une bordure qui s'affirme légèrement */
.card {
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    box-shadow: 0 2px 8px -2px rgba(16, 24, 40, 0.08);
}

/* Badges de statut */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Tiroirs temps / rentabilité fiche chantier */
#chantier-menu-time-progress > summary,
#chantier-menu-profitability > summary,
#chantier-time-by-user-wrap > summary,
.etape-time-users > summary {
    list-style: none;
}
#chantier-menu-time-progress > summary::-webkit-details-marker,
#chantier-menu-profitability > summary::-webkit-details-marker,
#chantier-time-by-user-wrap > summary::-webkit-details-marker,
.etape-time-users > summary::-webkit-details-marker {
    display: none;
}

/* Infobulle « i » à côté des titres de section (survol / focus) */
.section-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    flex-shrink: 0;
    font-size: 1em; /* suit la taille du titre (text-lg / text-base) */
    line-height: 1;
}
.section-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem !important;
    min-height: 1.25rem !important;
    max-width: none;
    max-height: none;
    padding: 0 !important;
    margin: 0;
    border-radius: 9999px;
    border: 1.5px solid #9ca3af;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    font-style: normal;
    font-family: inherit;
    line-height: 0;
    cursor: help;
    user-select: none;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}
.section-info-glyph {
    display: block;
    font-style: italic;
    font-weight: 700;
    font-size: 0.85em;
    line-height: 1;
    /* recentrage optique du « i » italique */
    transform: translate(-0.1em, 0.02em);
}
.section-info:hover .section-info-btn,
.section-info:focus-within .section-info-btn,
.section-info--open .section-info-btn {
    border-color: #3b82f6;
    color: #2563eb;
    background: rgba(59, 130, 246, 0.08);
}
.dark .section-info-btn {
    border-color: #6b7280;
    color: #9ca3af;
}
.dark .section-info:hover .section-info-btn,
.dark .section-info:focus-within .section-info-btn,
.dark .section-info--open .section-info-btn {
    border-color: #60a5fa;
    color: #93c5fd;
    background: rgba(96, 165, 250, 0.12);
}
.section-info-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 0.25rem);
    z-index: 60;
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(45vh, 16rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 400;
    font-style: normal;
    line-height: 1.45;
    box-shadow: 0 8px 24px -8px rgba(16, 24, 40, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, visibility 0.12s ease;
}
.dark .section-info-panel {
    border-color: #4b5563;
    background: #1f2937;
    color: #d1d5db;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.45);
}
.section-info:hover .section-info-panel,
.section-info--open .section-info-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.section-info--open .section-info-panel {
    position: fixed;
    z-index: 80;
}
.section-info-extra {
    display: block;
    margin-top: 0.5rem;
}
.section-info-extra:empty {
    display: none;
    margin: 0;
}

/* Téléphone : pastille plus grande, contraste bleu, zone de tap ~44px */
@media (max-width: 767px) {
    .section-info-btn {
        width: 1.75rem;
        height: 1.75rem;
        min-width: 1.75rem !important;
        min-height: 1.75rem !important;
        font-size: 0.9375rem;
        border-width: 2px;
        border-color: #2563eb;
        color: #1d4ed8;
        background: #eff6ff;
    }
    .dark .section-info-btn {
        border-color: #60a5fa;
        color: #93c5fd;
        background: rgba(37, 99, 235, 0.28);
    }
    .section-info-btn::after {
        content: '';
        position: absolute;
        inset: -0.45rem;
    }
    .section-info-panel {
        width: min(22rem, calc(100vw - 1.5rem));
        font-size: 0.875rem;
        line-height: 1.5;
        max-height: min(55vh, 20rem);
    }
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-purple {
    background-color: rgba(147, 51, 234, 0.1);
    color: #7c3aed;
}

.badge-neutral {
    background-color: rgba(107, 114, 128, 0.12);
    color: #374151;
}

.dark .badge-neutral {
    background-color: rgba(156, 163, 175, 0.2);
    color: #e5e7eb;
}

/* Responsive - Correction des tableaux */
@media (max-width: 640px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* FullCalendar (réplique Google Calendar) est une grille HTML <table> :
       display:block écrase les 7 colonnes et affiche un calendrier illisible. */
    #fullcalendar-main table,
    .gcal-mini-wrap table,
    .fc table,
    .psw-table {
        display: table !important;
        width: 100%;
        overflow: visible;
        white-space: normal;
        table-layout: fixed;
    }
    
    /* Empêcher le zoom sur les inputs iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="month"],
    select,
    textarea {
        font-size: 16px; /* Évite le zoom automatique sur iOS */
    }
    
    /* Grille responsive pour les statistiques */
    .grid {
        grid-template-columns: 1fr !important;
    }

    #fullcalendar-main .grid,
    .gcal-mini-wrap .grid,
    #agenda-container .grid {
        grid-template-columns: unset !important;
    }
    
    /* Navigation mobile - ajustements */
    .nav-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .nav-tab svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    /* Cards - espacement réduit */
    .card {
        padding: 0.75rem;
    }
    
    /* Formulaire de pointage - colonnes empilées */
    #pointage-form .grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* iOS : éviter zoom au focus + largeur intrinsèque des champs heure */
    input[type="time"] {
        font-size: 16px;
    }
}

/* Pointage : 2 colonnes avec minmax(0,1fr) pour éviter le débordement WebKit (Safari iPhone) */
.pointage-heures-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#pointage-form input[type="time"],
#edit-pointage-modal input[type="time"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#pointage-date,
.pointage-date-input {
    text-align: center;
}

#pointage-date::-webkit-date-and-time-value,
.pointage-date-input::-webkit-date-and-time-value {
    text-align: center;
}

.pointage-heures-grid > * {
    min-width: 0;
}

/* Animation de chargement */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Transitions pour les vues */
.view {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gantt - Layout split (labels fixes + timeline scrollable) */
#gantt-container {
    position: relative;
    touch-action: pan-x pan-y;
    min-height: 400px;
}

.gantt-split {
    height: 100%;
}

/* Planning : vue compacte (téléphone / paysage) — timeline plus large */
.gantt-split.gantt-compact {
    min-height: 240px;
}

.gantt-split.gantt-compact .gantt-labels-col {
    min-width: 0;
}

.gantt-labels-col {
    overflow-y: auto;
    position: relative;
    z-index: 2;
    align-self: stretch;
}

.gantt-labels-col > div:first-child {
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgb(243 244 246);
}

.dark .gantt-labels-col > div:first-child {
    background: rgba(55, 65, 81, 0.85);
}

.gantt-timeline-wrap {
    touch-action: none;
}

.gantt-canvas {
    touch-action: none; /* Désactive le scroll natif pendant l'interaction */
}

.gantt-edit-mode .gantt-canvas {
    touch-action: pan-x pan-y; /* Réactive le scroll en mode édition */
}

/* Ligne "Aujourd'hui" dans le Gantt */
.gantt-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ef4444;
    z-index: 10;
    pointer-events: none;
}

/* Week-ends grisés */
.gantt-weekend {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark .gantt-weekend {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Poignées de redimensionnement Gantt */
.gantt-resize-handle {
    position: absolute;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    background-color: #3b82f64d;
    opacity: 0;
    transition: opacity 0.2s;
}

.gantt-task:hover .gantt-resize-handle {
    opacity: 1;
}

.gantt-resize-handle-left {
    left: 0;
}

.gantt-resize-handle-right {
    right: 0;
}

/* Planning mobile - cartes chantiers */
.gantt-mobile-card {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 767px) {
    #gantt-container.gantt-split {
        min-height: 0;
    }
}

/* Planning : moins de marge sur petit écran pour gagner de la place utile */
@media (max-width: 1023px) {
    #view-planning #gantt-container {
        max-width: 100vw;
    }
}

/* Planning Gantt — téléphone / très petit écran : barre d’outils compacte, plus de place pour le canvas */
@media (max-width: 767px) {
    #view-planning .gantt-card-shell {
        border-radius: 0.375rem;
    }
    #view-planning .gantt-toolbar {
        margin-bottom: 0.5rem;
    }
    #view-planning .gantt-toolbar-controls {
        flex-direction: column;
        align-items: stretch;
        row-gap: 0.5rem;
    }
    #view-planning .gantt-scale-group {
        width: 100%;
        max-width: 100%;
    }
    #view-planning .gantt-scale-row {
        display: flex;
        width: 100%;
    }
    #view-planning .gantt-scale-pill,
    #view-planning .gantt-scale-group button {
        flex: 1 1 0;
        min-height: 2.75rem;
    }
    #view-planning .gantt-team-row {
        width: 100%;
        min-width: 0;
    }
    #view-planning .gantt-btn-edit {
        max-width: 100%;
    }
}

#view-planning.gantt-view-phone .gantt-title {
    font-size: 0.8125rem;
    line-height: 1.2;
}

#view-planning.gantt-view-phone .gantt-btn-edit {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    line-height: 1.2;
}

#view-planning.gantt-view-phone .gantt-scale-pill.ring-2 {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.5);
}

/* Empêcher le chevauchement de la bague focus sur les mini-boutons d’échelle */
#view-planning .gantt-scale-pill.ring-2 {
    z-index: 1;
    position: relative;
}

/* Checklist logistique */
.checklist-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

/* Galerie photos chantier : ligne par ligne (plus récent en haut à gauche, puis à droite). */
#photo-gallery.photo-gallery {
    display: grid;
    grid-auto-flow: row;
    direction: ltr;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    #photo-gallery.photo-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    #photo-gallery.photo-gallery {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    #photo-gallery.photo-gallery {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

#photo-select-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.55rem 1.1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 0.5rem;
    border: none;
    background: #4f46e5;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

#photo-select-mode-btn:hover {
    background: #4338ca;
}

#photo-select-mode-btn.is-cancel {
    background: #e5e7eb;
    color: #111827;
}

#photo-select-mode-btn.is-cancel:hover {
    background: #d1d5db;
}

.dark #photo-select-mode-btn.is-cancel {
    background: #374151;
    color: #f3f4f6;
}

.dark #photo-select-mode-btn.is-cancel:hover {
    background: #4b5563;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Visionneuse type iCloud Photos */
.photo-icloud-modal {
    overscroll-behavior: none;
}
.photo-icloud-modal .photo-icloud-chrome {
    transition: opacity 0.22s ease;
    touch-action: auto;
}
.photo-icloud-modal[data-chrome="0"] .photo-icloud-chrome {
    opacity: 0;
    pointer-events: none;
}
#photo-zoom-outer {
    touch-action: none;
}
.photo-carousel {
    display: flex;
    width: 300%;
    height: 100%;
    transform: translateX(-33.333%);
    will-change: transform;
}
.photo-slide {
    width: 33.333%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.photo-zoom-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}
.photo-slide-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
.photo-filmstrip {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 12px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
}
.photo-filmstrip[hidden] {
    display: none;
}
.photo-filmstrip::-webkit-scrollbar {
    display: none;
}
.photo-filmstrip-item {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 5px;
    overflow: hidden;
    opacity: 0.42;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: #1f1f1f;
}
.photo-filmstrip-item.is-active {
    opacity: 1;
    border-color: #fff;
}
.photo-filmstrip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Pointage — thème clair : cartes blanches, liseré discret (plus de pastels jaune/bleu) */
html:not(.dark) #view-pointage .pointage-slot {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
}

html:not(.dark) #view-pointage .pointage-slot-matin {
    border-left-color: #0284c7;
}

html:not(.dark) #view-pointage .pointage-slot-aprem {
    border-left-color: #2563eb;
}

html:not(.dark) #view-pointage .pointage-slot-extra {
    border-left-color: #4f46e5;
}

html:not(.dark) #view-pointage .pointage-check-bar {
    background-color: #f9fafb;
    border: 1px solid #f3f4f6;
}

html:not(.dark) #view-pointage .pointage-add-lieu {
    border-color: #d1d5db;
    color: #4f46e5;
}

html:not(.dark) #view-pointage .pointage-add-lieu:hover {
    border-color: #818cf8;
    background-color: #eef2ff;
    color: #3730a3;
}

html:not(.dark) #view-pointage .pointage-recap {
    background-color: #fff;
    border-color: #e5e7eb;
}

.dark #view-pointage .pointage-add-lieu {
    border-color: #6366f1;
    color: #a5b4fc;
}

.dark #view-pointage .pointage-add-lieu:hover {
    background-color: rgba(79, 70, 229, 0.18);
    border-color: #818cf8;
    color: #c7d2fe;
}

.dark #view-pointage .pointage-slot-matin {
    border-left: 4px solid #eab308;
}

.dark #view-pointage .pointage-slot-aprem {
    border-left: 4px solid #60a5fa;
}

.dark #view-pointage .pointage-slot-extra {
    border-left: 4px solid #c084fc;
}

/* Notifications */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 400px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    font-size: 0.9375rem;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .notification {
        top: auto;
        right: 0.75rem;
        left: 0.75rem;
        bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        max-width: none;
        text-align: center;
        padding: 0.875rem 1rem;
        border-radius: 0.75rem;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    }

    @keyframes slideIn {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* Prélèvement matériaux chantier — mobile */
.cm-mat-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.cm-mat-card-flash-ok {
    animation: cmMatFlashOk 0.55s ease;
}

.cm-mat-card-flash-err {
    animation: cmMatFlashErr 0.55s ease;
}

@keyframes cmMatFlashOk {
    0%,
    100% {
        border-color: inherit;
        background-color: inherit;
    }
    45% {
        border-color: #10b981;
        background-color: #ecfdf5;
    }
}

.dark .cm-mat-card-flash-ok {
    animation-name: cmMatFlashOkDark;
}

@keyframes cmMatFlashOkDark {
    0%,
    100% {
        border-color: inherit;
        background-color: inherit;
    }
    45% {
        border-color: #34d399;
        background-color: rgba(6, 78, 59, 0.45);
    }
}

@keyframes cmMatFlashErr {
    0%,
    100% {
        border-color: inherit;
    }
    45% {
        border-color: #ef4444;
    }
}

.cm-mat-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.cm-mat-btn:active:not(:disabled) {
    transform: scale(0.94);
}

#chantier-materiaux-families-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#chantier-materiaux-families-scroll::-webkit-scrollbar {
    display: none;
}

@media (min-width: 640px) {
    #chantier-materiaux-history-details summary {
        pointer-events: none;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background-color: #10b981;
    color: white;
}

.notification-error {
    background-color: #ef4444;
    color: white;
}

.notification-info {
    background-color: #3b82f6;
    color: white;
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
    /* Les classes dark: de Tailwind gèrent déjà cela */
}

/* Amélioration de la lisibilité sur petits écrans */
@media (max-width: 375px) {
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    /* Padding réduit pour économiser l'espace */
    .px-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .py-6 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Boutons plus compacts */
    button, .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Focus visible pour accessibilité */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Empêcher la sélection de texte sur les boutons tactiles */
button, .nav-tab {
    user-select: none;
    -webkit-user-select: none;
}

/* ====== Styles Choices.js adaptés au thème sombre BTP Manager ====== */
.choices {
    margin-bottom: 0;
}

.choices__inner {
    background-color: #394556 !important; /* bg-gray-900-ish */
    border-radius: 0.375rem;
    border: 1px solid #394556 !important; /* gray-600 */
    color: #f9fafb; /* gray-50 */
    min-height: 2.5rem;
    padding: 0.35rem 0.75rem;
}

.choices__list--single .choices__item {
    color: #394556;
}

.choices__input {
    background-color: #394556 !important;
    color: #F3F4F6;
    border: 1px solid #d4d4df !important;
    border-radius: 0.375rem;
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
    background-color: #394556 !important;
    border-radius: 0.375rem;
    border: 1px solid #394556 !important;
}

.choices__list--dropdown .choices__item--selectable,
.choices__list[aria-expanded] .choices__item--selectable {
    padding: 0.5rem 0.75rem;
    color: #F3F4F6;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background-color: #394556; /* gray-800 */
    color: #394556;
}

.choices__placeholder {
    color: #9ca3af !important; /* gray-400 */
}

/* Mode paysage sur appareil tactile (téléphone/tablette) : affichage intégral, barre masquée */
/* Restreint aux petits écrans (max-height 500px) pour exclure les ordinateurs en pleine écran */
/* Ordinateur = barre toujours visible, pas de masquage */
@media (orientation: landscape) and (hover: none) and (max-height: 500px) {
    /* Barre du haut ; le padding-bas du contenu vient de #main-content */
    #app-screen {
        min-height: 100dvh;
        min-height: 100vh;
    }
    #main-content {
        display: flex;
        flex-direction: column;
        min-height: 0;
        flex: 1;
    }
    /* Vues en pleine hauteur en paysage */
    #main-content .view {
        min-height: calc(100dvh - 1rem);
        min-height: calc(100vh - 1rem);
    }
    /* Planning : occupe toute la place UNIQUEMENT quand c'est la vue active */
    #view-planning.active {
        display: flex !important;
        flex-direction: column;
        flex: 1;
        min-height: 100%;
    }
    #view-planning.active > div {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 0.5rem !important;
    }
    #view-planning.active > div > div {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    #view-planning.active #gantt-container {
        flex: 1;
        min-height: 0;
    }
    #view-planning.active .gantt-split {
        flex: 1;
        min-height: 280px;
    }
    #view-planning.active .gcal-main {
        flex: 1;
        min-width: 0;
    }
}

/* ─── Planning type Google Calendar (FullCalendar) ─── */
.gcal-shell {
    --gcal-bg: #ffffff;
    --gcal-border: #dadce0;
    --gcal-text: #3c4043;
    --gcal-text-muted: #70757a;
    --gcal-today: #1a73e8;
    --gcal-hover: #f1f3f4;
    --gcal-btn-active: #e8f0fe;
    --gcal-font: 'Google Sans', Roboto, Arial, sans-serif;
}

.dark .gcal-shell {
    --gcal-bg: #1f2937;
    --gcal-border: #374151;
    --gcal-text: #e5e7eb;
    --gcal-text-muted: #9ca3af;
    --gcal-today: #8ab4f8;
    --gcal-hover: #374151;
    --gcal-btn-active: #1e3a5f;
}

.gcal-sidebar-title {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gcal-text-muted);
    margin-bottom: 0.5rem;
}

.gcal-team-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 2px;
    flex-shrink: 0;
}

.gcal-btn-outline {
    min-height: 36px;
}

/* Mini-calendrier latéral (FullCalendar v6 pose .fc sur le conteneur lui-même) */
.gcal-mini-wrap.fc,
.gcal-mini-wrap .fc {
    font-family: var(--gcal-font);
    font-size: 0.75rem;
}

.gcal-mini-wrap .fc-toolbar {
    margin-bottom: 0.5rem !important;
}

.gcal-mini-wrap .fc-toolbar-title {
    font-size: 0.875rem !important;
    font-weight: 500;
    color: var(--gcal-text);
    text-transform: capitalize;
}

.gcal-mini-wrap .fc-button {
    padding: 0.15rem 0.35rem !important;
    font-size: 0.75rem !important;
    background: transparent !important;
    border: none !important;
    color: var(--gcal-text-muted) !important;
    box-shadow: none !important;
}

.gcal-mini-wrap .fc-button:hover {
    background: var(--gcal-hover) !important;
    border-radius: 50% !important;
}

.gcal-mini-wrap .fc-daygrid-day-number {
    font-size: 0.75rem;
    padding: 0.15rem;
    color: var(--gcal-text);
}

.gcal-mini-wrap .fc-daygrid-day-frame {
    min-height: 1.75rem;
}

.gcal-mini-wrap .gcal-mini-today .fc-daygrid-day-number {
    background: var(--gcal-today);
    color: #fff;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.gcal-mini-wrap .fc-col-header-cell {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--gcal-text-muted);
    padding: 0.25rem 0;
}

.gcal-mini-wrap .fc-scrollgrid,
.gcal-mini-wrap.fc-theme-standard td,
.gcal-mini-wrap.fc-theme-standard th,
.gcal-mini-wrap .fc-theme-standard td,
.gcal-mini-wrap .fc-theme-standard th {
    border-color: transparent !important;
}

/* Calendrier principal (FullCalendar v6 pose .fc sur le conteneur lui-même) */
#fullcalendar-main.fc,
#fullcalendar-main .fc {
    font-family: var(--gcal-font);
    color: var(--gcal-text);
}

#fullcalendar-main .fc-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem !important;
}

#fullcalendar-main .fc-toolbar-title {
    font-size: 1.25rem !important;
    font-weight: 400;
    color: var(--gcal-text);
    text-transform: capitalize;
}

#fullcalendar-main .fc-button {
    background: var(--gcal-bg) !important;
    border: 1px solid var(--gcal-border) !important;
    color: var(--gcal-text) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    box-shadow: none !important;
    text-transform: none;
    border-radius: 4px;
}

#fullcalendar-main .fc-button:hover {
    background: var(--gcal-hover) !important;
}

#fullcalendar-main .fc-button-active,
#fullcalendar-main .fc-button-active:hover {
    background: var(--gcal-btn-active) !important;
    color: var(--gcal-today) !important;
    border-color: var(--gcal-border) !important;
}

#fullcalendar-main .fc-button-group > .fc-button {
    border-radius: 0;
}

#fullcalendar-main .fc-button-group > .fc-button:first-child {
    border-radius: 4px 0 0 4px;
}

#fullcalendar-main .fc-button-group > .fc-button:last-child {
    border-radius: 0 4px 4px 0;
}

#fullcalendar-main .fc-prev-button,
#fullcalendar-main .fc-next-button {
    padding: 0.4rem 0.55rem;
}

#fullcalendar-main .fc-col-header-cell {
    font-weight: 500;
    font-size: 0.6875rem;
    color: var(--gcal-text-muted);
    padding: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

#fullcalendar-main .fc-col-header-cell a {
    color: inherit;
    text-decoration: none;
}

#fullcalendar-main .fc-daygrid-day-number,
#fullcalendar-main .fc-timegrid-slot-label-cushion {
    color: var(--gcal-text-muted);
    font-size: 0.75rem;
}

#fullcalendar-main .fc-day-today {
    background: rgba(26, 115, 232, 0.04) !important;
}

.dark #fullcalendar-main .fc-day-today {
    background: rgba(138, 180, 248, 0.08) !important;
}

#fullcalendar-main .fc-day-today .fc-daygrid-day-number {
    background: var(--gcal-today);
    color: #fff;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0.25rem;
}

#fullcalendar-main .fc-event {
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 1px 4px;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

#fullcalendar-main .fc-event:hover {
    filter: brightness(0.92);
}

#fullcalendar-main .fc-daygrid-more-link {
    color: var(--gcal-today);
    font-weight: 500;
    font-size: 0.75rem;
}

#fullcalendar-main .fc-scrollgrid,
#fullcalendar-main.fc-theme-standard td,
#fullcalendar-main.fc-theme-standard th,
#fullcalendar-main .fc-theme-standard td,
#fullcalendar-main .fc-theme-standard th {
    border-color: var(--gcal-border) !important;
}

#fullcalendar-main .fc-timegrid-now-indicator-line {
    border-color: #ea4335;
    border-width: 2px;
}

#fullcalendar-main .fc-timegrid-now-indicator-arrow {
    border-color: #ea4335;
}

#fullcalendar-main .fc-list-event:hover td {
    background: var(--gcal-hover);
}

#fullcalendar-main .fc-list-day-cushion {
    background: var(--gcal-hover) !important;
    font-weight: 500;
    color: var(--gcal-text);
}

/* ─── Chrome Google Calendar : topbar, boutons, sidebar rétractable ─── */

.gcal-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    color: var(--gcal-text-muted, #5f6368);
    background: transparent;
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}

.gcal-icon-btn:hover {
    background: var(--gcal-hover, #f1f3f4);
}

.gcal-btn-today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    height: 36px;
    min-height: 36px;
    min-width: 0;
    border: 1px solid var(--gcal-border, #dadce0);
    border-radius: 4px;
    background: var(--gcal-bg, #fff);
    color: var(--gcal-text, #3c4043);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--gcal-font);
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}

.gcal-btn-today:hover {
    background: var(--gcal-hover, #f1f3f4);
}

.gcal-title {
    font-family: var(--gcal-font);
}

.gcal-view-select {
    height: 36px;
    padding: 0 2rem 0 0.9rem;
    border: 1px solid var(--gcal-border, #dadce0);
    border-radius: 4px;
    background-color: var(--gcal-bg, #fff);
    color: var(--gcal-text, #3c4043);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--gcal-font);
    cursor: pointer;
}

.gcal-view-select:hover {
    background-color: var(--gcal-hover, #f1f3f4);
}

/* Bouton « Créer » avec ombre Material et logo + multicolore */
.gcal-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 1.4rem 0 0.8rem;
    height: 48px;
    border-radius: 24px;
    background: var(--gcal-bg, #fff);
    color: var(--gcal-text, #3c4043);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--gcal-font);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.gcal-create-btn:hover {
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    background: #f8f9fa;
}

.dark .gcal-create-btn:hover {
    background: #374151;
}

.gcal-sidebar-header {
    display: none;
}

.gcal-sidebar-reduce-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem 0.4rem 0.35rem;
    min-height: 40px;
    min-width: 0;
    border-radius: 999px;
    border: 1px solid var(--gcal-border, #dadce0);
    background: var(--gcal-bg, #fff);
    color: var(--gcal-text, #3c4043);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--gcal-font);
}

.gcal-sidebar-reduce-btn:hover {
    background: var(--gcal-hover, #f1f3f4);
}

.dark .gcal-sidebar-reduce-btn {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}

.gcal-sidebar {
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.gcal-sidebar.gcal-sidebar-hidden {
    transform: translateX(-105%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Zone calendrier : occupe le reste de l’écran, comme Google Calendar */
.gcal-shell {
    min-height: calc(100vh - 7.5rem);
}

.gcal-layout {
    flex: 1;
    min-height: 0;
}

.gcal-main,
#agenda-container {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#agenda-container,
#fullcalendar-main {
    width: 100%;
}

#fullcalendar-main {
    flex: 1;
    min-height: 28rem;
    height: 100%;
}

#fullcalendar-main .fc-list {
    border-radius: 4px;
}

#fullcalendar-main .fc-list-event-title,
#fullcalendar-main .fc-list-event-time {
    color: var(--gcal-text, #3c4043);
}

.dark #fullcalendar-main .fc-list-event-title,
.dark #fullcalendar-main .fc-list-event-time {
    color: var(--gcal-text, #e5e7eb);
}

/* Popovers (création rapide + détail) façon carte Google */
.gcal-popover {
    position: fixed;
    z-index: 80;
    background: var(--gcal-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
    font-family: var(--gcal-font);
    animation: gcal-pop-in 0.12s ease-out;
    max-width: calc(100vw - 16px);
}

.dark .gcal-popover {
    background: #1f2937;
    border: 1px solid #374151;
}

@keyframes gcal-pop-in {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gcal-quick-title:focus {
    outline: none;
    box-shadow: none;
}

.gcal-btn-text {
    padding: 0 1rem;
    height: 36px;
    border-radius: 4px;
    color: var(--gcal-today, #1a73e8);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--gcal-font);
}

.gcal-btn-text:hover {
    background: var(--gcal-btn-active, #e8f0fe);
}

.gcal-btn-filled {
    padding: 0 1.5rem;
    height: 36px;
    border-radius: 4px;
    background: #1a73e8;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--gcal-font);
    transition: box-shadow 0.15s ease;
}

.gcal-btn-filled:hover {
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    background: #1765cc;
}

/* Palette de couleurs (modale) */
.gcal-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
    transition: transform 0.1s ease;
}

.gcal-color-swatch:hover {
    transform: scale(1.15);
}

.gcal-color-swatch.gcal-color-selected::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Point rouge sur la ligne « heure actuelle » (comme Google) */
#fullcalendar-main .fc-timegrid-now-indicator-arrow {
    border: none !important;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ea4335;
    margin-top: -6px;
    margin-left: -6.5px;
}

/* Congés : chips légèrement translucides */
#fullcalendar-main .gcal-leave-event {
    opacity: 0.85;
}

/* Sélection d'une plage (drag) */
#fullcalendar-main .fc-highlight {
    background: rgba(26, 115, 232, 0.12);
}

/* Mobile : sidebar en tiroir, calendrier pleine largeur */
@media (max-width: 1023px) {
    #view-planning.active > div {
        padding: 0.25rem !important;
    }

    .gcal-layout {
        display: flex;
        flex-direction: column;
        position: relative;
        min-height: calc(100dvh - 8.5rem);
    }

    .gcal-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(0, 0, 0, 0.4);
    }

    .gcal-sidebar-backdrop.is-visible {
        display: block;
    }

    .gcal-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 30;
        width: min(18rem, 88vw);
        max-width: 88vw;
        background: var(--gcal-bg, #fff);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        padding-top: 0.75rem;
    }

    .dark .gcal-sidebar {
        background: #1f2937;
    }

    .gcal-sidebar.gcal-sidebar-hidden {
        transform: translateX(-105%);
    }

    .gcal-main {
        width: 100%;
        padding: 0;
        position: relative;
        z-index: 1;
        flex: 1;
        min-height: 28rem;
    }

    #fullcalendar-main .fc-daygrid-day-number {
        font-size: 0.9375rem;
        font-weight: 500;
    }

    #fullcalendar-main .fc-col-header-cell {
        font-size: 0.6875rem;
    }

    #fullcalendar-main .fc-event {
        font-size: 0.6875rem;
    }

    .gcal-title {
        flex-basis: 100%;
        order: -1;
        margin-left: 0;
        font-size: 1.15rem;
        font-weight: 400;
    }

    .gcal-btn-today {
        padding: 0 0.6rem;
        font-size: 0.8125rem;
    }

    .gcal-view-select {
        padding: 0 1.5rem 0 0.5rem;
        font-size: 0.8125rem;
        max-width: 6.5rem;
    }

    .gcal-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-bottom: 0.75rem;
        padding-top: env(safe-area-inset-top, 0);
    }

    .gcal-topbar {
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }
}

@media (min-width: 1024px) {
    .gcal-sidebar {
        position: relative;
        transform: none;
    }

    .gcal-sidebar.gcal-sidebar-hidden {
        margin-left: -16rem;
        width: 0;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
        border: none;
        transform: none;
        opacity: 0;
        visibility: hidden;
    }
}

/* Override min-height boutons globaux pour toolbar FC */
#view-planning .fc-button {
    min-height: 36px;
    min-width: 36px;
}

#view-planning .gcal-mini-wrap .fc-button {
    min-height: 28px;
    min-width: 28px;
}

/* =========================================================
   Design system — interface claire, moderne et épurée
   (chargé après tailwind-built.css : les overrides gagnent)
   ========================================================= */

/* Typographie : Inter avec repli système (hors ligne : police système) */
body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Cartes : ombre quasi plate + bordure fine — lisibilité avant effet, façon tableau de bord sobre.
   Cible le motif dominant de l'app : bg-white/dark:bg-gray-800 + .shadow */
.shadow, .shadow-lg, .shadow-xl {
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.04) !important;
}
.bg-white.shadow,
.bg-white.shadow-lg,
.bg-white.shadow-xl {
    border: 1px solid rgba(17, 24, 39, 0.08);
}
.dark .dark\:bg-gray-800.shadow,
.dark .dark\:bg-gray-800.shadow-lg,
.dark .dark\:bg-gray-800.shadow-xl {
    border-color: rgba(255, 255, 255, 0.08);
}

/* Rayons resserrés : coins nets, rendu sobre plutôt que "bulle" */
.rounded-lg {
    border-radius: 0.625rem;
}
.rounded-md {
    border-radius: 0.5rem;
}

/* Tableaux : en-tête discret, lignes fines, survol léger — cohérent sur toutes les vues */
table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
table tbody tr {
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}
.dark table tbody tr {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}
table tbody tr:last-child {
    border-bottom: none;
}
table tbody tr:hover {
    background-color: rgba(17, 24, 39, 0.02);
}
.dark table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ─── Sidebar desktop (≥1024px) ───
   #app-nav-drawer sert à la fois de tiroir mobile (JS : translate-x) et de sidebar fixe
   sur grand écran (voir classes lg: dans index.html). Ici : uniquement de la densité visuelle. */
@media (min-width: 1024px) {
    #app-nav-drawer .nav-tab {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    #app-nav-drawer .nav-tab svg {
        width: 1.125rem;
        height: 1.125rem;
    }
    #app-nav-drawer .nav-tab.active {
        font-weight: 600;
    }
}

/* Squelettes de chargement (remplacent les textes « Chargement… ») */
.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    background: rgba(17, 24, 39, 0.06);
}
.dark .skeleton {
    background: rgba(255, 255, 255, 0.07);
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.dark .skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
}
@keyframes skeleton-shimmer {
    100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
    .skeleton::after { animation: none; }
}

/* Menu latéral : masquer l'intitulé d'un groupe dont toutes les entrées sont cachées (rôles) */
.nav-group:not(:has(button.nav-tab:not([style*='none']))) {
    display: none;
}

/* Barre d'onglets défilante (fiche chantier) : sans barre de défilement native */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Mini-barre « glisser » sous les onglets chantier (téléphone uniquement) */
.chantier-tabs-wrap {
    position: relative;
}
.chantier-tabs-fade {
    pointer-events: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 1.75rem;
    height: 2.65rem;
    background: linear-gradient(to right, transparent, #fff);
    opacity: 0;
    transition: opacity 0.15s ease;
}
.dark .chantier-tabs-fade {
    background: linear-gradient(to right, transparent, #1f2937);
}
.chantier-tabs-wrap.has-overflow:not(.is-scrolled-end) .chantier-tabs-fade {
    opacity: 1;
}
.chantier-tabs-swipe-hint {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 0.4rem 0 0.55rem;
}
.chantier-tabs-swipe-hint.is-visible {
    display: flex;
}
.chantier-tabs-swipe-track {
    position: relative;
    width: 3.35rem;
    height: 3px;
    border-radius: 999px;
    background: #d1d5db;
    overflow: hidden;
}
.dark .chantier-tabs-swipe-track {
    background: #4b5563;
}
.chantier-tabs-swipe-thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 42%;
    border-radius: 999px;
    background: #6b7280;
}
.dark .chantier-tabs-swipe-thumb {
    background: #9ca3af;
}
@media (min-width: 1024px) {
    .chantier-tabs-fade,
    .chantier-tabs-swipe-hint,
    .chantier-tabs-swipe-hint.is-visible {
        display: none;
    }
}

/* ── Tutoriel d'onboarding (première utilisation) ── */
body.onboarding-active {
    overflow: hidden;
}

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: auto;
}

.onboarding-spotlight {
    position: fixed;
    border: 3px solid #22c55e;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
    pointer-events: none;
    transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
    z-index: 10051;
}

.onboarding-spotlight.hidden {
    display: none;
}

.onboarding-tooltip {
    position: fixed;
    z-index: 10052;
    width: min(92vw, 22rem);
    padding: 1.25rem 1.25rem 1rem;
    background: #1f2937;
    color: #f9fafb;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

.onboarding-tooltip--center {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: min(92vw, 24rem);
    text-align: center;
}

.onboarding-tooltip-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #fff;
}

.onboarding-tooltip-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    color: #d1d5db;
}

.onboarding-tooltip-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.onboarding-btn {
    flex: 1;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.onboarding-btn.invisible {
    visibility: hidden;
    pointer-events: none;
}

.onboarding-btn-prev {
    background: transparent;
    border: 2px solid #6b7280;
    color: #e5e7eb;
}

.onboarding-btn-prev:hover:not(:disabled) {
    border-color: #9ca3af;
    background: rgba(255, 255, 255, 0.06);
}

.onboarding-btn-prev:disabled {
    opacity: 0.4;
    cursor: default;
}

.onboarding-btn-next {
    background: #22c55e;
    border: 2px solid #22c55e;
    color: #052e16;
}

.onboarding-btn-next:hover {
    background: #16a34a;
    border-color: #16a34a;
}

.onboarding-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.onboarding-dots {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.onboarding-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6b7280;
    transition: background 0.2s, transform 0.2s;
}

.onboarding-dot.active {
    background: #fff;
    transform: scale(1.15);
}

.onboarding-skip {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0;
    min-height: auto;
    min-width: auto;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.onboarding-skip:hover {
    color: #e5e7eb;
}

/* ── Guide de démarrage (accueil) ── */
.setup-guide-card {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.dark .setup-guide-card {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.setup-guide-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0.75rem;
}

.setup-guide-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.dark .setup-guide-title {
    color: #f9fafb;
}

.setup-guide-progress {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.dark .setup-guide-progress {
    color: #9ca3af;
}

.setup-guide-steps {
    padding: 0.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.setup-guide-step {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
}

.dark .setup-guide-step {
    background: rgba(17, 24, 39, 0.45);
    border-color: #374151;
}

.setup-guide-step--done {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dark .setup-guide-step--done {
    background: rgba(6, 78, 59, 0.2);
    border-color: rgba(52, 211, 153, 0.25);
}

.setup-guide-step--actionable {
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.setup-guide-step--actionable:hover {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08);
}

.setup-guide-step--actionable:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.55);
    outline-offset: 2px;
}

.dark .setup-guide-step--actionable:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(129, 140, 248, 0.35);
}

.setup-guide-card--loading {
    pointer-events: none;
}

.setup-guide-loading-title,
.setup-guide-loading-progress,
.setup-guide-step--loading {
    border-radius: 0.5rem;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: setup-guide-shimmer 1.2s ease-in-out infinite;
}

.dark .setup-guide-loading-title,
.dark .setup-guide-loading-progress,
.dark .setup-guide-step--loading {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

.setup-guide-loading-title {
    height: 1.25rem;
    width: 55%;
    margin-bottom: 0.5rem;
}

.setup-guide-loading-progress {
    height: 0.875rem;
    width: 35%;
}

.setup-guide-step--loading {
    height: 4.5rem;
}

@keyframes setup-guide-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.setup-guide-step-icon-cell {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setup-guide-step-done-badge {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: #22c55e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setup-guide-step-check-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.setup-guide-step-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setup-guide-step-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.dark .setup-guide-step-icon {
    background: rgba(79, 70, 229, 0.15);
    color: #a5b4fc;
}

.setup-guide-step-body {
    min-width: 0;
    flex: 1;
}

.setup-guide-step-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
}

.dark .setup-guide-step-title {
    color: #f3f4f6;
}

.setup-guide-step-desc {
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #6b7280;
}

.dark .setup-guide-step-desc {
    color: #9ca3af;
}

.setup-guide-step-action {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4f46e5;
    text-align: left;
}

.dark .setup-guide-step-action {
    color: #a5b4fc;
}

.setup-guide-footer {
    border-top: 1px solid #f3f4f6;
    padding: 1rem 1.25rem 1.25rem;
    background: linear-gradient(180deg, transparent, rgba(79, 70, 229, 0.03));
}

.dark .setup-guide-footer {
    border-top-color: #374151;
    background: linear-gradient(180deg, transparent, rgba(79, 70, 229, 0.06));
}

.setup-guide-footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.dark .setup-guide-footer-title {
    color: #f3f4f6;
}

.setup-guide-footer-text {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #6b7280;
}

.dark .setup-guide-footer-text {
    color: #9ca3af;
}

.setup-guide-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.875rem;
}

.setup-guide-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0;
    border: none;
    background: none;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4f46e5;
    cursor: pointer;
    transition: color 0.15s;
}

.setup-guide-footer-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

.dark .setup-guide-footer-link {
    color: #a5b4fc;
}

.setup-guide-footer-link-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

#create-user-form.setup-guide-form-highlight,
#profil-referral-section.setup-guide-form-highlight {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.5);
    border-radius: 0.5rem;
    transition: box-shadow 0.25s ease;
}

/* Modale récapitulatif invitation salarié */
.invitation-review-modal {
    border: 1px solid #e5e7eb;
}

.dark .invitation-review-modal {
    border-color: #374151;
}

.invitation-review-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.invitation-review-close:hover {
    color: #4b5563;
    background: #f3f4f6;
}

.dark .invitation-review-close:hover {
    color: #e5e7eb;
    background: #374151;
}

.invitation-review-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.invitation-review-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.dark .invitation-review-row {
    border-bottom-color: #374151;
}

.invitation-review-row:last-child {
    border-bottom: none;
}

.invitation-review-label {
    font-size: 0.9375rem;
    color: #6b7280;
    flex-shrink: 0;
}

.dark .invitation-review-label {
    color: #9ca3af;
}

.invitation-review-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
    text-align: right;
}

.dark .invitation-review-value {
    color: #f3f4f6;
}

.invitation-role-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
}

.dark .invitation-role-badge {
    background: rgba(146, 64, 14, 0.25);
    color: #fcd34d;
}

.invitation-review-hint {
    margin-top: 1rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #6b7280;
}

.dark .invitation-review-hint {
    color: #9ca3af;
}

.invitation-review-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    background: #4f46e5;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.invitation-review-send-btn:hover:not(:disabled) {
    background: #4338ca;
}

.invitation-review-send-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Modale recherche d'établissement (SIRET) ─────────────────────────────── */
#etablissement-search-modal {
    overflow: hidden;
    overscroll-behavior: contain;
}

#etablissement-search-modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

#etablissement-search-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 32rem;
    height: min(92vh, 640px);
    max-height: min(92vh, 640px);
    min-height: 0;
    overflow: hidden;
}

#etablissement-search-toolbar {
    flex-shrink: 0;
}

#etablissement-search-input-wrap {
    position: relative;
}

#etablissement-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #9ca3af;
    line-height: 0;
}

#etablissement-search-input {
    display: block;
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 2.5rem;
    line-height: 1.25rem;
}

#etablissement-search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    min-height: 0;
    min-width: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
}

#etablissement-search-results-wrap {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

#etablissement-search-footer {
    flex-shrink: 0;
}

body.etablissement-search-open {
    overflow: hidden;
}

@media (max-width: 639px) {
    #etablissement-search-modal:not(.hidden) {
        align-items: flex-end;
    }

    #etablissement-search-panel {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        height: min(88vh, 640px);
        max-height: min(88vh, 640px);
    }
}

/* ── Page abonnement ─────────────────────────────────────────────────────── */

.subscription-page {
    font-feature-settings: "tnum" 1;
    color-scheme: light;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.08), transparent 55%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 45%, #eef2ff 100%);
    min-height: 100vh;
}

.subscription-header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.subscription-header-inner {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 1rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 640px) {
    .subscription-header-inner {
        padding: 0 1.5rem;
    }
}

.subscription-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.subscription-back:hover {
    color: #4f46e5;
}

.subscription-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.subscription-brand-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.subscription-brand-name {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subscription-main {
    max-width: 42rem;
    margin: 0 auto;
    padding: 2rem 1rem 2.5rem;
}

@media (min-width: 640px) {
    .subscription-main {
        padding: 2.5rem 1.5rem 3rem;
    }
}

.subscription-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.subscription-hero-kicker {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6366f1;
    margin: 0 0 0.35rem;
}

.subscription-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
}

@media (min-width: 640px) {
    .subscription-hero-title {
        font-size: 2rem;
    }
}

.subscription-hero-desc {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #64748b;
    max-width: 28rem;
}

.subscription-founding-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    border-radius: 9999px;
    border: 1px solid #c7d2fe;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
}

.subscription-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 4px 20px rgba(15, 23, 42, 0.03);
    margin-bottom: 1.25rem;
}

.subscription-status-card {
    padding-top: 1rem;
}

.subscription-card-header {
    margin-bottom: 1rem;
}

.dark .subscription-card {
    background: #111827;
    border-color: #1f2937;
    box-shadow: none;
}

.subscription-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.dark .subscription-section-title {
    color: #94a3b8;
}

.subscription-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .subscription-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.subscription-kpi {
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.subscription-kpi--status {
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    border-color: #ede9fe;
}

.subscription-kpi-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.dark .subscription-kpi-label {
    color: #64748b;
}

.subscription-kpi-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.dark .subscription-kpi-value {
    color: #f1f5f9;
}

.subscription-hint {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}

.subscription-hint--card {
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid #f1f5f9;
}

.subscription-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
}

.subscription-status-badge--active {
    background: #dcfce7;
    color: #166534;
}

.subscription-status-badge--trial {
    background: #e0e7ff;
    color: #4338ca;
}

.subscription-status-badge--warn {
    background: #ffedd5;
    color: #c2410c;
}

.subscription-status-badge--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.subscription-status-badge--muted {
    background: #f1f5f9;
    color: #64748b;
}

.subscription-plan-card {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.subscription-plan-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.dark .subscription-plan-card {
    background: #111827;
    border-color: #1f2937;
}

.subscription-plan-card--featured {
    border-color: #a5b4fc;
    box-shadow:
        0 4px 20px rgba(79, 70, 229, 0.1),
        0 0 0 1px rgba(99, 102, 241, 0.08);
}

.subscription-plan-card--featured:hover {
    box-shadow:
        0 12px 32px rgba(79, 70, 229, 0.14),
        0 0 0 1px rgba(99, 102, 241, 0.12);
}

.dark .subscription-plan-card--featured {
    border-color: #4338ca;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}

.subscription-plan-badge {
    position: absolute;
    top: -0.625rem;
    right: 1rem;
    background: #4f46e5;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
}

.subscription-plan-price {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
}

.dark .subscription-plan-price {
    color: #fff;
}

.subscription-plan-unit {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #64748b;
}

.subscription-estimate {
    font-size: 0.75rem;
    color: #4f46e5;
    line-height: 1.4;
}

.dark .subscription-estimate {
    color: #a5b4fc;
}

.subscription-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
}

.subscription-features li {
    position: relative;
    padding-left: 1.125rem;
    margin-bottom: 0.35rem;
}

.subscription-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background: #cbd5e1;
}

.dark .subscription-features li::before {
    background: #475569;
}

.subscription-annual-note {
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.dark .subscription-annual-note {
    background: rgba(30, 41, 59, 0.5);
    border-color: #334155;
}

.subscription-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: #4f46e5;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.subscription-btn-primary:hover:not(:disabled) {
    background: #4338ca;
}

.subscription-btn-secondary {
    padding: 0.5rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dark .subscription-btn-secondary {
    color: #e2e8f0;
    background: #1f2937;
    border-color: #374151;
}

.subscription-btn-secondary:hover {
    background: #e2e8f0;
}

.dark .subscription-btn-secondary:hover {
    background: #374151;
}

.subscription-btn-plan {
    margin-top: auto;
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.subscription-btn-plan:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.subscription-btn-plan:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.subscription-btn-plan--featured {
    color: #fff;
    background: #4f46e5;
    border-color: #4f46e5;
}

.subscription-btn-plan--featured:hover:not(:disabled) {
    background: #4338ca;
    border-color: #4338ca;
}

.dark .subscription-btn-plan {
    color: #e2e8f0;
    background: #1f2937;
    border-color: #374151;
}

.subscription-legal-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 28px rgba(79, 70, 229, 0.05);
}

.subscription-legal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.125rem;
}

.subscription-legal-title {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0 0 0.25rem;
}

.subscription-legal-subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

.subscription-step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.subscription-step-badge--muted {
    background: #f1f5f9;
    color: #64748b;
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

.subscription-recap-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.subscription-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
}

.subscription-recap-seats {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0 0 0.25rem;
}

.subscription-legal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
    margin: 1.125rem 0;
}

.subscription-section-title--inline {
    margin-bottom: 0.75rem;
}

.subscription-alert {
    font-size: 0.75rem;
    line-height: 1.45;
    border-radius: 0.625rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.75rem;
}

.subscription-alert--warn {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.subscription-inline-link {
    display: inline;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.subscription-inline-link:hover {
    color: #4338ca;
}

.subscription-legal-checkbox {
    margin-top: 0.125rem;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    border-radius: 0.25rem;
    border: 1px solid #cbd5e1;
    accent-color: #4f46e5;
}

.subscription-legal-check-text {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.5;
}

.subscription-legal-version {
    color: #94a3b8;
    font-size: 0.8125rem;
}

.subscription-plans-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.125rem;
}

.subscription-plans-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subscription-plans-title {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0;
}

.subscription-stripe-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.subscription-contract-preview {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid #e0e7ff;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #fafafa 0%, #f5f3ff 55%, #eef2ff 100%);
    padding: 1rem 1.125rem;
    margin-bottom: 1rem;
    overflow: visible;
}

.subscription-contract-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid #e0e7ff;
    color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.subscription-contract-body {
    flex: 1;
    min-width: 0;
}

.subscription-contract-status {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.5;
    margin: 0 0 0.35rem;
}

.subscription-contract-meta {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0 0 0.75rem;
}

.subscription-btn-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.subscription-btn-pdf:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.subscription-btn-pdf:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dark .subscription-legal-card {
    background: #111827;
    border-color: #1f2937;
}

.subscription-legal-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.subscription-legal-check:has(.subscription-legal-checkbox:checked) {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dark .subscription-legal-check {
    background: rgba(30, 41, 59, 0.4);
    border-color: #334155;
}

.subscription-legal-hint {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
    margin-top: 0.75rem;
}

.subscription-legal-hint--ok {
    color: #059669;
}

.dark .subscription-legal-hint--ok {
    color: #34d399;
}

.subscription-contract-html {
    max-height: 22rem;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.subscription-contract-html--page {
    max-height: none;
    overflow: visible;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.contract-page-root .contract-doc-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.dark .contract-page-root .contract-doc-header {
    border-bottom-color: #334155;
}

.contract-page-root .contract-doc-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.contract-page-root .contract-doc-meta,
.contract-page-root .contract-doc-intro,
.contract-page-root .contract-note {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
}

.contract-page-root .contract-section {
    margin-bottom: 1rem;
}

.contract-page-root .contract-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.contract-page-root .contract-list,
.contract-page-root .contract-party-list {
    margin-left: 1.1rem;
    list-style: disc;
    font-size: 0.75rem;
    line-height: 1.45;
}

.contract-page-root .contract-parties-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .contract-page-root .contract-parties-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contract-page-root .contract-party-box {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
}

.dark .contract-page-root .contract-party-box {
    border-color: #334155;
    background: #111827;
}

.contract-page-root .contract-party-box--client {
    border-color: #c7d2fe;
    background: #eef2ff;
}

.dark .contract-page-root .contract-party-box--client {
    border-color: #4338ca;
    background: #1e1b4b;
}

.contract-page-root .contract-party-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.contract-page-root .contract-section--highlight {
    border: 1px solid #fbbf24;
    border-radius: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: #fffbeb;
}

.dark .contract-page-root .contract-section--highlight {
    border-color: #b45309;
    background: rgba(120, 53, 15, 0.25);
}

.contract-page-root .contract-link {
    color: #4f46e5;
    text-decoration: underline;
}

.dark .contract-page-root .contract-link {
    color: #a5b4fc;
}

.dark .contract-page-root .contract-link {
    color: #a5b4fc;
}

.checkout-order-recap {
    border: 1px solid #c7d2fe;
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 0.85rem 1rem;
}

.dark .checkout-order-recap {
    border-color: #4338ca;
    background: #0f172a;
}

.checkout-order-recap-kicker {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.checkout-order-recap-grid {
    display: grid;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.checkout-order-recap-grid dt {
    color: #64748b;
    font-weight: 500;
}

.checkout-order-recap-grid dd {
    margin: 0;
    color: #0f172a;
}

.dark .checkout-order-recap-grid dd {
    color: #e2e8f0;
}

.checkout-order-recap-note {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.checkout-order-recap-commitment {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid #e2e8f0;
}

.dark .checkout-order-recap-commitment {
    border-top-color: #334155;
}

.checkout-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.checkout-confirm-modal.hidden {
    display: none;
}

.checkout-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.checkout-confirm-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 32rem);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 1.25rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.dark .checkout-confirm-panel {
    border-color: #334155;
    background: #111827;
}

.subscription-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
}

.dark .subscription-btn-secondary {
    border-color: #475569;
    background: #1e293b;
    color: #e2e8f0;
}

.subscription-footer-note {
    font-size: 0.6875rem;
    color: #94a3b8;
    line-height: 1.5;
}

.subscription-page #trial-banner {
    margin-bottom: 1.25rem;
}

.subscription-page #trial-banner > div {
    border-radius: 1rem !important;
    border: 1px solid #fed7aa !important;
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 50%, #fef3c7 100%) !important;
    padding: 1rem 1.125rem !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08) !important;
}

.dark .subscription-page #trial-banner > div {
    border-color: #312e81 !important;
    background: linear-gradient(160deg, #1e1b4b 0%, #111827 100%) !important;
}

.subscription-page #trial-banner a {
    background: #4f46e5 !important;
}

.subscription-founding-badge::before {
    content: "★";
    font-size: 0.65rem;
    opacity: 0.85;
}

.subscription-trust {
    border-top-color: rgba(226, 232, 240, 0.9) !important;
}

/* ── Parrainage (page abonnement) ─────────────────────────────────────────── */

.subscription-referral-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    flex-shrink: 0;
}

.dark .subscription-referral-icon {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #a5b4fc;
}

.subscription-referral-launch {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}

.dark .subscription-referral-launch {
    color: #c7d2fe;
    background: rgba(49, 46, 129, 0.35);
    border-color: #4338ca;
}

.subscription-referral-discount {
    font-size: 0.8125rem;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 0.75rem;
    padding: 0.625rem 0.875rem;
}

.dark .subscription-referral-discount {
    color: #6ee7b7;
    background: rgba(6, 78, 59, 0.25);
    border-color: #065f46;
}

.subscription-referral-benefit {
    border-radius: 0.875rem;
    padding: 1rem 1.125rem;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.dark .subscription-referral-benefit {
    background: #111827;
    border-color: #1f2937;
}

.subscription-referral-benefit--referee {
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
}

.dark .subscription-referral-benefit--referee {
    background: linear-gradient(160deg, #111827 0%, #0f172a 100%);
}

.subscription-referral-benefit--referrer {
    border-color: #c7d2fe;
    background: linear-gradient(160deg, #fafaff 0%, #eef2ff 100%);
}

.dark .subscription-referral-benefit--referrer {
    border-color: #4338ca;
    background: linear-gradient(160deg, #1e1b4b 0%, #111827 100%);
}

.subscription-referral-benefit-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.subscription-referral-benefit-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.dark .subscription-referral-benefit-value {
    color: #f8fafc;
}

.subscription-referral-benefit-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.subscription-referral-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #4f46e5;
    line-height: 1.2;
}

.dark .subscription-referral-code {
    color: #a5b4fc;
}

.subscription-referral-stat {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.dark .subscription-referral-stat {
    color: #f8fafc;
}

.subscription-referral-link-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.subscription-referral-link-input {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
}

.dark .subscription-referral-link-input {
    color: #e2e8f0;
    background: #0f172a;
    border-color: #334155;
}

.subscription-referral-history-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.subscription-referral-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.subscription-referral-history-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dark .subscription-referral-history-item {
    border-bottom-color: #1f2937;
}

.subscription-referral-history-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .subscription-referral-history-name {
    color: #f1f5f9;
}

.subscription-referral-history-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

.subscription-referral-status {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    letter-spacing: 0.01em;
}

.subscription-referral-status--pending {
    background: #f1f5f9;
    color: #64748b;
}

.subscription-referral-status--subscribed,
.subscription-referral-status--rewarded {
    background: #ecfdf5;
    color: #047857;
}

.dark .subscription-referral-status--pending {
    background: #1f2937;
    color: #94a3b8;
}

.dark .subscription-referral-status--subscribed,
.dark .subscription-referral-status--rewarded {
    background: rgba(6, 78, 59, 0.35);
    color: #6ee7b7;
}

.subscription-referral-empty {
    text-align: center;
    padding: 1.25rem 0.5rem;
}

.subscription-referral-empty-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

.dark .subscription-referral-empty-title {
    color: #cbd5e1;
}

.subscription-referral-empty-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.45;
}

/* ——— Planning semaine par salarié (psw) ——— */
.psw-shell {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
}

.dark .psw-shell {
    border-color: #374151;
}

.psw-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.psw-nav-btn:hover {
    background: #f3f4f6;
}

.psw-nav-today {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 0.65rem;
}

.dark .psw-nav-btn {
    background: #1f2937;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark .psw-nav-btn:hover {
    background: #374151;
}

.psw-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem;
    border: 1px solid #f3f4f6;
}

.dark .psw-table-wrap {
    border-color: #374151;
}

.psw-table {
    width: 100%;
    min-width: 52rem;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 0.8125rem;
}

.psw-user-head,
.psw-day-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0.35rem;
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    vertical-align: bottom;
}

.psw-user-head {
    left: 0;
    z-index: 3;
    text-align: left;
    width: 11rem;
    min-width: 11rem;
    padding-left: 0.75rem;
}

.dark .psw-user-head,
.dark .psw-day-head {
    background: #111827;
    border-color: #374151;
    color: #9ca3af;
}

.psw-day-head.is-today {
    color: #2563eb;
}

.psw-day-name {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.psw-day-date {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-top: 0.125rem;
}

.dark .psw-day-date {
    color: #e5e7eb;
}

.psw-role-cell {
    padding: 0;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.dark .psw-role-cell {
    background: #1f2937;
    border-color: #374151;
}

.psw-role-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    text-align: left;
}

.dark .psw-role-toggle {
    color: #d1d5db;
}

.psw-chevron {
    display: inline-block;
    transition: transform 0.15s ease;
    font-size: 0.875rem;
    color: #9ca3af;
}

.psw-chevron.is-open {
    transform: rotate(90deg);
}

.psw-role-count {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #9ca3af;
    background: #fff;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.dark .psw-role-count {
    background: #374151;
    color: #d1d5db;
}

.psw-user-cell {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    border-right: 1px solid #f3f4f6;
    padding: 0.4rem 0.65rem;
    vertical-align: top;
    width: 11rem;
    min-width: 11rem;
}

.dark .psw-user-cell {
    background: #1f2937;
    border-color: #374151;
}

.psw-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.psw-avatar {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.psw-user-name {
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .psw-user-name {
    color: #f3f4f6;
}

.psw-day-cell {
    border-bottom: 1px solid #f3f4f6;
    border-right: 1px solid #f3f4f6;
    padding: 0.25rem;
    vertical-align: top;
    min-height: 3.5rem;
    background: #fff;
}

.psw-day-cell.is-today {
    background: #eff6ff;
}

.dark .psw-day-cell {
    background: #1f2937;
    border-color: #374151;
}

.dark .psw-day-cell.is-today {
    background: rgba(37, 99, 235, 0.12);
}

.psw-block {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 0.2rem;
    row-gap: 0.08rem;
    width: 100%;
    margin-bottom: 0.2rem;
    padding: 0.32rem 0.35rem 0.3rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--psw-block-bg, #6366f1);
    color: #fff;
    text-align: left;
    cursor: pointer;
    line-height: 1.25;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: filter 0.15s ease, transform 0.1s ease;
    min-width: 0;
}

.psw-block:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.psw-block-place {
    display: block;
    grid-column: 1;
    grid-row: 1;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    padding-right: 0.15rem;
}

.psw-block-actions {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: flex-start;
    gap: 0.12rem;
    flex-shrink: 0;
    z-index: 4;
}

.psw-block-step {
    display: block;
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.625rem;
    opacity: 0.88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.psw-block-leave {
    background: #9ca3af !important;
    cursor: default;
    font-size: 0.6875rem;
    font-weight: 600;
    text-align: center;
}

.psw-salary-cb-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.15rem 0;
    color: #374151;
}

.dark .psw-salary-cb-label {
    color: #d1d5db;
}

@media (max-width: 640px) {
    .psw-toolbar {
        gap: 0.5rem;
    }

    .psw-user-head,
    .psw-user-cell {
        width: 8.5rem;
        min-width: 8.5rem;
    }
}

/* Layout palette + grille */
.psw-layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .psw-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

.psw-palette {
    flex-shrink: 0;
    width: 100%;
    max-height: min(42vh, 22rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    background: #f9fafb;
    transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.2s ease;
}

.psw-palette.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    border-width: 0;
    pointer-events: none;
    overflow: hidden;
}

.psw-palette.is-open {
    opacity: 1;
    pointer-events: auto;
}

.dark .psw-palette {
    border-color: #374151;
    background: #111827;
}

@media (min-width: 1024px) {
    .psw-palette {
        width: 15rem;
        max-height: calc(100vh - 14rem);
    }

    .psw-palette.is-collapsed {
        width: 15rem;
        max-height: calc(100vh - 14rem);
        opacity: 1;
        margin: 0;
        border-width: 1px;
        pointer-events: auto;
    }
}

.psw-palette-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #e5e7eb;
}

.dark .psw-palette-header {
    border-color: #374151;
}

.psw-palette-title {
    flex: 1;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin: 0;
}

.dark .psw-palette-title {
    color: #9ca3af;
}

.psw-palette-todo-count {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: #dc2626;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    min-width: 1.25rem;
    text-align: center;
}

.psw-palette-todo-count:empty,
.psw-palette-todo-count[data-zero="1"] {
    display: none;
}

.psw-palette-close {
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 0.25rem;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

@media (min-width: 1024px) {
    .psw-palette-close {
        display: none;
    }
}

.psw-palette-filters {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dark .psw-palette-filters {
    border-color: #374151;
}

.psw-palette-search {
    width: 100%;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    color: #111827;
}

.dark .psw-palette-search {
    background: #1f2937;
    border-color: #4b5563;
    color: #f3f4f6;
}

.psw-palette-todo-filter {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.6875rem;
    color: #6b7280;
    cursor: pointer;
}

.dark .psw-palette-todo-filter {
    color: #9ca3af;
}

.psw-toggle-palette-btn.has-todo {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
}

.dark .psw-toggle-palette-btn.has-todo {
    background: rgba(127, 29, 29, 0.35);
    color: #fca5a5;
}

.psw-palette-list {
    overflow-y: auto;
    padding: 0.5rem;
    flex: 1;
    min-height: 6rem;
}

.psw-palette-group {
    margin-bottom: 0.35rem;
}

.psw-palette-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.35rem 0.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.dark .psw-palette-group-toggle {
    color: #e5e7eb;
}

.psw-palette-group-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.psw-palette-group-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psw-palette-group-todo {
    font-size: 0.625rem;
    font-weight: 600;
    color: #dc2626;
    background: #fee2e2;
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
    flex-shrink: 0;
}

.dark .psw-palette-group-todo {
    background: rgba(127, 29, 29, 0.4);
    color: #fca5a5;
}

.psw-palette-group-body {
    padding-left: 0.65rem;
}

.psw-palette-group-body.hidden {
    display: none;
}

.psw-palette-badge {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0.2rem;
    padding: 0.05rem 0.3rem;
    margin-bottom: 0.15rem;
}

.psw-palette-badge-ok {
    background: rgba(255, 255, 255, 0.25);
    opacity: 0.85;
}

.psw-palette-empty {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    border: 1px dashed #d1d5db;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    font-size: 0.6875rem;
}

.dark .psw-palette-empty {
    background: #1f2937;
    border-color: #4b5563;
    color: #d1d5db;
}

.psw-palette-empty-text {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.625rem;
    color: #6b7280;
}

.psw-palette-group-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--psw-block-bg, #6366f1);
    margin: 0 0 0.25rem;
    padding-left: 0.25rem;
}

.psw-palette-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    background: var(--psw-block-bg, #6366f1);
    color: #fff;
    cursor: grab;
    user-select: none;
    touch-action: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

@media (min-width: 1024px) {
    .psw-palette {
        position: sticky;
        top: 0.5rem;
    }
}

.psw-palette-item:active {
    cursor: grabbing;
}

.psw-palette-item:hover {
    filter: brightness(1.05);
}

.psw-palette-item-chantier {
    display: none;
}

.psw-palette-item-etape {
    font-size: 0.625rem;
    opacity: 0.88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psw-palette-chantier-only .psw-palette-item-etape {
    font-size: 0.6875rem;
    font-weight: 600;
    opacity: 1;
}

.psw-block-chantier-only .psw-block-place {
    font-weight: 600;
}

.psw-layout .psw-table-wrap {
    flex: 1;
    min-width: 0;
}

/* Glisser-déposer */
.psw-draggable {
    touch-action: none;
    cursor: grab;
}

.psw-draggable:active {
    cursor: grabbing;
}

.psw-block.is-dragging {
    opacity: 0.35;
}

.psw-day-cell.is-drop-target {
    background: #dbeafe !important;
    outline: 2px dashed #3b82f6;
    outline-offset: -2px;
}

.dark .psw-day-cell.is-drop-target {
    background: rgba(59, 130, 246, 0.2) !important;
}

.psw-drag-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    padding: 0.3rem 0.4rem;
    border-radius: 0.375rem;
    background: var(--psw-block-bg, #6366f1);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    font-size: 0.6875rem;
    line-height: 1.25;
    opacity: 0.95;
    transform: rotate(-1deg);
}

.psw-drag-ghost .psw-resize,
.psw-drag-ghost .psw-block-actions {
    display: none;
}

/* Poignées redimensionnement — bords gauche/droit (étendre dans le temps) */
.psw-resize {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0.65rem;
    z-index: 5;
    touch-action: none;
    cursor: ew-resize;
}

.psw-resize-start {
    left: 0;
    border-radius: 0.375rem 0 0 0.375rem;
}

.psw-resize-end {
    right: 0;
    border-radius: 0 0.375rem 0.375rem 0;
}

.psw-resize::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 55%;
    max-height: 1.4rem;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

.psw-resize-start::after {
    left: 3px;
}

.psw-resize-end::after {
    right: 3px;
}

.psw-resize:hover,
.psw-block.is-resizing .psw-resize {
    background: rgba(255, 255, 255, 0.2);
}

.psw-day-cell.is-resize-preview {
    background: #dbeafe !important;
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.dark .psw-day-cell.is-resize-preview {
    background: rgba(59, 130, 246, 0.22) !important;
}

.is-range-start .psw-block-place {
    padding-left: 0.45rem;
}

.is-range-end .psw-block-actions {
    margin-right: 0.35rem;
}

.psw-block.is-range-start {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.psw-block.is-range-end {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.psw-block-split {
    border-left: 2px dashed rgba(255, 255, 255, 0.45);
}

.psw-block-menu {
    position: relative;
    top: auto;
    right: auto;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border: none;
    border-radius: 0.2rem;
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.psw-block:hover .psw-block-menu,
.psw-block:focus-within .psw-block-menu {
    opacity: 1;
}

.psw-block-menu:hover {
    background: rgba(0, 0, 0, 0.35);
}

.psw-context-menu {
    position: fixed;
    z-index: 10000;
    min-width: 11rem;
    max-width: 16rem;
    padding: 0.35rem;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.psw-context-menu.hidden {
    display: none;
}

.dark .psw-context-menu {
    background: #1f2937;
    border-color: #374151;
}

.psw-context-menu button {
    text-align: left;
    padding: 0.45rem 0.6rem;
    border: none;
    border-radius: 0.35rem;
    background: transparent;
    font-size: 0.75rem;
    color: #374151;
    cursor: pointer;
}

.psw-context-menu button:hover {
    background: #f3f4f6;
}

.dark .psw-context-menu button {
    color: #e5e7eb;
}

.dark .psw-context-menu button:hover {
    background: #374151;
}

.psw-context-menu button[data-action="resume-hint"] {
    color: #6b7280;
    font-size: 0.6875rem;
    cursor: default;
}

.psw-context-menu button[data-action="resume-hint"]:hover {
    background: transparent;
}

.psw-menu-danger {
    color: #dc2626 !important;
    font-weight: 600;
}

.dark .psw-menu-danger {
    color: #f87171 !important;
}

.psw-trash-zone {
    margin: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    border: 2px dashed #d1d5db;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.psw-trash-zone.is-drop-target {
    border-color: #dc2626;
    background: #fee2e2;
    box-shadow: inset 0 0 0 1px #dc2626;
}

.dark .psw-trash-zone {
    background: rgba(127, 29, 29, 0.25);
    border-color: #7f1d1d;
    color: #fca5a5;
}

.dark .psw-trash-zone.is-drop-target {
    background: rgba(127, 29, 29, 0.45);
    border-color: #f87171;
}

.psw-select-mode-btn.is-active {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #1d4ed8 !important;
}

.dark .psw-select-mode-btn.is-active {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd !important;
}

.psw-select-mode-active .psw-block {
    cursor: pointer;
}

.psw-block.is-selected {
    outline: 2px solid #fff;
    outline-offset: -2px;
    box-shadow: 0 0 0 2px #2563eb, 0 2px 8px rgba(37, 99, 235, 0.35);
}

.psw-block-check {
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.15rem;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.15);
    z-index: 5;
}

.psw-select-mode-active .psw-block-place {
    padding-left: 0.9rem;
}

.psw-block.is-selected .psw-block-check {
    background: #fff;
    border-color: #fff;
    box-shadow: inset 0 0 0 2px #2563eb;
}

/* Zones de dépôt PDF (plans, devis, fiches techniques, BL) */
.doc-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    padding: 1.25rem 1rem;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    background: #f9fafb;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.doc-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.doc-dropzone-orange:hover {
    border-color: #fb923c;
    background: #fff7ed;
}

.doc-dropzone-teal:hover {
    border-color: #2dd4bf;
    background: #f0fdfa;
}

.doc-dropzone-blue:hover {
    border-color: #60a5fa;
    background: #eff6ff;
}

.doc-dropzone-emerald:hover {
    border-color: #34d399;
    background: #ecfdf5;
}

.dark .doc-dropzone-orange:hover {
    border-color: #fb923c;
    background: rgba(154, 52, 18, 0.2);
}

.dark .doc-dropzone-teal:hover {
    border-color: #2dd4bf;
    background: rgba(19, 78, 74, 0.28);
}

.dark .doc-dropzone-blue:hover {
    border-color: #60a5fa;
    background: rgba(30, 64, 175, 0.22);
}

.dark .doc-dropzone-emerald:hover {
    border-color: #34d399;
    background: rgba(6, 78, 59, 0.28);
}

.dark .doc-dropzone {
    border-color: #4b5563;
    background: rgba(17, 24, 39, 0.45);
}

.doc-dropzone-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.dark .doc-dropzone-title {
    color: #e5e7eb;
}

.doc-dropzone-hint {
    font-size: 0.75rem;
    color: #6b7280;
}

.dark .doc-dropzone-hint {
    color: #9ca3af;
}

.doc-dropzone-icon {
    width: 1.75rem;
    height: 1.75rem;
    margin-bottom: 0.15rem;
    color: #6b7280;
}

.chantier-tab-content.is-dragover {
    outline: 2px dashed transparent;
}

.doc-dropzone.is-dragover,
.chantier-tab-content.is-dragover .doc-dropzone {
    box-shadow: inset 0 0 0 1px currentColor;
}

.doc-dropzone-orange.is-dragover,
.chantier-tab-content.is-dragover .doc-dropzone-orange {
    border-color: #ea580c;
    background: #fff7ed;
    color: #c2410c;
}

.doc-dropzone-teal.is-dragover,
.chantier-tab-content.is-dragover .doc-dropzone-teal {
    border-color: #0d9488;
    background: #f0fdfa;
    color: #0f766e;
}

.doc-dropzone-blue.is-dragover,
.chantier-tab-content.is-dragover .doc-dropzone-blue {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.doc-dropzone-emerald.is-dragover,
.chantier-tab-content.is-dragover .doc-dropzone-emerald {
    border-color: #059669;
    background: #ecfdf5;
    color: #047857;
}

.dark .doc-dropzone-orange.is-dragover,
.dark .chantier-tab-content.is-dragover .doc-dropzone-orange {
    border-color: #fb923c;
    background: rgba(154, 52, 18, 0.25);
    color: #fdba74;
}

.dark .doc-dropzone-teal.is-dragover,
.dark .chantier-tab-content.is-dragover .doc-dropzone-teal {
    border-color: #2dd4bf;
    background: rgba(19, 78, 74, 0.35);
    color: #5eead4;
}

.dark .doc-dropzone-blue.is-dragover,
.dark .chantier-tab-content.is-dragover .doc-dropzone-blue {
    border-color: #60a5fa;
    background: rgba(30, 64, 175, 0.28);
    color: #93c5fd;
}

.dark .doc-dropzone-emerald.is-dragover,
.dark .chantier-tab-content.is-dragover .doc-dropzone-emerald {
    border-color: #34d399;
    background: rgba(6, 78, 59, 0.35);
    color: #6ee7b7;
}