/* ============================================================
   MAQUETTE 2 « LA TERRE D'ABORD » — Genin Agricole
   Direction contrastée avec la maquette 1 (« cour de concession ») :
   chaleureuse, terrienne, humaine. Papier crème doré, brun limon,
   vert pin (aucune couleur de marque de machines), typo slab.
   Mêmes NOMS de tokens que la maquette 1 → les pages partagées
   fonctionnent sans modification ; seules les valeurs changent.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,500;0,600;0,700;1,400&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;1,400&family=Spline+Sans+Mono:wght@400;500;600&display=swap');

:root {
  /* — Palette « terre wallonne » — */
  --gravel:  #F5EFE3;   /* papier crème doré : fond général */
  --panel:   #FDFBF5;   /* surfaces / cartes */
  --ink:     #352B1F;   /* brun limon : encre */
  --ink-2:   #6B5F4E;   /* texte secondaire */
  --steel:   #8A7C64;   /* utilitaire chaud : données, filets */
  --line:    #E4DAC4;   /* filets discrets */
  --signal:  #2C5E4F;   /* vert pin : accent action (≠ vert John Deere) */
  --signal-d:#1F4638;   /* vert pin foncé (hover) */
  --field:   #4C8B3F;   /* vert prairie : pastille « disponible » */
  --straw:   #C9A35C;   /* paille : détails, filets dorés */
  --dark:    #2E251A;   /* brun terre profond : sections sombres */
  --dark-2:  #3A2F20;
  --on-dark: #F3EDE0;

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

  /* — Typo : slab robuste + humaniste — */
  --display: "Bitter", Georgia, serif;
  --body:    "Source Sans 3", "Segoe UI", sans-serif;
  --mono:    "Spline Sans Mono", "Consolas", monospace;

  /* — Rythme : généreux, arrondi — */
  --maxw: 1180px;
  --gap: clamp(18px, 2.5vw, 30px);
  --radius: 14px;
  --shadow: 0 2px 6px rgba(53,43,31,.06), 0 14px 34px -16px rgba(53,43,31,.22);
  --shadow-lift: 0 4px 10px rgba(53,43,31,.08), 0 24px 48px -18px rgba(53,43,31,.30);

  /* — Signature « bottes de paille » (jours loués, badge occasion) — */
  --chevrons: repeating-linear-gradient(
      -45deg,
      #A98545 0 12px,
      #8A6B36 12px 24px);

  /* — Signature « sillons » : séparateur ondulé — */
  --sillons: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14'><path d='M0 7 Q15 0 30 7 T60 7 T90 7 T120 7' fill='none' stroke='%23C9A35C' stroke-width='2.5'/></svg>");
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  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é haut de page : un champ, pas un chantier */
.chevron-strip { height: 6px; background: linear-gradient(90deg, var(--signal), #4C8B3F 55%, var(--straw)); }

/* Séparateur sillons (signature) */
.sillons { height: 14px; background-image: var(--sillons); background-repeat: repeat-x; opacity: .8; }

/* ---------- Topbar ---------- */
.topbar {
  background: rgba(253,251,245,.94); backdrop-filter: blur(6px);
  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: 76px;
}
.logo { text-decoration: none; line-height: 1; flex-shrink: 0; }
.logo b {
  display: block;
  font-family: var(--display); font-weight: 700; font-size: 27px;
  letter-spacing: .01em; color: var(--ink);
}
.logo span {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--body); font-size: 12px; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase; color: var(--signal);
}
.logo span::after {
  content: ""; width: 34px; height: 8px;
  background-image: var(--sillons); background-repeat: repeat-x; background-size: 60px 8px;
}
.nav { display: flex; gap: clamp(10px, 2vw, 26px); margin-left: auto; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 15.5px;
  color: var(--ink-2); padding: 8px 4px; border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--signal); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--straw); }
.topbar .tel {
  text-decoration: none; font-family: var(--body); font-weight: 700; font-size: 15px;
  background: var(--signal); color: #fff;
  padding: 11px 20px; border-radius: 999px; white-space: nowrap;
}
.topbar .tel:hover { background: var(--signal-d); }
@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(52px, 7vw, 88px); }
.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, 42px); }
.eyebrow {
  font-family: var(--body); font-size: 13px; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase; color: var(--straw);
  margin-bottom: 10px;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: 0; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; }
.section-head .more {
  font-weight: 600; font-size: 15.5px; text-decoration: none; color: var(--signal);
  border-bottom: 2px solid var(--straw); padding-bottom: 2px; white-space: nowrap;
}
.section-head .more:hover { color: var(--signal-d); }
.lead { max-width: 640px; color: var(--ink-2); font-size: 18px; }

/* ---------- Boutons : pilules pleines ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--body); font-weight: 700; font-size: 16.5px;
  padding: 15px 30px; border-radius: 999px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 8px 20px -8px rgba(44,94,79,.55); }
.btn-primary:hover { background: var(--signal-d); transform: translateY(-1px); }
.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(--body); font-size: 11.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}
.badge-brand { background: var(--ink); color: var(--on-dark); }
.badge-jcb   { background: var(--brand-jcb); color: var(--brand-jcb-ink); }
.badge-etat  { background: var(--panel); 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,.4); }

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

/* ---------- Cartes machine ---------- */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(270px, 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 .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-img { aspect-ratio: 4 / 3; background: #EDE5D2; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img .flags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 21px; font-weight: 700; }
.card .ref { font-family: var(--mono); font-size: 12px; color: var(--steel); letter-spacing: .05em; }
.card .specline {
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  border-top: 1px dashed var(--line); padding-top: 10px; margin-top: auto;
}
.card .price { font-weight: 700; font-size: 15.5px; color: var(--signal); }
.card .price small { color: var(--ink-2); font-weight: 400; }

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

/* ---------- Plaque signalétique → étiquette douce ---------- */
.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); overflow: hidden;
}
.plaque > div { padding: 11px 18px; border-right: 1px dashed var(--line); }
.plaque > div:last-child { border-right: none; }
.plaque dt { font-size: 10.5px; letter-spacing: .2em; 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: 12px 16px; border-bottom: 1px dashed var(--line); }
.specs th { font-weight: 500; color: var(--ink-2); width: 55%; }
.specs td { font-weight: 600; color: var(--signal-d); }
.specs tr:nth-child(odd) { background: rgba(201,163,92,.06); }

/* ---------- Hero photo immersif ---------- */
.hero {
  position: relative; color: var(--on-dark); overflow: hidden;
  background: var(--dark);
}
.hero .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 40%;
}
.hero .bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(46,37,26,.94) 8%, rgba(46,37,26,.55) 45%, rgba(46,37,26,.18));
}
.hero .wrap { position: relative; padding-block: clamp(120px, 22vh, 220px) clamp(40px, 6vh, 64px); }
.hero h1 {
  font-size: clamp(38px, 5.6vw, 68px); font-weight: 700; line-height: 1.05;
  max-width: 13ch;
}
.hero h1 em { font-style: italic; color: var(--straw); }
.hero p { margin-top: 18px; max-width: 520px; color: #DDD3BF; font-size: 19px; }
.hero .cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero .credit {
  position: relative; margin-top: 34px;
  font-family: var(--mono); font-size: 12px; color: #B7AB92;
}

/* ---------- Bande marques ---------- */
.marques { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.marque-tile {
  font-family: var(--display); font-weight: 700; font-size: 20px;
  padding: 13px 26px; border-radius: 999px;
  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: 20px; }
.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: 8px;
  background: #fff; border: 1px solid var(--line); cursor: pointer; user-select: none;
}
.day:hover { border-color: var(--signal); }
.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,.45); cursor: not-allowed; border: none; }
.day.sel  { background: var(--signal); color: #fff; border-color: var(--signal); font-weight: 600; }
.cal-legend { display: flex; gap: 18px; margin-top: 14px; font-size: 14px; 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: 4px; border: 1px solid var(--line); display: inline-block; }
.swatch--libre { background: #fff; }
.swatch--busy  { background: var(--chevrons); border: none; }
.swatch--sel   { background: var(--signal); 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: 14.5px; display: grid; gap: 6px; }
input, select, textarea {
  font: inherit; padding: 13px 16px; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--signal); }

/* ---------- 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, 76px); align-items: center; }
.contact h2 { color: var(--on-dark); }
.contact .bigtel {
  font-family: var(--display); font-weight: 700; font-size: clamp(32px, 4.6vw, 52px);
  color: var(--straw); text-decoration: none;
}
.contact .bigtel:hover { color: var(--on-dark); }
.contact .meta { font-family: var(--mono); font-size: 13.5px; color: #B7AB92; line-height: 2; }
@media (max-width: 760px) { .contact .wrap { grid-template-columns: 1fr; } }
.footer { background: var(--dark-2); color: #B7AB92; 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: 14.5px; color: var(--ink-2); background: var(--panel);
  border-left: 4px solid var(--straw); padding: 13px 17px; border-radius: 0 10px 10px 0;
}
.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, .card-img img { transition: none; }
}
