/* Masquer le contenu tant que Vue n'a pas rendu le template */
[v-cloak] { display: none !important; }

/* Taille maximale des boutons : btn-sm (0.875rem) partout dans l'app */
#app .btn:not(.btn-lg) {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
}

:root {
  /* === COULEURS PRIMAIRES === */
  --color-primary: #2c3e50;        /* Bleu ardoise */
  --color-primary-dark: #1a252f;   
  --color-primary-light: #34495e;  /* Pour variations */

  --color-secondary: #6c757d;
  --color-success: #198754;
  --color-danger: #dc3545;
  --color-warning: #ffc107;
  --color-info: #0dcaf0;
  
  /* === COULEURS D'INTERFACE === */
  --color-bg-light: #f8f9fa;
  --color-bg-white: #ffffff;
  --color-text-primary: #212529;
  --color-text-secondary: #6c757d;
  --color-text-muted: #adb5bd;
  --color-border: #dee2e6;
  
  /* === GRADIENTS === */
  --gradient-primary: linear-gradient(135deg, #4a6fa5 0%, #5b7fb8 100%);
  --gradient-success: linear-gradient(135deg, #198754 0%, #146c43 100%);
  --gradient-danger: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);

   --gradient-weekend: #546e7a;  /* Blue grey 600 */

  
  /* === ESPACEMENT === */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* === BORDER RADIUS === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* === SHADOWS === */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  
  /* === TRANSITIONS === */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* === PLANNING SPÉCIFIQUE === */
  --planning-cell-min-width: 140px;
  --planning-header-height: 60px;
  --planning-row-height: 80px;
  
  /* === HORAIRES COLORS === */
  --horaire-normal-bg: #d1e7dd;
  --horaire-normal-text: #0f5132;
  --horaire-modifie-bg: #cfe2ff;
  --horaire-modifie-text: #084298;
  --horaire-repos-bg: #e2e3e5;
  --horaire-repos-text: #6c757d;
  --horaire-conge-bg: #f8d7da;
  --horaire-conge-text: #842029;
  
  /* === Z-INDEX SCALE === */
  --z-dropdown: 1025; /* Au-dessus des éléments sticky (1020) */
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* === CLASSES UTILITAIRES RÉUTILISABLES === */

/* Header gradient */
.header-gradient {
  background: var(--gradient-primary) !important;
}
  

.header-gradient,
.header-gradient h1,
.header-gradient h2,
.header-gradient h3,
.header-gradient h4,
.header-gradient h5,
.header-gradient h6,
.header-gradient p,
.header-gradient i,
.header-gradient .bi {
  color: #ffffff !important;
}

.header-gradient .btn {
  color: initial !important;
}

.header-gradient .btn-light {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.95) !important;
  color: var(--color-primary) !important;
}

.header-gradient .btn-light:hover {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
}

.header-gradient .btn-light i {
  color: var(--color-primary) !important;
}

/* Cards */
.card-elevated {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card-elevated:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Stat cards */
.stat-card {
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Action cards */
.action-card {
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.action-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

/* Planning */

.planning-table th {
  background: white;
  color: #343a40;
  font-weight: 600;
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  z-index: 2; /* Juste au-dessus des cellules normales — les dropdowns (z-index 1000+) passent par-dessus */
  border-bottom: 2px solid #dee2e6;
}

.planning-cell {
  min-width: var(--planning-cell-min-width);
  min-height: var(--planning-row-height);
}

/* Horaires display */
.horaire-normal {
  background: var(--horaire-normal-bg);
  color: var(--horaire-normal-text);
}

.horaire-modifie {
  background: var(--horaire-modifie-bg);
  color: var(--horaire-modifie-text);
}

.horaire-repos {
  background: var(--horaire-repos-bg);
  color: var(--horaire-repos-text);
}

.horaire-conge {
  background: var(--horaire-conge-bg);
  color: var(--horaire-conge-text);
}

/* Quick menu */
.quick-menu {
  position: absolute;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  min-width: 200px;
}

/* Badges */
.badge-modified {
  background: var(--horaire-modifie-bg);
  color: var(--horaire-modifie-text);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Responsive utilities */
@media (max-width: 768px) {
  :root {
    --planning-cell-min-width: 100px;
    --stat-value-size: 2rem;
  }
  
  .stat-value {
    font-size: var(--stat-value-size);
  }
}

/* Dark mode ready (optionnel) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-light: #212529;
    --color-bg-white: #2c3034;
    --color-text-primary: #f8f9fa;
    --color-text-secondary: #adb5bd;
    --color-border: #495057;
  }
}

/* ============================================
   NAVIGATION - Niveau 1 (Main Navbar)
   ============================================ */

/* Navbar sticky */
.navbar.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navbar brand */
.navbar-brand {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Nav links */
.navbar-nav .nav-link {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
  font-size: 0.875rem;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

/* Dropdown menus */
.navbar .dropdown-menu {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.navbar .dropdown-item {
  padding: 0.5rem 1.5rem;
  transition: background-color 0.2s ease;
  font-size: 0.875rem;
}

.navbar .dropdown-item:hover {
  background-color: #f8f9fa;
}

.navbar .dropdown-item i {
  width: 1.5rem;
  text-align: center;
}

/* Badge dans navbar */
.navbar .badge {
  font-size: 0.7rem;
  padding: 0.25em 0.5em;
  vertical-align: middle;
}

/* ============================================
   NAVBAR OFFCANVAS RESPONSIVE
   ============================================ */

/* Desktop (≥992px): OffCanvas se comporte comme navbar normale pour navbar-expand-lg */
@media (min-width: 992px) {
  .navbar-expand-lg .offcanvas {
    position: static;
    z-index: auto;
    flex-grow: 1;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    background-color: transparent;
    border: 0;
    transform: none;
    transition: none;
  }

  .navbar-expand-lg .offcanvas .offcanvas-header {
    display: none;
  }

  .navbar-expand-lg .offcanvas .offcanvas-body {
    display: flex;
    flex-grow: 1;
    padding: 0;
    overflow-y: visible;
    align-items: center;
  }
}

/* Desktop (≥1200px): OffCanvas se comporte comme navbar normale pour navbar-expand-xl */
@media (min-width: 1200px) {
  .navbar-expand-xl .offcanvas {
    position: static;
    z-index: auto;
    flex-grow: 1;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    background-color: transparent;
    border: 0;
    transform: none;
    transition: none;
  }

  .navbar-expand-xl .offcanvas .offcanvas-header {
    display: none;
  }

  .navbar-expand-xl .offcanvas .offcanvas-body {
    display: flex;
    flex-grow: 1;
    padding: 0;
    overflow-y: visible;
    align-items: center;
  }
}

/* Mobile/tablet burger menu : OffCanvas depuis la droite
   - navbar-expand-lg  : burger visible < 992px
   - navbar-expand-xl  : burger visible < 1200px
   On cible donc toutes les largeurs < 1200px pour les styles communs,
   mais on les conditionne à la présence du burger (toggler visible). */
@media (max-width: 1199.98px) {
  /* Styles OffCanvas pour navbar-expand-xl en mode burger (992–1199px) */
  .navbar-expand-xl .offcanvas {
    max-width: 280px;
    background: var(--gradient-primary);
  }

  .navbar-expand-xl .offcanvas-header {
    padding: 1rem 1.5rem;
  }

  .navbar-expand-xl .offcanvas-body {
    padding: 1rem 0;
  }

  .navbar-expand-xl .offcanvas .nav-link,
  .navbar-expand-xl .offcanvas .offcanvas-title {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .navbar-expand-xl .offcanvas .nav-link:hover,
  .navbar-expand-xl .offcanvas .nav-link.active {
    color: #fff !important;
  }

  .navbar-expand-xl .offcanvas-body .navbar-nav {
    width: 100%;
  }

  .navbar-expand-xl .offcanvas-body .nav-link {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  .navbar-expand-xl .offcanvas-body .dropdown-menu {
    position: static !important;
    transform: none !important;
    margin-left: 1rem;
    border: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.05);
  }

  .navbar-expand-xl .offcanvas-body .dropdown-menu.planning-dropdown {
    display: block !important;
  }

  .navbar-expand-xl .offcanvas-body .dropdown-item {
    padding: 0.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
  }

  .navbar-expand-xl .offcanvas-body .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .navbar-expand-xl .offcanvas-body > .navbar-nav:last-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

/* Mobile (<992px): OffCanvas pour navbar-expand-lg */
@media (max-width: 991.98px) {
  .navbar .offcanvas {
    max-width: 280px;
    background: var(--gradient-primary);
  }

  .navbar .offcanvas-header {
    padding: 1rem 1.5rem;
  }

  .navbar .offcanvas-body {
    padding: 1rem 0;
  }

  /* Texte blanc dans OffCanvas mobile */
  .navbar .offcanvas .nav-link,
  .navbar .offcanvas .navbar-brand,
  .navbar .offcanvas .offcanvas-title {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .navbar .offcanvas .nav-link:hover,
  .navbar .offcanvas .nav-link.active {
    color: #fff !important;
  }

  /* Navigation verticale sur mobile */
  .navbar .offcanvas-body .navbar-nav {
    width: 100%;
  }

  .navbar .offcanvas-body .nav-link {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  /* Dropdowns dans OffCanvas : menu déroulant au lieu de floating */
  .navbar .offcanvas-body .dropdown-menu {
    position: static !important;
    transform: none !important;
    margin-left: 1rem;
    border: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.05);
  }

  /* Dropdown Planning déplié par défaut sur mobile */
  .navbar .offcanvas-body .dropdown-menu.planning-dropdown {
    display: block !important;
  }

  .navbar .offcanvas-body .dropdown-item {
    padding: 0.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
  }

  .navbar .offcanvas-body .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  /* User menu en bas sur mobile */
  .navbar .offcanvas-body > .navbar-nav:last-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

/* ============================================
   NAVIGATION - Niveau 2 (Contextual Toolbar)
   ============================================ */

.contextual-toolbar {
  background-color: #ffffff;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

/* Sticky toolbar (pour pages avec scroll) */
.contextual-toolbar.sticky-toolbar {
  position: sticky;
  top: 56px; /* Hauteur de la navbar (ajuster si besoin) */
  z-index: 1020;
}

/* Titre dans toolbar */
.contextual-toolbar h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #212529;
}

.contextual-toolbar h5 i {
  color: #6c757d;
  margin-right: 0.5rem;
}

/* Boutons dans toolbar */
.contextual-toolbar .btn-sm {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

/* Form controls dans toolbar */
.contextual-toolbar .form-select-sm {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

/* Responsive : passage sur 2 lignes sur mobile */
@media (max-width: 767px) {
  .contextual-toolbar .row > div {
    text-align: center !important;
  }

  .contextual-toolbar .d-flex {
    justify-content: center !important;
  }

  .contextual-toolbar h5 {
    font-size: 1rem;
  }

  /* Navbar : ajustement hauteur pour sticky toolbar */
  .contextual-toolbar.sticky-toolbar {
    top: 56px; /* Hauteur navbar mobile */
  }
}

/* Desktop : navbar plus haute */
@media (min-width: 992px) {
  .contextual-toolbar.sticky-toolbar {
    top: 64px; /* Hauteur navbar desktop (ajuster selon design final) */
  }
}

/* ============================================
   COLLABORATEURS TABLE
   ============================================ */

/* Table hover effect */
.table-hover tbody tr {
  transition: background-color 0.15s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

/* Table sticky header */
.table-responsive thead.sticky-top {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Badge service dans table */
.badge.bg-info {
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============================================
   MODAL TABS
   ============================================ */

.nav-tabs .nav-link {
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-tabs .nav-link.active {
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* ============================================
   SERVICE CHECKBOXES
   ============================================ */

.list-group-item.list-group-item-action {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.list-group-item.list-group-item-action:hover {
  background-color: #f8f9fa;
}

.list-group-item .form-check-label {
  cursor: pointer;
}

/* ============================================
   CONTRAT CARDS
   ============================================ */

.list-group-item.border-success {
  border-left-width: 4px !important;
}

/* Action buttons in contrat list */
.btn-group-sm .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* ============================================
   UTILITY COLORS
   ============================================ */

.text-purple {
  color: #6f42c1 !important;
}

/* ============================================
   DISPLAY OPTIONS COMPONENT
   ============================================ */

.display-options-wrapper .dropdown-menu {
  animation: slideDown 0.2s ease-out;
}

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

.display-options-wrapper .dropdown-menu {
  z-index: 1025; /* Au-dessus du sticky thead (1020) */
}

.display-options-wrapper .option-item {
  padding: 8px 12px 8px 1.5em; /* 1.5em à gauche = espace réservé par Bootstrap form-check pour le checkbox */
  border-radius: 6px;
  transition: background-color 0.2s;
}

.display-options-wrapper .option-item:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.display-options-wrapper .option-item.option-disabled {
  opacity: 0.6;
  background-color: rgba(0, 0, 0, 0.02);
}

.display-options-wrapper .option-item .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.display-options-wrapper .option-item .form-check-input:disabled {
  cursor: not-allowed;
}

.display-options-wrapper .option-item label {
  margin-bottom: 0;
  width: 100%;
}

.display-options-wrapper .badge {
  font-size: 0.7em;
  padding: 0.25em 0.5em;
}

/* ============================================
   TOOLBAR RESPONSIVE UTILITIES
   ============================================ */

/* Bouton icône seule (sans texte) */
.btn-icon-only {
  min-width: 38px;
  padding: 0.375rem 0.5rem;
}

.btn-icon-only i {
  margin: 0 !important;
}

/* Bouton avec texte responsive (masque texte, garde icône) */
@media (max-width: 991px) {
  .btn-text-responsive {
    font-size: 0;
    padding: 0.375rem 0.5rem;
  }

  .btn-text-responsive i {
    margin: 0 !important;
    font-size: 1rem; /* Restaurer taille icône */
  }
}

/* Réduire les gaps dans les toolbars sur mobile */
@media (max-width: 767px) {
  .contextual-toolbar .d-flex {
    gap: 0.5rem !important;
  }

  /* Réduire padding des boutons sur mobile */
  .contextual-toolbar .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* ============================================
   TOOLBAR OFFCANVAS COMPONENT
   ============================================ */

/* Animation d'entrée pour OffCanvas */
.toolbar-offcanvas-wrapper .offcanvas {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Badge compteur sur bouton filtres */
.toolbar-offcanvas-wrapper .badge {
  font-size: 0.7em;
  padding: 0.25em 0.5em;
}

/* ── Offcanvas filtres généraux (bar-general) ────────────── */
.offcanvas .offcanvas-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.offcanvas .offcanvas-body .form-label {
  font-size: 0.8125rem;
}

.offcanvas .offcanvas-body .form-select,
.offcanvas .offcanvas-body .form-control {
  font-size: 0.875rem;
}

/* Filtres dans offcanvas */
.toolbar-offcanvas-wrapper .offcanvas-body {
  padding: 1rem;
}

.toolbar-offcanvas-wrapper .form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.toolbar-offcanvas-wrapper .form-control,
.toolbar-offcanvas-wrapper .form-select {
  margin-bottom: 1rem;
}

/* ============================================================
   NOUVELLE ARCHITECTURE DES BARRES (2026-03)
   bar-general | bar-planning | bar-tables | save-bar-unified
   ============================================================ */

/* ── Barre Général (disparaît au scroll) ────────────────── */
.bar-general {
  background: white;
  border-bottom: 1px solid #e9ecef;
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: visible;
  flex-wrap: nowrap;
  scrollbar-width: none;
}
.bar-general::-webkit-scrollbar { display: none; }

/* ── Barre Planning (sticky-md-top via Bootstrap, offset sous la navbar) */
.bar-planning {
  background: white;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: visible;
  flex-wrap: nowrap;
  scrollbar-width: none;
  top: 56px; /* offset sous la navbar quand sticky-md-top est actif */
}
.bar-planning::-webkit-scrollbar { display: none; }

/* ── Barre Tables (dans le contenu, pas sticky) ──────────── */
.bar-tables {
  background: white;
  border-bottom: 1px solid #dee2e6;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.bar-tables::-webkit-scrollbar { display: none; }

/* ── Utilitaires communs aux barres ─────────────────────── */
.bar-spacer { flex: 1 1 0; min-width: 0; }
.bar-separator { width: 1px; height: 24px; background: #dee2e6; flex-shrink: 0; }


/* ── Barre fixe unifiée (save + sélection) ───────────────── */
.save-bar-unified {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #198754;
  color: white;
  padding: 0.5rem 0.75rem;
  z-index: 1040;
  box-shadow: 0 -2px 12px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  height: 52px;
}
.save-bar-unified::-webkit-scrollbar { display: none; }
.save-bar-unified--selection { background: #0d6efd; }
.save-bar-unified .btn { font-size: 0.8125rem; }
.save-bar-info { font-size: 0.8125rem; color: rgba(255,255,255,.85); white-space: nowrap; }
.save-bar-separator {
  width: 1px; height: 28px;
  background: rgba(255,255,255,.3);
  flex-shrink: 0;
  margin: 0 0.25rem;
}

/* Animation entrée/sortie */
.save-bar-enter-active, .save-bar-leave-active {
  transition: transform .2s ease, opacity .2s ease;
}
.save-bar-enter-from, .save-bar-leave-to {
  transform: translateY(100%);
  opacity: 0;
}

/* Transition fade (bouton Appliquer) */
.fade-enter-active, .fade-leave-active { transition: opacity .2s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* Bannière impersonation super admin */
.impersonation-banner {
  background: #d97706;
  color: #fff;
  font-size: 0.85rem;
  min-height: 34px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* ── Composant planning-grid-cell : case planning compacte ── */
.cal-outer  { overflow-x: auto; }
.cal-grid   { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; min-width: 700px; align-items: stretch; }
/* Mode badges inline : cases plus larges pour accueillir horaire + badges sur une ligne */
.cal-outer.inline-badges .cal-grid { min-width: 1000px; }
.cal-head   { background: #f8f9fa; border: 1px solid #dee2e6; text-align: center; font-weight: 600; font-size: .78rem; padding: 6px 4px; color: #495057; border-radius: 4px 4px 0 0; }
.cal-head.we { color: #adb5bd; }
.cal-cell-7  { background: #fff; border: 1px solid #e9ecef; min-height: 90px; padding: 5px 6px 24px; position: relative; height: 100%; box-sizing: border-box; }
.cal-cell-7.we       { background: #f8f9fa; }
.cal-cell-7.empty    { background: #f8f9fa; border-color: #f0f0f0; }
.cal-cell-7.pending  { border-left: 3px solid #fd7e14; }
.cal-cell-7.modified { border-top: 3px solid #0d6efd; }
.cal-cell-7.selected { background: #e7f1ff; outline: 2px solid #0d6efd; }
.cal-num  { font-weight: 600; font-size: .95rem; color: #212529; }
.cal-tot  { font-size: .78rem; color: #6c757d; }
.cal-abs  { display: block; font-size: .8rem; font-weight: 500; padding: 2px 5px; border-radius: 3px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-sch  { font-size: .82rem; color: #212529; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-svc  { display: inline-block; font-size: .7rem; padding: 1px 5px; border-radius: 4px; margin-top: 2px; white-space: nowrap; }
.cal-actions { position: absolute; bottom: 3px; right: 3px; display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.cal-cell-7:hover .cal-actions { opacity: 1; }
.cal-edit, .cal-history { padding: 0 5px; font-size: .7rem; line-height: 1.6; }
/* Compatibilité : cal-edit utilisé seul (hors PlanningGridCell) */
.cal-edit:not(.cal-actions .cal-edit) { position: absolute; bottom: 3px; right: 3px; opacity: 0.2; transition: opacity 0.15s; }
.cal-cell-7:hover .cal-edit:not(.cal-actions .cal-edit) { opacity: 1; }
.cal-week-num { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); font-size: .65rem; font-weight: 600; color: #adb5bd; line-height: 1; pointer-events: none; white-space: nowrap; }
.cal-pending { display: flex; align-items: center; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.cal-pending-label { font-size: .75rem; font-weight: 600; color: #212529; }
