/* AgriRation Caprin — landing d'offre (racine de agri.d1dev.fr)
 *
 * Feuille unique, sans dependance ni CDN : la landing est servie telle quelle
 * par nginx depuis agri/landing/, il n'y a AUCUN build de ce cote. L'application
 * (React/Vite/Tailwind) vit sous /app/ et ne partage rien avec ce fichier.
 */

/* ---------------------------------------------------------------- tokens -- */
:root {
  --vert-nuit: #12382a;
  --vert: #2f7d54;
  --vert-vif: #3d9c69;
  --vert-brume: #eaf3ed;
  --vert-voile: #f5faf7;
  --paille: #c08a2b;
  --paille-brume: #fdf6e7;
  --encre: #16211c;
  --gris: #5c6f65;
  --gris-clair: #8b9c93;
  --trait: #dde7e1;
  --blanc: #ffffff;

  --rayon: 14px;
  --rayon-s: 9px;
  --ombre: 0 1px 2px rgba(18, 56, 42, .06), 0 8px 24px -12px rgba(18, 56, 42, .18);
  --ombre-forte: 0 2px 4px rgba(18, 56, 42, .08), 0 18px 42px -18px rgba(18, 56, 42, .32);
  --largeur: 1120px;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--encre);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }
a { color: var(--vert); }

.enveloppe { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 24px; }

/* Les enfants de grille gardent `min-width: auto` par defaut et refusent de
   passer sous leur largeur min-content : un seul mot insecable, et c'est toute
   la page qui s'elargit. */
.hero__grille > *, .cartes > *, .paliers > *, .vis-a-vis > *, .ecrans > *, .preuves > * { min-width: 0; }

/* Lien d'evitement : la page est longue, le clavier doit pouvoir sauter au contenu. */
.saut {
  /* Range en HAUT et non a gauche : un decalage horizontal cree un
     debordement lateral sur certains navigateurs. */
  position: absolute; top: -200px; left: 0;
  background: var(--vert-nuit); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--rayon-s) 0;
}
.saut:focus { top: 0; z-index: 100; }

:focus-visible { outline: 3px solid var(--vert-vif); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- boutons -- */
.bouton {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1.0rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.bouton--plein { background: var(--vert); color: #fff; box-shadow: var(--ombre-forte); }
.bouton--plein:hover { background: var(--vert-nuit); transform: translateY(-1px); }
.bouton--vide { background: transparent; color: var(--vert-nuit); border-color: var(--trait); }
.bouton--vide:hover { border-color: var(--vert); background: var(--vert-voile); }
.bouton--petit { padding: 10px 18px; font-size: .93rem; }
.bouton--lien {
  padding: 15px 4px; color: var(--vert-nuit);
  text-decoration: underline; text-decoration-color: var(--trait);
  text-underline-offset: 5px; text-decoration-thickness: 2px;
}
.bouton--lien:hover { text-decoration-color: var(--vert); background: transparent; }

/* ----------------------------------------------------------------- entete -- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait);
}
.entete__interieur { display: flex; align-items: center; gap: 24px; height: 68px; min-width: 0; }
.marque {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  /* Ne se comprime pas : c'est la nav qui cede, pas le nom de la marque. */
  flex: 0 0 auto;
  font-weight: 700; text-decoration: none; color: var(--encre); font-size: 1.05rem;
}
.marque__texte { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-etroit { display: none; }
.marque__glyphe { width: 27px; height: 27px; color: var(--vert); flex: 0 0 27px; }
.nav { display: flex; gap: clamp(15px, 1.9vw, 26px); margin-left: auto; }
/* Sans nowrap, « Le calcul » se cassait en deux lignes et la barre debordait. */
.nav a { color: var(--gris); text-decoration: none; font-size: .94rem; font-weight: 550; white-space: nowrap; }
.nav a:hover { color: var(--vert-nuit); }

/* ------------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  padding: 84px 0 72px;
  background:
    radial-gradient(1100px 420px at 12% -10%, var(--vert-brume), transparent 60%),
    radial-gradient(900px 380px at 92% 0%, var(--paille-brume), transparent 62%),
    var(--blanc);
  border-bottom: 1px solid var(--trait);
}
.hero__grille { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.surtitre {
  display: flex; align-items: center; gap: 12px;
  font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--vert); margin-bottom: 20px; max-width: 30em; line-height: 1.5;
}
.surtitre::before {
  content: ""; flex: 0 0 28px; height: 2px; background: var(--vert); border-radius: 2px;
}
.hero h1 { font-size: clamp(1.85rem, 3.1vw, 2.7rem); text-wrap: balance; max-width: 16em; }
.hero__accroche { margin-top: 20px; font-size: 1.16rem; color: var(--gris); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__mention { margin-top: 16px; font-size: .88rem; color: var(--gris-clair); }

/* Vignette de l'app dans le hero */
.vignette {
  margin: 0; /* <figure> porte `margin: 1em 40px` par defaut : a retirer. */
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon);
  box-shadow: var(--ombre-forte); overflow: hidden;
}
.vignette__barre { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--vert-voile); border-bottom: 1px solid var(--trait); }
.vignette__pastille { width: 10px; height: 10px; border-radius: 50%; background: var(--trait); }
.vignette__url { margin-left: 8px; font-size: .76rem; color: var(--gris-clair); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.vignette__corps { padding: 20px; display: grid; gap: 12px; }
.jauge { display: grid; gap: 6px; }
.jauge__ligne { display: flex; justify-content: space-between; font-size: .85rem; }
.jauge__nom { color: var(--gris); }
.jauge__valeur { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jauge__piste { height: 8px; border-radius: 999px; background: var(--vert-brume); overflow: hidden; }
.jauge__barre { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--vert-vif), var(--vert)); }
.jauge--alerte .jauge__barre { background: linear-gradient(90deg, #e0b64a, var(--paille)); }
.vignette__pied {
  margin-top: 4px; padding: 12px 14px; border-radius: var(--rayon-s);
  background: var(--vert-voile); border: 1px solid var(--trait);
  font-size: .84rem; color: var(--gris);
}
.vignette__alerte {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--paille-brume); border-color: #f0e0bd; color: #6b5115;
}
.vignette__icone { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 2px; color: var(--paille); }

/* ------------------------------------------------------------- indicateurs -- */
.preuves {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  background: var(--blanc);
  border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden;
  margin-top: 58px;
}
.preuve {
  padding: 22px 20px;
  /* Filet a droite et en dessous ; ceux du bord sont manges par l'overflow
     du conteneur. Les cellules non remplies restent blanches. */
  box-shadow: 1px 0 0 var(--trait), 0 1px 0 var(--trait);
}
.preuve__valeur {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 700; line-height: 1.1;
  color: var(--vert-nuit); font-variant-numeric: tabular-nums;
}
.preuve__suite { font-size: .95rem; font-weight: 650; color: var(--vert-nuit); margin-top: 2px; }
.preuve__libelle { margin-top: 8px; font-size: .85rem; color: var(--gris); line-height: 1.45; overflow-wrap: break-word; }

/* --------------------------------------------------------------- sections -- */
.section { padding: 78px 0; border-bottom: 1px solid var(--trait); }
.section--voile { background: var(--vert-voile); }
.section--nuit { background: var(--vert-nuit); color: #dfeee6; border-bottom: none; }
.section--nuit h2, .section--nuit h3 { color: #fff; }
.section--nuit .section__accroche { color: #a9c9b8; }

.section__entete { max-width: 46em; margin-bottom: 44px; }
.section__oeil { font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--vert); margin-bottom: 12px; }
.section h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
.section__accroche { margin-top: 16px; font-size: 1.08rem; color: var(--gris); }

/* Grille de cartes */
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.carte {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 26px; box-shadow: var(--ombre);
}
.carte__glyphe {
  width: 40px; height: 40px; padding: 8px; margin-bottom: 16px; display: block;
  color: var(--vert); background: var(--vert-brume);
  border-radius: 10px; box-sizing: border-box;
}
.carte--etape .carte__glyphe { color: var(--paille); background: var(--paille-brume); }
.carte h3 { font-size: 1.12rem; margin-bottom: 9px; }
.carte p { color: var(--gris); font-size: .97rem; }
.carte__detail {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--trait);
  font-size: .87rem; color: var(--gris-clair);
}
.carte__detail code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em;
  background: var(--vert-brume); color: var(--vert-nuit); padding: 2px 6px; border-radius: 5px;
}

/* Liste "probleme" en vis-a-vis */
.vis-a-vis { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.colonne { border-radius: var(--rayon); padding: 28px; border: 1px solid var(--trait); background: var(--blanc); }
.colonne--avant { background: #fdf7f4; border-color: #f0ded4; }
.colonne--apres { background: var(--vert-brume); border-color: #cfe4d7; }
.colonne h3 { font-size: 1.05rem; margin-bottom: 16px; }
.colonne ul { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; }
.colonne li { color: var(--gris); font-size: .97rem; }
.colonne--apres li { color: #2c4a3a; }

/* Offre : deux paliers */
.paliers { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.palier {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 30px; box-shadow: var(--ombre);
}
.palier--vedette { border-color: var(--vert); box-shadow: var(--ombre-forte); position: relative; }
.palier__etiquette {
  position: absolute; top: -13px; left: 30px;
  background: var(--vert); color: #fff; font-size: .74rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 5px 13px; border-radius: 999px;
}
.palier__nom { font-size: 1.25rem; font-weight: 700; }
.palier__note { margin-top: 8px; color: var(--gris); font-size: .95rem; }
.palier ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.palier li { position: relative; padding-left: 28px; font-size: .97rem; color: var(--encre); }
.palier li::before {
  content: "○"; position: absolute; left: 0; top: 0;
  color: var(--paille); font-weight: 700;
}
.palier--vedette li::before { content: "✓"; color: var(--vert); }

/* Statut d'une ligne « en preparation », sorti du texte courant. */
.etiquette {
  display: inline-block; margin-right: 8px; padding: 1px 9px;
  border-radius: 999px; background: var(--paille-brume); border: 1px solid #f0e0bd;
  color: #6b5115; font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  vertical-align: 1px; white-space: nowrap;
}
.palier__pied { margin-top: 26px; }
.mention-tarif {
  margin-top: 26px; padding: 16px 18px; border-radius: var(--rayon-s);
  background: var(--paille-brume); border: 1px solid #f0e0bd;
  font-size: .92rem; color: #6b5115;
}

/* Ecrans de l'app */
.ecrans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.ecran {
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--rayon);
  padding: 22px; background: rgba(255, 255, 255, .05);
}
.ecran__glyphe {
  width: 38px; height: 38px; padding: 8px; display: block; margin-bottom: 14px;
  color: #9fe0bd; background: rgba(255, 255, 255, .08);
  border-radius: 10px; box-sizing: border-box;
}
.ecran h3 { font-size: 1.03rem; margin-bottom: 8px; }
.ecran p { font-size: .93rem; color: #a9c9b8; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 52em; }
.faq details {
  border: 1px solid var(--trait); border-radius: var(--rayon-s);
  background: var(--blanc); padding: 4px 20px;
}
.faq details[open] { border-color: var(--vert); }
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--vert); font-size: 1.4rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { padding: 0 0 18px; color: var(--gris); font-size: .97rem; }

/* Bloc de cloture : titre + les trois etapes + le bouton, d'un seul tenant. */
.final { padding: 84px 0; text-align: center; background: var(--vert-voile); }
.final h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.final .section__oeil { margin-bottom: 12px; }
.final__accroche { margin: 18px auto 0; max-width: 34em; color: var(--gris); font-size: 1.08rem; }
.cartes--etapes { margin-top: 44px; text-align: left; }
.cartes--etapes .carte__glyphe { margin-bottom: 14px; }
.final .hero__actions { justify-content: center; margin-top: 40px; }

/* ------------------------------------------------------------------- pied -- */
.pied { padding: 40px 0; background: var(--blanc); border-top: 1px solid var(--trait); }
.pied__interieur { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.pied p { font-size: .88rem; color: var(--gris-clair); }
.pied nav { display: flex; gap: 20px; }
.pied nav a { font-size: .88rem; color: var(--gris); text-decoration: none; }
.pied nav a:hover { color: var(--vert-nuit); }

/* -------------------------------------------------------------- responsive -- */
/* Six entrees nowrap + la marque + le bouton ne tiennent plus sous ~1020 px. */
@media (max-width: 1023px) {
  .nav { display: none; }
}

@media (max-width: 900px) {
  .hero__grille, .vis-a-vis, .paliers { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 52px; }
  .section { padding: 58px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .enveloppe { padding: 0 18px; }
  /* Pleine largeur ET secable : `nowrap` sur un libelle long imposait une
     largeur minimale superieure a l'ecran. */
  .bouton { width: 100%; justify-content: center; white-space: normal; text-align: center; }
  .preuves { grid-template-columns: 1fr; }

  /* L'entete : libelle court, ecart reduit, et le bouton reprend sa largeur
     naturelle (la regle .bouton ci-dessus le met a 100 %). */
  .entete__interieur { gap: 12px; }
  .marque { font-size: .98rem; flex: 0 1 auto; }
  .si-large { display: none; }
  .si-etroit { display: inline; }
  .entete .bouton { width: auto; flex: 0 0 auto; }
}

/* Sous 380 px, le nom de marque se tronquait en « AgriRati... » : mieux vaut
   l'icone seule qu'un mot coupe. */
@media (max-width: 380px) {
  .marque__texte { display: none; }
}
