/* ==========================================================================
   TOPNIVEAUX — feuille de style unique
   1. Réglages (couleurs, polices)   2. Base   3. Composants   4. Blocs
   Pour changer les couleurs du site : modifier uniquement la section 1.
   ========================================================================== */

/* 1. Réglages ------------------------------------------------------------- */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); }

:root {
  --yellow: #ffe000;
  --yellow-dark: #e6c900;
  --black: #111111;
  --ink: #1d1d1b;
  --text: #34342f;
  --muted: #6b6b63;
  --line: #e4e3dc;
  --gray: #f4f3ee;
  --white: #ffffff;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 6px;
  --shadow: 0 10px 30px -12px rgb(0 0 0 / 0.25);
  --section: clamp(56px, 9vw, 112px);
  --header-h: 76px;
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.08; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.005em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--black); color: var(--yellow); padding: 8px 14px; }
.skip-link:focus { left: 8px; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.eyebrow { display: inline-flex; align-items: center; gap: .6em; margin: 0 0 1rem; font-family: var(--font-title); font-weight: 600; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 28px; height: 4px; background: var(--yellow); }

/* Règle graduée, clin d'œil au logo */
.ruler {
  height: 18px; background-color: var(--yellow);
  background-image:
    repeating-linear-gradient(90deg, var(--black) 0 2px, transparent 2px 100px),
    repeating-linear-gradient(90deg, var(--black) 0 2px, transparent 2px 20px);
  background-size: 100% 18px, 100% 8px; background-repeat: no-repeat;
}

/* 3. Composants ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border: 2px solid transparent; border-radius: var(--radius);
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--yellow); color: var(--black); }
.btn--primary:hover { background: var(--yellow-dark); }
.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: #333; }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.btn--lg { font-size: 1.1rem; padding: .95em 1.7em; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }

.checklist { list-style: none; display: grid; gap: .5em; }
.checklist li { position: relative; padding-left: 1.7em; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .38em; width: 1.05em; height: 1.05em; border-radius: 3px;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 72% no-repeat;
}
.checklist--cols { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); column-gap: 1.5rem; margin-top: .5rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.5rem 0 0; }
.tags span { padding: .3em .8em; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 500; background: var(--white); }

.prose > :last-child { margin-bottom: 0; }
.prose a { color: var(--ink); text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.prose ul { list-style: none; display: grid; gap: .4em; margin-bottom: 1em; }
.prose ul li { padding-left: 1.2em; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: .5em; height: .5em; background: var(--yellow); }
.prose strong { color: var(--ink); }

/* Barre supérieure + en-tête */
.topbar { background: var(--black); color: #cfcfc8; font-size: .875rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; }
.topbar__inner .icon { color: var(--yellow); }
.topbar__links { display: flex; gap: 20px; }
.topbar a { color: var(--white); text-decoration: none; font-weight: 500; }
.topbar a:hover { color: var(--yellow); }

.header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 6px 20px -12px rgb(0 0 0 / .3); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.header__logo img { width: 210px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { list-style: none; display: flex; gap: 4px; }
.nav__link { display: block; padding: 8px 12px; font-weight: 500; text-decoration: none; color: var(--ink); border-radius: var(--radius); position: relative; }
.nav__link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.header__toggle { display: none; background: none; border: 0; padding: 8px; color: var(--ink); cursor: pointer; }
.header__toggle .icon { width: 28px; height: 28px; }
.header__toggle .icon--close { display: none; }

/* Pied de page */
.footer { background: var(--black); color: #bdbdb5; font-size: .95rem; margin-top: 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-block: 64px 48px; }
.footer__brand img { width: 220px; margin-bottom: 20px; background: var(--white); padding: 12px 14px; border-radius: var(--radius); }
.footer__title { font-size: 1.15rem; color: var(--white); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer__list { list-style: none; display: grid; gap: 8px; }
.footer a { color: #e9e9e2; text-decoration: none; }
.footer a:hover { color: var(--yellow); }
.footer .icon { color: var(--yellow); margin-right: 4px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid #2a2a28; font-size: .875rem; }

/* Barre d'appel fixe (mobile) */
.call-bar { display: none; }

/* 4. Blocs ---------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section--gris { background: var(--gray); }
.section--sombre { background: var(--black); color: #d6d6cf; }
.section--sombre h2, .section--sombre h3 { color: var(--white); }
.section--jaune { background: var(--yellow); }
.section--jaune .eyebrow::before { background: var(--black); }
.section__title { font-size: clamp(2rem, 4.2vw, 3rem); }
.section__head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.section__intro { font-size: 1.15rem; color: var(--muted); }

/* hero */
.hero { position: relative; isolation: isolate; color: var(--white); background: var(--black); overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease, transform 8s ease-out; transform: scale(1.06); }
.hero__media img.is-active { opacity: 1; transform: scale(1); }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(10 10 10 / .92) 0%, rgb(10 10 10 / .78) 45%, rgb(10 10 10 / .25) 100%); }
.hero__inner { min-height: min(82vh, 760px); display: flex; align-items: center; padding-block: 96px 112px; }
.hero__content { max-width: 680px; }
.hero .eyebrow { color: var(--yellow); }
.hero__title { font-size: clamp(2.6rem, 6.5vw, 4.75rem); color: var(--white); text-transform: uppercase; }
.hero__text { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: #e4e4dd; max-width: 580px; }
.hero .btn--ghost { color: var(--white); }
.hero .btn--ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.hero .btn--primary { font-size: 1.15rem; }
.hero__badges { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 2rem; font-weight: 500; color: #e4e4dd; }
.hero__badges .icon { color: var(--yellow); }
.hero .ruler, .page-header .ruler { position: absolute; left: 0; right: 0; bottom: 0; }

/* en-tête de page */
.page-header { position: relative; isolation: isolate; background: var(--gray); padding-block: clamp(64px, 10vw, 120px) clamp(72px, 10vw, 128px); overflow: hidden; }
.page-header h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); max-width: 900px; text-transform: uppercase; }
.page-header__text { font-size: 1.2rem; max-width: 680px; }
.page-header--image { color: #e4e4dd; background: var(--black); }
.page-header--image h1 { color: var(--white); }
.page-header--image .eyebrow { color: var(--yellow); }
.page-header--image .page-header__text strong { color: var(--white); }
.page-header__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.page-header__logo { width: 240px; margin-bottom: 28px; background: var(--white); padding: 14px 18px; border-radius: var(--radius); }

/* statistiques */
.stats { background: var(--yellow); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 16px; text-align: center; border-left: 2px solid rgb(0 0 0 / .12); }
.stat:first-child { border-left: 0; }
.stat__value { display: block; font: 700 clamp(2.2rem, 4.5vw, 3.2rem)/1 var(--font-title); color: var(--black); }
.stat__label { font-weight: 500; color: var(--ink); }

/* cartes */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; padding: 32px 28px; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--yellow); border-radius: var(--radius); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: var(--radius); background: var(--black); color: var(--yellow); }
.card__icon .icon { width: 28px; height: 28px; }
.card__title { font-size: 1.6rem; }
.card__text { color: var(--muted); }
.card .checklist { font-size: .98rem; }
.card__link { margin-top: auto; padding-top: 20px; display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; color: var(--ink); }
.card__link:hover .icon { transform: translateX(3px); }
.card__link .icon { transition: transform .2s; }

/* image + texte */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { margin: 0; position: relative; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.split__media::before { content: ""; position: absolute; inset: 20px -20px -20px 20px; z-index: -1; background: var(--yellow); border-radius: var(--radius); }
.split--reverse .split__media::before { inset: 20px 20px -20px -20px; }
.split { isolation: isolate; }

/* texte seul */
.text-block { max-width: 820px; }
.text-block--wide { max-width: var(--container); }
.prose--columns { columns: 2 320px; column-gap: 48px; }

/* logos */
.logos { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.logos li { display: grid; place-items: center; padding: 22px; background: var(--white); min-height: 120px; }
.logos img { max-height: 70px; width: auto; max-width: 100%; object-fit: contain; mix-blend-mode: multiply; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.logos li:hover img { filter: none; opacity: 1; }

/* appel à l'action */
.cta { background: var(--black); color: #d6d6cf; padding-block: clamp(48px, 7vw, 80px); position: relative; }
.cta::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--yellow); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta__title { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.8rem); text-transform: uppercase; margin-bottom: .3em; }
.cta__text p { margin: 0; font-size: 1.1rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta__actions .buttons { margin: 0; }
.cta__phone { display: inline-flex; align-items: center; gap: .5em; padding: .55em 1em; background: var(--yellow); color: var(--black); font: 700 1.6rem/1 var(--font-title); text-decoration: none; border-radius: var(--radius); letter-spacing: .02em; }
.cta__phone:hover { background: var(--white); }
.cta .btn--dark { background: transparent; border-color: var(--white); }

/* galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.gallery__item { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--gray); }
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 14px; color: var(--white); font-weight: 600; background: linear-gradient(transparent, rgb(0 0 0 / .75)); }

/* formulaire */
.form-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-list { list-style: none; display: grid; gap: 18px; margin-top: 2rem; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { width: 42px; height: 42px; padding: 10px; border-radius: var(--radius); background: var(--black); color: var(--yellow); }
.contact-list strong { display: block; color: var(--ink); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.form { background: var(--white); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-top: 4px solid var(--yellow); border-radius: var(--radius); box-shadow: var(--shadow); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.field__req { color: #c0392b; }
.field input, .field textarea, .field select { width: 100%; padding: .75em .9em; font: inherit; color: var(--ink); background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, background-color .2s; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--black); background: var(--white); box-shadow: 0 0 0 3px var(--yellow); }
.field input[type="file"] { padding: .6em; background: var(--white); border-style: dashed; }
.field textarea { resize: vertical; min-height: 140px; }
.field__help { color: var(--muted); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__legal { font-size: .875rem; color: var(--muted); margin: 18px 0; }
.form__status { margin: 16px 0 0; font-weight: 600; }
.form__status:empty { display: none; }
.form__status.is-ok { color: #1e7b34; }
.form__status.is-error { color: #c0392b; }
.form.is-sending button[type="submit"] { opacity: .6; pointer-events: none; }

/* Apparition au défilement */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img { transition: none; transform: none; }
}

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .header__toggle { display: inline-flex; }
  .nav { position: fixed; inset: var(--nav-top, 0) 0 0 0; z-index: 40; flex-direction: column; align-items: stretch; gap: 24px; padding: 24px var(--gutter) 40px; background: var(--white); overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__list { flex-direction: column; }
  .nav__link { font: 700 1.8rem/1.2 var(--font-title); padding: 12px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link::after { left: 0; right: auto; width: 48px; bottom: -2px; }
  .nav__cta { font-size: 1.15rem; padding: 1em; }
  .header.is-open .icon--open { display: none; }
  .header.is-open .icon--close { display: block; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .logos { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 820px) {
  .topbar__inner > span:first-child { display: none; }
  .topbar__links { width: 100%; justify-content: center; }
  .topbar__links a:last-child { display: none; }
  .split, .form-layout { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .split__media::before { inset: 12px -12px -12px 12px; }
  .split--reverse .split__media::before { inset: 12px -12px -12px 12px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 2px solid rgb(0 0 0 / .12); }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .hero__media::after { background: linear-gradient(180deg, rgb(10 10 10 / .7), rgb(10 10 10 / .88)); }
  .hero__inner { min-height: 0; padding-block: 72px 96px; }
}
@media (max-width: 600px) {
  :root { --header-h: 64px; }
  body { padding-bottom: 64px; }
  .header__logo img { width: 160px; }
  .form__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .buttons .btn { flex: 1 1 100%; }
  .cta__phone { flex: 1 1 100%; justify-content: center; }
  .call-bar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; box-shadow: 0 -4px 16px rgb(0 0 0 / .2); }
  .call-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; font-weight: 700; font-size: 1.05rem; text-decoration: none; }
  .call-bar a:first-child { background: var(--yellow); color: var(--black); }
  .call-bar a:last-child { background: var(--black); color: var(--white); }
}
