/* ============================================================
   Cheval 3F — design system partagé (variables, reset, typo,
   composants communs : header, footer, boutons, cartes)
   ============================================================ */

:root {
  /* Couleurs — palette naturelle et sobre, distincte de tout autre site */
  --c-bg: #f7f4ec;
  --c-bg-alt: #efe9db;
  --c-surface: #ffffff;
  --c-ink: #23221c;
  --c-ink-soft: #58554a;
  --c-moss: #3e4d38;
  --c-moss-light: #6b7f5e;
  --c-moss-pale: #e3e9dc;
  --c-clay: #bd6a3c;
  --c-clay-dark: #9a5630;
  --c-line: #e2dbc9;
  --c-alert: #b3492f;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Public Sans", "Segoe UI", Arial, sans-serif;

  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;
  --shadow-card: 0 12px 32px rgba(35, 34, 28, 0.08);
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

/* L'attribut hidden doit toujours l'emporter (sinon .btn, .lead-form… restent visibles). */
[hidden] {
  display: none !important;
}

/* Visible seulement des lecteurs d'écran (annonces, libellés sans redite visuelle). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus clavier visible partout (liens, boutons, champs) : un composant peut
   garder son propre traitement au survol/clic, mais ne doit jamais supprimer
   cet anneau au clavier sans le remplacer par un équivalent aussi visible. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--c-moss-light);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* <picture> est un élément générique en ligne par défaut : sans ceci, il
   laisse un filet d'espace sous l'image que <img> seul n'avait pas. */
picture {
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--c-ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: inherit; }

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-clay-dark);
  margin-bottom: 0.8em;
}

.lede {
  font-size: 1.15rem;
  color: var(--c-ink-soft);
  max-width: 640px;
}

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.16,1,.3,1), box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-clay) 0%, var(--c-clay-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(189, 106, 60, 0.28);
}

.btn-primary::after {
  content: "→";
  display: inline-block;
  transition: transform 0.25s cubic-bezier(.16,1,.3,1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(189, 106, 60, 0.4);
}

.btn-primary:hover::after {
  transform: translateX(4px);
}

.btn-secondary {
  background: transparent;
  color: var(--c-moss);
  border-color: var(--c-moss);
}

.btn-secondary:hover {
  background: var(--c-moss);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(62, 77, 56, 0.22);
}

.btn-ghost {
  background: transparent;
  color: var(--c-ink-soft);
  padding: 0.6em 0.2em;
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 236, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(247, 244, 236, 0.94);
  border-color: var(--c-line);
  box-shadow: 0 8px 28px rgba(35, 34, 28, 0.06);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--c-moss);
  letter-spacing: 0.01em;
}

.brand span {
  color: var(--c-clay);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a:not(.btn) {
  position: relative;
  text-decoration: none;
  color: var(--c-ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 2px;
}

.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--c-clay);
  border-radius: 2px;
  transition: right 0.25s cubic-bezier(.16,1,.3,1);
}

.site-nav a:not(.btn):hover {
  color: var(--c-moss);
}

.site-nav a:not(.btn):hover::after {
  right: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--c-moss);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--c-line);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--c-line);
  }

  .site-nav .btn {
    margin-top: 14px;
  }
}

/* --- Footer --- */
.site-footer {
  background: var(--c-moss);
  color: #eef1ea;
  padding: 56px 0 28px;
  margin-top: 96px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.site-footer .brand {
  color: #fff;
}

.site-footer .brand span {
  color: #e7b98c;
}

.footer-tagline {
  color: #cfd8c6;
  max-width: 320px;
  margin-top: 10px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: #dbe2d3;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--content-width);
  margin: 40px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #b7c0ac;
  font-size: 0.85rem;
}

/* --- Cartes génériques --- */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--c-bg-alt);
}

@media (max-width: 640px) {
  .section {
    padding: 56px 0;
  }
}

/* --- Texte en dégradé (accent) --- */
.text-gradient {
  background: linear-gradient(120deg, var(--c-moss) 0%, var(--c-clay) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Animation au scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(.16,1,.3,1), transform 0.8s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Liens légaux du pied de page : présents sur toutes les pages, les mentions
   légales devant être accessibles de partout. */
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px;
  font-size: .85rem;
}
.footer-legal a { color: inherit; opacity: .85; }
.footer-legal a:hover { opacity: 1; }
/* Pied de page réduit (bilan, rapport, pages légales, paiement) : sans le
   bloc marque et navigation, la marge et le filet du bas laissaient une bande
   verte vide au-dessus du texte. */
.site-footer > .footer-bottom:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.site-footer:has(> .footer-bottom:first-child) { padding-top: 28px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.footer-bottom p { margin: 0; }
