/* Écran « Validation » du Boss (php/validation.php) et bloc « Mes demandes au Boss » des bookings (php/pm/PM_get_book.php).
   Même vocabulaire que les écrans Secteurs (secteurs.css : .sect-fiche, .sect-badge, palette verte #0f5132). */

.vb { margin-top: 12px; }
.vb-fiche { border-left-color: #d97706; }
.vb-fiche .sect-fiche__code { background: #0f5132; }

.vb-badge--attente { background: #fef3c7; color: #92400e; }
.vb-badge--valide { background: #dcfce7; color: #166534; }
.vb-badge--refuse { background: #fee2e2; color: #991b1b; }

.vb-bloc { margin-top: 14px; padding: 12px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.vb-bloc__tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.vb-bloc__titre { font-weight: 700; color: #0f172a; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.vb-compte { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: .78rem; text-align: center; }
.vb-selection { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #64748b; font-size: .85rem; }
.vb-selection[hidden] { display: none; }
.vb-vide { color: #64748b; font-size: .875rem; padding: 10px 2px; }

.vb-table { font-size: .85rem; margin-bottom: 0; }
.vb-table thead th { color: #64748b; font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.vb-table td { vertical-align: middle; }
.vb-table tbody tr:hover > * { background: #f8fafc; }
.vb-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vb-fort { font-weight: 600; color: #0f172a; white-space: nowrap; }
.vb-pale { color: #64748b; font-size: .78rem; }
.vb-module { display: inline-block; padding: 0 6px; border-radius: 6px; background: #f1f5f9; color: #0f172a; font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.vb-libelle { max-width: 220px; }
.vb-table .vb-prix { width: 96px; margin-left: auto; text-align: right; }
.vb-table .vb-qte { width: 84px; margin-left: auto; text-align: right; }
.vb-table .vb-commentaire { min-width: 170px; }
.vb-champ-modifie { border-color: #d97706; background: #fffbeb; font-weight: 600; }
.vb-valeur { font-weight: 600; }
.vb-actions { white-space: nowrap; }
.vb-barre { color: #94a3b8; text-decoration: line-through; }
.vb-modifie { color: #b45309; font-weight: 700; }
.vb-commentaire-txt { max-width: 280px; color: #334155; }

.vb-btn { border-radius: 999px; font-weight: 600; padding: 2px 12px; color: #fff; }
.vb-btn--valider { background: #0f5132; border: 1px solid #0f5132; }
.vb-btn--valider:hover { background: #0b3d26; border-color: #0b3d26; color: #fff; }
.vb-btn--refuser { background: #dc2626; border: 1px solid #dc2626; }
.vb-btn--refuser:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.vb-btn:disabled { opacity: .6; }

/* Compteur rouge du menu « Validation » */
#vb-compteur { font-size: .7rem; }

/* Bloc « Mes demandes au Boss » (page des bookings PM) */
.vb-mes { margin: 10px 0; padding: 10px 14px; background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #d97706; border-radius: 10px; }
.vb-mes .vb-table { font-size: .82rem; }
.vb-mes__boss { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .875rem; color: #334155; }
.vb-mes--vide { border-left-color: #cbd5e1; padding-top: 8px; padding-bottom: 8px; }
.vb-mes--vide .vb-bloc__tete { margin-bottom: 2px; }
.vb-mes__sous-titre { margin: 12px 0 4px; font-size: .88rem; }

/* Liste des bookings (PM_get_book.php) : bookings Non confirmés en attente du Boss, en tête et en orange */
#dataTable-booking tbody tr.vb-ligne-attente > * { background: #fffbeb !important; color: #78350f; }
#dataTable-booking tbody tr.vb-ligne-attente > td:first-child { box-shadow: inset 3px 0 0 #d97706; }
.vb-ico-attente { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #d97706; color: #fff; }
/* Une seule ligne, même hauteur que les autres bookings */
#dataTable-booking tbody tr.vb-ligne-attente > td { vertical-align: middle; }
#dataTable-booking tbody tr.vb-ligne-attente .vb-attente-code { white-space: nowrap; }
#dataTable-booking tbody tr.vb-ligne-attente .sect-badge { padding: 0 8px; font-size: .72rem; line-height: 1.5; }
#dataTable-booking tbody tr.vb-ligne-attente .vb-ico-attente { width: 16px; height: 16px; vertical-align: middle; }
#dataTable-booking tbody tr.vb-ligne-attente .vb-ico-attente svg { width: 10px; height: 10px; }

/* Mise à jour automatique (dist/js/validation-suivi.js) */
.vb-nouveau { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; color: #1e3a8a; font-size: .875rem; }
.vb-nouveau[hidden] { display: none; }
.vb-avis { border: 0; border-left: 4px solid; box-shadow: 0 8px 24px rgba(15, 23, 42, .15); }
.vb-avis--valide { border-left-color: #0f5132; }
.vb-avis--valide .toast-header { color: #166534; }
.vb-avis--refuse { border-left-color: #dc2626; }
.vb-avis--refuse .toast-header { color: #991b1b; }
.vb-avis__comm { margin-top: 4px; color: #475569; font-style: italic; }

/* Menu principal : « Validation » et son compteur toujours sur une seule ligne */
#principal_menu #validation { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
#principal_menu #vb-compteur { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; font-size: .68rem; font-weight: 700; line-height: 1; }
#principal_menu #vb-compteur[style*="none"] { display: none !important; }

/* Liste des bookings : Non confirmés refusés par le Boss (le jour du refus), en rouge */
#dataTable-booking tbody tr.vb-ligne-refus > * { background: #fef2f2 !important; color: #7f1d1d; vertical-align: middle; }
#dataTable-booking tbody tr.vb-ligne-refus > td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
#dataTable-booking tbody tr.vb-ligne-refus .vb-attente-code { white-space: nowrap; }
#dataTable-booking tbody tr.vb-ligne-refus .sect-badge { padding: 0 8px; font-size: .72rem; line-height: 1.5; }
#dataTable-booking tbody tr.vb-ligne-refus .vb-ico-attente { width: 16px; height: 16px; vertical-align: middle; }
.vb-ico-refus { background: #dc2626; }
.vb-refus-comm { color: #b91c1c; font-style: italic; }

/* Écran Validation : classement par secteur (php/validation_secteurs.php) */
.vb-pastille { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 9px; color: #fff; font-weight: 800; font-size: .72rem; letter-spacing: .03em; }
.vb-pastille--petite { width: 20px; height: 20px; border-radius: 6px; font-size: .6rem; }
.vb-secteurs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.vb-onglet { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; color: #334155; font-size: .85rem; font-weight: 600; transition: border-color .15s, background .15s; }
.vb-onglet:hover { border-color: #0f5132; }
.vb-onglet.is-actif { background: #0f5132; border-color: #0f5132; color: #fff; }
.vb-onglet.is-vide { color: #94a3b8; }
.vb-onglet.is-vide .vb-pastille { opacity: .45; }
.vb-onglet.is-actif.is-vide { color: #fff; }
.vb-onglet__nb { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: .72rem; font-weight: 700; text-align: center; }
.vb-onglet__nb.is-attente { background: #fef3c7; color: #92400e; }
.vb-onglet.is-actif .vb-onglet__nb { background: rgba(255, 255, 255, .22); color: #fff; }

.vb-groupe { margin-top: 6px; }
.vb-groupe + .vb-groupe { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #e2e8f0; }
.vb-groupe[hidden], .vb-vide[hidden], #vb-table-decisions[hidden] { display: none; }
.vb-groupe__tete { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.vb-groupe__titre { font-weight: 700; color: #0f172a; }
.vb-secteur-nom { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; color: #334155; }

/* Écran Validation : bloc « Synchronisation avec le serveur en ligne » (dist/js/validation-sync.js) */
.vb-sync .vb-bloc__titre svg { color: #0f5132; }
.vb-sync__etat { display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #f1f5f9; color: #475569; }
.vb-sync__point { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.vb-sync__etat--ok { background: #dcfce7; color: #166534; }
.vb-sync__etat--encours { background: #dbeafe; color: #1d4ed8; }
.vb-sync__etat--encours .vb-sync__point { animation: vb-pulse 1.2s ease-in-out infinite; }
.vb-sync__etat--attente { background: #fef3c7; color: #92400e; }
.vb-sync__etat--arret { background: #ffedd5; color: #9a3412; }
.vb-sync__etat--retard { background: #fee2e2; color: #991b1b; }
@keyframes vb-pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .5); } 70% { box-shadow: 0 0 0 7px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }

.vb-sync__corps { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
.vb-sync__chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vb-sync__chiffre { padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; display: flex; flex-direction: column; }
.vb-sync__chiffre--grand { grid-column: 1 / -1; background: #f0fdf4; border-color: #bbf7d0; }
.vb-sync__val { font-size: 1.15rem; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; }
.vb-sync__chiffre--grand .vb-sync__val { font-size: 2rem; color: #0f5132; line-height: 1.1; }
.vb-sync__lib { color: #64748b; font-size: .76rem; }

.vb-sync__graphe-titre { color: #334155; font-size: .82rem; font-weight: 600; margin-bottom: 4px; }
.vb-sync__courbe { position: relative; width: 100%; height: 96px; cursor: crosshair; }
.vb-sync__courbe svg { display: block; overflow: visible; }
.vb-sync__ligne { fill: none; stroke: #0f5132; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vb-sync__aire { fill: #0f5132; opacity: .08; }
.vb-sync__axe { stroke: #cbd5e1; stroke-width: 1; }
.vb-sync__grille { stroke: #e2e8f0; stroke-width: 1; stroke-dasharray: 3 3; }
.vb-sync__graduation { fill: #64748b; font-size: 10px; }
.vb-sync__vide { fill: #94a3b8; font-size: 12px; }
.vb-sync__dernier { fill: #0f5132; stroke: #fff; stroke-width: 2; }
.vb-sync__repere { stroke: #94a3b8; stroke-width: 1; stroke-dasharray: 2 2; }
.vb-sync__marque { fill: #fff; stroke: #0f5132; stroke-width: 2; }
.vb-sync__bulle { position: absolute; transform: translate(-50%, -100%); padding: 5px 9px; border-radius: 8px; background: #0f172a; color: #fff; font-size: .75rem; line-height: 1.3; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 16px rgba(15, 23, 42, .25); }
.vb-sync__bulle span { color: #cbd5e1; }
.vb-sync__bulle[hidden] { display: none; }
.vb-sync__bases { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vb-sync__base { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: .76rem; }
.vb-sync__base i { font-style: normal; }
.vb-sync__base b { color: #0f172a; }
.vb-sync__base--ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
@media (max-width: 767px) { .vb-sync__corps { grid-template-columns: minmax(0, 1fr); } }

/* Fiche Validation compacte : chiffres en badges (les demandes remontent en haut de l'écran) */
.vb-fiche { padding: 10px 14px; margin-bottom: 10px; }
.vb-fiche .sect-fiche__code { min-width: 44px; height: 44px; }
.vb-fiche__chiffres { gap: 6px; }
.vb-chiffre { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: .8rem; white-space: nowrap; text-decoration: none; }
.vb-chiffre b { color: #0f172a; font-weight: 800; }
.vb-chiffre--attente { background: #fef3c7; color: #92400e; }
.vb-chiffre--attente b { color: #92400e; }
.vb-chiffre--valide { background: #dcfce7; color: #166534; }
.vb-chiffre--valide b { color: #166534; }
.vb-chiffre--refuse { background: #fee2e2; color: #991b1b; }
.vb-chiffre--refuse b { color: #991b1b; }
.vb-sync-mini { font-weight: 700; cursor: pointer; }
.vb-sync-mini:hover { filter: brightness(.95); }
.vb-sync-mini.vb-sync__etat--encours .vb-sync__point { animation: vb-pulse 1.2s ease-in-out infinite; }
.vb .vb-secteurs { margin-top: 0; }
/* Bloc Synchronisation : « en attente » (pleine largeur), puis « envoyées » et « temps estimé » côte à côte */
.vb-sync__chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Indicateur de synchronisation de la fiche : couleur de l'état (prioritaire sur .vb-chiffre) */
.vb-chiffre.vb-sync-mini.vb-sync__etat--ok { background: #dcfce7; color: #166534; }
.vb-chiffre.vb-sync-mini.vb-sync__etat--encours { background: #dbeafe; color: #1d4ed8; }
.vb-chiffre.vb-sync-mini.vb-sync__etat--attente { background: #fef3c7; color: #92400e; }
.vb-chiffre.vb-sync-mini.vb-sync__etat--arret { background: #ffedd5; color: #9a3412; }
.vb-chiffre.vb-sync-mini.vb-sync__etat--retard { background: #fee2e2; color: #991b1b; }
