/* ==========================================================================
   GeoOffice Île-de-France - Feuille de styles principale
   Palette :
   - Bleu-vert très foncé : #0B3F4D (en-têtes, textes, repères clients)
   - Vert menthe vif : #00F5A0 (boutons principaux, accents, repères OM)
   - Gris clair bleuté : #E6EBED (fiches, cartes, sous-surfaces)
   - Blanc : #FFFFFF (fonds secondaires, cartes)
   ========================================================================== */

:root {
  /* Nouvelle palette exigée */
  --brand-dark: #0B3F4D;
  --brand-dark-hover: #072B35;
  --brand-mint: #00F5A0;
  --brand-mint-hover: #00D68C;
  --brand-mint-light: #E6FFF6;
  --brand-gray: #E6EBED;
  --brand-gray-light: #F4F7F8;
  --brand-white: #FFFFFF;

  /* Office Managers (Vert menthe vif avec contraste sombre) */
  --om-primary: #00F5A0;
  --om-hover: #00D68C;
  --om-dark: #086650;
  --om-light: #E6FFF6;
  --om-border: #80FAD0;
  --om-text: #0B3F4D;

  /* Clients (Bleu-vert très foncé) */
  --cli-primary: #0B3F4D;
  --cli-hover: #072B35;
  --cli-light: #EBF3F5;
  --cli-border: #ADC9CF;
  --cli-text: #0B3F4D;

  /* Neutres */
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0B3F4D;

  --success: #10B981;
  --success-light: #ECFDF5;
  --danger: #EF4444;
  --danger-light: #FEF2F2;

  --surface: #FFFFFF;
  --bg-app: #F4F7F8;

  /* Typographie & Rayons */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Ombres douces */
  --shadow-sm: 0 1px 3px rgba(11, 63, 77, 0.06);
  --shadow-md: 0 4px 10px rgba(11, 63, 77, 0.08), 0 2px 4px rgba(11, 63, 77, 0.04);
  --shadow-lg: 0 10px 20px rgba(11, 63, 77, 0.12), 0 4px 8px rgba(11, 63, 77, 0.06);
  --shadow-xl: 0 20px 28px rgba(11, 63, 77, 0.18), 0 8px 12px rgba(11, 63, 77, 0.08);

  --navbar-height: 64px;
  --side-panel-width: 440px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--brand-dark);
  background-color: var(--bg-app);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.hidden { display: none !important; }
.text-danger { color: var(--danger) !important; }

/* ==========================================================================
   Barre de navigation supérieure
   ========================================================================== */
.navbar {
  height: var(--navbar-height);
  background: var(--brand-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 1010;
  box-shadow: var(--shadow-md);
  color: var(--brand-white);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--brand-mint);
  color: var(--brand-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 245, 160, 0.35);
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-white);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-mint);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.brand-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* Recherche globale */
.navbar-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 440px;
  margin: 0 24px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--gray-400);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 9px 36px 9px 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: var(--brand-white);
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-box input:focus {
  background: var(--brand-white);
  color: var(--brand-dark);
  border-color: var(--brand-mint);
  box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.25);
}

.clear-search {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--brand-gray);
  box-shadow: var(--shadow-xl);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1020;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--brand-gray);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--brand-gray-light); }

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-result-icon.icon-om { background: var(--om-light); color: var(--om-dark); }
.search-result-icon.icon-cli { background: var(--cli-light); color: var(--cli-text); }

.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-weight: 600; color: var(--brand-dark); font-size: 13px; }
.search-result-sub { font-size: 11px; color: var(--gray-500); display: flex; gap: 6px; }

.search-empty {
  padding: 24px;
  text-align: center;
  color: var(--gray-500);
  font-size: 13px;
}

/* Navbar Droite & Compteurs */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand-white);
}

.stat-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-om { background: var(--brand-mint); }
.dot-cli { background: #FFFFFF; }

.pill-label { color: rgba(255, 255, 255, 0.75); font-weight: 500; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-mint);
  color: var(--brand-dark);
}
.btn-primary:hover {
  background: var(--brand-mint-hover);
  box-shadow: 0 2px 8px rgba(0, 245, 160, 0.35);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--gray-300);
  color: var(--brand-dark);
}
.btn-secondary:hover {
  background: var(--brand-gray);
  border-color: var(--gray-400);
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}
.btn-danger:hover { background: #DC2626; }

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-block { width: 100%; }

.btn-icon-only {
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  color: var(--brand-white);
}
.btn-icon-only:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--brand-white);
}

.btn-text {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
}

/* Dropdown menus */
.dropdown-wrapper { position: relative; }

.menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  min-width: 220px;
  padding: 6px;
  z-index: 1030;
}

.menu-dropdown-right {
  left: auto;
  right: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--brand-dark);
  transition: background var(--transition-fast);
}

.dropdown-item:hover { background: var(--brand-gray-light); }

.dropdown-item-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-item-icon.icon-om { background: var(--om-light); color: var(--om-dark); }
.dropdown-item-icon.icon-cli { background: var(--cli-light); color: var(--cli-text); }

.dropdown-item-title { font-weight: 700; color: var(--brand-dark); font-size: 13px; }
.dropdown-item-desc { font-size: 11px; color: var(--gray-500); }

.dropdown-divider {
  height: 1px;
  background: var(--brand-gray);
  margin: 4px 0;
}

/* ==========================================================================
   Conteneur Principal (Layout Carte & Volet)
   ========================================================================== */
.main-layout {
  position: relative;
  height: calc(100vh - var(--navbar-height));
  width: 100vw;
  overflow: hidden;
  display: flex;
}

.map-container {
  flex: 1;
  height: 100%;
  width: 100%;
  z-index: 1;
  background-color: var(--brand-gray);
}

/* Rendu épuré et clair pour OpenStreetMap */
.leaflet-tile-pane {
  filter: grayscale(0.85) contrast(0.95) brightness(1.05);
}

.leaflet-top.leaflet-left {
  top: 16px;
  left: auto;
  right: 16px;
}

/* ==========================================================================
   Bouton Flottant Latéral Droit & Bouton Réinitialiser
   ========================================================================== */
.floating-drawer-btn {
  position: absolute;
  top: 16px;
  right: 64px; /* à côté du zoom Leaflet */
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--brand-dark);
  color: var(--brand-mint);
  border: 1px solid rgba(0, 245, 160, 0.4);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.floating-drawer-btn:hover {
  background: var(--brand-dark-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.reset-highlight-btn {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--brand-dark);
  border: 1.5px solid var(--brand-dark);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.reset-highlight-btn:hover {
  background: var(--brand-mint-light);
  border-color: var(--om-dark);
}

/* ==========================================================================
   Légende Flottante
   ========================================================================== */
.map-legend-card {
  position: absolute;
  bottom: 24px;
  right: 20px; /* bottom-droite : ne chevauche jamais l'aide ni la présence du jour (haut-gauche) */
  left: auto;
  z-index: 999;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  width: 260px;
  user-select: none;
}

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

.legend-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
}

.legend-reset-btn {
  background: var(--brand-gray);
  border: 1px solid var(--gray-300);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-reset-btn:hover {
  background: var(--brand-mint);
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.legend-item:hover { background: var(--brand-gray-light); }

.legend-item input[type="checkbox"] { display: none; }

.custom-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  flex-shrink: 0;
}

.legend-item input[type="checkbox"]:checked + .custom-checkbox {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.legend-item input[type="checkbox"]:checked + .custom-checkbox::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid var(--brand-mint);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.legend-marker-preview {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.marker-om-bg { background: var(--brand-mint); border: 1.5px solid #FFFFFF; }
.marker-cli-bg { background: var(--brand-dark); border: 1.5px solid #FFFFFF; }

.legend-label { font-size: 13px; font-weight: 600; color: var(--brand-dark); flex: 1; }
.legend-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--brand-gray);
  color: var(--brand-dark);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.legend-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--brand-gray);
}
.legend-hint { font-size: 11px; color: var(--gray-500); font-style: italic; text-align: center; display: block; }

/* ==========================================================================
   Repères Leaflet & Photos sur la carte
   ========================================================================== */
.custom-map-marker {
  background: transparent;
  border: none;
}

/* Repère standard sans photo */
.marker-pin {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(11, 63, 77, 0.35);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  position: relative;
}

.marker-pin-inner {
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-pin-om {
  background: var(--brand-mint);
  border: 2.5px solid #FFFFFF;
  color: var(--brand-dark);
}

.marker-pin-cli {
  background: var(--brand-dark);
  border: 2.5px solid #FFFFFF;
  color: #FFFFFF;
}

.marker-pin:hover {
  transform: rotate(-45deg) scale(1.15);
  box-shadow: 0 6px 16px rgba(11, 63, 77, 0.45);
  z-index: 1000 !important;
}

/* Repère avec Photo (Vignette ronde 40px + pointeur) */
.marker-photo-wrapper {
  position: relative;
  width: 40px;
  height: 48px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.marker-photo-pin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(11, 63, 77, 0.35);
  overflow: hidden;
  position: relative;
}

.marker-photo-pin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.marker-photo-pointer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.photo-pin-om .marker-photo-pin {
  border: 3px solid var(--brand-mint);
}
.photo-pin-om .marker-photo-pointer {
  border-top: 8px solid var(--brand-mint);
}

.photo-pin-cli .marker-photo-pin {
  border: 3px solid var(--brand-dark);
}
.photo-pin-cli .marker-photo-pointer {
  border-top: 8px solid var(--brand-dark);
}

.marker-photo-wrapper:hover {
  transform: scale(1.18);
  z-index: 1000 !important;
}

/* Repères atténués / dimmed */
.marker-dimmed {
  opacity: 0.22 !important;
  filter: grayscale(0.5);
  transition: opacity 0.25s ease;
}

/* Étiquettes permanentes en GRAS */
.permanent-marker-label {
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--brand-dark) !important;
  border: 1.5px solid var(--brand-dark) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 4px 14px rgba(11, 63, 77, 0.25) !important;
  font-family: var(--font-sans) !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  padding: 4px 10px !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.permanent-marker-label::before {
  border-top-color: var(--brand-dark) !important;
}

/* Infobulles standards Leaflet */
.custom-leaflet-tooltip {
  background: var(--surface) !important;
  color: var(--brand-dark) !important;
  border: 1px solid var(--brand-gray) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 6px 10px !important;
  font-family: var(--font-sans) !important;
  font-size: 12px !important;
}

/* ==========================================================================
   Volet Latéral Droit (Drawer) à 3 Onglets
   ========================================================================== */
.side-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--side-panel-width);
  background: var(--surface);
  border-left: 1px solid var(--brand-gray);
  box-shadow: -4px 0 25px rgba(11, 63, 77, 0.12);
  z-index: 1005;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.side-panel.open {
  transform: translateX(0);
}

.side-panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand-dark);
  color: var(--brand-white);
}

.drawer-tabs-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.drawer-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.drawer-tab-btn:hover {
  color: var(--brand-white);
  background: rgba(255, 255, 255, 0.08);
}

.drawer-tab-btn.active {
  color: var(--brand-mint);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.drawer-fiche-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.side-panel-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.badge-om { background: var(--brand-mint); color: var(--brand-dark); }
.badge-cli { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; }

.close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg-app);
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tab-pane.active {
  display: flex;
}

/* ==========================================================================
   ONGLET 1 : LISTE (OM & CLIENTS)
   ========================================================================== */
.list-tab-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subtabs-segmented {
  display: flex;
  background: var(--brand-gray);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.subtab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.subtab-btn.active {
  background: var(--surface);
  color: var(--brand-dark);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.subtab-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(11, 63, 77, 0.1);
  color: var(--brand-dark);
}

.list-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-search-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.list-search-box svg {
  position: absolute;
  left: 10px;
  color: var(--gray-400);
  pointer-events: none;
}

.list-search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 13px;
  outline: none;
}

.list-search-box input:focus {
  border-color: var(--brand-dark);
}

.entity-rows-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.entity-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.entity-row-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-dark);
}

.entity-row-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-gray);
}

.entity-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-om-placeholder {
  background: var(--brand-mint);
  color: var(--brand-dark);
}

.avatar-cli-placeholder {
  background: var(--brand-dark);
  color: #FFFFFF;
}

.entity-row-info {
  flex: 1;
  min-width: 0;
}

.entity-row-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-row-meta {
  font-size: 11px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.entity-attach-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--brand-gray);
  color: var(--brand-dark);
}

.entity-row-actions {
  display: flex;
  align-items: center;
}

.btn-row-delete {
  background: none;
  border: none;
  color: var(--gray-400);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-row-delete:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ==========================================================================
   ONGLET 2 : TRAJETS EN TRANSPORTS 
   ========================================================================== */
.pane-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pane-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  margin-bottom: 12px;
}

.trip-form-card {
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.trip-inputs-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trip-point-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-from { background: var(--brand-mint); border: 1.5px solid var(--brand-dark); }
.dot-to { background: var(--brand-dark); border: 1.5px solid #FFFFFF; }

.trip-swap-row {
  display: flex;
  justify-content: center;
  margin: -4px 0;
}

.btn-swap-trip {
  background: var(--brand-gray);
  border: 1px solid var(--gray-300);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-swap-trip:hover {
  background: var(--brand-mint);
}

.trip-time-options {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.trip-results-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trip-placeholder {
  background: var(--surface);
  border: 1px dashed var(--brand-gray);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  color: var(--gray-500);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Résumé du trajet */
.trip-summary-card {
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.trip-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.trip-duration-badge {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-dark);
}

.trip-badge-api {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.badge-api-real { background: var(--brand-mint-light); color: var(--om-dark); border: 1px solid var(--om-border); }
.badge-api-approx { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }

.trip-schedule-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--gray-700);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--brand-gray);
}

/* Timeline des étapes */
.trip-steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.trip-step-item {
  display: flex;
  gap: 12px;
  position: relative;
}

.trip-step-icon-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-icon-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.step-bubble-walk { background: var(--brand-gray); color: var(--brand-dark); }
.step-bubble-transit { background: var(--brand-dark); color: #FFFFFF; }

.step-line-bar {
  flex: 1;
  width: 2px;
  background: var(--brand-gray);
  margin-top: 4px;
  margin-bottom: 4px;
}

.trip-step-content {
  flex: 1;
  padding-bottom: 8px;
}

.step-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-dark);
}

.step-transit-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF;
}

.step-details-meta {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ==========================================================================
   ONGLET 3 : PARAMÈTRES
   ========================================================================== */
.settings-steps-list {
  padding-left: 20px;
  font-size: 12px;
  color: var(--gray-700);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

.settings-note {
  font-size: 11px;
  color: var(--gray-500);
  background: var(--brand-gray-light);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand-mint);
}

.settings-status-box {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.status-configured { background: var(--brand-mint-light); color: var(--om-dark); border: 1px solid var(--om-border); }
.status-missing { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

/* ==========================================================================
   FICHE DÉTAILLÉE (DANS LE VOLET)
   ========================================================================== */
.fiche-detail-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* En-tête de la fiche avec Photo */
.fiche-hero-card {
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.fiche-photo-zone {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.fiche-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fiche-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fiche-photo-btn-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 63, 77, 0.7);
  color: #FFFFFF;
  font-size: 10px;
  text-align: center;
  padding: 2px 0;
  cursor: pointer;
}

.fiche-hero-info {
  flex: 1;
  min-width: 0;
}

.fiche-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.25;
}

.fiche-city {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 600;
  margin-top: 2px;
}

/* Raccourcis Trajets Départ / Arrivée */
.fiche-trip-shortcuts {
  display: flex;
  gap: 8px;
}

.btn-trip-shortcut {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid var(--brand-gray);
  background: var(--surface);
  color: var(--brand-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-trip-shortcut:hover {
  background: var(--brand-gray-light);
  border-color: var(--brand-dark);
}

.btn-trip-shortcut.shortcut-from:hover {
  background: var(--brand-mint-light);
  border-color: var(--brand-mint);
}

/* Section Cartes internes */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  padding: 14px;
}

.panel-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-address-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--brand-dark);
}

.panel-contact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--brand-gray);
  font-size: 12px;
}

.panel-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-600);
}

/* Section Relations Tags */
.relationships-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.relation-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.relation-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.relation-tag:hover {
  border-color: var(--brand-dark);
  background: var(--brand-gray-light);
}

.relation-tag-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tag-icon-om { background: var(--brand-mint); color: var(--brand-dark); }
.tag-icon-cli { background: var(--brand-dark); color: #FFFFFF; }

.relation-tag-remove {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
}
.relation-tag-remove:hover { color: var(--danger); }

.relation-empty-msg {
  font-size: 12px;
  color: var(--gray-400);
  font-style: italic;
}

/* Zone d'ajout de liaison avec popover */
.relation-add-wrapper { position: relative; }

.relation-add-btn {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.relation-add-btn:hover {
  background: var(--brand-mint-light);
  border-color: var(--brand-mint);
}

.relation-select-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 10;
}

.relation-select-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 6px;
  outline: none;
}

.relation-select-options {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.relation-select-option {
  padding: 6px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.relation-select-option:hover { background: var(--brand-gray); }

/* Boutons d'action dans le panneau */
.panel-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--brand-gray);
}
.panel-actions .btn { flex: 1; }

/* ==========================================================================
   Modales & Formulaires
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 63, 77, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-dialog-sm { max-width: 400px; }

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--brand-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-dark);
}

.modal-body {
  padding: 20px;
  font-size: 14px;
  color: var(--gray-700);
}

#entity-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-col { flex: 1; }

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-500);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--brand-dark);
  background: var(--surface);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(11, 63, 77, 0.12);
}

/* Zone Uploader Photo dans le modal */
.photo-uploader-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--brand-gray-light);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.photo-preview-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #FFFFFF;
  box-shadow: var(--shadow-sm);
}

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

.photo-uploader-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

/* Bascule Type Segmentée */
.type-segmented-control {
  display: flex;
  background: var(--brand-gray);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.segment-option { flex: 1; cursor: pointer; }
.segment-option input { display: none; }

.segment-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
}

.segment-om input:checked + .segment-indicator {
  background: var(--brand-mint);
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.segment-cli input:checked + .segment-indicator {
  background: var(--brand-dark);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

/* Autocomplétion BAN */
.autocomplete-container { position: relative; }

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--gray-400);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 36px;
  padding-right: 36px;
}

.suggestions-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-height: 220px;
  overflow-y: auto;
  z-index: 2010;
}

.suggestion-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--brand-gray);
  cursor: pointer;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--brand-mint-light); }

.suggestion-main { font-weight: 700; font-size: 13px; color: var(--brand-dark); }
.suggestion-context { font-size: 11px; color: var(--gray-500); }

.address-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 8px;
  background: var(--brand-mint-light);
  color: var(--om-dark);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.checkbox-select-list {
  max-height: 130px;
  overflow-y: auto;
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--brand-gray-light);
}

.checkbox-select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
}
.checkbox-select-item:hover { background: var(--surface); }

.modal-footer {
  padding: 14px 20px;
  background: var(--brand-gray-light);
  border-top: 1px solid var(--brand-gray);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3000;
  pointer-events: none;
}

.toast {
  background: var(--brand-dark);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  border-left: 4px solid var(--brand-mint);
}

.toast-success { border-left-color: var(--brand-mint); }
.toast-danger { border-left-color: var(--danger); }

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

/* ==========================================================================
   Responsive & Mobile
   ========================================================================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 12px;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .navbar-search-wrapper {
    order: 3;
    max-width: 100%;
    margin: 4px 0 0 0;
    width: 100%;
  }

  .main-layout {
    height: calc(100vh - 108px);
  }

  .stats-pills { display: none; }

  .floating-drawer-btn {
    top: 12px;
    right: 56px;
    padding: 7px 12px;
  }

  .side-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 82vh;
    border-left: none;
    border-top: 2px solid var(--brand-mint);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
  }

  .side-panel.open {
    transform: translateY(0);
  }

  .map-legend-card {
    bottom: 16px;
    right: 12px;
    left: auto;
    width: 200px;
    padding: 10px 12px;
  }
}

/* ==========================================================================
   Bouton & Bloc Google Maps
   ========================================================================== */
.trip-gmaps-box {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-gmaps {
  background: #1A73E8;
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.35);
  transition: all var(--transition-fast);
}

.btn-gmaps:hover {
  background: #1557B0;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.45);
  transform: translateY(-1px);
}

.gmaps-note {
  font-size: 11px;
  color: var(--gray-500);
  font-style: italic;
  text-align: center;
}

/* ==========================================================================
   Bouton d'Aide Flottant & Décalage Attribution Leaflet
   ========================================================================== */
.leaflet-bottom.leaflet-right {
  margin-right: 12px !important;
  margin-bottom: 152px !important; /* reste visible sous la légende Filtres, à droite */
}

.help-floating-btn {
  position: fixed;
  top: calc(var(--navbar-height) + 16px);
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-mint);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 20px;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 4px 14px rgba(11, 63, 77, 0.35);
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.help-floating-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 18px rgba(11, 63, 77, 0.45);
  background: var(--brand-mint-hover);
}

/* ==========================================================================
   Modale d'Aide & Guide d'Utilisation
   ========================================================================== */
.modal-dialog-help {
  max-width: 620px;
}

.help-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-badge-icon {
  font-size: 20px;
}

.help-modal-body {
  max-height: 65vh;
  overflow-y: auto;
  padding: 16px 20px;
}

.help-intro-lead {
  font-size: 13px;
  color: var(--brand-dark);
  margin-bottom: 14px;
  line-height: 1.5;
  background: var(--brand-mint-light);
  border-left: 3px solid var(--brand-mint);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.help-accordions-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-accordion {
  background: var(--surface);
  border: 1px solid var(--brand-gray);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.help-accordion[open] {
  border-color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.help-summary {
  padding: 11px 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  background: var(--brand-gray-light);
}

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

.help-summary:hover {
  background: var(--brand-gray);
}

.help-chevron {
  font-size: 14px;
  color: var(--gray-500);
  transition: transform 0.2s ease;
}

.help-accordion[open] .help-chevron {
  transform: rotate(180deg);
}

.help-accordion-content {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--brand-dark);
  line-height: 1.5;
  border-top: 1px solid var(--brand-gray);
  background: var(--surface);
}

.help-accordion-content ul,
.help-accordion-content ol {
  padding-left: 20px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.help-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.help-hide-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-600);
  cursor: pointer;
}

.help-hide-label input {
  cursor: pointer;
}


/* Connexion (mode partagé) */
.login-overlay { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0B3F4D 0%, #0B3F4D 60%, #00F5A0 140%); padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: #fff; border-radius: 16px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.login-card h2 { margin: 0; color: #0B3F4D; font-size: 22px; }
.login-card p { margin: 0 0 4px; color: #4b5b62; font-size: 14px; }
.login-card .login-error { color: #B42318; font-size: 13px; min-height: 18px; margin: 0; }
.btn-text-link { background: none; border: 0; color: #0B3F4D; text-decoration: underline; cursor: pointer; font-size: 13px; }

/* Planning de la semaine & logiciels (fiche OM) */
.plan-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.plan-day { border: 0; border-radius: 10px; padding: 9px 0 8px; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 4px; background: var(--brand-gray); transition: transform .12s, box-shadow .12s; font-family: inherit; }
.plan-day:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(11,63,77,.18); }
.plan-day.empty { background: transparent; border: 1.5px dashed #b9c4c9; color: #7b8b92; }
.plan-day-name { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; opacity: .85; }
.plan-day-val { font-size: 12px; font-weight: 700; min-height: 16px; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--brand-dark); }
.plan-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.plan-hint { font-size: 11px; color: #7b8b92; margin-top: 6px; }
.soft-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.soft-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,245,160,.18); color: #0B3F4D;
  border: 1px solid rgba(0,245,160,.6); padding: 4px 6px 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.soft-chip button { border: 0; background: rgba(11,63,77,.14); color: #0B3F4D; width: 16px; height: 16px; border-radius: 50%;
  cursor: pointer; line-height: 1; font-size: 12px; padding: 0; }
.soft-chip button:hover { background: #0B3F4D; color: #fff; }
.soft-add { display: flex; gap: 6px; }
.soft-add .form-input { flex: 1; min-width: 0; }
.list-alert-chip { display: block; width: 100%; text-align: left; border: 1px solid #F5A524; background: rgba(245,165,36,.12);
  color: #0B3F4D; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  margin-bottom: 8px; font-family: inherit; }
.list-alert-chip.active { background: #F5A524; }

/* Corbeille */
.trash-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--brand-gray);
  border-radius: 10px; background: #fff; }
.trash-row-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.trash-row-info { flex: 1; min-width: 0; }
.trash-row-name { font-weight: 600; font-size: 13.5px; color: var(--brand-dark); }
.trash-row-meta { font-size: 11.5px; color: #7b8b92; }

/* Regroupement de repères (clusters) : rendu plus doux et plus lisible */
.custom-cluster-icon { display: flex; align-items: center; justify-content: center; }
.cluster-badge {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 4px 14px rgba(11,63,77,.32), 0 0 0 4px rgba(255,255,255,.35);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.cluster-badge:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(11,63,77,.4), 0 0 0 5px rgba(255,255,255,.45); }
.cluster-badge span { line-height: 1; letter-spacing: -.02em; }
.cluster-badge-om { background: radial-gradient(circle at 35% 30%, #26e6a3, #00C880 70%); color: #0B3F4D; }
.cluster-badge-cli { background: radial-gradient(circle at 35% 30%, #16607a, #0B3F4D 70%); color: #fff; }

/* Présence du jour (barre latérale gauche) */
.today-presence-card {
  position: fixed;
  top: calc(var(--navbar-height) + 68px);
  left: 16px;
  z-index: 900;
  width: 190px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border: 1px solid var(--brand-gray);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(11, 63, 77, 0.14);
  overflow: hidden;
  transition: opacity .2s;
}
.today-presence-header {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, #0B3F4D, #0e5266);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
}
#today-presence-caret { transition: transform .2s; opacity: .8; }
.today-presence-card.collapsed #today-presence-caret { transform: rotate(-90deg); }
.today-presence-card.collapsed .today-presence-body { display: none; }
.today-presence-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 9px; }
.presence-row-top { display: flex; align-items: center; gap: 6px; }
.presence-emoji { font-size: 14px; }
.presence-label { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--brand-dark); }
.presence-count { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 1px 8px; min-width: 20px; text-align: center; }
.presence-bar-track { height: 5px; border-radius: 999px; background: var(--brand-gray); margin-top: 4px; overflow: hidden; }
.presence-bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.presence-none { font-size: 11px; color: #7b8b92; text-align: center; padding-top: 2px; border-top: 1px dashed var(--brand-gray); }
.presence-weekend { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--brand-dark); line-height: 1.5; }
.presence-weekend span { font-weight: 400; font-size: 11px; color: #7b8b92; }

@media (max-width: 640px) {
  .today-presence-card { width: 150px; }
}

/* Staffing */
.staff-grid { display: grid; grid-template-columns: 52px repeat(5, 1fr); gap: 4px; align-items: center; }
.staff-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: #7b8b92; text-align: center; letter-spacing: .03em; }
.staff-cell { width: 100%; min-height: 34px; border: 0; border-radius: 8px; color: #fff; font-size: 10px; font-weight: 700; line-height: 1.1;
  padding: 3px 2px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; font-family: inherit; transition: transform .12s, box-shadow .12s; }
.staff-cell:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(11,63,77,.25); }
.staff-cell.empty { background: #FBE3E3; color: #c0525a; font-size: 15px; font-weight: 600; }
.staff-cell.gone { background: #E6EBED; color: #7b8b92; font-weight: 600; }
.staff-rate { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.staff-rate strong { font-size: 22px; min-width: 62px; }
.staff-rate span { font-size: 11px; color: #7b8b92; white-space: nowrap; }
.staff-rate-track { flex: 1; height: 8px; border-radius: 999px; background: var(--brand-gray); overflow: hidden; }
.staff-rate-track div { height: 100%; border-radius: 999px; transition: width .4s ease; }
.staff-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.staff-dates label { font-size: 11.5px; font-weight: 600; color: var(--brand-dark); display: flex; flex-direction: column; gap: 4px; }
.staff-badges { margin-top: 8px; }
.staff-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin: 2px 4px 2px 0; }
.staff-badge.in { background: rgba(0,245,160,.25); color: #0B3F4D; border: 1px solid rgba(0,245,160,.7); }
.staff-badge.out { background: #FDE2E2; color: #B42318; }
.staff-badge.gone { background: #E6EBED; color: #5b6b72; }
.prop-item { display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border: 1px solid var(--brand-gray); border-radius: 10px; margin-bottom: 6px; background: #fff; }
.prop-text { flex: 1; font-size: 12.5px; color: var(--brand-dark); line-height: 1.4; }
.prop-text small { display: block; color: #7b8b92; font-size: 10.5px; }
.prop-btn { border: 0; background: var(--brand-gray); width: 24px; height: 24px; border-radius: 6px; cursor: pointer; color: var(--brand-dark); }
.prop-btn:hover { background: var(--brand-dark); color: #fff; }
.prop-add { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.picker-overlay { position: fixed; inset: 0; z-index: 2500; background: rgba(11,63,77,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.picker-card { width: 100%; max-width: 380px; max-height: 80vh; background: #fff; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.picker-title { font-weight: 700; color: var(--brand-dark); font-size: 14px; }
.picker-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 80px; }
.picker-row { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: var(--brand-gray); border-radius: 8px; padding: 9px 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand-dark); font-family: inherit; }
.picker-row:hover { background: rgba(0,245,160,.3); }
.picker-row i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.picker-row small { margin-left: auto; font-weight: 400; color: #7b8b92; }
.staffing-view { position: fixed; inset: 0; z-index: 1500; background: #f4f7f8; display: flex; flex-direction: column; }
.staffing-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: linear-gradient(135deg, #0B3F4D, #0e5266); color: #fff; }
.staffing-head h2 { margin: 0; font-size: 19px; }
.staffing-summary { font-size: 13px; opacity: .95; margin-top: 2px; }
.staffing-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.staffing-tools .form-input { width: auto; padding: 7px 10px; font-size: 13px; }
.staffing-check { font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.staffing-alerts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px; }
.staffing-alerts span { margin-top: 10px; background: #fff; border: 1px solid var(--brand-gray); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--brand-dark); }
.staffing-scroll { flex: 1; overflow: auto; padding: 14px 20px 24px; }
.staffing-table { border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 14px; box-shadow: 0 6px 20px rgba(11,63,77,.1); min-width: 1100px; width: 100%; }
.staffing-table th, .staffing-table td { padding: 5px; border-bottom: 1px solid var(--brand-gray); font-size: 12px; color: var(--brand-dark); vertical-align: middle; }
.staffing-table thead th { position: sticky; top: 0; background: var(--brand-gray); z-index: 2; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.staffing-table thead tr:nth-child(2) th { top: 30px; }
.staffing-table .day-h { border-left: 2px solid #fff; text-align: center; }
.staffing-table .sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; min-width: 170px; }
.staffing-table thead .sticky-col { background: var(--brand-gray); z-index: 3; }
.staffing-table td { min-width: 78px; }
.staffing-table .rate-cell { min-width: 90px; text-align: center; }
.staffing-table .props-cell { min-width: 190px; font-size: 11.5px; }
.staffing-table .dates-cell { min-width: 110px; font-size: 11.5px; }
.staffing-table tr.is-gone { opacity: .5; }
.staff-om-link { display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font-weight: 700; color: var(--brand-dark); font-size: 13px; font-family: inherit; padding: 2px; }
.staff-om-link:hover { text-decoration: underline; }
.staff-avatar { width: 26px; height: 26px; border-radius: 50%; background: rgba(0,245,160,.35); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-size: 13px; flex-shrink: 0; }
.staff-avatar img { width: 100%; height: 100%; object-fit: cover; }
.muted { color: #9aa8ae; }
.staffing-empty { text-align: center; padding: 60px 20px; color: var(--brand-dark); font-weight: 600; line-height: 2.2; }

/* Staffing : jours, anglais, dates proches, pied de tableau, pop-up OM */
.mini-select { border: 1px solid var(--brand-gray); border-radius: 8px; padding: 4px 4px; font-size: 12px; font-family: inherit; color: var(--brand-dark); background: #fff; cursor: pointer; }
.date-input { border: 1px solid var(--brand-gray); border-radius: 8px; padding: 4px 6px; font-size: 11.5px; font-family: inherit; color: var(--brand-dark); background: #fff; width: 122px; }
.date-input.soon { color: #B42318; border-color: #E5484D; background: #FDE2E2; font-weight: 700; }
.staff-badge.soon { background: #FDE2E2; color: #B42318; border: 1px solid #E5484D; }
.staffing-alerts span.soon { background: #FDE2E2; border-color: #E5484D; color: #B42318; }
.staffing-table tfoot th, .staffing-table tfoot td { position: sticky; bottom: 0; background: #E6EBED; font-weight: 700; z-index: 2; border-bottom: 0; }
.staffing-table tfoot .sticky-col { z-index: 3; }
.team-bar small { display: block; margin-top: 4px; font-weight: 600; color: #5b6b72; }
.today-presence-card.focus { width: 238px; }
.pf-slot { padding: 6px 0; border-top: 1px dashed var(--brand-gray); }
.pf-slot:first-child { border-top: 0; padding-top: 0; }
.pf-when { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: #7b8b92; letter-spacing: .03em; }
.pf-name { font-size: 13px; font-weight: 800; margin-top: 2px; }
.pf-addr { font-size: 11.5px; color: var(--brand-dark); margin-top: 2px; line-height: 1.35; }
.pf-none { font-size: 12px; color: #9aa8ae; margin-top: 2px; }
.staffing-tools .staffing-check .form-input { padding: 5px 6px; }

.addr-check { font-size: 12px; font-weight: 600; color: var(--brand-dark); text-decoration: underline; }
.addr-check:hover { color: #00A870; }

/* ===== Niveau d'anglais en couleur (A = bas, C = haut) ===== */
.eng-badge { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-left: 6px; letter-spacing: .02em; color: #fff; vertical-align: middle; }
.eng-badge.lvl-A { background: #F5A524; color: #0B3F4D; }
.eng-badge.lvl-B { background: #2F9BE8; }
.eng-badge.lvl-C { background: #00C880; color: #0B3F4D; }
select[data-lvl="A"] { background-color: rgba(245,165,36,.22); border-color: #F5A524; font-weight: 700; }
select[data-lvl="B"] { background-color: rgba(47,155,232,.18); border-color: #2F9BE8; font-weight: 700; }
select[data-lvl="C"] { background-color: rgba(0,200,128,.22); border-color: #00C880; font-weight: 700; }

/* ===== Finitions esthétiques ===== */
::selection { background: rgba(0,245,160,.45); color: #0B3F4D; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
* { scrollbar-width: thin; scrollbar-color: #b9c8ce transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #b9c8ce; border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: #8fa5ad; }
.navbar { box-shadow: 0 2px 14px rgba(11,63,77,.18); }
.btn { transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, filter .15s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(11,63,77,.18); }
.btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 4px 14px rgba(0,245,160,.4); }
.btn:focus-visible, .form-input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid #00F5A0; outline-offset: 2px; }
.form-input { transition: border-color .15s ease, box-shadow .15s ease; }
.form-input:focus { border-color: #00C880; box-shadow: 0 0 0 3px rgba(0,245,160,.25); outline: none; }
.panel-card { border: 1px solid rgba(11,63,77,.06); box-shadow: 0 2px 10px rgba(11,63,77,.06); transition: box-shadow .2s ease; }
.panel-card:hover { box-shadow: 0 6px 18px rgba(11,63,77,.1); }
.panel-section-title { display: flex; align-items: center; gap: 8px; }
.panel-section-title::before { content: ""; width: 4px; height: 14px; border-radius: 4px; background: linear-gradient(180deg, #00F5A0, #00C880); flex-shrink: 0; }
.map-legend-card { box-shadow: 0 8px 26px rgba(11,63,77,.16); }
.today-presence-card { box-shadow: 0 10px 28px rgba(11,63,77,.18); animation: popIn .25s ease; }
.login-card, .picker-card { animation: popIn .22s ease; }
.leaflet-container { font-family: inherit; }
.leaflet-control-zoom a { color: #0B3F4D !important; transition: background-color .15s; }
.leaflet-control-zoom a:hover { background-color: #E6EBED !important; }
.staffing-table tbody tr:hover td, .staffing-table tbody tr:hover th.sticky-col { background: #f1faf6; }
.staffing-table tbody tr:nth-child(even) td, .staffing-table tbody tr:nth-child(even) th.sticky-col { background: #fafcfc; }
.staffing-table tbody tr:nth-child(even):hover td, .staffing-table tbody tr:nth-child(even):hover th.sticky-col { background: #f1faf6; }
.staffing-head h2 { letter-spacing: -.01em; }
.staff-cell { box-shadow: 0 1px 3px rgba(11,63,77,.12); }
.trash-row, .prop-item, .picker-row { transition: box-shadow .15s ease, background-color .15s ease; }
.trash-row:hover, .prop-item:hover { box-shadow: 0 3px 10px rgba(11,63,77,.1); }
@keyframes popIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Propales : besoin en demi-journées */
.need-picker-label { font-size: 11px; font-weight: 700; color: var(--brand-dark); margin: 4px 0 4px; }
.staff-grid.need-picker { margin-bottom: 8px; }
.need-toggle { width: 100%; min-height: 26px; border: 1.5px dashed #b9c4c9; border-radius: 8px; background: #fff; cursor: pointer; transition: all .12s; }
.need-toggle:hover { border-color: #00C880; }
.need-toggle.on { background: linear-gradient(135deg, #00F5A0, #00C880); border: 1.5px solid #00C880; box-shadow: 0 2px 6px rgba(0,200,128,.35); }
.need-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.need-row span { font-size: 10.5px; font-weight: 700; color: #0B3F4D; background: rgba(0,245,160,.25); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.need-mini { display: flex; gap: 2px; }
.need-mini i { width: 7px; height: 7px; border-radius: 2px; background: var(--brand-gray); display: inline-block; }
.need-mini i.on { background: #00C880; }

.clients-table td, .clients-table th { min-width: auto; }

.staffed-om-cell { min-width: 220px; }
.client-om-chip { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; flex-wrap: wrap; }
.client-om-chip .staff-om-link { font-size: 12px; padding: 0; }
.client-om-days { font-size: 10.5px; color: #5b6b72; background: var(--brand-gray); border-radius: 999px; padding: 1px 8px; }

/* ===== Notice du jour : staffé / non staffé (matin + après-midi) ===== */
.presence-half + .presence-half { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--brand-gray); }
.presence-half-title { font-size: 12px; font-weight: 700; color: var(--brand-dark); margin-bottom: 6px; }

/* ===== Comptes rendus (fiche Client) ===== */
.reports-list { display: flex; flex-direction: column; gap: 10px; }
.report-item { border: 1px solid rgba(11,63,77,.08); border-radius: 10px; padding: 10px 12px; background: #fbfcfc; }
.report-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.report-item-head strong { color: var(--brand-dark); margin-right: 6px; }
.report-date { font-size: 11px; color: var(--gray-500); }
.report-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.report-body { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--brand-dark); overflow: hidden; max-height: 4.6em; word-wrap: break-word; }
.report-item.expanded .report-body { max-height: none; }
.report-toggle { margin-top: 4px; background: none; border: none; padding: 0; font-size: 11.5px; font-weight: 600; color: var(--brand-teal, #0f766e); cursor: pointer; }
.report-toggle.hidden { display: none; }
.report-editor-card { max-width: 480px; }
.report-field-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--brand-dark); }
.report-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.report-tool-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(11,63,77,.15); background: #fff; cursor: pointer; font-size: 13px; }
.report-tool-btn:hover { background: var(--brand-gray); }
.report-color-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(11,63,77,.2); cursor: pointer; padding: 0; }
.report-color-swatch:hover { box-shadow: 0 0 0 2px rgba(11,63,77,.4); }
.report-editable {
  min-height: 140px; max-height: 50vh; overflow-y: auto;
  border: 1px solid rgba(11,63,77,.15); border-radius: 10px; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.55; color: var(--brand-dark); background: #fff;
}
.report-editable:focus { outline: none; border-color: #00C880; box-shadow: 0 0 0 3px rgba(0,245,160,.25); }
.report-editable:empty:before { content: attr(data-placeholder); color: var(--gray-400); }
.picker-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* Trajet rapide */
.quick-trip-card { max-width: 460px; }
.quick-trip-sub { font-size: 12.5px; color: #5b6b72; margin-top: -4px; }
.quick-input-wrap { position: relative; }
.quick-point-badge { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--brand-gray); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; color: var(--brand-dark); }
.quick-om-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.quick-om-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #7b8b92; margin-top: 2px; }
.quick-om-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--brand-gray); border-radius: 12px; background: #fff; }
.quick-om-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quick-om-info strong { font-size: 13px; color: var(--brand-dark); }
.quick-om-info small { font-size: 11px; color: #7b8b72; }


/* ==========================================================================
   Comptes & droits : ce qui est réservé à l'administrateur
   ========================================================================== */
body:not(.is-admin) .admin-only { display: none !important; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 4px 0; color: var(--brand-dark); }
.account-row span { color: #5b6b72; }
.account-row code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; background: var(--brand-gray);
  padding: 2px 10px; border-radius: 8px; letter-spacing: .06em; user-select: all; }

/* ==========================================================================
   Téléphone & tablette
   ========================================================================== */
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.navbar { flex-shrink: 0; }
.main-layout { flex: 1; min-height: 0; height: auto; }

@media (max-width: 1100px) {
  .nav-label, .brand-subtitle, .stats-pills { display: none; }
}

@media (max-width: 768px) {
  .navbar { row-gap: 6px; }
  .brand-badge { display: none; }
  .brand-text h1 { font-size: 15px; }
  .brand-icon { width: 34px; height: 34px; }
  .navbar-right { gap: 6px; }
  .navbar-right .btn { padding: 8px 10px; font-size: 15px; min-height: 38px; }

  /* 16 px : évite le zoom automatique d'iOS quand on touche un champ */
  input, select, textarea, .form-input, .mini-select, .date-input { font-size: 16px !important; }

  .leaflet-control-zoom { display: none; } /* on zoome avec deux doigts */
  .floating-drawer-btn { right: 12px; }
  .reset-highlight-btn { top: 12px; left: 68px; transform: none; padding: 7px 12px; }
  .map-legend-card { width: 180px; }
  .today-presence-card, .today-presence-card.focus { width: 180px; max-width: calc(100vw - 32px); }

  .side-panel { max-height: 55vh; max-height: 55dvh; padding-bottom: env(safe-area-inset-bottom); }
  .side-panel-body { padding: 12px; }
  .list-controls-row { flex-wrap: wrap; }
  .list-search-box { flex: 1 1 100%; }
  .form-row { flex-direction: column; gap: 16px; }
  .modal-backdrop { padding: 8px; }
  .modal-dialog { max-height: 94vh; max-height: 94dvh; }
  .staff-cell { min-height: 40px; }
  .picker-row { min-height: 42px; }
  .quick-om-row { flex-wrap: wrap; }
  .staffing-head { padding: 10px 12px; }
  .staffing-scroll { padding: 10px 10px 20px; }
  .staffing-tools .form-input { flex: 1 1 140px; }
  .toast-container { left: 12px; right: 12px; bottom: 12px; }
}

@media (max-width: 420px) {
  .brand-text { display: none; }
}

/* Comptes de connexion */
.login-card .login-hint { font-size: 12px; color: #5b6b72; line-height: 1.45; margin: 0; }
.login-card .btn:disabled { opacity: .6; cursor: wait; }
.cred-list { display: flex; flex-direction: column; gap: 8px; max-height: 45vh; overflow-y: auto; }
.cred-row { background: var(--brand-gray-light); border: 1px solid var(--brand-gray); border-radius: 10px; padding: 8px 12px; }
.cred-row > strong { font-size: 13px; color: var(--brand-dark); }

/* ==========================================================================
   Feuilles de temps mensuelles (demi-journées), validation & export Sellsy
   ========================================================================== */
.ts-open-btn { position: relative; }
.ts-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #E5484D; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--brand-dark); animation: tsPulse 2s ease-in-out infinite; }
@keyframes tsPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.ts-view .staffing-scroll { padding-top: 16px; }
.ts-body { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.ts-month-nav { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 3px; }
.ts-month-nav span { min-width: 120px; text-align: center; font-weight: 700; font-size: 14px; }
.ts-nav-btn { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,.16); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; }
.ts-nav-btn:hover { background: var(--brand-mint); color: var(--brand-dark); }

/* Anneau de progression */
.ts-ring { --p: 0; --c: #00D68C; width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #E2E8F0 0); transition: background .4s ease; }
.ts-ring span { width: 78%; height: 78%; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: var(--brand-dark); }
.ts-ring-sm { width: 44px; height: 44px; }
.ts-ring-sm span { font-size: 11px; }
.ts-ring-lg { width: 84px; height: 84px; }
.ts-ring-lg span { font-size: 18px; }

.ts-hero { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--brand-gray); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-sm); }
.ts-hero-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ts-hero-mood { font-size: 18px; font-weight: 800; color: var(--brand-dark); }
.ts-hero-sub { font-size: 13px; color: var(--gray-500); }
.ts-back { align-self: flex-start; }

.ts-status { border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 600; }
.ts-status.wait { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.ts-status.sent { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }
.ts-status.ok { background: var(--brand-mint-light); color: var(--om-dark); border: 1px solid var(--om-border); }

/* Pinceaux */
.ts-tools { background: #fff; border: 1px solid var(--brand-gray); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
  position: sticky; top: -16px; z-index: 5; box-shadow: var(--shadow-sm); }
.ts-tools-title { font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.ts-tools-title small { font-weight: 500; color: var(--gray-500); }
.ts-brushes { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-brush { --bg: #E2E8F0; --fg: #0B3F4D; border: 2px solid transparent; background: var(--bg); color: var(--fg); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s ease; }
.ts-brush:hover { transform: translateY(-1px); }
.ts-brush.on { border-color: var(--brand-dark); box-shadow: 0 0 0 3px var(--brand-mint); transform: scale(1.06); }
.ts-brush.eraser { background: #fff; color: var(--brand-dark); border: 2px dashed var(--gray-300); }
.ts-brush.eraser.on { border-style: solid; }
.ts-brush.add { background: #fff; color: var(--brand-dark); border: 1px dashed var(--gray-400); font-weight: 600; }
.ts-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Calendrier */
.ts-cal { display: grid; grid-template-columns: 28px repeat(5, minmax(0, 1fr)); gap: 6px; user-select: none; -webkit-user-select: none; }
.ts-dh { text-align: center; font-size: 12px; font-weight: 800; color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em; }
.ts-week { border: none; background: transparent; color: var(--gray-400); font-size: 16px; cursor: pointer; border-radius: 8px; }
.ts-week:hover:not(:disabled) { background: var(--brand-mint-light); color: var(--om-dark); }
.ts-day { background: #fff; border: 1px solid var(--brand-gray); border-radius: 12px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ts-day.is-today { border-color: var(--brand-mint); box-shadow: 0 0 0 2px var(--brand-mint-light); }
.ts-day-none { background: transparent; border: none; }
.ts-day-off { background: repeating-linear-gradient(45deg, #F1F5F9, #F1F5F9 6px, #E9EEF2 6px, #E9EEF2 12px); align-items: center; justify-content: center; text-align: center; min-height: 84px; }
.ts-off-lbl { font-size: 10.5px; color: var(--gray-500); font-weight: 600; line-height: 1.2; }
.ts-dnum { align-self: flex-start; border: none; background: transparent; font-size: 12px; font-weight: 800; color: var(--brand-dark);
  padding: 1px 6px; border-radius: 6px; cursor: pointer; }
button.ts-dnum:hover:not(:disabled) { background: var(--brand-mint); }
.ts-half { --bg: #F8FAFC; --fg: #94A3B8; position: relative; min-height: 34px; border-radius: 8px; border: 1px dashed #CBD5E1;
  background: var(--bg); color: var(--fg); font-size: 11px; font-weight: 700; cursor: pointer; padding: 2px 4px; text-align: center;
  display: flex; align-items: center; justify-content: center; min-width: 0; transition: transform .12s ease, filter .12s ease; }
.ts-half.filled { border: 1px solid rgba(0,0,0,.06); }
.ts-half:not(.filled) .ts-half-lbl { font-weight: 500; font-style: italic; }
.ts-half:hover:not(:disabled) { transform: scale(1.04); filter: brightness(1.05); }
.ts-half:disabled { cursor: default; }
.ts-half-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ts-half.pending { outline: 2px dashed #F5A524; outline-offset: -2px;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 5px, transparent 5px 10px); }
.ts-pend-dot { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 11px; }

.ts-totals { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-chip { --bg: #E2E8F0; --fg: #0B3F4D; display: inline-flex; align-items: center; gap: 4px; background: var(--bg); color: var(--fg);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ts-chip.empty { background: #fff; color: var(--gray-500); border: 1px dashed var(--gray-300); }
.ts-chip.old { opacity: .7; text-decoration: line-through; }
.ts-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 10px; text-align: center; }
.ts-send { font-size: 15px; padding: 12px 22px; border-radius: 999px; }
.ts-send:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Validation (admin) */
.ts-review { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.ts-review-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; color: #78350F; }
.ts-review-actions { display: flex; gap: 6px; }
.ts-review-list { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.ts-rev-row { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 5px 8px; font-size: 12.5px; }
.ts-rev-when { width: 120px; flex-shrink: 0; font-weight: 700; color: var(--brand-dark); }
.ts-rev-diff { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ts-arrow { color: var(--gray-400); font-weight: 800; }
.ts-rev-btns { display: flex; gap: 4px; }
.ts-mini { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--brand-gray); background: #fff; cursor: pointer; font-size: 13px; }
.ts-mini.ok:hover { background: var(--brand-mint-light); border-color: var(--brand-mint); }
.ts-mini.no:hover { background: var(--danger-light); border-color: var(--danger); }

/* Vue équipe (admin) */
.ts-inbox { background: #fff; border: 1px solid var(--brand-gray); border-left: 4px solid #F5A524; border-radius: 14px; padding: 12px 14px; }
.ts-inbox-calm { border-left-color: var(--brand-mint); color: var(--gray-600); font-size: 13px; font-weight: 600; }
.ts-inbox-title { font-weight: 800; color: var(--brand-dark); margin-bottom: 8px; }
.ts-inbox-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ts-inbox-item { display: flex; align-items: center; gap: 10px; border: 1px solid #FDE68A; background: #FFFBEB; border-radius: 12px; padding: 8px 10px; cursor: pointer; text-align: left; }
.ts-inbox-item:hover { border-color: #F5A524; transform: translateY(-1px); }
.ts-inbox-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ts-inbox-txt strong { font-size: 13px; color: var(--brand-dark); }
.ts-inbox-txt small { font-size: 11.5px; color: #92400E; }
.ts-inbox-go { font-size: 12px; font-weight: 700; color: var(--brand-dark); }
.ts-team-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ts-team-progress { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--gray-600); font-weight: 600; }
.ts-team-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ts-team-tools .form-input { width: 200px; padding: 7px 10px; }
.ts-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.ts-filter { border: 1px solid var(--gray-300); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--brand-dark); }
.ts-filter.on { background: var(--brand-dark); color: var(--brand-mint); border-color: var(--brand-dark); }
.ts-om-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ts-om-tile { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--brand-gray); border-radius: 14px; padding: 12px; cursor: pointer; text-align: left;
  transition: transform .15s ease, box-shadow .15s ease; }
.ts-om-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand-dark); }
.ts-om-tile.has-pending { border-color: #FDE68A; background: linear-gradient(180deg, #FFFDF5, #fff); }
.ts-om-tile-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ts-om-tile-info strong { font-size: 13.5px; color: var(--brand-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-om-tile-info small { font-size: 11.5px; color: var(--gray-500); }
.ts-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ts-tag { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #EEF2FF; color: #3730A3; }
.ts-tag.warn { background: #FEF3C7; color: #92400E; }
.ts-tag.ok { background: var(--brand-mint-light); color: var(--om-dark); }
.ts-tag.muted { background: var(--brand-gray-light); color: var(--gray-500); font-weight: 600; }

/* Fiche OM & fiche client */
.ts-card-row { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--brand-dark); }
.ts-billing-fields { border: 1px solid var(--brand-gray); background: var(--brand-gray-light); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ts-billing-title { font-size: 13px; font-weight: 800; color: var(--brand-dark); }
.panel-section-title small.muted { font-weight: 500; font-size: 11px; }

.ts-confetti { position: fixed; inset: 0; z-index: 4000; pointer-events: none; }

@media (max-width: 768px) {
  .ts-cal { grid-template-columns: 18px repeat(5, minmax(0, 1fr)); gap: 3px; }
  .ts-week { font-size: 13px; padding: 0; }
  .ts-day { padding: 3px 2px; border-radius: 9px; gap: 2px; }
  .ts-half { min-height: 38px; font-size: 9.5px; padding: 1px 2px; border-radius: 6px; }
  .ts-half-lbl { white-space: normal; line-height: 1.1; max-height: 2.2em; overflow: hidden; word-break: break-word; }
  .ts-dnum { font-size: 11px; padding: 0 4px; }
  .ts-day-off { min-height: 88px; }
  .ts-off-lbl { font-size: 9px; }
  .ts-hero { padding: 12px; gap: 12px; }
  .ts-ring-lg { width: 64px; height: 64px; }
  .ts-ring-lg span { font-size: 15px; }
  .ts-hero-mood { font-size: 15px; }
  .ts-tools { position: static; padding: 10px; }
  .ts-tools-title small { display: none; }
  .ts-brushes { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .ts-brush { flex-shrink: 0; }
  .ts-rev-row { flex-wrap: wrap; }
  .ts-rev-when { width: auto; }
  .ts-month-nav span { min-width: 96px; font-size: 13px; }
  .ts-team-tools .form-input { width: 100%; flex: 1 1 100%; }
  .ts-om-grid, .ts-inbox-list { grid-template-columns: 1fr; }
}

/* Feuilles de temps : remplissage rapide, télétravail, trajets, verrou */
.ts-status.deadline { background: #F0F9FF; color: #075985; border: 1px solid #BAE6FD; }
.ts-status + .ts-status { margin-top: -6px; }
.ts-extras { align-items: center; }
.ts-extras-lbl { font-size: 12px; font-weight: 700; color: var(--gray-500); margin-right: 2px; }
.ts-brush.extra { background: #fff; color: var(--brand-dark); border: 1.5px solid var(--gray-300); }
.ts-brush.extra.on { border-color: var(--brand-dark); }
.ts-drag-toggle.on { background: var(--brand-dark); color: var(--brand-mint); border-color: var(--brand-dark); }
.ts-cal.touch-drag { touch-action: none; }
.ts-day-top { display: flex; align-items: center; justify-content: space-between; }
.ts-tr { font-size: 12px; line-height: 1; padding-right: 2px; }
.ts-tr.pending { outline: 2px dashed #F5A524; border-radius: 6px; }
.ts-tt { position: absolute; bottom: -5px; left: -3px; font-style: normal; font-size: 11px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.ts-half.ts-preview { box-shadow: inset 0 0 0 3px var(--brand-mint); }
.ts-range-card { max-width: 420px; overflow-y: auto; }
.ts-range-lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--brand-dark); }
.ts-range-row { display: flex; gap: 8px; }
.ts-range-row .ts-range-lbl { flex: 1; }
.ts-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.ts-seg label { cursor: pointer; }
.ts-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ts-seg span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gray-300); font-size: 12.5px; font-weight: 600; background: #fff; }
.ts-seg input:checked + span { background: var(--brand-dark); color: var(--brand-mint); border-color: var(--brand-dark); }
.ts-seg input:focus-visible + span { outline: 2px solid var(--brand-mint); }
.ts-range-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--brand-dark); }
.ts-range-preview { font-size: 13px; color: var(--om-dark); background: var(--brand-mint-light); border-radius: 10px; padding: 8px 10px; }
@media (max-width: 768px) { .ts-extras { flex-wrap: wrap; } .ts-tt { font-size: 10px; } }

/* ==========================================================================
   Assistant IA (données anonymisées)
   ========================================================================== */
.ai-overlay { z-index: 2600; }
.ai-card { max-width: 640px; width: 100%; max-height: 90vh; max-height: 90dvh; gap: 10px; }
.ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ai-sub { font-size: 12px; color: var(--om-dark); background: var(--brand-mint-light); border-radius: 8px; padding: 6px 8px; margin-top: 4px; }
.ai-close { color: var(--gray-500); }
.ai-close:hover { background: var(--brand-gray); color: var(--brand-dark); }
.ai-log { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.ai-empty { font-size: 13px; color: var(--gray-500); }
.ai-msg { max-width: 88%; border-radius: 14px; padding: 8px 12px; font-size: 13.5px; line-height: 1.45; color: var(--brand-dark); }
.ai-msg p { margin: 0 0 4px; }
.ai-msg ul { margin: 2px 0 4px 18px; padding: 0; }
.ai-msg small { display: block; margin-top: 4px; font-size: 10.5px; opacity: .6; }
.ai-msg.me { align-self: flex-end; background: var(--brand-dark); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.bot { align-self: flex-start; background: var(--brand-gray-light); border: 1px solid var(--brand-gray); border-bottom-left-radius: 4px; }
.ai-typing { display: flex; gap: 4px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gray-400); animation: aiDot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .15s; } .ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-sugg .ts-filter { text-align: left; }
.ai-warn { font-size: 12.5px; background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; border-radius: 10px; padding: 8px 10px; }
.ai-warn .btn { margin-left: 6px; }
.ai-input { display: flex; flex-direction: column; gap: 6px; }
.ai-input textarea { resize: vertical; min-height: 54px; }
.ai-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-btns .btn { flex: 1 1 auto; }
.ai-details { font-size: 12.5px; color: var(--brand-dark); }
.ai-details summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
.ai-details textarea { margin: 6px 0; }
.ai-pre { white-space: pre-wrap; font-size: 11px; max-height: 200px; overflow: auto; background: var(--brand-gray-light); border-radius: 8px; padding: 8px; margin-top: 6px; }

/* ==========================================================================
   Tutoriel guidé
   ========================================================================== */
.tour-layer { position: fixed; inset: 0; z-index: 3500; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(7, 43, 53, .62), 0 0 0 3px var(--brand-mint);
  transition: all .3s cubic-bezier(.16,1,.3,1); pointer-events: none; }
.tour-bubble { position: fixed; width: min(340px, calc(100vw - 16px)); background: #fff; border-radius: 16px; padding: 14px 16px 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 6px; transition: top .3s ease, left .3s ease; animation: popIn .22s ease; }
.tour-bubble.centered { width: min(400px, calc(100vw - 16px)); }
.tour-progress { height: 4px; background: var(--brand-gray); border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.tour-progress div { height: 100%; background: var(--brand-mint); transition: width .3s ease; }
.tour-title { font-size: 15.5px; font-weight: 800; color: var(--brand-dark); }
.tour-text { font-size: 13.5px; line-height: 1.5; color: var(--gray-700); }
.tour-nav { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.tour-count { flex: 1; text-align: center; font-size: 11.5px; color: var(--gray-500); font-weight: 600; }
.tour-skip { font-size: 12.5px; color: var(--gray-500); background: none; border: none; cursor: pointer; text-decoration: underline; padding: 4px; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-bubble { transition: none; } }

/* ==========================================================================
   Ajout en masse (copier-coller Excel / fichier)
   ========================================================================== */
.bulk-overlay { z-index: 2600; }
.bulk-card { max-width: 900px; width: 100%; max-height: 92vh; max-height: 92dvh; gap: 12px; }
.bulk-type { margin-top: -2px; }
.bulk-how { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--brand-dark); }
.bulk-paste { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; resize: vertical; min-height: 110px; }
.bulk-or { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-500); }
.bulk-or .btn-text-link { background: none; border: none; color: var(--brand-dark); text-decoration: underline; cursor: pointer; font-weight: 600; font-size: 13px; }
.bulk-step { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.bulk-map summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--brand-dark); }
.bulk-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.bulk-map-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--gray-600); }
.bulk-map-grid .form-input { padding: 6px 8px; font-size: 12.5px; }
.bulk-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk-summary .ts-tag { font-size: 11.5px; padding: 3px 9px; }
.bulk-table-wrap { overflow: auto; max-height: 46vh; border: 1px solid var(--brand-gray); border-radius: 12px; }
.bulk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bulk-table th { position: sticky; top: 0; background: var(--brand-gray-light); text-align: left; padding: 7px 8px; font-size: 11.5px; color: var(--gray-600); z-index: 1; }
.bulk-table td { padding: 6px 8px; border-top: 1px solid var(--brand-gray); vertical-align: top; color: var(--brand-dark); }
.bulk-table .b-status { width: 28px; font-size: 15px; text-align: center; }
.bulk-table .bulk-addr { padding: 5px 8px; font-size: 12px; min-width: 200px; }
.bulk-table .b-note { display: block; font-size: 10.5px; color: var(--gray-500); margin-top: 2px; }
.bulk-table .b-more { font-size: 11.5px; color: var(--gray-600); max-width: 240px; }
.bulk-table tr.b-dup td { background: #FFFBEB; }
.bulk-table tr.b-bad td { opacity: .55; }
.bulk-table tr.b-warn .b-note { color: #B45309; }
.bulk-table .mini-select { margin-top: 4px; font-size: 11.5px; }
.bulk-foot { display: flex; justify-content: flex-end; gap: 8px; }
.bulk-foot .btn-primary { min-width: 200px; }
@media (max-width: 768px) {
  .bulk-table .b-more { display: none; }
  .bulk-table .bulk-addr { min-width: 140px; }
  .bulk-foot { flex-direction: column-reverse; }
  .bulk-foot .btn { width: 100%; }
}
.bulk-table tr.b-byname td { background: #F0F9FF; }
.bulk-table tr.b-byname .b-note { color: #075985; }
.bulk-byname { font-size: 12.5px; }
#entity-modal.is-client #field-name { text-transform: uppercase; }

/* Disponibilité des OM (Trajet rapide, création de client) */
.quick-om-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.quick-om-info { min-width: 0; }
.quick-om-actions { display: flex; flex-direction: column; gap: 4px; }
.avail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 5px; font-size: 11.5px; }
.avail-rate { font-weight: 800; }
.avail-free { font-weight: 700; color: var(--om-dark); background: var(--brand-mint-light); border-radius: 999px; padding: 1px 8px; }
.avail-free.full { color: #9F1239; background: #FFE4E6; }
.avail-grid { display: inline-flex; gap: 3px; }
.avail-day { display: inline-flex; align-items: center; gap: 1px; }
.avail-day b { font-size: 9.5px; color: var(--gray-500); margin-right: 1px; font-weight: 700; }
.avail-day i { width: 9px; height: 14px; border-radius: 3px; display: inline-block; }
.avail-day i.free { background: #fff; border: 1.5px solid #00C880; }
.avail-txt { font-size: 11.5px; color: var(--om-dark); margin-top: 3px; }
.avail.compact { margin-top: 2px; }
.nearest-om-row { background: #fff; border-radius: 8px; padding: 6px 8px; }
.nearest-om-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--brand-dark); }
.nearest-om-top span { opacity: .75; }
@media (max-width: 768px) { .quick-om-actions { flex-direction: row; width: 100%; } .quick-om-actions .btn { flex: 1; } }
.quick-back-bar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.input-with-icon, .quick-input-wrap { position: relative; }
.input-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  border: none; background: var(--brand-gray); color: var(--brand-dark); font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.input-clear:hover { background: var(--gray-300); }
.quick-input-wrap .input-clear { top: 22px; }
#quick-address-input { padding-right: 38px; }
.suggestion-item.kbd-active { background: var(--brand-mint-light); }
/* Liste des clients : facturation modifiable */
.mini-input { width: 110px; padding: 5px 8px; border: 1px solid var(--brand-gray); border-radius: 8px; font-size: 12.5px; background: #fff; color: var(--brand-dark); transition: border-color .2s, box-shadow .2s; }
.mini-input:focus { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(0,245,160,.25); }
.mini-input.empty { border-color: #FDE68A; background: #FFFBEB; }
.mini-input.saved { border-color: #00C880; box-shadow: 0 0 0 3px rgba(0,200,128,.25); }
.bill-cell { white-space: nowrap; }
.bill-cell input[type="number"] { width: 80px; }
.bill-cell input[data-bill-field="owner"] { width: 70px; }

/* Guides de format des imports */
.fg-card { max-width: 760px; width: 100%; max-height: 90vh; max-height: 90dvh; overflow-y: auto; gap: 10px; }
.fg-intro { font-size: 13px; color: var(--gray-700); margin: 0; line-height: 1.5; }
.fg-label { font-size: 12px; font-weight: 700; color: var(--brand-dark); }
.fg-label small { font-weight: 500; color: var(--gray-500); }
.fg-req { color: #E5484D; font-weight: 800; }
.fg-table-wrap { overflow-x: auto; border: 1px solid var(--brand-gray); border-radius: 10px; }
.fg-table { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.fg-table th { background: #E8F5EE; color: var(--om-dark); text-align: left; padding: 6px 10px; white-space: nowrap; border-right: 1px solid #fff; }
.fg-table td { padding: 6px 10px; color: var(--gray-600); white-space: nowrap; border-top: 1px solid var(--brand-gray); font-family: ui-monospace, Menlo, Consolas, monospace; }
.fg-details { font-size: 12.5px; color: var(--brand-dark); }
.fg-details summary { cursor: pointer; font-weight: 600; }
.fg-details ul, .fg-tips { margin: 4px 0 0 18px; padding: 0; font-size: 12.5px; color: var(--gray-700); line-height: 1.5; }
.fg-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 768px) { .fg-actions .btn { flex: 1 1 100%; } }
.bulk-cols { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }

/* ==========================================================================
   OFFICY TEAM — couche de finition visuelle (octobre 2026)
   Palette : encre #0B3F4D · menthe #00F5A0 (action principale et OM uniquement)
             fond #F4F7F7 · surfaces #FFFFFF · lignes #E1E8E9 · texte doux #5E7378
   Police : Hanken Grotesk
   ========================================================================== */
:root {
  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --ink: #0B3F4D;
  --ink-2: #134E5E;
  --ink-soft: #5E7378;
  --line: #E1E8E9;
  --bg-app: #F4F7F7;
  --shadow-sm: 0 1px 2px rgba(11, 63, 77, .06);
  --shadow-md: 0 2px 8px rgba(11, 63, 77, .07);
  --shadow-lg: 0 8px 24px rgba(11, 63, 77, .10);
  --shadow-xl: 0 18px 44px rgba(11, 63, 77, .16);
}
body { background: var(--bg-app); color: var(--ink); font-feature-settings: 'ss01' on, 'tnum' on; letter-spacing: -.003em; }
h1, h2, h3, .pane-title, .fiche-name, .picker-title, .ts-hero-mood, .tour-title { letter-spacing: -.015em; }
:focus-visible { outline: 2px solid var(--brand-mint); outline-offset: 2px; }

/* --- Barre du haut ------------------------------------------------------- */
.navbar { background: var(--ink); border-bottom: none; box-shadow: none; padding: 0 18px; gap: 14px; }
.brand { gap: 10px; }
.brand-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-mint); color: var(--ink); box-shadow: none; }
.brand-text h1 { font-size: 17px; font-weight: 800; letter-spacing: -.02em; gap: 5px; }
.brand-team { font-weight: 500; color: var(--brand-mint); }
.brand-subtitle { font-size: 11.5px; color: rgba(255, 255, 255, .58); font-weight: 500; }
.navbar-search-wrapper { max-width: 380px; margin: 0 8px; }
.search-box input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); border-radius: 10px; padding-top: 8px; padding-bottom: 8px; }
.search-box input:focus { box-shadow: 0 0 0 3px rgba(0, 245, 160, .22); }
.navbar-right { gap: 4px; }
.navbar-right > .btn-secondary, .navbar-right > .btn-sm {
  background: transparent; border: 1px solid transparent; color: rgba(255, 255, 255, .86);
  padding: 7px 11px; font-weight: 600; font-size: 13px; border-radius: 9px; gap: 7px; }
.navbar-right > .btn-secondary:hover, .navbar-right > .btn-sm:hover { background: rgba(255, 255, 255, .09); color: #fff; border-color: transparent; }
.nav-ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.stats-pills { margin: 0 6px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .14); gap: 10px; }
.stat-pill { border: none; background: transparent; padding: 0; font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.stat-pill strong { color: #fff; font-weight: 700; }
#add-menu-btn { border-radius: 9px; padding: 8px 14px; box-shadow: none; }
#data-menu-btn { border-radius: 9px; background: transparent; border: 1px solid rgba(255, 255, 255, .16); }
#data-menu-btn:hover { background: rgba(255, 255, 255, .09); }
.ts-badge { box-shadow: 0 0 0 2px var(--ink); animation: none; }

/* --- Boutons & champs ---------------------------------------------------- */
.btn { border-radius: 9px; font-weight: 600; letter-spacing: -.005em; }
.btn-primary { background: var(--brand-mint); color: var(--ink); }
.btn-primary:hover { background: var(--brand-mint-hover); box-shadow: none; }
.btn-secondary { border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: #F0F4F4; border-color: #CDD8DA; }
.form-input, .form-textarea, .form-select { border-color: var(--line); border-radius: 9px; }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 245, 160, .2); }
.form-label { font-weight: 600; color: var(--ink); }
.menu-dropdown { border-color: var(--line); border-radius: 12px; box-shadow: var(--shadow-xl); }

/* --- Éléments flottants sur la carte ------------------------------------ */
.leaflet-tile-pane { filter: grayscale(.9) contrast(.92) brightness(1.06); }
.floating-drawer-btn { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 10px; padding: 9px 14px; }
.floating-drawer-btn:hover { background: #fff; transform: none; box-shadow: var(--shadow-xl); }
.help-floating-btn { width: 36px; height: 36px; background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 17px; font-weight: 800; }
.help-floating-btn:hover { transform: none; background: var(--brand-mint); border-color: var(--brand-mint); box-shadow: var(--shadow-lg); }
.map-legend-card, .today-presence-card { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); backdrop-filter: none; background: #fff; }
.legend-title { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink); font-weight: 700; }
.reset-highlight-btn { border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 10px; }

/* --- Volet latéral -------------------------------------------------------- */
.side-panel { border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(11, 63, 77, .08); }
.side-panel-header { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.drawer-tab-btn { color: var(--ink-soft); }
.drawer-tab-btn:hover { color: var(--ink); background: #F0F4F4; }
.drawer-tab-btn.active { color: var(--ink); background: #E9F7F1; }
.close-btn { color: var(--ink-soft); }
.close-btn:hover { background: #F0F4F4; color: var(--ink); }
.badge-cli { background: #E9EFF0; color: var(--ink); }
.side-panel-body { background: var(--bg-app); }
.panel-card, .fiche-hero-card, .entity-row-card, .trip-form-card, .trip-summary-card { border-color: var(--line); box-shadow: none; border-radius: 12px; }
.entity-row-card:hover { transform: none; box-shadow: var(--shadow-md); border-color: #C9D6D8; }
.panel-section-title { font-weight: 700; }

/* --- Écrans plein écran (Temps, Staffing, Clients) ---------------------- */
.staffing-view { background: var(--bg-app); }
.staffing-head { background: var(--ink); padding: 14px 22px; }
.staffing-head h2 { font-size: 19px; font-weight: 800; }
.staffing-summary { color: rgba(255, 255, 255, .72); }
.staffing-summary strong { color: #fff; }
.staffing-tools .btn-secondary { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .16); }
.staffing-tools .btn-secondary:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .28); }
.staffing-tools .form-input { background: rgba(255, 255, 255, .95); }
.staffing-tools .staffing-check { color: rgba(255, 255, 255, .85); }
.ts-month-nav { background: rgba(255, 255, 255, .08); }
.ts-nav-btn { background: transparent; }
.staffing-table { box-shadow: none; border: 1px solid var(--line); border-radius: 12px; }
.staffing-table thead th { background: #F0F4F4; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.staffing-table thead .sticky-col { background: #F0F4F4; }
.staffing-table th, .staffing-table td { border-bottom-color: #EDF2F2; }

/* Feuilles de temps : plus calme */
.ts-hero, .ts-tools, .ts-inbox, .ts-om-tile, .ts-day { border-color: var(--line); box-shadow: none; }
.ts-om-tile:hover { transform: none; box-shadow: var(--shadow-md); border-color: #C9D6D8; }
.ts-tools { box-shadow: 0 6px 16px -10px rgba(11, 63, 77, .25); }
.ts-brush:hover { transform: none; }
.ts-brush.on { transform: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); border-color: transparent; }
.ts-half:hover:not(:disabled) { transform: none; filter: brightness(1.04); }
.ts-hero-mood { font-weight: 800; }

/* --- Fenêtres ------------------------------------------------------------- */
.modal-backdrop, .picker-overlay { background: rgba(7, 37, 45, .42); backdrop-filter: blur(3px); }
.modal-dialog, .picker-card, .login-card { border-radius: 16px; box-shadow: var(--shadow-xl); border: 1px solid rgba(11, 63, 77, .06); }
.modal-header { border-bottom-color: var(--line); }
.modal-footer { background: #F7FAFA; border-top-color: var(--line); }
.picker-title { font-weight: 800; }
.login-overlay#login-overlay { background: radial-gradient(1200px 600px at 20% -10%, #135767 0%, var(--ink) 55%, #072B35 100%); }
.login-card { padding: 30px 26px; gap: 12px; }
.login-card h2 { font-size: 22px; font-weight: 800; }
.login-card h2::before { content: ''; display: block; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 10px;
  background: var(--brand-mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='7.2' stroke='%230B3F4D' stroke-width='3'/%3E%3Ccircle cx='18.6' cy='5.4' r='2.6' fill='%230B3F4D'/%3E%3C/svg%3E") center / 22px no-repeat; }
.toast { border-radius: 10px; border-left-width: 3px; box-shadow: var(--shadow-xl); font-weight: 600; }

/* --- Téléphone ------------------------------------------------------------ */
@media (max-width: 1100px) { .stats-pills { display: none; } }
@media (max-width: 768px) {
  .navbar { padding: 8px 12px; }
  .navbar-right > .btn-secondary, .navbar-right > .btn-sm { padding: 8px 9px; min-height: 38px; }
  .nav-ico { width: 19px; height: 19px; }
  .navbar-search-wrapper { margin: 2px 0 0; }
  .brand-icon { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .ts-badge { animation: none; } }
.panel-section-title { justify-content: flex-start; font-size: 13.5px; color: var(--ink); }
.panel-section-title::before { content: none; }
.panel-section-title > button:last-child, .panel-section-title > .btn:last-child { margin-left: auto; }
#data-menu-btn { color: #fff; }
.login-card { background: #fff; }
/* Tableau Staffing : taux bien visible sous le nom de l'OM */
.staff-rate-badge { display: inline-block; margin: 4px 0 0 32px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); }
/* Planning de la semaine : statuts hors client (interco, formation, congé…) */
.staff-cell.special { font-weight: 700; border: 1px solid rgba(0, 0, 0, .06); }
.picker-statuses { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 2px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.picker-status { border: none; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.picker-status:hover { filter: brightness(.96); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
