@tailwind base;
@tailwind components;
@tailwind utilities;

/* 🌞 Thème clair (par défaut) */
body {
  @apply transition-colors duration-500 ease-in-out;
}

/* 🌙 Thème sombre */
html.dark body,
body.dark {
  @apply bg-gray-900 text-gray-100;
}

/* Harmonisation des cartes et bordures */
html.dark .card,
html.dark .shadow,
html.dark .border {
  @apply bg-gray-800 border-gray-700 text-gray-100;
}

/* Mode normal : transparent (on voit l'image du body) */
main {
  background: transparent;
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

/* Mode évasion activé : couleur opaque (cache l'image du body) */
main.mode-evasion {
  background-color: rgba(245, 245, 244, 0.96); /* clair */
  backdrop-filter: blur(4px);
}

/* Variante sombre du mode évasion */
html.dark main.mode-evasion {
  background-color: rgba(17, 24, 39, 0.95); /* foncé */
}


*,
::before,
::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* Conteneur principal */
.ContenuPrincipal {
   display: inline-flex; /* ou inline-grid */
    width: 100%;
    min-height:auto;     /* prend toute la hauteur de la fenêtre */;    
}

/* Menu latéral */
.ContenuMenu {
    width: 290px;
    transition: width 0.3s;
    margin-top:15px;
    margin-left:10px;
    overflow: hidden;
}

.ContenuMenu.minimized {
    width: 60px;
}

.ContenuMenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ContenuMenu li {
    padding: 5px;
    white-space: nowrap;
}

/* Zone principale */
.ContenuPage {
    display: inline-flex; /* ou inline-grid */
    width: 100%;
    height: 100%;    
}

.Logo {
    fill: var(--Fond2);
    stroke: black;
}

/* FIN CSS SPECIFIQUE ------------------------------ MENU LATERAL*/


/* Div principale */
.PageGenerale {
    position: relative;
    background-color: var(--Fond1);
}

/* Boite à l'interieur de la colonne centre */
.EncartColonneCentre {
    width: 100%;
    height: auto;
    color: var(--Fond3Text);
    background-color: var(--Fond3);
    padding: 10px;
    border-radius: var(--BorderRadius);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0px;
}

/* Zone servant à l'affichage des liste et autre informations secondaire autres que le planning affiché en 100%
-> Rapports
*/
.ZoneInformationsSecondaires {
    width: 90%;
    height: auto;
    color: var(--Fond1Text);
    background-color: var(--Fond1);
    padding: 10px;
    Border: 1px solid;
    Border-color: var(--Fond2);
    border-radius: var(--BorderRadius);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0px;
}

.NomSociete {
    /* permet de surpasser le Line Height par défaut pour que le nom société et la phrase Inventory RFID soient bien espacés */
    display: grid;
    height: auto;
    line-height: normal;
    margin-left: 10px;
}

.TitreSociete {
    font-size: 25px;
    letter-spacing: .3rem;
}

/* Sous titre du logo societe */
.SousTitrePrincipal {
    font-size: 14px;
    letter-spacing: normal;
    text-align: left;
}

/* Sous titre des pages */
.SousTitre {
    font-size: 20px;
    letter-spacing: normal;
    text-align: center;
    margin: 10px;
    padding: 5px;
}

.StyleListe {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.MenuConnectionContact {
    /* Menu Connection et contact doivent etre à gauche sur le bandeau haut */
    color: var(--Fond2Text);
    height: 40px;
    justify-content: center;
}

/* Boutons menu du bandeau */
.bouton1 {
    font-size: 12px;
    color: var(--Fond1Text);
    text-align: center;
    align-content: center;
    margin: 5px;

    display: inline-block;
    width: 140px;
    height: 80%;
    background-color: var(--Fond1Accent);

    border-radius: var(--BorderRadius);
    border: 1px;
    border-style: solid;
    border-color: var(--Fond1Text);

    -webkit-transition: all 0.25s;
    -moz-transition: all 0.25s;
    -o-transition: all 0.25s;
    transition: all 0.25s;
    cursor: pointer;
}

.bouton1:hover {
    background-color: var(--Fond1);
    border: 2px;
    border-style: solid;
    border-color: var(--Fond2);
    color: var(--Fond1Text);
}

.bouton1 a {
    text-decoration: none;
}


.boutonMenuCommon {
    width: 100%;
    padding: 20px;
    background-color: var(--Fond2);
    color: var(--Fond2Text);
    border-radius: var(--BorderRadius);
    border: 0px;
    margin-left: 5px;
    margin-right: 5px;
}

.boutonMenuCommon:hover {
    background-color: var(--BtnCtaHover);
    color: var(--BtnCtaHoverText);
}

.bouton2 {
    margin: 20px;
    width: 50%;
    padding: 10px;
    background-color: var(--Fond2);
    color: var(--Fond2Text);
    font-size: 12px;
    border-radius: var(--BorderRadius);
    border: 0px;
}

.bouton2:hover {
    background-color: var(--Fond1);
    color: var(--Fond1Text);
}

/* Style general formulaire */
.StyleForm {
    border-radius: var(--BorderRadius);
    border-width: 1px solid;
    text-align: center;
    font-weight: 500;
    font-size: 17px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    width: 100%;
}

/* Styleform2 est utilisé quand je veux mettre deux spans cote à cote dans une zone de formulaire avec deux champs */
.StyleForm2 {
    display: inline;
    border-radius: var(--BorderRadius);
    border-width: 1px solid;
    text-align: center;
    font-weight: 500;
    font-size: 17px;
    padding: 10px;
    max-width: 50%;
}


.StyleFormSubmit {
    border-radius: var(--BorderRadius);
    border-width: 1px solid;
    text-align: center;
    font-weight: 500;
    font-size: 17px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    width: 100%;
    background-color: var(--BtnCta);
    color: var(--BtnCtaText);
}

.StyleFormSubmit:hover {
    background-color: var(--BtnCtaHover);
    color: var(--BtnCtaHoverText);
}


/* DIV qui contient le formulaire */
.StyleDivFormulaire {
    display: grid;
    place-items: center;
}


/* Style général des tableau de listing */
.TableList {
    border-radius: var(--BorderRadius);
    width: 100%;
    border-collapse: collapse;
}

.TableList tr:hover {
    border-radius: var(--BorderRadius);
    background-color: var(--BtnCtaHover);
    color: var(--BtnCtaHoverText);
}

.TableList th,
td {
    font-size: 14px;
    padding: 15px;
}

/* Couleur différente pour sous section tableau */
.SectionTableau {
    background-color: var(--Fond1Accent);
    border-radius: var(--BorderRadius);
}

option {
    text-align: center;
}

/* Spinner attente */
#overlay {
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    display: none;
    background: var(--Fond2);
}

.cv-spinner {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px var(--Fond2Text);
    border-top: 4px var(--Fond2Text);
    border-radius: 50%;
    animation: sp-anime 0.8s infinite linear;
}

@keyframes sp-anime {
    100% {
        transform: rotate(360deg);
    }
}

.is-hide {
    display: none;
}

/* Fin spinner attente se trouve dans page_administration.php */



/* Span permettant de faire un espace*/
.SpaceSpan20 {
    display: inline-block;
    width: 20px;
}

html.dark .BlocPlanning {
  background-color: #111827; /* gris profond */
  border-color: #374151;
  color: #e5e7eb;
}

html.dark .PosteBlock {
  background-color: #1f2937; /* gris ardoise */
  border-color: #374151;
}

html.dark .PosteBlock > div:first-child {
  background-color: #2d3748;
  color: #f3f4f6;
}

html.dark .LignePlanning {
  color: #e5e7eb;
}

html.dark .ContainerVacation {
  background-color: #1f2937;
}

html.dark .VacationLigne {
  color: #f9fafb;
  box-shadow: 0 1px 4px rgba(255,255,255,0.1);
}

/* 🧭 Graduations */
html.dark .VacationHeure {
  background-color: rgba(255,255,255,0.08) !important;
}

html.dark .PastilleHoraire {
  color: #9ca3af;
}

/* ⚠️ Icônes et tooltips */
html.dark .warning-icon {
  filter: brightness(1.2);
}

html.dark #warn-tooltip {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #f87171;
}

html.dark .warn-tooltip-global {
  background: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #4b5563 !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

/* 🪶 Animation douce des transitions */
.BlocPlanning, .PosteBlock, .ContainerVacation, .VacationLigne {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html.dark .VacationLigne.bg-blue-500 {
  background-color: #2563eb !important; /* bleu clair Tailwind */
}
html.dark .VacationLigne.bg-red-50 {
  background-color: #7f1d1d !important;
  color: #fee2e2 !important;
}

/* Cellules de planning */
html.dark .dropzone {
  background-color: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

/* Vacations */
html.dark .vacation {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #f3f4f6 !important;
}
html.dark .vacation.bg-red-50 {
  background-color: #7f1d1d !important;
  border-color: #ef4444 !important;
  color: #fee2e2 !important;
}

/* Badge des besoins */
html.dark .besoin-container {
  background-color: #1f2937 !important;
  border-color: #4b5563 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
html.dark .besoin-badge {
  background-color: #111827 !important;
  border-color: #4b5563 !important;
  color: #d1d5db !important;
}

/* Infobox besoins */
html.dark .besoin-info {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #f3f4f6 !important;
}
html.dark .besoin-info a {
  color: #93c5fd !important;
}
html.dark .besoin-info a:hover {
  color: #60a5fa !important;
}

/* Tooltip violations */
html.dark .warn-tooltip {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #4b5563 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}
html.dark .warn-icon {
  color: #f87171 !important;
}

/* Transition douce */
.dropzone,
.vacation,
.besoin-container,
.border.rounded-lg.shadow.bg-white {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ---- CONTENEURS GÉNÉRAUX ---- */
html.dark #PagePlanningSemaineG2,
html.dark #PagePlanningAnneeG2 {
  background-color: #0f172a; /* gris ardoise profond */
  color: #e5e7eb;
}

/* Barres supérieures et zones de contrôle */
html.dark .bg-gray-100 {
  background-color: #1e293b !important;
}
html.dark .shadow-md {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}
html.dark .text-gray-800,
html.dark .text-gray-700 {
  color: #e5e7eb !important;
}
html.dark .text-gray-500 {
  color: #9ca3af !important;
}

/* ---- BADGES & BESOINS ---- */
html.dark .besoin-container:hover {
  background-color: #1f2937 !important;
}
html.dark .besoin-badge {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #f3f4f6 !important;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

/* ---- CARTES DES MOIS ---- */
html.dark .Mois {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
}
html.dark .Mois:hover {
  border-color: #60a5fa !important;
  box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}

/* ---- JOURS ---- */
html.dark .JourG2 {
  background-color: #0f172a !important;
  color: #f3f4f6 !important;
  border: 1px solid #1e293b;
}
html.dark .JourG2:hover {
  border-color: #3b82f6 !important;
  background-color: #1e3a8a !important;
}

/* ---- POPUPS / OVERLAYS ---- */
html.dark .JourG2Popup {
  background-color: #1f2937 !important;
  border: 1px solid #4b5563 !important;
  color: #f3f4f6 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

/* ---- FLECHES / ICONES ---- */
html.dark img.w-6 {
  filter: invert(1) brightness(1.2);
}

/* ---- ANIMATIONS ---- */
.Mois, .JourG2, .besoin-badge, .bg-white, button {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ---- BOUTONS ---- */
html.dark button.bg-white {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border: 1px solid #374151 !important;
}
html.dark button.bg-white:hover {
  background-color: #374151 !important;
}

html.dark button.bg-gray-200 {
  background-color: #374151 !important;
  color: #f3f4f6 !important;
}
html.dark button.bg-gray-200:hover {
  background-color: #4b5563 !important;
}

html.dark button.bg-blue-600 {
  background-color: #2563eb !important;
}
html.dark button.bg-blue-600:hover {
  background-color: #1d4ed8 !important;
}

/* === 🔒 Sécurité Tailwind pour classes dynamiques JS === */
@layer utilities {
  /* ✅ col-span dynamiques */
  .col-span-1 {}
  .col-span-2 {}
  .col-span-3 {}
  .col-span-4 {}
  .col-span-5 {}
  .col-span-6 {}
  .col-span-7 {}

  /* ✅ grid-cols dynamiques */
  .grid-cols-1 {}
  .grid-cols-2 {}
  .grid-cols-3 {}
  .grid-cols-4 {}
  .grid-cols-5 {}
  .grid-cols-6 {}
  .grid-cols-7 {}
  .grid-cols-8 {}
  .grid-cols-9 {}
  .grid-cols-10 {}
  .grid-cols-12 {}

  /* ✅ bg-color dynamiques utilisées dans tes plannings */
  .bg-emerald-100 {}
  .bg-emerald-200 {}
  .bg-emerald-900 {}
  .bg-amber-100 {}
  .bg-amber-200 {}
  .bg-amber-900 {}
  .bg-blue-600 {}
  .bg-blue-700 {}
  .bg-gray-100 {}
  .bg-gray-200 {}
  .bg-gray-800 {}
  .bg-gray-900 {}
  .dark\:bg-emerald-900 {}
  .dark\:bg-emerald-800 {}
  .dark\:bg-amber-900 {}
  .dark\:bg-amber-800 {}
  .dark\:bg-gray-900 {}
  .dark\:bg-blue-600 {}

  /* ✅ text-color dynamiques */
  .text-emerald-100 {}
  .text-amber-100 {}
  .text-gray-700 {}
  .text-gray-800 {}
  .text-gray-100 {}
  .text-gray-500 {}
  .text-blue-600 {}

  /* ✅ hover states */
  .hover\:bg-emerald-200 {}
  .hover\:bg-amber-200 {}
  .hover\:bg-gray-200 {}
  .hover\:bg-gray-300 {}
  .hover\:bg-blue-700 {}
  .dark\:hover\:bg-emerald-800 {}
  .dark\:hover\:bg-amber-800 {}
  .dark\:hover\:bg-gray-800 {}
  .dark\:hover\:bg-gray-700 {}
}

/* =====================================================
   🌙 DARK THEME — Planning Semaine Personnel
   ===================================================== */

/* --- Fond général --- */
html.dark #PlanningSemainePersonnel {
   color: #e5e7eb;
}

/* --- Cartes et blocs employés --- */
html.dark .PersonnelCard {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* --- En-tête de semaine --- */
html.dark #PlanningSemainePersonnel .text-gray-700,
html.dark #PlanningSemainePersonnel .text-gray-800 {
  color: #e5e7eb !important;
}

/* --- Barre des jours --- */
html.dark #PlanningSemainePersonnel .bg-gray-50 {
  background-color: #1e293b !important;
}

html.dark #PlanningSemainePersonnel .bg-white {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #f3f4f6 !important;
}
html.dark #PlanningSemainePersonnel .bg-white:hover {
  background-color: #374151 !important;
}

/* --- Bordures et séparateurs --- */
html.dark #PlanningSemainePersonnel .border-gray-200 {
  border-color: #374151 !important;
}
html.dark #PlanningSemainePersonnel .border-gray-300 {
  border-color: #4b5563 !important;
}

/* --- Boutons génériques --- */
html.dark #PlanningSemainePersonnel button.bg-white {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border: 1px solid #374151 !important;
}
html.dark #PlanningSemainePersonnel button.bg-white:hover {
  background-color: #374151 !important;
}

html.dark #PlanningSemainePersonnel button.bg-blue-600 {
  background-color: #2563eb !important;
}
html.dark #PlanningSemainePersonnel button.bg-blue-600:hover {
  background-color: #1d4ed8 !important;
}

/* --- Vacations (cases) --- */
html.dark .VS_cell-vacation {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}
html.dark .VS_cell-vacation:hover {
  background-color: #374151 !important;
}

html.dark .VSvacation {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #4b5563 !important;
}

/* --- Textes dynamiques --- */
html.dark .text-gray-500 { color: #9ca3af !important; }
html.dark .text-gray-600 { color: #d1d5db !important; }
html.dark .text-gray-700 { color: #e5e7eb !important; }
html.dark .text-gray-800 { color: #f3f4f6 !important; }
html.dark .text-gray-900 { color: #f9fafb !important; }

/* --- Étiquettes de poste / info-box --- */
html.dark .employee-infobox {
  background-color: #1e293b !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

/* --- Contrats --- */
html.dark .employee-infobox .bg-green-100 {
  background-color: #064e3b !important;
  color: #d1fae5 !important;
  border-color: #065f46 !important;
}
html.dark .employee-infobox .bg-orange-100 {
  background-color: #7c2d12 !important;
  color: #fed7aa !important;
  border-color: #9a3412 !important;
}

/* --- Badges IA / icônes --- */
html.dark .text-purple-700 { color: #c084fc !important; }

/* --- Flèches de navigation --- */
html.dark #PlanningSemainePersonnel img.w-6 {
  filter: invert(1) brightness(1.2);
}

/* --- Avertissements / tooltips --- */
html.dark .warn-tooltip {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #4b5563 !important;
}

/* =====================================================
   🌙 DARK THEME — Tableau des besoins en personnel
   ===================================================== */

/* Fond général */
html.dark #tableBesoinsContainer {
  background-color: #111827;
  color: #e5e7eb;
}

/* --- Encadrés de service --- */
html.dark .border-2 {
  border-color: #374151 !important;
}
html.dark .shadow-sm {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}
html.dark .bg-white {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
}
html.dark .bg-gray-50 {
  background-color: #1e293b !important;
}
html.dark .bg-gray-100 {
  background-color: #1f2937 !important;
}
html.dark .text-gray-700,
html.dark .text-gray-800 {
  color: #e5e7eb !important;
}

/* --- En-tête des services --- */
html.dark [data-service-meta] .text-gray-800 {
  color: #f3f4f6 !important;
}
html.dark [data-service-meta] .bg-gray-100 {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
}
html.dark [data-service-meta] table {
  border-color: #374151 !important;
}

/* --- Tableaux internes --- */
html.dark .poste-block {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}
html.dark .poste-block .border-b {
  border-color: #374151 !important;
  background-color: #1e293b !important;
}
html.dark .poste-block .text-indigo-700 {
  color: #93c5fd !important;
}
html.dark .poste-block .total-jour.text-gray-400 {
  color: #6b7280 !important;
}

/* --- Sélecteurs de besoins --- */
html.dark .besoin-select {
  background-color: #1f2937 ;
  color: #f3f4f6 ;
  border: 1px solid #374151;
}

html.dark .besoin-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
}

/* --- Selects colorés dynamiquement (fond clair) --- */
html.dark .besoin-select option {
  background-color: #1f2937 ;
  color: #e5e7eb ;
}

/* --- Boutons de navigation et actions --- */
html.dark button.bg-white {
  background-color: #1f2937 !important;
  border: 1px solid #374151 !important;
  color: #e5e7eb !important;
}
html.dark button.bg-white:hover {
  background-color: #374151 !important;
}
html.dark button.bg-blue-600 {
  background-color: #2563eb !important;
}
html.dark button.bg-blue-600:hover {
  background-color: #1d4ed8 !important;
}
html.dark button.bg-red-100 {
  background-color: #7f1d1d !important;
  color: #fecaca !important;
  border-color: #b91c1c !important;
}
html.dark button.bg-red-100:hover {
  background-color: #991b1b !important;
}

/* --- Tableaux et lignes --- */
html.dark table {
  border-color: #374151 !important;
}
html.dark th,
html.dark td {
  border-color: #374151 !important;
}
html.dark thead {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
}

/* --- Flèches gauche/droite --- */
html.dark img.w-4,
html.dark img.w-6 {
  filter: invert(1) brightness(1.2);
}

/* --- Toast de copie --- */
html.dark .bg-amber-100 {
  background-color: #78350f !important;
  color: #fde68a !important;
  border-color: #92400e !important;
}

/* --- Statut de sauvegarde --- */
html.dark #saveStatus {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border-bottom: 1px solid #374151 !important;
}

/* --- Modale de copie de semaine --- */
html.dark #modalCopyWeek {
  background-color: rgba(17, 24, 39, 0.9) !important;
  color: #e5e7eb !important;
}

/* --- Inputs --- */
html.dark input[type="week"],
html.dark input[type="text"],
html.dark input[type="number"] {
  background-color: #1f2937 !important;
  color: #f3f4f6 !important;
  border: 1px solid #374151 !important;
}

#breadcrumb .crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #f9fafb;   /* gris-50 */
  border: 1px solid #e5e7eb;   /* gris-200 */
  color: #374151;              /* gris-700 */
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
#breadcrumb .crumb:hover {
  background-color: #f3f4f6;
  border-color: #e5e7eb;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
#breadcrumb .separator {
  color: #9ca3af;
  user-select: none;
  margin: 0 2px;
}

/* Style de base des sélecteurs */
.besoin-select {
  min-width: 3.5rem;
  text-align: center;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

/* État valeur = 0 */
.besoin-select[data-state="empty"] {
  background-color: #f9fafb; /* gris très clair */
  color: #9ca3af;           /* gris moyen */
  font-weight: 400;
}

/* État valeur > 0 */
.besoin-select[data-state="filled"] {
  background-color: #eef2ff; /* indigo-50 */
  color: #1e293b;           /* gris foncé / bleu ardoise */
  font-weight: 600;
  border-color: #818cf8;    /* indigo-400 */
}

/* 🌈 BESOINS PERSONNEL Bloc principal pour chaque poste/équipe */
/* 🌈 Style visuel pour chaque bloc de poste (équipe) */
.poste-block {
  border: 1px solid #e5e7eb;
  border-left-width: 6px;
  border-radius: 0.75rem;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-top: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.poste-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.poste-header-bar {
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Table à l’intérieur du poste */
.poste-table {
  width: 100%;
  border-collapse: collapse;
}

.poste-table th, .poste-table td {
  border: 1px solid #e5e7eb;
  text-align: center;
  padding: 0.5rem;
}

.poste-table th {
  background-color: #f3f4f6;
  color: #374151;
  font-weight: 600;
}

.sousposte-row td:first-child {
  text-align: left;
  padding-left: 1rem;
  color: #4b5563;
}

.poste-block .bg-gray-50 {
  display: grid;
  grid-template-columns: 12rem repeat(7, 1fr);
}
.poste-block .total-jour {
  border-left: 1px solid #e5e7eb;
}
table {
  table-layout: fixed;
  width: 100%;
}
th, td {
  text-align: center;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

/* 🌞 Mode clair par défaut */
.generator-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 20px;
}
.progress-bar-container {
  width: 80%;
  background-color: #e5e7eb;
  border-radius: 9999px;
  height: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background-color: #4f46e5;
  transition: width 0.3s ease;
}
.step-pane {
  width: 80%;
  max-height: 80%;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  padding: 2rem;
  overflow-y: auto;
  position: relative;
  color: #1f2937;
}
.step-pane::-webkit-scrollbar {
  width: 8px;
}
.step-pane::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 8px;
}
.hidden {
  display: none !important;
}
.animate-fadein {
  animation: fadein 0.4s ease;
}
@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 🌙 Mode sombre */
html.dark body {
  background-color: #111827;
  color: #e5e7eb;
}
html.dark .progress-bar-container {
  background-color: #374151;
}
html.dark #progress-bar {
  background-color: #6366f1;
}
html.dark .step-pane {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
html.dark .step-pane::-webkit-scrollbar-thumb {
  background: #6b7280;
}
html.dark input,
html.dark textarea,
html.dark select {
  background-color: #111827;
  color: #f9fafb;
  border: 1px solid #374151;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #9ca3af;
}
html.dark .bg-gray-50 {
  background-color: #1f2937 !important;
}
html.dark .bg-gray-200 {
  background-color: #374151 !important;
  color: #e5e7eb !important;
}
html.dark .bg-gray-300 {
  background-color: #4b5563 !important;
}
html.dark .text-gray-700,
html.dark .text-gray-600,
html.dark .text-gray-500 {
  color: #d1d5db !important;
}
html.dark .border-gray-300,
html.dark .border-gray-200 {
  border-color: #374151 !important;
}
html.dark .bg-white {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
}
html.dark .hover\:bg-gray-300:hover {
  background-color: #4b5563 !important;
}
html.dark button.bg-indigo-600 {
  background-color: #4f46e5 !important;
}
html.dark button.bg-indigo-600:hover {
  background-color: #4338ca !important;
}
html.dark button.bg-green-600 {
  background-color: #22c55e !important;
}
html.dark button.bg-green-600:hover {
  background-color: #16a34a !important;
}
html.dark #aiPreviewContainer {
  background-color: #111827 !important;
  border-color: #374151 !important;
}
