/* ============================================================
   MAQUETTE GENIN AGRICOLE — feuille de style commune
   Identité PROVISOIRE (le client n'a pas encore fourni la sienne).
   Tout passe par les design tokens ci-dessous : re-skinner le site
   = changer ces variables, rien d'autre.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Barlow:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* — Palette « cour de concession » — */
  --gravel:  #E8E6E1;   /* fond général : béton propre */
  --panel:   #F8F7F4;   /* surfaces / cartes */
  --ink:     #23201A;   /* encre charbon brun */
  --ink-2:   #55514A;   /* texte secondaire */
  --steel:   #5E6A72;   /* gris acier : données, filets */
  --line:    #D4D1C9;   /* filets discrets */
  --signal:  #B3271E;   /* rouge oxyde : accent action + chevrons */
  --signal-d:#8F1F18;   /* rouge oxyde foncé (hover) */
  --field:   #3F5A36;   /* vert champ : pastille « disponible » uniquement */
  --dark:    #26231D;   /* sections sombres (hero, contact) */
  --dark-2:  #322E27;
  --on-dark: #EFEDE8;

  /* — Marques (badges produits uniquement, jamais pour le site) — */
  --brand-jcb: #FCB026;         /* réservé au badge JCB */
  --brand-jcb-ink: #1A1A1A;

  /* — Typo — */
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body:    "Barlow", "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", "Consolas", monospace;

  /* — Rythme — */
  --maxw: 1180px;
  --gap: clamp(16px, 2.5vw, 28px);
  --radius: 3px;              /* tôle pliée : angles quasi vifs */
  --shadow: 0 1px 2px rgba(35,32,26,.08), 0 8px 24px -12px rgba(35,32,26,.22);
  --shadow-lift: 0 2px 4px rgba(35,32,26,.10), 0 18px 38px -14px rgba(35,32,26,.30);

  /* — Signature : chevrons de signalisation (convoi agricole) — */
  --chevrons: repeating-linear-gradient(
      -45deg,
      var(--signal) 0 14px,
      var(--panel) 14px 28px);
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--gravel);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }

/* Liseré signature en haut de chaque page */
.chevron-strip { height: 7px; background: var(--chevrons); }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar .wrap {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  min-height: 74px;
}
.logo { text-decoration: none; line-height: .92; flex-shrink: 0; }
.logo b {
  display: block;
  font-family: var(--display); font-weight: 700; font-size: 30px;
  letter-spacing: .02em; text-transform: uppercase;
}
.logo span {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .34em; text-transform: uppercase; color: var(--signal);
}
.logo span::after { content: ""; flex: 1; height: 3px; background: var(--chevrons); opacity: .9; }
.nav { display: flex; gap: clamp(10px, 2vw, 26px); margin-left: auto; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 15px;
  color: var(--ink-2); padding: 6px 2px; border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--signal); }
.topbar .tel {
  text-decoration: none; font-family: var(--mono); font-weight: 600; font-size: 14px;
  background: var(--ink); color: var(--on-dark);
  padding: 10px 16px; border-radius: var(--radius); white-space: nowrap;
}
.topbar .tel:hover { background: var(--signal); }
@media (max-width: 860px) {
  .topbar .wrap { flex-wrap: wrap; padding-block: 10px; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .topbar .tel { margin-left: auto; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(48px, 7vw, 84px); }
.section--panel { background: var(--panel); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(24px, 4vw, 40px); }
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase; color: var(--signal);
  margin-bottom: 10px;
}
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .015em; line-height: .96; }
h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; }
.section-head .more {
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink);
  border-bottom: 2px solid var(--signal); padding-bottom: 2px; white-space: nowrap;
}
.section-head .more:hover { color: var(--signal); }
.lead { max-width: 640px; color: var(--ink-2); font-size: 17.5px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: var(--radius);
  text-decoration: none; border: none; cursor: pointer;
  transition: background .15s, transform .15s;
  position: relative; overflow: hidden;
}
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 5px;
  background: var(--chevrons); opacity: 0; transition: opacity .2s;
}
.btn-primary:hover { background: var(--signal-d); }
.btn-primary:hover::after { opacity: 1; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-dark); }
.btn-ghost--dark { color: var(--on-dark); box-shadow: inset 0 0 0 2px var(--on-dark); }
.btn-ghost--dark:hover { background: var(--on-dark); color: var(--ink); }

/* ---------- Badges & pastilles ---------- */
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 2px;
}
.badge-brand { background: var(--ink); color: var(--on-dark); }        /* marque générique */
.badge-jcb   { background: var(--brand-jcb); color: var(--brand-jcb-ink); } /* charte JCB : jaune réservé */
.badge-etat  { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.badge-occ   { background: var(--chevrons); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.dispo   { color: var(--field); font-weight: 600; }
.dispo .dot { background: var(--field); }
.loue    { color: var(--signal); font-weight: 600; }
.loue .dot { background: var(--signal); }

/* ---------- Cartes machine ---------- */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-img { aspect-ratio: 4 / 3; background: #DFDCD5; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .flags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 22px; font-weight: 600; letter-spacing: .01em; }
.card .ref { font-family: var(--mono); font-size: 11.5px; color: var(--steel); letter-spacing: .06em; }
.card .specline {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto;
}
.card .price { font-weight: 600; font-size: 15px; }
.card .price small { color: var(--ink-2); font-weight: 400; }

/* Placeholder photo (machines dont on attend les photos CARFAC) */
.ph {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: repeating-linear-gradient(-45deg, #E3E0DA 0 12px, #DAD7D0 12px 24px);
  color: var(--steel); font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; text-align: center; padding: 12px;
}
.ph svg { width: 44px; height: 44px; opacity: .55; }

/* ---------- Plaque signalétique (fiche machine) ---------- */
.plaque {
  display: inline-flex; flex-wrap: wrap; align-items: stretch;
  font-family: var(--mono); font-size: 13px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.plaque > div { padding: 10px 16px; border-right: 1px solid var(--line); }
.plaque > div:last-child { border-right: none; }
.plaque dt { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--steel); }
.plaque dd { font-weight: 600; margin: 0; }

/* ---------- Tableau de specs ---------- */
.specs { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
.specs th, .specs td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.specs th { font-weight: 500; color: var(--ink-2); width: 55%; }
.specs td { font-weight: 600; }
.specs tr:nth-child(odd) { background: rgba(35,32,26,.025); }

/* ---------- Hero sombre ---------- */
.hero { background: var(--dark); color: var(--on-dark); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
  padding-block: clamp(36px, 4.5vw, 58px);
}
.hero h1 {
  font-size: clamp(44px, 6.2vw, 78px); font-weight: 700; line-height: .9;
  letter-spacing: .005em;
}
.hero h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px var(--on-dark); }
.hero p { margin-top: 20px; max-width: 480px; color: #C9C5BC; font-size: 18px; }
.hero .cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); box-shadow: 0 24px 60px -18px rgba(0,0,0,.6);
}
.hero-visual figcaption {
  margin-top: 12px; font-family: var(--mono); font-size: 12px; color: #97928A;
  display: flex; justify-content: space-between; gap: 12px;
}
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ---------- Bande marques ---------- */
.marques { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.marque-tile {
  font-family: var(--display); font-weight: 700; font-size: 21px; text-transform: uppercase;
  letter-spacing: .04em; padding: 12px 22px; border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow);
}
.marque-tile--jcb { background: var(--brand-jcb); color: var(--brand-jcb-ink); }
.marque-tile--soon { background: transparent; box-shadow: inset 0 0 0 2px var(--line); color: var(--steel); }

/* ---------- Calendrier de disponibilité ---------- */
.cal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.cal h3 { font-size: 20px; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--steel); text-align: center; padding-bottom: 4px; }
.day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; border-radius: 2px;
  background: #fff; border: 1px solid var(--line); cursor: pointer; user-select: none;
}
.day:hover { border-color: var(--ink); }
.day.off  { background: transparent; border-color: transparent; color: var(--line); cursor: default; }
.day.busy { background: var(--chevrons); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); cursor: not-allowed; border: none; }
.day.sel  { background: var(--ink); color: var(--on-dark); border-color: var(--ink); font-weight: 600; }
.cal-legend { display: flex; gap: 18px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); flex-wrap: wrap; }
.cal-legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--line); display: inline-block; }
.swatch--libre { background: #fff; }
.swatch--busy  { background: var(--chevrons); border: none; }
.swatch--sel   { background: var(--ink); border: none; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
label { font-weight: 600; font-size: 14px; display: grid; gap: 6px; }
input, select, textarea {
  font: inherit; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius); background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }

/* ---------- Bandeau contact + footer ---------- */
.contact { background: var(--dark); color: var(--on-dark); }
.contact .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: var(--gap); padding-block: clamp(48px, 6vw, 72px); align-items: center; }
.contact h2 { color: var(--on-dark); }
.contact .bigtel {
  font-family: var(--display); font-weight: 700; font-size: clamp(34px, 5vw, 56px);
  color: var(--on-dark); text-decoration: none; letter-spacing: .02em;
}
.contact .bigtel:hover { color: var(--brand-jcb); color: var(--signal); }
.contact .meta { font-family: var(--mono); font-size: 13.5px; color: #A5A098; line-height: 2; }
@media (max-width: 760px) { .contact .wrap { grid-template-columns: 1fr; } }
.footer { background: var(--dark-2); color: #97928A; font-size: 13.5px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; }
.footer a { color: inherit; }

/* ---------- Divers ---------- */
.note {
  font-size: 14px; color: var(--ink-2); background: var(--panel);
  border-left: 4px solid var(--signal); padding: 12px 16px; border-radius: 2px;
}
.breadcrumb { font-family: var(--mono); font-size: 12.5px; color: var(--steel); padding-top: 22px; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--signal); }

/* Révélation discrète au scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}
