/* ═══════════════════════════════════════════════════════════════
   THÈME VOLITIS · Suivi Chantiers
   Aligné sur la charte graphique Volitis utilisée dans Suiv'Heures
   ─────────────────────────────────────────────────────────────── */

:root {
  --vol-bleu:        #0f3a8a;   /* bleu marine principal */
  --vol-bleu-clair:  #1e4fa8;
  --vol-bleu-pale:   #bfdbfe;   /* texte secondaire sur fond bleu */
  --vol-ambre:       #f59e0b;   /* accent (signature) */
  --vol-ambre-clair: #fcd34d;
  --vol-noir:        #0f172a;
  --vol-gris-bg:     #f1f5f9;   /* fond de page */
  --vol-gris-card:   #f8fafc;
  --vol-gris-bord:   #cbd5e1;
  --vol-gris-texte:  #475569;
  --vol-gris-mute:   #64748b;
  --vol-success:     #16a34a;
  --vol-warning:     #f59e0b;
  --vol-danger:      #dc2626;

  /* ─── Alias de compatibilité ───
     Noms de couleurs utilisés dans saisie.html et rapports.html.
     Sans ces définitions, les bandeaux et totaux s'affichaient
     en crème pâle sur fond blanc (illisibles). */
  --ink:         var(--vol-bleu);        /* bandeaux foncés (fond) + texte foncé */
  --ink-soft:    var(--vol-gris-mute);   /* texte discret / mentions grises */
  --accent:      var(--vol-ambre);       /* totaux (ambre signature) */
  --accent-dark: var(--vol-bleu);        /* titres / libellés en évidence */
  --line:        var(--vol-gris-bord);   /* bordures fines */
}

/* ─── Page ─── */
html, body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  background: var(--vol-gris-bg) !important;
  color: var(--vol-noir) !important;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER VOLITIS
   ─────────────────────────────────────────────────────────────── */
.main-header {
  background: var(--vol-bleu);
  color: #fff;
  border-bottom: 3px solid var(--vol-ambre);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 10;
  min-height: 0;
  position: sticky;
  top: 0;
}

/* Bloc identité à gauche : logo + nom outil + baseline */
.main-header .vol-identite {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 0 auto;
}
.main-header .vol-identite .vol-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: var(--vol-bleu);
  letter-spacing: -0.02em;
}
.main-header .vol-identite .vol-titres {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
  gap: 0;
}
.main-header .vol-identite .vol-marque {
  font-size: 10px;
  font-weight: 600;
  color: var(--vol-bleu-pale);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.main-header .vol-identite .vol-nom {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.main-header .vol-identite .vol-baseline {
  font-size: 11px;
  color: var(--vol-bleu-pale);
  font-style: italic;
  margin-top: 1px;
}

/* Centre du header : titre de la page */
.main-header .page-title {
  flex: 1 1 auto;
  text-align: center;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  min-width: 0;
}

/* Bloc droite : entreprise + déconnexion */
.main-header .vol-droite {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.main-header .entreprise-nom {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  min-width: auto;
  line-height: 1.25;
}
.main-header .entreprise-nom::before {
  content: "ENTREPRISE";
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--vol-bleu-pale);
  letter-spacing: 0.06em;
  margin-bottom: 1px;
}
.main-header .vol-user-email {
  font-size: 10px;
  font-weight: 400;
  color: var(--vol-bleu-pale);
}
.main-header .vol-logout {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 11px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.main-header .vol-logout:hover {
  background: rgba(255,255,255,0.2);
}
.main-header .vol-role-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  background: var(--vol-ambre);
  color: var(--vol-noir);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION EN ONGLETS
   ─────────────────────────────────────────────────────────────── */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--vol-gris-bord);
  padding: 0 22px;
  display: flex;
  justify-content: flex-start;
  gap: 0;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 5;
}
.nav a {
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--vol-gris-texte);
  border-bottom: 3px solid transparent;
  border-radius: 0;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  background: transparent;
  white-space: nowrap;
}
.nav a:hover {
  background: var(--vol-gris-card);
  color: var(--vol-bleu);
  text-decoration: none;
}
.nav a.active {
  color: var(--vol-bleu);
  font-weight: 700;
  border-bottom-color: var(--vol-ambre);
  background: transparent;
  text-decoration: none;
}

/* Sur mobile, scroll horizontal de la nav */
@media (max-width: 700px) {
  .main-header { padding: 10px 14px; gap: 10px; }
  .main-header .vol-identite .vol-baseline { display: none; }
  .main-header .page-title { display: none; }
  .main-header .entreprise-nom { font-size: 11px; }
  .nav { padding: 0 8px; overflow-x: auto; }
  .nav a { padding: 11px 12px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS / CARTES
   ─────────────────────────────────────────────────────────────── */
body section,
body .card {
  background: #fff;
  border: 1px solid var(--vol-gris-bord);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
body section h2 {
  color: var(--vol-bleu) !important;
  border-bottom: 2px solid var(--vol-gris-bord) !important;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTONS
   ─────────────────────────────────────────────────────────────── */
body .btn-primary,
body button.btn-primary,
body .btn--primary,
body button.btn--primary {
  background: var(--vol-bleu) !important;
  color: #fff !important;
}
body .btn-success,
body button.btn-success,
body .btn--success,
body button.btn--success,
body .btn--ok,
body button.btn--ok {
  background: var(--vol-success) !important;
  color: #fff !important;
}
body .btn-warning,
body button.btn-warning,
body .btn--warning,
body button.btn--warning {
  background: var(--vol-warning) !important;
  color: #0f172a !important;
}
body .btn-danger,
body button.btn-danger,
body .btn--danger,
body button.btn--danger {
  background: var(--vol-danger) !important;
  color: #fff !important;
}
body .btn-ghost,
body .btn--ghost {
  background: #fff !important;
  color: var(--vol-gris-texte) !important;
  border: 1px solid var(--vol-gris-bord) !important;
}

/* ═══════════════════════════════════════════════════════════════
   INPUTS
   ─────────────────────────────────────────────────────────────── */
body input,
body select,
body textarea {
  border: 1px solid var(--vol-gris-bord) !important;
  border-radius: 4px;
}
body input:focus,
body select:focus,
body textarea:focus {
  outline: 2px solid var(--vol-bleu-pale) !important;
  border-color: var(--vol-bleu) !important;
}

/* ═══════════════════════════════════════════════════════════════
   TABLEAUX
   ─────────────────────────────────────────────────────────────── */
body table {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
body th {
  background: var(--vol-bleu) !important;
  color: #fff !important;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  border: 1px solid var(--vol-bleu-clair) !important;
  padding: 8px 10px !important;
}
body td {
  border: 1px solid #e5e7eb !important;
  padding: 6px 10px !important;
}
body tbody tr:nth-child(even) td { background: #f8fafc; }
body tbody tr:hover td { background: #eff6ff !important; }

/* ═══════════════════════════════════════════════════════════════
   BADGES / TAGS (style Volitis)
   ─────────────────────────────────────────────────────────────── */
body .tag {
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
body .tag-success, body .badge-actif {
  background: #dcfce7; color: #166534;
}
body .tag-info {
  background: var(--vol-bleu-pale); color: var(--vol-bleu);
}
body .tag-warn, body .badge-pause {
  background: #fef3c7; color: #92400e;
}
body .tag-danger, body .badge-depasse {
  background: #fee2e2; color: #991b1b;
}
body .tag-muted, body .badge-termine {
  background: var(--vol-gris-card); color: var(--vol-gris-mute);
  border: 1px solid var(--vol-gris-bord);
}

/* ═══════════════════════════════════════════════════════════════
   COMBOBOX (style Volitis)
   ─────────────────────────────────────────────────────────────── */
body .combo__display {
  border-color: var(--vol-gris-bord) !important;
}
body .combo.open .combo__display {
  border-color: var(--vol-bleu) !important;
  outline: 2px solid var(--vol-bleu-pale) !important;
}
body .combo__list {
  border-color: var(--vol-gris-bord);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}
body .combo__opt:hover { background: #eff6ff; }
body .combo__create {
  background: #dcfce7; color: #166534;
  border-top: 2px solid var(--vol-success);
}

/* ═══════════════════════════════════════════════════════════════
   MODAL (style Volitis)
   ─────────────────────────────────────────────────────────────── */
body .modal__head {
  background: var(--vol-bleu) !important;
  color: #fff !important;
  border-bottom: 3px solid var(--vol-ambre) !important;
}
body .modal__head button { color: #fff !important; }

/* ═══════════════════════════════════════════════════════════════
   PAGE LOGIN
   ─────────────────────────────────────────────────────────────── */
body .login-box {
  border-top: 4px solid var(--vol-ambre);
}
body .login-box h1 {
  color: var(--vol-bleu) !important;
}

/* ═══════════════════════════════════════════════════════════════
   ENCART JAUNE COMMENTAIRES & NOTES (style Volitis)
   ─────────────────────────────────────────────────────────────── */
.encart-notes {
  background: #fef9c3;
  border: 1px solid var(--vol-ambre);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.encart-notes__head {
  background: var(--vol-ambre);
  color: var(--vol-noir);
  padding: 6px 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════════
   ACCENT DOT (la pastille dans les card__header)
   ─────────────────────────────────────────────────────────────── */
body .card__header .dot {
  background: var(--vol-ambre) !important;
}
body .card__header h2 {
  color: var(--vol-bleu) !important;
}
