/* ==========================================================================
   ALMA Protection — feuille de style
   DA : fond clair, grandes photos, cartes sobres, orange réservé aux actions.
   ========================================================================== */

:root {
  --paper: #F7F6F2;
  --soft: #EFEEE9;
  --grey: #E5E5E0;
  --white: #FFFFFF;
  --ink: #171717;
  --signal: #F15A29;
  --signal-dark: #D9481B;

  --ink-80: rgba(23, 23, 23, .8);
  --ink-60: rgba(23, 23, 23, .6);
  --ink-45: rgba(23, 23, 23, .45);
  --line: #E5E5E0;
  --line-strong: rgba(23, 23, 23, .18);
  --line-dark: rgba(247, 246, 242, .14);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(64px, 8vw, 120px);
  --radius: 6px;
  --radius-sm: 4px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 3.3vw, 44px); line-height: 1.12; max-width: 22ch; }
h3 { font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow { font: 500 11px/1.4 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-80); margin-bottom: 18px; }
.lead { font-size: 17px; color: var(--ink-60); max-width: 56ch; margin-top: 18px; }
.fineprint { font-size: 13px; color: var(--ink-45); margin-top: 28px; max-width: 80ch; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }

.link { display: inline-flex; align-items: center; gap: 6px; color: var(--signal); font-size: 14px; font-weight: 500; text-decoration: none; margin-top: 22px; }
.link span { transition: transform .25s var(--ease); }
.link:hover span { transform: translateX(4px); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  font: 500 15px/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--accent { background: var(--signal); color: var(--white); }
.btn--accent:hover { background: var(--signal-dark); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: #000; }
.btn--outline { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--ink); }
.btn--block { width: 100%; }

/* ---------- En-tête ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(247, 246, 242, .94); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

/* Logo empilé : ALMA / PROTECTION */
.logo { display: inline-flex; flex-direction: column; align-items: flex-start; text-decoration: none; line-height: 1; }
.logo__name { font: 700 28px/1 var(--font); letter-spacing: .04em; }
.logo__sub { font: 400 9px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; margin-top: 5px; padding-left: 1px; }
.logo--light { color: var(--paper); }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) { font-size: 13px; text-decoration: none; color: var(--ink-80); transition: color .2s; position: relative; }
.nav a:not(.btn):hover, .nav a.is-active { color: var(--ink); }
.nav a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--signal); }
.nav__cta { min-height: 42px; padding: 0 18px; font-size: 13px; margin-left: 8px; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__media { position: absolute; top: 0; right: 0; bottom: 0; width: min(56vw, 900px); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero__media::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 34%; z-index: 1;
  background: linear-gradient(90deg, var(--paper) 0%, rgba(247, 246, 242, .7) 35%, rgba(247, 246, 242, 0) 100%);
}
.hero__inner { position: relative; z-index: 2; min-height: min(720px, calc(100vh - var(--header-h))); display: flex; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero__text { max-width: 600px; }
.hero__title { font-family: var(--font-display); text-transform: uppercase; line-height: .98; letter-spacing: -.02em; font-size: clamp(36px, 3.9vw, 58px); margin-bottom: 28px; }
.hero__strong { display: block; font-weight: 800; }
.hero__light { display: block; font-weight: 200; margin-top: .06em; }
.hero__lead { font-size: 16px; color: var(--ink-80); max-width: 48ch; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); padding: 32px 0; border-bottom: 1px solid var(--line); }
.pillars li { display: flex; align-items: center; gap: 16px; padding: 0 32px; }
.pillars li:first-child { padding-left: 0; }
.pillars li + li { border-left: 1px solid var(--line-strong); }
.pillars__icon { flex: none; width: 40px; height: 40px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; }
.pillars__icon svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pillars strong { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.pillars small { display: block; font-size: 13px; color: var(--ink-60); margin-top: 2px; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section--soft { background: var(--soft); }
.section__head { margin-bottom: clamp(36px, 4vw, 56px); }


/* ---------- Étapes ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step__n { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.step h3 { font-size: 14px; font-weight: 500; margin: 2px 0 14px; }
.step__icon { aspect-ratio: 4 / 3; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; margin-bottom: 18px; }
.step__icon svg { width: 52px; height: 52px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.step > p:last-child { font-size: 14px; color: var(--ink-60); }
.callout { margin-top: clamp(40px, 5vw, 64px); padding: 28px 32px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 20px 48px; flex-wrap: wrap; }
.callout p { max-width: 64ch; font-size: 15px; }

/* ---------- Personnalisation / avant-après ---------- */
.perso { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.compare { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--grey); user-select: none; touch-action: pan-y; }
.compare img { width: 100%; aspect-ratio: 1311 / 1008; object-fit: cover; }
.compare__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__before img { height: 100%; }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--white); pointer-events: none; }
.compare__handle::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; background: var(--white); color: var(--ink);
  display: grid; place-items: center; font: 500 16px/1 var(--font); letter-spacing: .08em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare:focus-within .compare__handle::after { outline: 2px solid var(--signal); outline-offset: 2px; }
.compare__tag {
  position: absolute; bottom: 14px; padding: 7px 11px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .92);
  font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; pointer-events: none;
}
.compare__tag--l { left: 14px; }
.compare__tag--r { right: 14px; }

.finishes { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 32px; }
.finishes li { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.finishes strong { display: block; font-size: 14px; font-weight: 600; }
.finishes small { display: block; font-size: 13px; color: var(--ink-60); }
.swatch { flex: none; width: 52px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; }
.swatch i { font: normal 500 8px/1 var(--font); letter-spacing: .2em; color: var(--paper); }
.swatch--osb { background: url("../img/photos/texture-osb.jpg") 60% 40% / 220% auto; }
.swatch--logo { background: #1E2B27; }
.swatch--plain { background: #1E2B27; }
.swatch--logo i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #EEE7D8; display: grid; place-items: center; font: 500 8px/1 Georgia, serif; letter-spacing: .04em; color: #EEE7D8; }
.swatch--full { background: url("../img/photos/texture-adhesif.jpg") center / cover; }

/* ---------- Formulaires (commun) ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font: 600 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; padding: 0; }
.row { display: grid; gap: 16px; }
.row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 8px; font-size: 13px; color: var(--ink-80); margin-bottom: 16px; }
.field em { font-style: normal; color: var(--ink-45); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: 400 16px/1.4 var(--font); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, background .2s;
  appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-45); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background-color: var(--white); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--signal); }
.hint { font-size: 13px; color: var(--ink-45); margin-top: -4px; }

/* ---------- Sur le terrain ---------- */
.terrain { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
.terrain figure { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--grey); }
.terrain img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.terrain__main img { aspect-ratio: auto; }
.terrain figcaption {
  position: absolute; left: 12px; bottom: 12px; right: 12px; width: fit-content; max-width: calc(100% - 24px);
  padding: 7px 11px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .92); font-size: 12px; font-weight: 500;
}

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); }
.faq .section__head { margin-bottom: 0; align-self: start; }
.faq__list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 28px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font-size: 16px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 13px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq details p { padding: 0 40px 24px 0; color: var(--ink-60); font-size: 15px; max-width: 64ch; }

/* ---------- Devis ---------- */
.quote { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact { margin-top: 40px; border-top: 1px solid var(--line-strong); }
.contact li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.contact span { color: var(--ink-45); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding-top: 3px; }
.contact a, .contact b { font-weight: 500; text-decoration: none; }
.contact a:hover { color: var(--signal); }
.quote__form { padding: clamp(24px, 3vw, 40px); }
.quote__est { font-size: 14px; padding: 14px 16px; border-left: 2px solid var(--signal); background: var(--paper); margin-bottom: 20px; color: var(--ink-80); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--ink-60); margin: 8px 0 24px; cursor: pointer; }
.check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--signal); flex: none; }
.check.is-invalid span { color: var(--signal); }
.form-status { margin-top: 16px; font-size: 14px; min-height: 1.4em; }
.form-status.is-ok { color: #2E7D4F; }
.form-status.is-error { color: var(--signal-dark); }

/* ---------- Pied de page ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 56px 0 40px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; }
.footer__tag { font-size: 14px; color: rgba(247, 246, 242, .55); margin-top: 18px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 14px; }
.footer__nav a { text-decoration: none; color: rgba(247, 246, 242, .75); }
.footer__nav a:hover { color: var(--paper); }
.footer__copy { width: 100%; font-size: 13px; color: rgba(247, 246, 242, .4); border-top: 1px solid var(--line-dark); padding-top: 24px; }

.mobile-cta { display: none; }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .nav { gap: 22px; }
}

@media (max-width: 1024px) {
  :root { --header-h: 68px; }
  .burger { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--paper);
    flex-direction: column; align-items: stretch; gap: 0; padding: 16px var(--gutter) 32px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
    overflow-y: auto;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a:not(.btn) { font-size: 22px; font-weight: 500; color: var(--ink); padding: 18px 0; border-bottom: 1px solid var(--line); }
  .nav a.is-active::after { display: none; }
  .nav__cta { margin: 24px 0 0; min-height: 54px; font-size: 15px; }

  /* Hero : photo en haut, texte dessous */
  .hero__media { position: relative; width: 100%; height: auto; }
  .hero__media img { height: auto; aspect-ratio: 16 / 11; }
  .hero__media::before { inset: auto 0 0 0; width: auto; height: 40%; background: linear-gradient(0deg, var(--paper) 0%, rgba(247, 246, 242, 0) 100%); }
  .hero__inner { min-height: 0; margin-top: -48px; padding-top: 0; padding-bottom: 40px; }
  .hero__text { max-width: 640px; }


  .terrain { grid-template-columns: 1fr 1fr; }
  .terrain__main { grid-column: 1 / -1; }
  .terrain__main img { aspect-ratio: 16 / 9; }
  .steps { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .perso { grid-template-columns: 1fr; }
  .faq, .quote { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; padding: 8px 0; }
  .pillars li, .pillars li:first-child { padding: 16px 0; }
  .pillars li + li { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .hero__media img { aspect-ratio: 4 / 3.4; }
  .hero__title { font-size: clamp(28px, 8.2vw, 48px); }
  .hero__actions .btn { flex: 1 1 100%; }
  .terrain { gap: 10px; }
  .terrain figcaption { font-size: 11px; left: 8px; bottom: 8px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 28px 14px; }
  .step__icon svg { width: 40px; height: 40px; }
  .finishes { grid-template-columns: 1fr; }
  .row--2, .row--3 { grid-template-columns: 1fr; gap: 0; }
  .callout { padding: 22px; }
  .faq__list { padding: 0 20px; }
  .contact li { grid-template-columns: 1fr; gap: 4px; }

  .mobile-cta {
    display: flex; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40;
    transform: translateY(140%); transition: transform .35s var(--ease);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  }
  .mobile-cta.is-visible { transform: none; }
  .footer { padding-bottom: 96px; }
}
