/* ------------------------------------------------------------------
   Suivi entretien matériel — feuille de style
   Vert = terminé · Orange = échéance proche · Rouge = en retard
   ------------------------------------------------------------------ */

:root {
  --etat-ok:    #198754;
  --etat-soon:  #fd7e14;
  --etat-late:  #dc3545;
}

body {
  background-color: #f5f7f5;
  -webkit-text-size-adjust: 100%;
}

.navbar-brand { letter-spacing: .2px; }

/* ---- Cartes de synthèse ---- */
.stat-card {
  border: 0;
  border-left: 5px solid var(--bs-secondary);
  border-radius: .5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  height: 100%;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat-card .stat-label { font-size: .82rem; color: #6c757d; text-transform: uppercase; letter-spacing: .3px; }
.stat-card.b-success { border-left-color: var(--etat-ok); }
.stat-card.b-warning { border-left-color: var(--etat-soon); }
.stat-card.b-danger  { border-left-color: var(--etat-late); }
.stat-card.b-info    { border-left-color: #0dcaf0; }
.stat-card.b-primary { border-left-color: #0d6efd; }
.stat-card a { text-decoration: none; color: inherit; display: block; }
.stat-card a:hover { opacity: .85; }

/* ---- Lignes d'échéance ---- */
tr.row-late  { background-color: #fdeaea !important; }
tr.row-soon  { background-color: #fff4e5 !important; }
tr.row-done  { background-color: #eaf6ee !important; }

.badge-etat { font-size: .75rem; }

/* ---- Fiches véhicule ---- */
.vehicle-header {
  background: #fff;
  border-radius: .5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.dl-fiche dt { font-weight: 500; color: #6c757d; font-size: .85rem; }
.dl-fiche dd { margin-bottom: .6rem; }

.compteur {
  font-size: 1.6rem;
  font-weight: 600;
}

/* ---- Tables lisibles sur mobile ---- */
.table-sm td, .table-sm th { vertical-align: middle; }
.table-responsive { -webkit-overflow-scrolling: touch; }

@media (max-width: 576px) {
  .stat-card .stat-value { font-size: 1.5rem; }
  h1, .h1 { font-size: 1.4rem; }
  h2, .h2 { font-size: 1.2rem; }
  .table-sm td, .table-sm th { font-size: .85rem; }
  .btn { --bs-btn-padding-y: .45rem; }  /* cibles tactiles plus grandes */
}

/* ---- Formulaires ---- */
.form-label { font-weight: 500; font-size: .9rem; margin-bottom: .25rem; }
.required::after { content: " *"; color: var(--etat-late); }
fieldset legend {
  font-size: .95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #6c757d;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: .3rem;
  margin-bottom: .8rem;
}

/* ---- Connexion ---- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #198754 0%, #0f5132 100%);
  padding: 1rem;
}
.login-card { width: 100%; max-width: 400px; border: 0; border-radius: .75rem; }

/* ---- Impression ---- */
@media print {
  .no-print, .navbar, footer, .btn, form.d-flex { display: none !important; }
  body { background: #fff; }
  .card, .vehicle-header { box-shadow: none !important; border: 1px solid #ddd !important; }
  a[href]::after { content: ""; }
}
