/* ========= PADVOL — rouge #F63B3B, noir, blanc ========= */
:root {
  --rouge: #F63B3B;
  --rouge-fonce: #d92b2b;
  --noir: #141414;
  --gris: #6b6b6b;
  --gris-clair: #f4f4f4;
  --blanc: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--noir);
  background: var(--blanc);
}

.vue { min-height: 100vh; display: flex; flex-direction: column; }
.cachee { display: none !important; }
.rouge { color: var(--rouge); }

/* ---------- Barre du haut ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px;
  background: var(--blanc);
  border-bottom: 3px solid var(--rouge);
  position: sticky; top: 0; z-index: 1001;
}
.topbar-logo { height: 62px; }
.topbar-droite { display: flex; align-items: center; gap: 14px; }
.nom-utilisateur { color: var(--gris); font-size: 14px; }

/* ---------- Boutons ---------- */
.btn {
  border: none; cursor: pointer; font-weight: 600;
  border-radius: 8px; padding: 10px 20px; font-size: 15px;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-rouge { background: var(--rouge); color: var(--blanc); }
.btn-rouge:hover { background: var(--rouge-fonce); }
.btn-grand { padding: 14px 32px; font-size: 17px; }
.btn-contour {
  background: var(--blanc); color: var(--noir);
  border: 2px solid var(--noir); padding: 8px 16px;
}
.btn-contour:hover { background: var(--noir); color: var(--blanc); }

/* ---------- Accueil ---------- */
.hero {
  text-align: center; padding: 48px 20px 36px;
  max-width: 760px; margin: 0 auto;
}
.hero-logo { width: 210px; max-width: 60vw; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 18px 0 14px; }
.hero-texte { color: var(--gris); font-size: 18px; line-height: 1.6; margin-bottom: 28px; }

.avantages {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  padding: 10px 20px 60px; max-width: 1000px; margin: 0 auto;
}
.carte-avantage {
  background: var(--gris-clair); border-radius: 14px;
  padding: 26px 22px; width: 280px; text-align: center;
  border-top: 4px solid var(--rouge);
}
.carte-avantage .icone { font-size: 34px; margin-bottom: 10px; }
.carte-avantage h3 { margin-bottom: 8px; }
.carte-avantage p { color: var(--gris); font-size: 15px; line-height: 1.5; }

.pied {
  margin-top: auto; text-align: center; padding: 18px;
  background: var(--noir); color: var(--blanc); font-size: 14px;
}

/* ---------- Connexion ---------- */
#vue-connexion {
  justify-content: center; align-items: center;
  background: linear-gradient(160deg, var(--blanc) 55%, #ffecec 100%);
}
.boite-connexion {
  background: var(--blanc); border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  padding: 36px 34px; width: 380px; max-width: 92vw;
  text-align: center; border-top: 5px solid var(--rouge);
}
.connexion-logo { width: 130px; }
.boite-connexion h2 { margin: 10px 0 4px; }
.sous-titre { color: var(--gris); font-size: 14px; margin-bottom: 22px; }
#form-connexion { text-align: left; }
#form-connexion label {
  display: block; font-size: 13px; font-weight: 600;
  margin: 14px 0 5px; color: var(--noir);
}
#form-connexion input {
  width: 100%; padding: 11px 12px; font-size: 15px;
  border: 1.5px solid #ddd; border-radius: 8px; outline: none;
}
#form-connexion input:focus { border-color: var(--rouge); }
#form-connexion .btn { width: 100%; margin-top: 20px; }
.erreur {
  background: #ffecec; color: var(--rouge-fonce);
  border-radius: 8px; padding: 10px; font-size: 14px; margin-top: 14px;
  text-align: center;
}
.lien-retour {
  background: none; border: none; color: var(--gris);
  margin-top: 18px; cursor: pointer; font-size: 14px;
}
.lien-retour:hover { color: var(--noir); }

/* ---------- Suivi ---------- */
#vue-suivi { height: 100vh; }
.topbar-app { flex-shrink: 0; }
.app-corps { flex: 1; display: flex; min-height: 0; }

.panneau-vehicules {
  width: 330px; flex-shrink: 0; overflow-y: auto; overflow-x: hidden;
  background: var(--gris-clair); padding: 18px;
  border-right: 1px solid #e2e2e2;
}
.panneau-vehicules h2 { font-size: 18px; margin-bottom: 14px; }
.badge {
  background: var(--rouge); color: var(--blanc);
  border-radius: 999px; font-size: 13px; padding: 2px 10px;
  vertical-align: middle;
}

.carte-vehicule {
  background: var(--blanc); border-radius: 12px;
  padding: 14px; margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  cursor: pointer; border-left: 4px solid transparent;
  transition: border-color .15s;
}
.carte-vehicule:hover, .carte-vehicule.actif { border-left-color: var(--rouge); }
.vehicule-entete { display: flex; align-items: center; justify-content: space-between; }
.vehicule-nom { font-weight: 700; font-size: 16px; }
.pastille {
  width: 11px; height: 11px; border-radius: 50%; display: inline-block;
  margin-right: 6px; flex-shrink: 0;
}
.pastille.online { background: #2ebd59; }
.pastille.offline { background: #c4c4c4; }
.pastille.unknown { background: #f0ad2e; }
.vehicule-infos { color: var(--gris); font-size: 13px; margin-top: 8px; line-height: 1.7; }
.vehicule-infos b { color: var(--noir); }
.aucun { color: var(--gris); text-align: center; padding: 30px 10px; font-size: 14px; }

/* ---------- Zone retour ---------- */
.flotte-entete {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 8px;
}
.flotte-entete h2 { margin: 0; }
.config-zone {
  background: var(--blanc); border-radius: 12px; padding: 14px;
  margin-bottom: 12px; border-left: 4px solid var(--rouge);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.zone-aide { font-size: 13px; color: var(--gris); margin-bottom: 10px; line-height: 1.5; }
.zone-rayon { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.zone-rayon input[type="range"] { width: 100%; accent-color: var(--rouge); margin-top: 6px; }
.zone-boutons { display: flex; gap: 6px; flex-wrap: wrap; }

@keyframes clignoter { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
.pin-padvol.clignote svg { animation: clignoter .9s infinite; }
@keyframes clignoter-bord {
  0%, 100% { border-left-color: var(--rouge); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
  50% { border-left-color: transparent; box-shadow: 0 2px 14px rgba(246,59,59,.45); }
}
.carte-vehicule.clignote-bord { border-left-color: var(--rouge); animation: clignoter-bord .9s infinite; }
.badge-retour, .badge-zone {
  display: inline-block; border-radius: 6px; padding: 3px 10px;
  font-size: 12px; font-weight: 700; margin-top: 8px; color: var(--blanc);
}
.badge-retour { background: var(--rouge); animation: clignoter .9s infinite; }
.badge-zone { background: #2ebd59; }

/* ---------- Chronologie historique ---------- */
.carte-arret { border-left: 4px solid #141414; }
.carte-arret:hover, .carte-arret.actif { border-left-color: #141414; }

/* ---------- Historique ---------- */
.btn-petit { padding: 6px 12px; font-size: 13px; }
.btn-historique { margin-top: 10px; }
.hist-entete {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; gap: 8px;
}
.hist-entete h2 { margin: 0; }
.hist-vehicule { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.hist-raccourcis {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.hist-choix-date {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px;
}
.hist-choix-date label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
}
.hist-choix-date label span { width: 24px; flex-shrink: 0; }
.hist-choix-date input[type="datetime-local"] {
  flex: 1; width: 100%; min-width: 0; max-width: 100%;
  padding: 8px 10px; border: 1.5px solid #ddd;
  border-radius: 8px; font-size: 14px; background: var(--blanc);
  font-family: inherit; box-sizing: border-box;
}
.hist-choix-date .btn { align-self: stretch; }
.hist-resume {
  background: var(--blanc); border-left: 4px solid var(--rouge);
  border-radius: 8px; padding: 12px 14px; font-size: 14px;
  margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.stat-titre {
  font-weight: 700; font-size: 15px; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid #eee;
}
.stat-ligne {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 0; font-size: 14px;
}
.stat-ligne span { color: var(--gris); }
.carte-trajet { border-left-color: var(--rouge); }

#carte { flex: 1; min-height: 0; }

/* Pin PADVOL sur la carte */
.pin-padvol svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.etiquette-vehicule {
  background: var(--noir); color: var(--blanc);
  border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  .app-corps { flex-direction: column; }
  .panneau-vehicules {
    width: 100%; max-height: 38vh;
    border-right: none; border-bottom: 1px solid #e2e2e2;
  }
  .topbar-logo { height: 42px; }
}
