:root {
  --graphite: #1F2933;
  --bleu-acier: #3A5A78;
  --or: #E0A526;
  --kaki: #5C6B4F;
  --ivoire: #F2EFE9;
  --blanc: #FFFFFF;
  --texte-clair: #6B7280;

  --font-titre: "Arial Black", "Archivo Black", sans-serif;
  --font-corps: "Segoe UI", Arial, sans-serif;
}

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

body {
  font-family: var(--font-corps);
  background: var(--ivoire);
  color: var(--graphite);
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- EN-TÊTE ---------- */
header.entete {
  background: var(--ivoire);
  color: var(--graphite);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--or);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
header.entete img { height: 38px; }
header.entete .nom-site {
  font-family: var(--font-titre);
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--graphite);
}

/* ---------- BOUTON PRINCIPAL ---------- */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  font-size: 15px;
}
.btn-or { background: var(--or); color: var(--graphite); }
.btn-bleu { background: var(--bleu-acier); color: var(--blanc); }
.btn-whatsapp { background: #25D366; color: var(--blanc); }
.btn-large { width: 100%; padding: 16px; font-size: 16px; }

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(135deg, var(--graphite), var(--bleu-acier));
  color: var(--ivoire);
  padding: 36px 20px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-titre);
  font-size: 26px;
  margin-bottom: 10px;
}
.hero p { font-size: 15px; opacity: 0.9; margin-bottom: 18px; }

/* ---------- CATÉGORIES (accueil) ---------- */
.grille-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}
.carte-categorie {
  background: var(--blanc);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  border-left: 4px solid var(--or);
}
.carte-categorie img { height: 100px; object-fit: cover; width: 100%; }
.carte-categorie .contenu { padding: 10px; }
.carte-categorie h3 { font-size: 15px; color: var(--graphite); }
.carte-categorie p { font-size: 12px; color: var(--texte-clair); }

/* ---------- FICHE ENGIN ---------- */
.fiche-engin img.principale {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: center;
}
.fiche-engin .contenu { padding: 18px; }
.fiche-engin h1 { font-family: var(--font-titre); font-size: 22px; margin-bottom: 6px; }
.badge-categorie {
  display: inline-block;
  background: var(--kaki);
  color: var(--blanc);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.specs { margin: 16px 0; }
.specs div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #E5E1D8; font-size: 14px; }

/* ---------- FORMULAIRE DE DEMANDE ---------- */
.formulaire { padding: 18px; }
.formulaire label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
.formulaire input, .formulaire select, .formulaire textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #D5D0C4;
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-corps);
}
.formulaire textarea { min-height: 90px; resize: vertical; }

/* ---------- NAVIGATION BASSE (mobile) ---------- */
nav.bas {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--blanc);
  border-top: 1px solid #E5E1D8;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 50;
}
nav.bas a { font-size: 12px; text-align: center; color: var(--texte-clair); }
nav.bas a.actif { color: var(--bleu-acier); font-weight: 700; }

/* ---------- ADMIN ---------- */
.admin-body { background: #F5F5F3; }
.admin-carte {
  background: var(--blanc);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.admin-liste-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #EEE;
}

/* ---------- BADGES DE CONFIANCE ---------- */
.rangee-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.badge-confiance {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #EEF2ED;
  color: var(--kaki);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 20px;
}

/* ---------- BLOC RÉASSURANCE (objections) ---------- */
.bloc-reassurance {
  background: #F4F1E9;
  border-left: 4px solid var(--or);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
}
.bloc-reassurance h3 { font-size: 14px; margin-bottom: 8px; color: var(--graphite); }
.bloc-reassurance p { font-size: 13px; color: var(--texte-clair); margin-bottom: 6px; }
.bloc-reassurance p:last-child { margin-bottom: 0; }

/* ---------- FORMULAIRE MULTI-ÉTAPES ---------- */
.barre-progression {
  background: #E5E1D8;
  height: 6px;
  border-radius: 4px;
  margin: 0 16px 4px;
  overflow: hidden;
}
.barre-progression-remplissage {
  background: var(--or);
  height: 100%;
  transition: width 0.4s ease;
}
.etape-label {
  padding: 0 16px 14px;
  font-size: 12px;
  color: var(--texte-clair);
  font-weight: 700;
}
.etape-formulaire { display: none; }
.etape-formulaire.active { display: block; }
.nav-etapes {
  display: flex;
  gap: 10px;
  padding: 4px 16px 16px;
}
.nav-etapes .btn { flex: 1; }
.btn-secondaire {
  background: var(--blanc);
  color: var(--graphite);
  border: 1px solid #D5D0C4;
}

/* ---------- MENU HAMBURGER ---------- */
.btn-hamburger {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--graphite);
  cursor: pointer;
  padding: 4px 8px;
}
.menu-navigation {
  display: none;
  position: fixed;
  top: 62px;
  right: 12px;
  background: var(--blanc);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  min-width: 200px;
  overflow: hidden;
  z-index: 100;
}
.menu-navigation.ouvert { display: block; }
.menu-navigation a {
  display: block;
  padding: 13px 18px;
  font-size: 14px;
  color: var(--graphite);
  border-bottom: 1px solid #F0EEE8;
}
.menu-navigation a:last-child { border-bottom: none; }
.menu-navigation a.lien-legal { color: var(--texte-clair); font-size: 12px; }

/* ---------- CARROUSEL D'ENGINS ---------- */
.carrousel {
  position: relative;
  overflow: hidden;
  height: 210px;
}
.carrousel-piste {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}
.carrousel-diapo {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.carrousel-diapo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.carrousel-diapo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31,41,51,0.85), rgba(31,41,51,0) 60%);
}
.carrousel-texte {
  position: relative;
  z-index: 2;
  padding: 16px;
  color: var(--ivoire);
}
.carrousel-texte h3 { font-size: 16px; margin-bottom: 3px; }
.carrousel-texte p { font-size: 12px; opacity: 0.9; }
.carrousel-points {
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}
.carrousel-points .point {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}
.carrousel-points .point.actif { background: var(--or); }
.titre-section { padding: 18px 16px 0; font-size: 17px; }

/* ---------- FOOTER ---------- */
.pied-de-page {
  background: var(--graphite);
  color: #C9CDD2;
  padding: 24px 16px;
  margin-top: 20px;
  font-size: 13px;
}
.pied-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}
.pied-liens a { color: var(--ivoire); font-size: 13px; }
.pied-contact { margin-bottom: 10px; color: #9AA0A8; }
.pied-copyright { font-size: 11px; color: #767C84; border-top: 1px solid #3A414A; padding-top: 12px; }

/* ---------- WHATSAPP FLOTTANT ---------- */
.whatsapp-flottant {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  z-index: 200;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.whatsapp-flottant:active { cursor: grabbing; }

/* ---------- BANNIÈRE D'INSTALLATION PWA ---------- */
.banniere-installation {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--graphite);
  color: var(--ivoire);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  z-index: 250;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.25);
}
.banniere-installation span { flex: 1; line-height: 1.4; }
.banniere-installation button {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.banniere-installation #btn-installer-app { background: var(--or); color: var(--graphite); }
.banniere-installation #btn-fermer-banniere { background: transparent; color: var(--ivoire); font-size: 16px; padding: 4px 8px; }

body.avec-banniere-install { padding-bottom: 58px; }
body.avec-banniere-install .whatsapp-flottant { bottom: 76px; }
