/* ============================================================
   EXTRANET LES ENVOLÉES — Charte graphique v1.0
   Palette officielle + typographie Montserrat / Roboto
   Mobile-first responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Roboto:ital,wght@0,400;0,500;1,400&display=swap');

/* ── Variables CSS ──────────────────────────────────────────── */
:root {
  /* Palette primaire */
  --bleu:         #1A2B6B;
  --rouge:        #E01414;
  --noir-texte:   #1E1E1C;

  /* Palette complémentaire */
  --terracotta:   #C5623A;
  --sable:        #F2E8D9;
  --sable-clair:  #FCF6EF;
  --ardoise:      #4B5468;

  /* Couleurs de fond légères */
  --bleu-clair:   #E8EBF3;
  --rouge-clair:  #FDE9EA;
  --gris-clair:   #EEEBE6;

  /* États disponibilité */
  --dispo-bg:           #D4EDDA;
  --dispo-color:        #155724;
  --pas-dispo-bg:       #F8D7DA;
  --pas-dispo-color:    #721C24;
  --si-necesaire-bg:    #FFF3CD;
  --si-necesaire-color: #856404;
  --affecte-bg:         #1A2B6B;
  --affecte-color:      #FFFFFF;

  /* Typographie */
  --font-titre:  'Montserrat', Arial, sans-serif;
  --font-corps:  'Roboto', Arial, sans-serif;

  /* Layout */
  --sidebar-w:   240px;
  --header-h:    56px;
  --radius:      6px;
  --shadow:      0 2px 8px rgba(26,43,107,0.10);
  --shadow-md:   0 4px 16px rgba(26,43,107,0.15);
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-corps);
  font-size: 0.9375rem;
  color: var(--noir-texte);
  background: var(--sable-clair);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--terracotta); }

img { max-width: 100%; height: auto; }

/* ── Typographie ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6, .font-titre {
  font-family: var(--font-titre);
  color: var(--bleu);
  line-height: 1.25;
}
h1 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; }
h2 { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.page-title {
  font-family: var(--font-titre);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bleu);
  border-bottom: 3px solid var(--rouge);
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
}

/* ── Layout principal ────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bleu);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 100;
  box-shadow: var(--shadow-md);
  gap: 1rem;
}
.app-header .logo {
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  white-space: nowrap;
}
.app-header .logo span {
  color: var(--rouge);
}
.app-header .header-spacer { flex: 1; }
.app-header .header-user {
  font-size: .875rem;
  color: rgba(255,255,255,.85);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.app-header .btn-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: .25rem;
  line-height: 1;
}
@media (max-width: 768px) {
  .app-header .btn-menu-toggle { display: flex; align-items: center; }
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.app-sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bleu);
  color: #fff;
  overflow-y: auto;
  z-index: 90;
  padding: 1rem 0;
  transition: transform .25s ease;
}
@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
}

.nav-section-label {
  font-family: var(--font-titre);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.45);
  padding: .75rem 1.25rem .25rem;
  margin-top: .5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  color: rgba(255,255,255,.82);
  font-size: .9rem;
  cursor: pointer;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}
.nav-item.active {
  background: rgba(255,255,255,.12);
  border-left-color: var(--rouge);
  color: #fff;
  font-weight: 500;
}
.nav-item .nav-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: .7;
}
.nav-item.active .nav-icon { opacity: 1; }

/* Badge dans la nav */
.nav-badge {
  margin-left: auto;
  background: var(--rouge);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 10px;
  padding: .1rem .45rem;
  min-width: 20px;
  text-align: center;
}

/* ── Main content ────────────────────────────────────────────── */
.app-main {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  padding: 1.5rem;
  transition: margin-left .25s ease;
}
@media (max-width: 768px) {
  .app-main {
    margin-left: 0;
    padding: 1rem .75rem;
  }
}

/* ── Overlay mobile (fond sombre quand sidebar ouverte) ─────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 89;
}
.sidebar-overlay.visible { display: block; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--gris-clair);
}
.card-title {
  font-family: var(--font-titre);
  font-size: 1rem;
  font-weight: 700;
  color: var(--bleu);
  margin: 0;
}
.card-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bleu-clair);
  display: flex; align-items: center; justify-content: center;
  color: var(--bleu);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Statistiques (dashboard) ────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  border-top: 3px solid var(--bleu);
  text-align: center;
}
.stat-card.rouge { border-top-color: var(--rouge); }
.stat-card.terracotta { border-top-color: var(--terracotta); }
.stat-card.ardoise { border-top-color: var(--ardoise); }
.stat-value {
  font-family: var(--font-titre);
  font-size: 2rem;
  font-weight: 700;
  color: var(--bleu);
  line-height: 1;
}
.stat-label {
  font-size: .8rem;
  color: var(--ardoise);
  margin-top: .25rem;
}

/* ── Tableau des interventions ───────────────────────────────── */
.planning-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.planning-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: .85rem;
}
.planning-table th {
  background: var(--bleu);
  color: #fff;
  font-family: var(--font-titre);
  font-size: .78rem;
  font-weight: 700;
  padding: .6rem .5rem;
  text-align: center;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.planning-table th.col-info {
  background: #253478;
  text-align: left;
  min-width: 200px;
}
.planning-table th.noyau-header {
  background: #253478;
  border-bottom: 2px solid var(--rouge);
}
.planning-table td {
  padding: .45rem .5rem;
  border-bottom: 1px solid var(--gris-clair);
  border-right: 1px solid #eee;
  text-align: center;
  vertical-align: middle;
}
.planning-table td.col-info {
  text-align: left;
  background: var(--sable-clair);
  border-right: 2px solid var(--gris-clair);
}
.planning-table tr:hover td { background: var(--bleu-clair); }
.planning-table tr:hover td.col-info { background: #e8eefc; }

.col-date { font-weight: 600; color: var(--bleu); white-space: nowrap; }
.col-etab { font-weight: 500; color: var(--noir-texte); }
.col-etab a { color: var(--terracotta); font-size: .78rem; }
.col-num  { color: var(--ardoise); font-size: .78rem; }

/* Cellules de disponibilité */
.dispo-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: .15rem .4rem;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  min-width: 28px;
  min-height: 24px;
  transition: opacity .15s;
}
.dispo-cell:hover { opacity: .8; }
.dispo-cell.dispo         { background: var(--dispo-bg); color: var(--dispo-color); }
.dispo-cell.pas-dispo     { background: var(--pas-dispo-bg); color: var(--pas-dispo-color); }
.dispo-cell.si-necessaire { background: var(--si-necesaire-bg); color: var(--si-necesaire-color); }
.dispo-cell.affecte       { background: var(--affecte-bg); color: var(--affecte-color); font-weight: 700; }
.dispo-cell.vide          { background: var(--gris-clair); color: var(--ardoise); }

/* Séparateur noyau / équipe */
.noyau-sep { border-left: 3px solid var(--rouge) !important; }

/* ── Badges statut ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  border-radius: 12px;
  padding: .2rem .65rem;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-dispo         { background: var(--dispo-bg); color: var(--dispo-color); }
.badge-pas-dispo     { background: var(--pas-dispo-bg); color: var(--pas-dispo-color); }
.badge-si-necessaire { background: var(--si-necesaire-bg); color: var(--si-necesaire-color); }
.badge-proposee      { background: var(--bleu-clair); color: var(--bleu); }
.badge-validee       { background: var(--dispo-bg); color: var(--dispo-color); }
.badge-contractualisee { background: #1A2B6B; color: #fff; }
.badge-realisee      { background: var(--ardoise); color: #fff; }
.badge-brouillon     { background: var(--gris-clair); color: var(--ardoise); }
.badge-soumise       { background: var(--si-necesaire-bg); color: var(--si-necesaire-color); }
.badge-archivee      { background: #e9ecef; color: #666; }
.badge-reunion       { background: var(--bleu-clair); color: var(--bleu); }
.badge-training      { background: #e8f5e9; color: #2e7d32; }

/* ── Boutons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-titre);
  font-size: .875rem; font-weight: 600;
  border-radius: var(--radius);
  padding: .55rem 1.1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--bleu); color: #fff; border-color: var(--bleu);
}
.btn-primary:hover { background: #253478; border-color: #253478; color: #fff; }

.btn-danger {
  background: var(--rouge); color: #fff; border-color: var(--rouge);
}
.btn-danger:hover { background: #c01010; border-color: #c01010; color: #fff; }

.btn-outline {
  background: transparent; color: var(--bleu); border-color: var(--bleu);
}
.btn-outline:hover { background: var(--bleu-clair); }

.btn-ghost {
  background: transparent; color: var(--ardoise); border-color: transparent;
}
.btn-ghost:hover { background: var(--gris-clair); color: var(--bleu); }

.btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Formulaires ─────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-family: var(--font-titre);
  font-size: .8rem; font-weight: 600;
  color: var(--ardoise);
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-control {
  display: block; width: 100%;
  padding: .6rem .85rem;
  font-family: var(--font-corps); font-size: .9375rem;
  color: var(--noir-texte);
  background: #fff;
  border: 1.5px solid #ced4da;
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
  min-height: 44px; /* Accessibilité mobile */
}
.form-control:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(26,43,107,.15);
}
.form-control.is-invalid { border-color: var(--rouge); }
.form-error {
  font-size: .8rem; color: var(--rouge); margin-top: .25rem;
}

select.form-control { cursor: pointer; }
textarea.form-control { min-height: 80px; resize: vertical; }

/* Select dispo inline dans le tableau */
.dispo-select {
  border: none; background: transparent;
  font-size: .8rem; font-weight: 600;
  cursor: pointer; padding: .1rem .2rem;
  border-radius: 4px;
  min-height: 28px;
}

/* ── Alertes ─────────────────────────────────────────────────── */
.alert {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
}
.alert-info    { background: var(--bleu-clair); border-left: 4px solid var(--bleu); color: var(--bleu); }
.alert-success { background: var(--dispo-bg); border-left: 4px solid #28a745; color: var(--dispo-color); }
.alert-warning { background: var(--si-necesaire-bg); border-left: 4px solid #ffc107; color: var(--si-necesaire-color); }
.alert-error   { background: var(--rouge-clair); border-left: 4px solid var(--rouge); color: #721c24; }

/* ── Page de connexion ───────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--sable);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.5rem;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem;
  width: 100%; max-width: 400px;
}
.login-logo {
  text-align: center; margin-bottom: 2rem;
}
.login-logo h1 {
  font-family: var(--font-titre);
  font-size: 1.6rem; font-weight: 700;
  color: var(--bleu);
}
.login-logo .logo-nez {
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--rouge);
  border-radius: 50%;
  margin: 0 2px;
  vertical-align: middle;
}
.login-logo p {
  font-size: .85rem; color: var(--ardoise);
  font-style: italic; margin-top: .25rem;
}
.login-divider {
  border: none; border-top: 1px solid var(--gris-clair);
  margin: 1.25rem 0;
}

/* ── Tables génériques ────────────────────────────────────────── */
.table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem; background: #fff;
}
.table th {
  background: var(--bleu);
  color: #fff;
  font-family: var(--font-titre);
  font-size: .78rem; font-weight: 700;
  padding: .65rem .85rem;
  text-align: left; white-space: nowrap;
}
.table td {
  padding: .6rem .85rem;
  border-bottom: 1px solid var(--gris-clair);
  vertical-align: middle;
}
.table tr:nth-child(even) td { background: var(--sable-clair); }
.table tr:hover td { background: var(--bleu-clair); }
.table-wrapper {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  overflow-x: auto;
}

/* ── Utilitaires ─────────────────────────────────────────────── */
.text-bleu        { color: var(--bleu); }
.text-rouge       { color: var(--rouge); }
.text-ardoise     { color: var(--ardoise); }
.text-terracotta  { color: var(--terracotta); }
.text-small       { font-size: .8rem; }
.text-bold        { font-weight: 700; }
.text-center      { text-align: center; }
.text-right       { text-align: right; }
.d-flex           { display: flex; }
.align-center     { align-items: center; }
.gap-1            { gap: .5rem; }
.gap-2            { gap: 1rem; }
.mt-1             { margin-top: .5rem; }
.mt-2             { margin-top: 1rem; }
.mb-1             { margin-bottom: .5rem; }
.mb-2             { margin-bottom: 1rem; }
.mb-3             { margin-bottom: 1.5rem; }
.p-0              { padding: 0; }
.w-full           { width: 100%; }
.hidden           { display: none; }

/* Grille responsive 2 colonnes */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* ── Loading spinner ─────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(26,43,107,.2);
  border-top-color: var(--bleu);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast notifications ─────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--bleu);
  color: #fff;
  border-radius: var(--radius);
  padding: .75rem 1.1rem;
  font-size: .875rem;
  box-shadow: var(--shadow-md);
  max-width: 320px;
  animation: slideIn .25s ease;
}
.toast.success { background: #28a745; }
.toast.error   { background: var(--rouge); }
.toast.warning { background: #856404; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Responsive ajustements ──────────────────────────────────── */
@media (max-width: 576px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 1rem; }
  .login-card { padding: 1.75rem 1.25rem; }
  .btn { padding: .55rem .85rem; }
  h1 { font-size: 1.25rem; }
  .page-title { font-size: 1.1rem; }
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ── Utilitaires Phase 2 ─────────────────────────────────────── */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.page-header-row .page-title { margin-bottom: 0; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--gris-clair);
  background: var(--sable);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-header h3 { margin: 0; font-size: .95rem; color: var(--bleu); }
.card-body { padding: 1.25rem; }
.card-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--gris-clair);
  background: var(--sable-clair);
  border-radius: 0 0 var(--radius) var(--radius);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-2 [style*="grid-column"] { grid-column: 1 !important; }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gris-clair);
  flex-wrap: wrap;
}

.grid-2-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) { .grid-2-col { grid-template-columns: 1fr; } }

.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: .4rem .75rem;
  font-size: .9rem;
}
.detail-list dt { font-weight: 600; color: var(--ardoise); }
.detail-list dd { margin: 0; }

.role-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
.role-row .form-control { flex: 1; min-width: 150px; }

.search-bar {
  display: flex;
  gap: .5rem;
  max-width: 480px;
}
.search-bar .form-control { flex: 1; }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: .85rem; }
.text-muted { color: var(--ardoise); }
.text-rouge { color: var(--rouge); }
.text-bleu  { color: var(--bleu); }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1.5rem; }
.mr-1 { margin-right: .25rem; }
.ml-2 { margin-left: .5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.align-start { align-items: flex-start; }
.grid { display: grid; }

/* Badges rôles */
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 99px;
  font-size: .75rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.badge-bleu      { background: var(--bleu-clair);  color: var(--bleu); }
.badge-rouge     { background: var(--rouge-clair);  color: var(--rouge); }
.badge-success   { background: #D4EDDA; color: #155724; }
.badge-danger    { background: #F8D7DA; color: #721C24; }
.badge-warning   { background: #FFF3CD; color: #856404; }
.badge-ardoise   { background: var(--gris-clair); color: var(--ardoise); }
.badge-terracotta{ background: #F5E0D6; color: var(--terracotta); }
.badge-role.badge-directeur     { background: var(--bleu);      color: #fff; }
.badge-role.badge-pilote        { background: var(--terracotta); color: #fff; }
.badge-role.badge-referent      { background: var(--ardoise);   color: #fff; }
.badge-role.badge-administrateur{ background: #5a6a8a;           color: #fff; }
.badge-role.badge-comedien      { background: var(--sable);     color: var(--noir-texte); }

/* Statut comedien dans la troupe */
.badge-observation { background: #FFF3CD; color: #856404; border: 1px solid #ffc107; }
.badge-renfort     { background: #E8E0F5; color: #5b3fa0; border: 1px solid #9c71e0; }

/* Statut affectation */
.statut-affectation { display:inline-block; padding:.2rem .6rem;
  border-radius:var(--radius); font-size:.8rem; font-weight:600; }
.statut-proposee        { background:#FFF3CD; color:#856404; }
.statut-validee         { background:#D4EDDA; color:#155724; }
.statut-refusee         { background:#F8D7DA; color:#721C24; }
.statut-contractualisee { background:var(--bleu-clair); color:var(--bleu); }

/* Boutons dispo */
.btn-dispo { border:none; border-radius:var(--radius); padding:.3rem .6rem;
  font-size:.8rem; font-weight:600; cursor:pointer; }
.btn-dispo.dispo        { background:var(--dispo-bg); color:var(--dispo-color); }
.btn-dispo.pas_dispo    { background:var(--pas-dispo-bg); color:var(--pas-dispo-color); }
.btn-dispo.si_necesaire { background:var(--si-necesaire-bg); color:var(--si-necesaire-color); }
.btn-dispo.neutre       { background:var(--gris-clair); color:var(--ardoise); }
.btn-dispo.affecte      { background:var(--affecte-bg); color:var(--affecte-color); }
.dispo-toggle { display:flex; gap:.3rem; justify-content:center; }
.dispo-loading { opacity:.5; pointer-events:none; }

/* Toggle checkbox */
.toggle-label { display:flex; align-items:center; gap:.5rem;
  cursor:pointer; font-size:.9rem; }
.toggle-label input[type="checkbox"] { width:18px; height:18px; cursor:pointer; }

/* Boutons additionnels */
.btn-success { background:var(--dispo-bg); color:var(--dispo-color); border:1.5px solid var(--dispo-color); }
.btn-success:hover { background:#c3e6cb; }
.btn-danger  { background:var(--pas-dispo-bg); color:var(--pas-dispo-color); border:1.5px solid var(--pas-dispo-color); }
.btn-danger:hover  { background:#f5c6cb; }
.invalid-feedback { color:var(--rouge); font-size:.82rem; margin-top:.25rem; }

/* Pagination Laravel */
.pagination { display:flex; gap:.35rem; list-style:none; flex-wrap:wrap; margin-top:.75rem; }
.pagination li a, .pagination li span {
  display:block; padding:.35rem .7rem; border-radius:var(--radius);
  border:1px solid var(--gris-clair); font-size:.85rem; }
.pagination li.active span { background:var(--bleu); color:#fff; border-color:var(--bleu); }
.pagination li a:hover { background:var(--bleu-clair); }
