/* =========================================================
   Atelier Horizon — feuille de style
   Palette : anthracite, blanc cassé, cuivre.
   Pour changer les couleurs, modifiez les variables ci-dessous.
   ========================================================= */

:root {
  --anthracite: #1d2024;
  --anthracite-2: #272b30;
  --anthracite-3: #343940;
  --blanc: #f6f3ee;
  --blanc-2: #ece7df;
  --texte: #23262b;
  --texte-doux: #555b63;
  --cuivre: #c07a43;          /* décor, surfaces */
  --cuivre-clair: #e0a571;    /* texte sur fond sombre */
  --cuivre-fonce: #8f5222;    /* texte sur fond clair */
  --erreur-clair: #a3261b;
  --erreur-sombre: #ff9e8f;
  --succes: #1f6b46;

  --font-titre: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-texte: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --shadow: 0 18px 40px -24px rgba(20, 22, 26, .45);
  --header-h: 103px;          /* recalculé par main.js selon la hauteur réelle de l'en-tête */
  --section-pad: clamp(64px, 9vw, 112px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--texte);
  font-family: var(--font-texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-titre);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--cuivre-fonce); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

.narrow { max-width: 860px; }

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: .7em 1.1em;
  background: var(--cuivre-clair);
  color: var(--anthracite);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

main:focus { outline: none; }

/* Ancres du menu : le haut du texte de la section arrive 32px sous l'en-tête collant
   (on retire l'espacement interne de la section, sinon un grand vide apparaît). */
section[id] { scroll-margin-top: calc(var(--header-h) - var(--section-pad) + 32px); }

/* Éléments ciblés par le focus : ne pas les masquer sous l'en-tête collant */
.quote-form input,
.quote-form select,
.quote-form textarea,
.error-summary,
.form-status { scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(29, 32, 36, .96);
  color: var(--blanc);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -15px rgba(0, 0, 0, .6); }

.demo-bar {
  margin: 0;
  padding: .4em 16px;
  background: var(--cuivre-clair);
  color: var(--anthracite);
  font-size: .875rem;
  line-height: 1.4;
  text-align: center;
}
.demo-bar span { margin-left: .35em; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  color: var(--blanc);
  text-decoration: none;
}

.brand-text {
  margin: 0;
  font-family: var(--font-titre);
  font-size: 1.35rem;
  letter-spacing: .02em;
}
.brand-text em { font-style: normal; color: var(--cuivre-clair); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: .55em .85em;
  color: var(--blanc);
  text-decoration: none;
  font-size: .975rem;
  border-radius: 999px;
}
.site-nav a:hover { color: var(--cuivre-clair); }
.site-nav a[aria-current="true"] { color: var(--cuivre-clair); box-shadow: inset 0 -2px 0 var(--cuivre); border-radius: 0; }

.site-nav .nav-cta {
  margin-left: 8px;
  border: 1px solid var(--cuivre);
  color: var(--cuivre-clair);
}
.site-nav .nav-cta:hover { background: var(--cuivre); color: var(--anthracite); }
.site-nav .nav-cta[aria-current="true"] { border-radius: 999px; box-shadow: none; background: var(--cuivre); color: var(--anthracite); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .6em;
  padding: .55em .9em;
  background: transparent;
  color: var(--blanc);
  border: 1px solid var(--anthracite-3);
  border-radius: 999px;
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75em 1.5em;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btn-primary { background: var(--cuivre-clair); color: var(--anthracite); }
.btn-primary:hover { background: var(--blanc); }

.btn-ghost { border-color: rgba(246, 243, 238, .35); color: var(--blanc); }
.btn-ghost:hover { border-color: var(--cuivre-clair); color: var(--cuivre-clair); }

.btn-block { width: 100%; }

/* ---------- Accueil ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% 110%, rgba(192, 122, 67, .22), transparent 60%),
    linear-gradient(180deg, var(--anthracite) 0%, var(--anthracite-2) 100%);
  color: var(--blanc);
  padding-block: clamp(48px, 7vw, 104px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* Le titre suit la largeur de sa colonne : chaque phrase tient sur une ligne */
.hero-text { container-type: inline-size; }

.hero h1 {
  margin-bottom: .5em;
  font-size: clamp(1.9rem, 1rem + 3.4vw, 3.75rem);
  font-size: clamp(1.9rem, 10.2cqi, 3.75rem);
  letter-spacing: -.015em;
  line-height: 1.1;
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--cuivre-clair); }

.hero .lead {
  max-width: 34em;
  margin-bottom: 0;
  font-size: 1.15rem;
  color: #d7d2ca;
}

.eyebrow {
  margin-bottom: .8em;
  color: var(--cuivre-fonce);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero .eyebrow,
.section-dark .eyebrow { color: var(--cuivre-clair); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 32px 36px;
}

.hero-points {
  display: grid;
  gap: .5em;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(246, 243, 238, .12);
  list-style: none;
  color: #d7d2ca;
  font-size: .975rem;
}
.hero-points li {
  position: relative;
  padding-left: 1.6em;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: .9em; height: 1px;
  background: var(--cuivre-clair);
}

.hero-visual { margin: 0; }
.hero-visual img { width: 100%; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); }

.section-dark {
  background: var(--anthracite);
  color: var(--blanc);
}
.section-dark p { color: #d7d2ca; }
.section-dark a { color: var(--cuivre-clair); }

.section-soft { background: var(--blanc-2); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head p:last-child { color: var(--texte-doux); margin-bottom: 0; }
.section-head .eyebrow { color: var(--cuivre-fonce); }

/* Cartes prestations */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 28px;
  background: #fffdf9;
  border: 1px solid #e2dbd0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--cuivre); }
.card p { margin: 0; color: var(--texte-doux); }

.card-icon {
  width: 44px; height: 44px;
  margin-bottom: 18px;
  color: var(--cuivre);
}

/* Atelier */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.values {
  display: grid;
  gap: 22px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.values li {
  padding-left: 20px;
  border-left: 2px solid var(--cuivre);
}
.values h3 { margin-bottom: .25em; font-size: 1.15rem; }
.values p { margin: 0; }

.atelier-plan { margin: 0; }
.atelier-plan img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--anthracite-3);
}
.atelier-plan figcaption {
  margin-top: 12px;
  color: #a9a49c;
  font-size: .875rem;
}

/* Étapes */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

.step {
  position: relative;
  padding-top: 64px;
  counter-increment: etape;
}
.step::before {
  content: counter(etape, decimal-leading-zero);
  position: absolute;
  top: 0; left: 0;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--cuivre);
  border-radius: 50%;
  color: var(--cuivre-fonce);
  font-family: var(--font-titre);
  font-size: 1.05rem;
  background: var(--blanc);
}
.step::after {
  content: "";
  position: absolute;
  top: 23px; left: 58px; right: -8px;
  height: 1px;
  background: linear-gradient(90deg, var(--cuivre), rgba(192, 122, 67, .1));
}
.step:last-child::after { display: none; }
.step h3 { font-size: 1.2rem; }
.step p { margin: 0; color: var(--texte-doux); font-size: .975rem; }

/* FAQ */

.faq { display: grid; gap: 12px; }

.faq details {
  background: #fffdf9;
  border: 1px solid #ddd5c9;
  border-radius: var(--radius);
}
.faq details[open] { border-color: var(--cuivre); }

.faq summary {
  position: relative;
  padding: 20px 56px 20px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  color: var(--cuivre-fonce);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--texte-doux); }

/* ---------- Devis & contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.demo-callout {
  padding: 14px 18px;
  border: 1px dashed var(--cuivre-clair);
  border-radius: 10px;
  background: rgba(224, 165, 113, .08);
}
.section-dark .demo-callout strong { color: var(--cuivre-clair); }

.coords { margin: 28px 0 0; display: grid; gap: 16px; }
.coords div { padding-bottom: 14px; border-bottom: 1px solid var(--anthracite-3); }
.coords dt {
  color: var(--cuivre-clair);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.coords dd { margin: .2em 0 0; overflow-wrap: anywhere; }
.muted { color: #a9a49c; font-size: .9em; }

.quote-form {
  padding: clamp(22px, 4vw, 40px);
  background: var(--blanc);
  color: var(--texte);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.quote-form p { color: var(--texte-doux); }

.form-intro { font-size: .925rem; }

.quote-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.quote-form fieldset:disabled { opacity: .55; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.field { margin-bottom: 16px; min-width: 0; }

.field label {
  display: block;
  margin-bottom: .35em;
  font-weight: 600;
  font-size: .95rem;
}

.req { color: var(--cuivre-fonce); }
.opt { font-weight: 400; color: var(--texte-doux); font-size: .9em; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: .65em .85em;
  background: #fff;
  color: var(--texte);
  border: 1px solid #b9b1a5;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 130px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cuivre-fonce);
  box-shadow: 0 0 0 3px rgba(192, 122, 67, .35);
}

.field [aria-invalid="true"] {
  border-color: var(--erreur-clair);
  box-shadow: 0 0 0 1px var(--erreur-clair);
}

.field-hint { margin: .35em 0 0; font-size: .85rem; }
.field-error {
  margin: .3em 0 0;
  color: var(--erreur-clair) !important;
  font-size: .875rem;
  font-weight: 600;
}
.field-error:empty { display: none; }

.field-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
  margin-block: 8px 22px;
}
.field-check input {
  width: 22px; height: 22px;
  margin: .15em 0 0;
  accent-color: var(--cuivre-fonce);
}
.field-check label { font-weight: 400; margin: 0; }
.field-check .field-error { grid-column: 2; }

.error-summary {
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 2px solid var(--erreur-clair);
  border-radius: 10px;
  background: #fff4f2;
}
.error-summary h3 { font-family: var(--font-texte); font-size: 1rem; color: var(--erreur-clair); }
.error-summary ul { margin: 0; padding-left: 1.2em; }
.error-summary a { color: var(--erreur-clair); font-weight: 600; }

.form-status {
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 2px solid var(--succes);
  border-radius: 10px;
  background: #eef7f1;
  color: #173f2b;
}
.form-status p { margin: 0; color: #173f2b; }
.form-status p + p { margin-top: .5em; }
.form-status strong { color: var(--succes); }

.form-noscript {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--blanc-2);
  font-weight: 600;
}

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

.site-footer {
  padding-block: 56px 28px;
  background: #15171a;
  color: #cfcac2;
  font-size: .95rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}
.site-footer .brand-text { color: var(--blanc); margin-bottom: .6em; }
.footer-demo strong { color: var(--cuivre-clair); }
.footer-links p { margin-bottom: .6em; }
.site-footer a { color: var(--cuivre-clair); }
.copyright {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #2c3036;
  color: #9a958d;
  font-size: .85rem;
}

/* ---------- Page 404 ---------- */

.page-404 {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: auto 1fr auto;
  background: var(--anthracite);
  color: var(--blanc);
}
.page-404 .site-header { position: static; }
.error-wrap {
  display: grid;
  place-items: center;
  padding-block: 64px;
  text-align: center;
}
.error-code {
  margin: 0;
  font-family: var(--font-titre);
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  line-height: 1;
  color: var(--cuivre-clair);
}
.error-wrap p { color: #d7d2ca; max-width: 32em; margin-inline: auto; }
.error-wrap .hero-actions { justify-content: center; }
.page-404 .site-footer { padding-block: 24px; }
.page-404 .copyright { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 28px; max-width: 640px; }
  .step { padding: 0 0 0 68px; min-height: 46px; }
  .step::after { top: 54px; bottom: -22px; left: 23px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--cuivre), rgba(192, 122, 67, .15)); }
}

@media (max-width: 880px) {
  :root { --header-h: 120px; }

  .nav-toggle { display: inline-flex; }

  .nav-ready .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    background: var(--anthracite);
    border-top: 1px solid var(--anthracite-3);
    box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .7);
  }
  .nav-ready .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
  }
  .site-nav a { padding: .85em .4em; border-radius: 0; border-bottom: 1px solid var(--anthracite-3); }
  .site-nav a[aria-current="true"] { box-shadow: none; }
  .site-nav .nav-cta { margin: 14px 0 0; text-align: center; border-radius: 999px; }

  /* Sans JavaScript, le menu reste visible sous la marque */
  .site-header:not(.nav-ready) .header-inner { flex-wrap: wrap; }
  .site-header:not(.nav-ready) .nav-toggle { display: none; }

  .hero-grid,
  .split,
  .contact-grid,
  .footer-inner { grid-template-columns: 1fr; }

  .hero-grid { gap: 40px; }
  .hero-visual { width: 100%; max-width: 520px; margin-inline: auto; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .container { padding-inline: 16px; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding-block: 40px 48px; }
  .hero .lead { font-size: 1.05rem; }
  .hero-actions { margin-block: 28px 28px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-grid { gap: 32px; }
  /* Sur téléphone, le bandeau reste sur une ligne ; le détail figure près du formulaire et en pied de page */
  .demo-bar span { display: none; }
  .header-inner { min-height: 64px; }
  :root { --header-h: 96px; }
  .brand-text { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

@media print {
  .site-header { position: static; }
  .nav-toggle, .hero-actions, .quote-form { display: none; }
}
