/* ── Tom Rouvier · version « humaine » (sans jargon) ─────────────────────────
   Design épuré, chaud, une seule couleur d'accent (terracotta).
   Pièce maîtresse : le mini-site « La Fournée » qui se construit au scroll
   (miroir de la fenêtre terminal de la version développeur). */

:root {
  --bg: #fdfbf7;
  --paper: #ffffff;
  --ink: #211d17;
  --muted: #6f675c;
  --line: #ece5d8;
  --accent: #c2542e;
  --accent-deep: #9a3f1d;
  --accent-soft: #faeee7;
  --green: #2e9e5b;
  --serif: Charter, "Bitstream Charter", Georgia, Cambria, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.01em; }
a { color: var(--accent-deep); }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem clamp(0.9rem, 4vw, 3rem);
  background: rgba(253, 251, 247, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav nav { display: flex; gap: clamp(0.6rem, 2vw, 1.5rem); align-items: center; }
.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
.nav nav a:hover, .nav nav a:focus-visible { color: var(--accent-deep); }
.nav-cta {
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  color: var(--accent-deep) !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-soft); }

/* Le « sélecteur de langue » : français · développeur */
.lang {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  background: var(--paper);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.lang strong { color: var(--accent-deep); }
.lang:hover { border-color: var(--accent); }

/* ── Hero ── */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(6.5rem, 15vh, 9.5rem) clamp(1rem, 5vw, 3rem) clamp(2rem, 6vh, 4rem);
  text-align: center;
  background: radial-gradient(42rem 24rem at 50% -8rem, var(--accent-soft), transparent 70%);
}
.hero-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  margin: 0 0 1.3rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6.5vw, 3.9rem);
  line-height: 1.08;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-pitch {
  margin: 1.4rem auto 2rem;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 36rem;
}
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ── Boutons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 650;
  font-size: 1rem;
  white-space: nowrap;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--paper); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1.08rem; }

/* ── Sections ── */
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 5vw, 3rem);
}
.kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0 0 0.4rem;
  line-height: 1.15;
}
.section-sub { color: var(--muted); margin: 0 0 2rem; max-width: 40rem; }

/* ═══════════ SCROLLYTELLING : le mini-site qui se construit ═══════════ */
.st-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.st-sticky {
  position: sticky;
  top: 84px;
}
.st-steps { display: grid; }
.st-step {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 0;
}
.st-num {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}
.st-step h3 { margin: 0 0 0.5rem; font-size: 1.45rem; }
.st-step p { margin: 0; color: var(--muted); font-size: 1.02rem; max-width: 26rem; }

/* — La fenêtre navigateur — */
.mock {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(60, 40, 20, 0.10);
  transition: box-shadow 0.6s;
}
.mock.s5 { box-shadow: 0 18px 56px rgba(194, 84, 46, 0.22); }
.mock-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  background: #f4efe6;
  border-bottom: 1px solid var(--line);
}
.mdot { width: 10px; height: 10px; border-radius: 50%; }
.mdot-r { background: #ff5f57; } .mdot-y { background: #febc2e; } .mdot-g { background: #28c840; }
.mock-url {
  flex: 1;
  margin-left: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.15rem 0.7rem;
  text-align: center;
}
.mock:not(.s5) .mock-lock { display: none; }
.mock:not(.s5) .mock-url::after { content: " · brouillon"; opacity: 0.6; }

.mock-page {
  position: relative;
  min-height: 380px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: #fff;
  transition: background 0.6s;
}
.mock.s2 .mock-page { background: #fffaf3; }

/* Éléments du mini-site : cachés puis révélés étape par étape */
.m-header, .m-hero, .m-products, .m-foot, .m-live {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.mock.s2 .m-header,
.mock.s3 .m-hero, .mock.s3 .m-products,
.mock.s4 .m-foot,
.mock.s5 .m-live { opacity: 1; transform: none; }

/* Étape 0 : fenêtre vide */
.m-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  opacity: 1;
  transition: opacity 0.4s;
}
.mock.s1 .m-empty { opacity: 0; }

/* Étape 1 : l'esquisse (wireframe en pointillés) */
.m-sketch {
  position: absolute;
  inset: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  opacity: 0;
  transition: opacity 0.5s;
}
.mock.s1 .m-sketch { opacity: 1; }
.mock.s2 .m-sketch { opacity: 0; }
.m-sk {
  border: 2px dashed #d8cdbb;
  border-radius: 10px;
  flex: 1;
}
.m-sk-head { flex: 0 0 34px; }
.m-sk-hero { flex: 0 0 96px; }
.m-sk-row { display: flex; gap: 0.7rem; flex: 1; }
.m-sk-row .m-sk { flex: 1; }

/* Étape 2 : en-tête + identité */
.m-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  background: #7c4a26;
  border-radius: 10px;
  color: #fff;
}
.m-logo { font-size: 1.05rem; }
.m-name { font-family: var(--serif); font-weight: 700; font-size: 0.95rem; }
.m-links { margin-left: auto; display: flex; gap: 0.35rem; }
.m-links i { width: 22px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); }

/* Étape 3 : bannière + produits */
.m-hero {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  background: linear-gradient(120deg, #fbeedd, #f7dfc4);
  border-radius: 10px;
}
.m-hero-emoji { font-size: 1.9rem; }
.m-hero-txt { font-size: 0.78rem; line-height: 1.45; color: #5a3d22; }
.m-hero-txt b { font-family: var(--serif); font-size: 0.9rem; display: block; color: #3d2814; }
.m-products { display: flex; gap: 0.7rem; }
.m-prod {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.6rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.68rem;
  text-align: center;
  background: #fff;
}
.mock.s3 .m-prod:nth-child(1) { transition-delay: 0.10s; }
.mock.s3 .m-prod:nth-child(2) { transition-delay: 0.22s; }
.mock.s3 .m-prod:nth-child(3) { transition-delay: 0.34s; }
.m-prod {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.mock.s3 .m-prod { opacity: 1; transform: none; }
.m-p-img {
  font-size: 1.5rem;
  background: #faf3e7;
  border-radius: 8px;
  width: 100%;
  padding: 0.35rem 0;
  margin-bottom: 0.2rem;
}
.m-prod em { font-style: normal; font-weight: 700; color: var(--accent-deep); }

/* Étape 4 : bouton commander + avis */
.m-foot {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.m-cta {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.74rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}
.m-stars { font-size: 0.68rem; color: #8a6d3b; }

/* Étape 5 : en ligne */
.m-live {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--green);
}
.m-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(46, 158, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0); }
}

/* ── Services : liste aérée, sans cadres ── */
.svc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem 2.5rem;
}
.svc { display: flex; gap: 1rem; align-items: flex-start; }
.svc-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 1.4rem;
}
.svc h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.svc p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ── Histoires ── */
.stories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
}
.story {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  transition: border-color 0.2s, transform 0.2s;
}
.story:hover { border-color: var(--accent); transform: translateY(-3px); }
.story-icon { font-size: 1.6rem; }
.story h3 { margin: 0.5rem 0 0.4rem; font-size: 1.08rem; color: var(--accent-deep); }
.story p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ── Page /humain/outils/ ── */
.page-top { padding-top: clamp(6rem, 14vh, 8.5rem); }
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}
.tool {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  transition: border-color 0.2s, transform 0.2s;
}
.tool:hover { border-color: var(--accent); transform: translateY(-3px); }
.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.tool-icon { font-size: 1.6rem; }
.tool-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
  white-space: nowrap;
}
.tool-badge.is-open { color: var(--green); border-color: currentColor; }
.tool h3 { margin: 0.5rem 0 0.4rem; font-size: 1.08rem; color: var(--accent-deep); }
.tool p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.tool-link {
  margin-top: auto;
  padding-top: 0.9rem;
  align-self: flex-start;
  font-weight: 650;
  font-size: 0.92rem;
  text-decoration: none;
}
.tool-link:hover, .tool-link:focus-visible { text-decoration: underline; }
.tool-note {
  max-width: 40rem;
  margin: 2.5rem auto 0;
  padding: 1.2rem 1.4rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.tool-note p { margin: 0; font-size: 0.98rem; }
.section-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

/* ── À propos ── */
.section-about .about {
  display: flex;
  gap: 1.6rem;
  align-items: flex-start;
  max-width: 46rem;
  margin: 0 auto;
}
.avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #d99a2b, var(--accent));
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.55rem;
}
.section-about p { margin: 0 0 0.9rem; }
.section-about p:last-child { margin-bottom: 0; }

/* ── Contact ── */
.section-contact { text-align: center; }
.section-contact .section-sub { margin-inline: auto; }
.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.4rem 0 1rem;
}
.contact-note { color: var(--muted); font-size: 0.95rem; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem clamp(1rem, 5vw, 3rem) 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer p { margin: 0.3rem 0; }

/* ── Apparition au scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.on { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .nav nav { display: none; }
  .nav-brand { font-size: 1.05rem; }
  .lang { font-size: 0.78rem; padding: 0.28rem 0.65rem; }

  /* Scrollytelling mobile : la fenêtre reste collée en haut,
     les étapes défilent dessous. */
  .st-wrap { display: block; }
  .st-sticky {
    top: 58px;
    z-index: 5;
    padding: 0.5rem 0 0.8rem;
    background: linear-gradient(var(--bg) 82%, transparent);
  }
  .mock-page { min-height: 300px; }
  .st-step { min-height: 52vh; }
  .st-step h3 { font-size: 1.25rem; }
}

/* ── Accessibilité : mouvement réduit ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .m-live-dot { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
