/* SL80, site vitrine statique servi par Caddy.
 *
 * Direction : sobre, typographie large (Archivo étendu), une seule couleur
 * d'accent orange chantier. Thème clair ou sombre selon le système.
 *
 * Règle de formes (à respecter partout) :
 *   - éléments interactifs (boutons) : pilule, rayon 999px
 *   - captures d'écran : rayon 22px
 *   - sections, grilles, encadrés : angles droits, filets de 1px
 */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-wdth.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #F2F3F0;
  --panel: #E7E9E4;
  --ink: #15171A;
  --muted: #565C61;
  --line: #CDD1CB;
  --accent: #E0622A;        /* fonds (boutons, aplats) avec texte --on-accent */
  --accent-text: #B4461B;   /* liens et texte en accent sur --bg */
  --on-accent: #15171A;
  --shadow: 0 30px 60px -28px rgb(40 44 38 / 0.35), 0 8px 18px -10px rgb(40 44 38 / 0.18);

  --font: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --panel: #1A1D20;
    --ink: #ECEDE9;
    --muted: #A2A8AC;
    --line: #2C3135;
    --accent: #EE7038;
    --accent-text: #F08250;
    --on-accent: #111315;
    --shadow: 0 30px 60px -28px rgb(0 0 0 / 0.7), 0 8px 18px -10px rgb(0 0 0 / 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-stretch: 100%;
  font-weight: 420;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--on-accent); }

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

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left));
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  z-index: 20;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

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

.display {
  font-stretch: 118%;
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

h1.display {
  font-size: clamp(2.5rem, 4.7vw, 4.25rem);
  font-stretch: 114%;
}

.display--section {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.05;
  max-width: 22ch;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  max-width: 58ch;
  margin: 1.1rem 0 0;
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 1.1rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 620;
  font-stretch: 108%;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 160ms var(--ease), background-color 200ms var(--ease), border-color 200ms var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.985); }

.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--small { min-height: 40px; padding: 0 1.1rem; font-size: 0.9375rem; }

@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover { background: color-mix(in oklab, var(--accent) 88%, var(--ink)); }
  .btn--ghost:hover { border-color: var(--ink); }
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 600;
  font-stretch: 108%;
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}
.arrow-link::after {
  content: "\2192";
  transition: transform 200ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .arrow-link:hover::after { transform: translateX(4px); }
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}
.wordmark {
  font-stretch: 125%;
  font-weight: 860;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
}
.wordmark--small { font-size: 1.0625rem; margin-right: 0; }
.nav__links { display: flex; gap: 1.75rem; }
.nav__links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 520;
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--ink); }
}
@media (max-width: 767px) {
  .nav__links { display: none; }
  .nav__inner { gap: 1rem; height: 60px; }
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7.4fr) minmax(0, 4.6fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  min-height: min(calc(100dvh - 68px), 860px);
}
.hero__sub {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  color: var(--muted);
  max-width: 40ch;
  margin: 1.5rem 0 0;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.hero__visual { margin: 0; }
.hero__visual figcaption {
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.shots {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  max-width: 440px;
  margin-inline: auto;
  padding-left: 22%;
}
.shot {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.shots .shot { grid-area: 1 / 1; width: 100%; }
.shot--back {
  transform: translate(-30%, 9%) scale(0.86);
  transform-origin: bottom left;
  opacity: 0.96;
}
.shot--front { position: relative; }

@media (max-width: 767px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 2.5rem;
  }
  .hero__ctas .btn { flex: 1 1 auto; }
  .shots { max-width: 300px; padding-left: 18%; }
}

/* Réalisation : cartouche --------------------------------------------- */

.case {
  border-top: 1px solid var(--line);
  padding-block: clamp(4rem, 8vw, 7rem);
}

.cartouche {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--ink);
}
.cartouche__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}
.cell {
  padding: clamp(1.25rem, 2.4vw, 2rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cell:nth-child(2n) { border-right: 0; }
.cell dt {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.cell dd {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
}
.cell--link {
  grid-column: 1 / -1;
  border-bottom: 0;
  border-right: 0;
  display: flex;
  align-items: center;
  padding-block: 1.1rem;
}
.cartouche__shot {
  border-left: 1px solid var(--ink);
  background: var(--panel);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cartouche__shot .shot { max-width: 300px; width: 100%; }

@media (max-width: 899px) {
  .cartouche { grid-template-columns: 1fr; }
  .cartouche__shot { border-left: 0; border-top: 1px solid var(--ink); }
}
@media (max-width: 599px) {
  .cartouche__grid { grid-template-columns: 1fr; }
  .cell { border-right: 0; }
}

/* Produit maison ------------------------------------------------------ */

.product {
  background: var(--panel);
  border-block: 1px solid var(--line);
  overflow: hidden;
}
.product__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(4rem, 8vw, 6.5rem) 0;
}
.product__shot {
  align-self: end;
  display: flex;
  justify-content: center;
}
.product__shot .shot {
  max-width: 320px;
  width: 100%;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 0;
  margin-bottom: -1px;
}
.product__text { padding-bottom: clamp(4rem, 8vw, 6.5rem); }
.product__text .arrow-link { margin-top: 1.75rem; }

@media (max-width: 767px) {
  .product__inner { grid-template-columns: 1fr; }
  .product__text { order: -1; padding-bottom: 0; }
  .product__shot .shot { max-width: 260px; }
}

/* Méthode ------------------------------------------------------------- */

.method { padding-block: clamp(4rem, 8vw, 7rem); }
.steps {
  list-style: none;
  margin: clamp(2rem, 4vw, 3.25rem) 0 0;
  padding: 0;
}
.step {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem 3rem;
  align-items: baseline;
  padding-block: clamp(1.4rem, 2.6vw, 2rem);
  border-top: 1px solid var(--line);
}
.step__verb {
  font-stretch: 120%;
  font-weight: 720;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.step p { margin: 0; color: var(--muted); max-width: 46ch; }
.step:last-child .step__verb { color: var(--accent-text); }

@media (max-width: 767px) {
  .step { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Infrastructure ------------------------------------------------------ */

.infra {
  border-top: 1px solid var(--line);
  padding-block: clamp(4rem, 8vw, 7rem);
}
.infra__grid {
  list-style: none;
  padding: 0;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.infra__item {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 0.5rem;
  align-content: start;
  min-height: 11rem;
}
.infra__item strong {
  font-stretch: 115%;
  font-weight: 700;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
}
.infra__item span { color: var(--muted); max-width: 40ch; }
.infra__item--accent { background: var(--accent); color: var(--on-accent); }
.infra__item--accent span { color: var(--on-accent); opacity: 0.85; }
.infra__item--ink { background: var(--ink); color: var(--bg); }
.infra__item--ink span { color: var(--bg); opacity: 0.75; }
.infra__grid > :nth-child(2) { grid-column: 2; }
.infra__grid > :nth-child(3) { grid-column: 1; grid-row: 2; }

@media (max-width: 767px) {
  .infra__grid { grid-template-columns: 1fr; }
  .infra__grid > :nth-child(n) { grid-column: auto; grid-row: auto; }
  .infra__item { min-height: 0; }
}

/* Contact ------------------------------------------------------------- */

.contact {
  border-top: 1px solid var(--line);
  padding-block: clamp(4.5rem, 9vw, 8rem);
}
.contact__mail {
  display: inline-block;
  margin-top: clamp(2rem, 4vw, 3rem);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.35rem, 4.4vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.copy-status { font-size: 0.9375rem; color: var(--muted); }

/* Pied de page -------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 1.75rem calc(1.75rem + env(safe-area-inset-bottom));
  font-size: 0.9375rem;
  color: var(--muted);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.75rem;
}
.footer .wordmark { color: var(--ink); }

/* Pages de texte (mentions légales) ----------------------------------- */

.legal { padding-block: clamp(3rem, 6vw, 5rem); max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.legal h2 {
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
}
.legal p, .legal dd { color: var(--muted); }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; margin: 0; }
.legal dt { font-weight: 600; }
.legal dd { margin: 0; }
.legal a { color: var(--accent-text); }
@media (max-width: 599px) {
  .legal dl { grid-template-columns: 1fr; }
  .legal dd { margin-bottom: 0.6rem; }
}

/* Mouvement ----------------------------------------------------------- */
/* Entrée du hero (hiérarchie : titre, puis texte, puis visuel) et apparition
 * des blocs au défilement. Rien ne bouge si le système demande moins
 * d'animations, ni si le JavaScript est absent (classe .js posée par site.js). */

@media (prefers-reduced-motion: no-preference) {
  .enter {
    animation: enter 900ms var(--ease) both;
  }
  .hero__sub.enter { animation-delay: 90ms; }
  .hero__ctas.enter { animation-delay: 170ms; }
  .hero__visual.enter { animation-delay: 240ms; animation-duration: 1100ms; }

  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .steps .reveal:nth-child(2) { transition-delay: 60ms; }
  .js .steps .reveal:nth-child(3) { transition-delay: 120ms; }
  .js .steps .reveal:nth-child(4) { transition-delay: 180ms; }
  .js .infra__grid .reveal:nth-child(2) { transition-delay: 60ms; }
  .js .infra__grid .reveal:nth-child(3) { transition-delay: 120ms; }
  .js .infra__grid .reveal:nth-child(4) { transition-delay: 180ms; }
}

@keyframes enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.nowrap { white-space: nowrap; }
