/* Terrain — d'après le style Wise de Refero (vert forêt, citron électrique, display ultra-gras).
   Le citron devient la chasuble fluo d'entraînement ; le vert forêt, le gazon tondu. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --gazon: #14391f;
  --pelouse: #1d5a2b;
  --chasuble: #b4ef4f;
  --rosee: #e7f5da;
  --brume: #eceee8;
  --papier: #ffffff;
  --encre: #0f1a10;
  --texte: #3d463e;
  --muet: #677068;
  --clair: #d3dfcf;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 9vw, 120px);
  --radius-card: 28px;
  --radius-img: 16px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--texte);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gazon);
  color: var(--papier);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Typographie ---------- */

.display {
  font-weight: 900;
  font-stretch: 62%;
  text-transform: uppercase;
  line-height: 0.94;
  letter-spacing: -0.005em;
  color: var(--encre);
  text-wrap: balance;
}

.nowrap { white-space: nowrap; }

.display--md {
  font-size: clamp(2.75rem, 6.4vw, 5.5rem);
  max-width: 20ch;
}

.display--lime { color: var(--chasuble); }

/* Dans une colonne à côté d'une image, le grand titre se fait plus petit. */
.split .display--md { font-size: clamp(2.4rem, 4.2vw, 3.9rem); }

.h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  font-weight: 760;
  font-stretch: 88%;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--encre);
  text-wrap: balance;
}

.h2--center { text-align: center; margin-inline: auto; max-width: 22ch; }

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--encre);
}

/* ---------- Boutons et liens ---------- */

.btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.btn--lime { background: var(--chasuble); color: var(--gazon); }
.btn--lime:hover { background: #a2e035; }

.btn--gazon { background: var(--gazon); color: var(--papier); }
.btn--gazon:hover { background: #0d2a16; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(14, 15, 12, 0.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: min(1280px, 100% - 2 * var(--gutter));
  height: 68px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gazon);
}
.brand__mark { width: 32px; height: 32px; }
.brand__name {
  font-size: 1.3rem;
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.01em;
}
.brand__tld { color: var(--pelouse); font-weight: 500; }

.nav__links {
  display: flex;
  gap: 4px;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--gazon);
  text-decoration: none;
}
.nav__links a:hover { background: var(--rosee); }

.nav__end {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.lang {
  display: flex;
  padding: 3px;
  border: 1px solid rgba(20, 57, 31, 0.18);
  border-radius: 999px;
}
.lang a {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muet);
  text-decoration: none;
}
.lang a:hover { color: var(--gazon); }
.lang a[aria-current] { background: var(--gazon); color: var(--papier); }

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(56px, 8vw, 104px);
  text-align: center;
}

.hero__text {
  width: min(1100px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.hero .display {
  font-size: clamp(2.75rem, 7.1vw, 6.2rem);
  margin-inline: auto;
}

.hero__lead {
  max-width: 58ch;
  margin: 32px auto 0;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--texte);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 36px;
}

/* Le terrain chevauche la bande verte qui suit. */
.pitch {
  position: relative;
  isolation: isolate;
  width: min(1100px, 100% - 2 * var(--gutter));
  margin: clamp(56px, 7vw, 88px) auto 0;
}

.pitch::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 52% -100vw 0;
  background: var(--gazon);
}

.pitch__svg {
  width: 100%;
  border-radius: var(--radius-card);
  box-shadow: 0 30px 60px -20px rgba(7, 24, 12, 0.45);
}

.pitch__caption {
  max-width: 62ch;
  margin: 28px auto 0;
  font-size: 1.05rem;
  color: var(--clair);
}
.pitch__caption strong { color: var(--papier); font-weight: 700; }

.plateau rect,
.plateau path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  fill-opacity: 0;
  animation:
    trace 1s cubic-bezier(0.65, 0, 0.25, 1) forwards,
    remplir 0.6s ease-out forwards;
  animation-delay: calc(500ms + var(--i) * 260ms), calc(1300ms + var(--i) * 260ms);
}

@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes remplir { to { fill-opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plateau rect,
  .plateau path {
    animation: none;
    stroke-dashoffset: 0;
    fill-opacity: 1;
  }
}

/* ---------- Bandes ---------- */

.band { padding-block: var(--section); }
.band--gazon { background: var(--gazon); color: var(--clair); }
.band--rosee { background: var(--rosee); }
.band--brume { background: var(--brume); }
/* Deuxième partie d'un même chapitre : collée à la bande précédente. */
.band--suite { padding-top: 0; }

.band--gazon h3 { color: var(--papier); }
.band--gazon .display:not(.display--lime) { color: var(--papier); }

#semaine { padding-top: clamp(56px, 7vw, 96px); }

.band__lead {
  max-width: 56ch;
  margin-top: 24px;
  font-size: 1.2rem;
}

/* La semaine */
.week {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 24px;
  margin: 56px 0 64px;
  padding: 0;
  list-style: none;
}

.week__day {
  padding-top: 18px;
  border-top: 2px solid rgba(255, 255, 255, 0.16);
}

.week__day--now { border-top-color: var(--chasuble); }

.week__name {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 70%;
  line-height: 1;
  color: var(--papier);
}
.week__day--now .week__name { color: var(--chasuble); }

.week__time {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #9fb79a;
}

.week__day p {
  margin-top: 14px;
  font-size: 0.98rem;
  line-height: 1.5;
}

/* Captures */
.shot {
  padding: 10px;
  border-radius: var(--radius-card);
  background: var(--brume);
}
.shot img {
  width: 100%;
  border-radius: calc(var(--radius-card) - 10px);
  box-shadow: 0 0 0 1px rgba(14, 15, 12, 0.08);
}
/* Sans la barre de menu de l'application : seulement l'écran utile. */
.shot--crop img {
  aspect-ratio: 1200 / 1000;
  object-fit: cover;
  object-position: right top;
}
.shot--dark { background: var(--pelouse); }
.band--rosee .shot { background: #d5ecc2; }

/* Texte + visuel */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}

.split--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--reverse .split__text { order: 2; }

.split__text > * + * { margin-top: 20px; }
.split__text p { max-width: 52ch; }
.split__text .h2 + p { margin-top: 28px; }

.ticks {
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding: 12px 0 12px 32px;
  border-top: 1px solid rgba(14, 15, 12, 0.1);
  font-size: 1rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 16px;
  height: 10px;
  border-left: 3px solid var(--pelouse);
  border-bottom: 3px solid var(--pelouse);
  transform: rotate(-45deg);
}

/* Terrains : texte en deux colonnes, puis les trois dessins à l'échelle */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: end;
  gap: 24px clamp(40px, 6vw, 88px);
}
.intro__text p + p { margin-top: 16px; }

.scale {
  margin-top: 56px;
  padding: clamp(16px, 3vw, 36px);
  border-radius: var(--radius-card);
  background: var(--papier);
  overflow-x: auto;
}
.scale__track { min-width: 640px; }
.scale img { width: 100%; }
.scale__legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 18px;
  font-size: 1rem;
  text-align: center;
}
.scale__legend strong { margin-right: 6px; color: var(--encre); }

/* Parents */
.steps {
  margin-top: 36px;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}
.steps li {
  position: relative;
  padding: 14px 0 14px 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  counter-increment: etape;
}
.steps li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 11px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(180, 239, 79, 0.14);
  color: var(--chasuble);
  font-weight: 700;
  font-size: 0.95rem;
}
.steps strong { color: var(--papier); font-weight: 600; }

.phone {
  justify-self: center;
  width: min(340px, 100%);
  padding: 12px;
  border-radius: 52px;
  background: #0b2112;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.phone__screen {
  overflow: hidden;
  border-radius: 40px;
}
.phone__screen img {
  width: 100%;
  aspect-ratio: 390 / 716;
  object-fit: cover;
  object-position: bottom;
}

/* Impressions : l'affiche scotchée */
.sheet {
  position: relative;
  justify-self: center;
  width: min(420px, 100%);
  transform: rotate(-1.6deg);
}
.sheet img {
  width: 100%;
  aspect-ratio: 1012 / 1000;
  object-fit: cover;
  object-position: top;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 24px 48px -16px rgba(15, 26, 16, 0.3);
}
.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -14px;
  width: 96px;
  height: 30px;
  background: rgba(231, 245, 218, 0.82);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.sheet::before { left: -18px; transform: rotate(-32deg); }
.sheet::after { right: -18px; transform: rotate(30deg); }

.specs { margin-top: 32px; }
.specs div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(14, 15, 12, 0.1);
}
.specs dt { font-weight: 700; color: var(--encre); }
.specs dd { color: var(--muet); }

/* Le reste de la saison */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px clamp(24px, 4vw, 56px);
  margin-top: 64px;
}
.features p { margin-top: 10px; font-size: 1rem; color: var(--muet); }

/* Rôles */
.roles { margin-top: 48px; }
.role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid rgba(14, 15, 12, 0.12);
}
.role:last-child { border-bottom: 1px solid rgba(14, 15, 12, 0.12); }
.role p { max-width: 56ch; }
.role--parent h3 { color: var(--pelouse); }

/* Appel final */
.cta {
  padding-block: var(--section);
  background: var(--chasuble);
  text-align: center;
}
.cta .display { margin-inline: auto; color: var(--gazon); }
.cta p {
  max-width: 50ch;
  margin: 24px auto 0;
  font-size: 1.2rem;
  color: var(--gazon);
}

/* Résultat de l'envoi : le relais renvoie le visiteur sur l'ancre du message à montrer. */
.notices { max-width: 720px; margin: 0 auto; }
.cta .notice {
  display: none;
  max-width: none;
  margin: 0;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
}
.cta .notice:target { display: block; margin-top: 32px; }
.cta .notice--ok { background: var(--gazon); color: var(--papier); }
.cta .notice--ko { background: var(--papier); color: #8f1d17; box-shadow: inset 0 0 0 2px #a4221b; }

/* La fenêtre du formulaire : API popover, ouverte et fermée sans JavaScript (bouton, Échap, clic à côté). */
.popup {
  width: min(680px, 100% - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 40px);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--papier);
  color: var(--encre);
  text-align: left;
  box-shadow: 0 40px 80px -24px rgba(7, 24, 12, 0.5);
}
.popup::backdrop { background: rgba(14, 26, 16, 0.6); }

.popup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.popup__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 760;
  font-stretch: 88%;
  letter-spacing: -0.02em;
}

.popup__close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--brume);
  color: var(--gazon);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.popup__close:hover { background: var(--rosee); }

.popup .form { max-width: none; margin: 0; }

/* Formulaire de contact */
.form {
  display: grid;
  gap: 20px;
  max-width: 720px;
  margin: 48px auto 0;
  text-align: left;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gazon);
}

.field__hint {
  margin-left: 6px;
  font-weight: 400;
  color: rgba(20, 57, 31, 0.7);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(20, 57, 31, 0.3);
  border-radius: 12px;
  background: var(--papier);
  color: var(--encre);
  font: inherit;
  font-size: 1.05rem;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--gazon);
  outline: 3px solid rgba(20, 57, 31, 0.22);
  outline-offset: 0;
}

.field input:user-invalid,
.field textarea:user-invalid { border-color: #a4221b; }

/* Piège à robots : invisible pour les personnes, rempli par les robots. */
.field--piege {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 4px;
}

.cta .form__note {
  max-width: none;
  margin: 0;
  font-size: 0.95rem;
  color: rgba(20, 57, 31, 0.8);
}

/* Pied de page */
.footer {
  padding-block: 40px;
  background: var(--gazon);
  color: var(--clair);
  font-size: 0.95rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.2rem;
  color: var(--papier);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.footer nav a { text-decoration: none; white-space: nowrap; }
.footer nav a:hover { color: var(--chasuble); }

/* ---------- Adaptations ---------- */

@media (max-width: 1080px) {
  .nav__links { display: none; }
  .week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .split,
  .split--reverse { grid-template-columns: minmax(0, 1fr); }
  .split--reverse .split__text { order: 0; }
  .intro { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .nav__inner { gap: 12px; }
  .lang a { padding: 5px 7px; }
  .brand__name { font-size: 1.15rem; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: minmax(0, 1fr); }
  .specs div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .pitch__svg { border-radius: 18px; }
  .sheet::before,
  .sheet::after { width: 72px; }
}
