/* ============================================================
   BATS SERVICES — Thème CRM
   Palette issue du logo : vagues bleu profond / bleu ciel / orange.
   Ce fichier est la référence de la charte. Les mêmes tokens sont
   également embarqués dans l'application (fichier unique, hors-ligne).
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  --bleu-profond: #1E5F8A;
  --bleu-ciel:    #5BA4CF;
  --bleu-pale:    #EAF4FA;
  --orange:       #E8895A;
  --orange-pale:  #FCEFE7;
  --fond:         #F7FAFC;
  --surface:      #FFFFFF;
  --texte:        #2C3E50;
  --texte-2:      #64748B;
  --bordure:      #E2EAF1;
  --statut-asuivre:  #94A3B8;  --statut-asuivre-bg: #EEF2F6;
  --statut-encours:  #3D8BB8;  --statut-encours-bg: #E3F1F9;
  --statut-termine:  #3E9A6D;  --statut-termine-bg: #E4F4EC;
  --radius: 12px;  --radius-s: 8px;
  --ombre: 0 1px 3px rgba(30,95,138,0.08), 0 4px 14px rgba(30,95,138,0.05);
  --ombre-hover: 0 4px 10px rgba(30,95,138,0.12), 0 8px 24px rgba(30,95,138,0.08);
  --transition: 150ms ease;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: 'DM Sans', system-ui, sans-serif; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--bleu-profond); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
a { color: var(--bleu-profond); text-decoration: none; }
a:hover { color: var(--bleu-ciel); }

.header { background: var(--surface); padding: 14px 24px; display: flex; align-items: center; gap: 24px; position: relative; }
.header .logo { height: 42px; display: block; }
.header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 20' preserveAspectRatio='none'%3E%3Cpath d='M0,10 C150,22 300,-2 450,8 C600,18 750,0 900,8 C1050,16 1150,4 1200,10 L1200,0 L0,0 Z' fill='%235BA4CF' opacity='0.35'/%3E%3Cpath d='M0,6 C180,16 360,-4 540,6 C720,16 900,-2 1080,6 C1140,9 1180,7 1200,6 L1200,0 L0,0 Z' fill='%231E5F8A' opacity='0.5'/%3E%3C/svg%3E") no-repeat; background-size: 100% 100%; pointer-events: none; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: var(--radius-s); color: var(--texte-2); font-weight: 500; transition: background var(--transition), color var(--transition); }
.nav a:hover { background: var(--bleu-pale); color: var(--bleu-profond); }
.nav a.actif { background: var(--bleu-profond); color: #fff; }

.conteneur { max-width: 1080px; margin: 0 auto; padding: 32px 20px; }

.carte { background: var(--surface); border-radius: var(--radius); box-shadow: var(--ombre); padding: 20px; transition: box-shadow var(--transition), transform var(--transition); }
a.carte:hover, .carte.cliquable:hover { box-shadow: var(--ombre-hover); transform: translateY(-2px); }

.liste-chantiers { display: grid; gap: 14px; }
.chantier { background: var(--surface); border-radius: var(--radius); box-shadow: var(--ombre); padding: 16px 20px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; cursor: pointer; border-left: 4px solid transparent; transition: box-shadow var(--transition), transform var(--transition); }
.chantier:hover { box-shadow: var(--ombre-hover); transform: translateY(-2px); }
.chantier.asuivre { border-left-color: var(--statut-asuivre); }
.chantier.encours { border-left-color: var(--bleu-ciel); }
.chantier.termine { border-left-color: var(--statut-termine); }
.chantier .nom { font-weight: 600; font-size: 1.05rem; color: var(--texte); }
.chantier .infos { color: var(--texte-2); font-size: .9rem; grid-column: 1; }
.chantier .infos .poseur { color: var(--bleu-profond); font-weight: 500; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.asuivre { background: var(--statut-asuivre-bg); color: var(--statut-asuivre); }
.badge.encours { background: var(--statut-encours-bg); color: var(--statut-encours); }
.badge.termine { background: var(--statut-termine-bg); color: var(--statut-termine); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: none; border-radius: var(--radius-s); font-family: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); }
.btn:active { transform: scale(.98); }
.btn-principal { background: var(--orange); color: #fff; }
.btn-principal:hover { background: #DD7A47; box-shadow: 0 4px 12px rgba(232,137,90,.35); }
.btn-bleu { background: var(--bleu-profond); color: #fff; }
.btn-bleu:hover { background: #17527A; }
.btn-secondaire { background: var(--bleu-pale); color: var(--bleu-profond); }
.btn-secondaire:hover { background: #DCEDF8; }
.btn-discret { background: transparent; color: var(--texte-2); }
.btn-discret:hover { background: var(--bleu-pale); color: var(--bleu-profond); }

label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--texte); }
input, select, textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--bordure); border-radius: var(--radius-s); background: var(--surface); color: var(--texte); font-family: inherit; font-size: .95rem; transition: border-color var(--transition), box-shadow var(--transition); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu-ciel); box-shadow: 0 0 0 3px rgba(91,164,207,.18); }
input::placeholder, textarea::placeholder { color: #A7B4C2; }
.champ { margin-bottom: 18px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--ombre); }
th { text-align: left; padding: 12px 16px; background: var(--bleu-pale); color: var(--bleu-profond); font-weight: 600; font-size: .88rem; }
td { padding: 12px 16px; border-top: 1px solid var(--bordure); }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: #FBFDFE; }

.vide { text-align: center; padding: 48px 20px; color: var(--texte-2); }
.vide .titre-vide { color: var(--bleu-profond); font-weight: 600; font-size: 1.1rem; margin-bottom: 6px; }

.ligne { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.espace { margin-left: auto; }
.texte-2 { color: var(--texte-2); }
.mt { margin-top: 20px; }

@media (max-width: 640px) {
  .conteneur { padding: 20px 14px; }
  .header { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .header .logo { height: 34px; }
  .nav { width: 100%; margin-left: 0; overflow-x: auto; }
  .chantier { grid-template-columns: 1fr; }
  .chantier .badge { justify-self: start; }
  .btn { padding: 12px 18px; }
  input, select, textarea { padding: 12px 14px; font-size: 16px; }
}

:focus-visible { outline: 2px solid var(--bleu-ciel); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
