/* Piscines Raphaël — feuille de style
   Palette minérale : calcaire, basalte, pierre bleue, eau profonde. */
:root {
  --calcaire: #EEEDE8;
  --calcaire-2: #E3E2DC;
  --basalte: #23292B;
  --pierre: #5E6A6D;
  --eau: #24616A;
  --eau-claire: #9CC3C6;
  --brume: #D2D8D6;
  --blanc: #FFFFFF;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1320px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--calcaire);
  color: var(--basalte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--eau); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--basalte); }
:focus-visible { outline: 2px solid var(--eau); outline-offset: 3px; }
::selection { background: var(--eau-claire); color: var(--basalte); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.skip { position: absolute; left: -9999px; top: 0; background: var(--basalte); color: var(--blanc); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Typographie ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.2vw, 5.6rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
h3 { font-size: clamp(1.45rem, 2.1vw, 1.9rem); line-height: 1.15; }
p { margin: 0 0 1.1em; max-width: 64ch; }
.lead { font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.6; color: var(--basalte); max-width: 52ch; }
.muted { color: var(--pierre); }
.serif-quote { font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.5rem); line-height: 1.2; font-style: italic; font-weight: 400; max-width: 26ch; }

/* ---------- Mise en page ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 150px) 0; }
.section--tight { padding: clamp(48px, 6vw, 90px) 0; }
.section--dark { background: var(--basalte); color: var(--calcaire); }
.section--dark a { color: var(--eau-claire); }
.section--dark a:hover { color: var(--blanc); }
.section--dark .muted { color: #A9B3B4; }
.section--stone { background: var(--calcaire-2); }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.split--rev { grid-template-columns: 7fr 5fr; }
.split--center { align-items: center; }
@media (max-width: 860px) { .split, .split--rev { grid-template-columns: 1fr; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 28px;
  font-family: var(--sans); font-size: 1rem; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none; border: 1px solid var(--eau); background: var(--eau); color: var(--blanc);
  border-radius: 2px; cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--basalte); border-color: var(--basalte); color: var(--blanc); }
.btn--ghost { background: transparent; color: var(--basalte); border-color: var(--basalte); }
.btn--ghost:hover { background: var(--basalte); color: var(--blanc); }
.btn--light { background: var(--blanc); color: var(--basalte); border-color: var(--blanc); }
.btn--light:hover { background: transparent; color: var(--blanc); border-color: var(--blanc); }
.btn--line-light { background: transparent; color: var(--blanc); border-color: rgba(255,255,255,.7); }
.btn--line-light:hover { background: var(--blanc); color: var(--basalte); border-color: var(--blanc); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(238, 237, 232, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(35, 41, 43, 0.08);
  transition: background .35s, border-color .35s, color .35s;
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { white-space: nowrap; display: flex; flex-direction: column; text-decoration: none; color: var(--basalte); line-height: 1; }
.brand-name { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; letter-spacing: 0.005em; }
.brand-tag { font-size: 0.78rem; color: var(--pierre); margin-top: 6px; letter-spacing: 0.04em; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav a { color: var(--basalte); text-decoration: none; font-size: 0.98rem; white-space: nowrap; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.nav .btn { min-height: 44px; padding: 0 20px; color: var(--blanc); border-bottom: 1px solid var(--eau); }
.nav .btn:hover { color: var(--blanc); }
.menu-btn { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: inherit; }
.menu-btn svg { width: 28px; height: 28px; }

/* En-tête posé sur la vidéo d'accueil */
.has-hero .site-header { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.has-hero .site-header .brand, .has-hero .site-header .nav a, .has-hero .site-header .menu-btn { color: var(--blanc); }
.has-hero .site-header .brand-tag { color: rgba(255,255,255,.8); }
.has-hero .site-header .nav .btn { background: transparent; border-color: rgba(255,255,255,.75); }
.has-hero .site-header .nav .btn:hover { background: var(--blanc); color: var(--basalte); }
.has-hero.scrolled .site-header { background: rgba(238, 237, 232, 0.94); border-bottom-color: rgba(35,41,43,.08); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); }
.has-hero.scrolled .site-header .brand, .has-hero.scrolled .site-header .nav a, .has-hero.scrolled .site-header .menu-btn { color: var(--basalte); }
.has-hero.scrolled .site-header .brand-tag { color: var(--pierre); }
.has-hero.scrolled .site-header .nav .btn { background: var(--eau); border-color: var(--eau); color: var(--blanc); }

@media (max-width: 1180px) {
  :root { --header-h: 70px; }
  .brand-name { font-size: 1.45rem; }
  .brand-tag { display: none; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; height: calc(100svh - var(--header-h));
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 24px var(--gutter) 40px; background: var(--calcaire);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
    overflow-y: auto;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { font-family: var(--serif); font-size: 1.7rem; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--brume); }
  .has-hero .site-header .nav a { color: var(--basalte); }
  .nav .btn { margin-top: 26px; font-family: var(--sans); font-size: 1rem; width: 100%; }
  .has-hero .site-header .nav .btn { background: var(--eau); border-color: var(--eau); color: var(--blanc); }
  .menu-open .site-header { background: var(--calcaire) !important; }
  .menu-open .site-header .brand, .menu-open .site-header .menu-btn { color: var(--basalte) !important; }
}

/* ---------- Accueil : vidéo ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; color: var(--blanc); overflow: hidden; background: var(--basalte); }
.hero video, .hero .hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,24,25,.45) 0%, rgba(20,24,25,0) 28%, rgba(20,24,25,0) 45%, rgba(20,24,25,.72) 100%); }
.hero-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(36px, 6vh, 70px); }
.hero h1 { max-width: 15ch; opacity: 0; transform: translateY(14px); animation: rise 1.1s .25s cubic-bezier(.2,.7,.2,1) forwards; }
.hero .lead { color: rgba(255,255,255,.92); margin-top: 22px; opacity: 0; animation: rise 1.1s .55s cubic-bezier(.2,.7,.2,1) forwards; }
.hero .actions { opacity: 0; animation: rise 1.1s .8s cubic-bezier(.2,.7,.2,1) forwards; }
.waterline { margin-top: clamp(36px, 6vh, 64px); padding-top: 14px; border-top: 1px solid rgba(255,255,255,.55); display: flex; justify-content: space-between; gap: 20px; font-size: 0.9rem; color: rgba(255,255,255,.85); }
.waterline button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .waterline span:last-child { display: none; } }

/* ---------- En-tête de page intérieure ---------- */
.page-head { padding: clamp(56px, 9vw, 120px) 0 clamp(36px, 5vw, 64px); }
.page-head h1 { max-width: 18ch; }
.page-head .lead { margin-top: 26px; }
.crumbs { font-size: 0.9rem; color: var(--pierre); margin-bottom: 26px; }
.crumbs a { color: var(--pierre); }

/* ---------- Images ---------- */
.figure { margin: 0; }
.figure img, .figure video { width: 100%; object-fit: cover; }
.figure figcaption { font-size: 0.88rem; color: var(--pierre); margin-top: 12px; }
.section--dark .figure figcaption { color: #A9B3B4; }
.ratio-wide img, .ratio-wide video { aspect-ratio: 16 / 9; }
.ratio-photo img { aspect-ratio: 4 / 3; }
.ratio-tall img, .ratio-tall video { aspect-ratio: 3 / 4; }
.bleed { width: 100%; }
.bleed img { width: 100%; height: clamp(320px, 62vw, 820px); object-fit: cover; }

/* Projet vedette */
.feature-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(16px, 2vw, 28px); margin-top: clamp(16px, 2vw, 28px); }
.feature-grid .figure:last-child img { height: 100%; }
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Index des savoir-faire ---------- */
.index { list-style: none; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; border-top: 1px solid var(--brume); }
.index li { border-bottom: 1px solid var(--brume); }
.index a { display: grid; grid-template-columns: minmax(220px, 4fr) 6fr auto; gap: 28px; align-items: baseline; padding: clamp(24px, 3vw, 38px) 0; text-decoration: none; color: var(--basalte); }
.index h3 { transition: color .25s; }
.index p { margin: 0; color: var(--pierre); }
.index .go { font-size: 0.95rem; color: var(--eau); white-space: nowrap; }
.index a:hover h3 { color: var(--eau); }
@media (max-width: 760px) { .index a { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- Étapes ---------- */
.steps { list-style: none; counter-reset: step; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 48px); }
.steps li { counter-increment: step; padding-top: 18px; border-top: 1px solid rgba(238,237,232,.25); }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.6rem; line-height: 1; margin-bottom: 14px; color: var(--eau-claire); }
.steps h3 { font-size: 1.35rem; margin-bottom: 10px; }
.steps p { color: #C3CBCB; margin: 0; font-size: 1rem; }
.section:not(.section--dark) .steps li { border-top-color: var(--brume); }
.section:not(.section--dark) .steps li::before { color: var(--eau); }
.section:not(.section--dark) .steps p { color: var(--pierre); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Listes de détails ---------- */
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px); margin-top: clamp(36px, 5vw, 60px); }
.specs > div { border-top: 1px solid var(--brume); padding-top: 22px; }
.section--dark .specs > div { border-top-color: rgba(238,237,232,.22); }
.specs h3 { font-size: 1.45rem; margin-bottom: 12px; }
.specs p { margin-bottom: 0.6em; }
.specs ul { margin: 0; padding-left: 1.1em; }
.specs li { margin-bottom: 6px; }
@media (max-width: 700px) { .specs { grid-template-columns: 1fr; } }

/* ---------- Réalisations ---------- */
.project { padding: clamp(56px, 8vw, 110px) 0; border-top: 1px solid var(--brume); }
.project:first-of-type { border-top: 0; }
.project-head { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 90px); align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.project-head p { margin: 0; color: var(--pierre); }
.project-meta { font-size: 0.95rem; color: var(--pierre); margin-top: 10px; }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.gallery .figure { grid-column: span 6; }
.gallery .figure.w12 { grid-column: span 12; }
.gallery .figure.w8 { grid-column: span 8; }
.gallery .figure.w4 { grid-column: span 4; }
.gallery .figure.w7 { grid-column: span 7; }
.gallery .figure.w5 { grid-column: span 5; }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.gallery .w12 img, .gallery .w12 video { aspect-ratio: 16 / 8; }
.gallery .tall img, .gallery .tall video { aspect-ratio: 3 / 4; }
.gallery button.zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
@media (max-width: 760px) {
  .project-head { grid-template-columns: 1fr; }
  .gallery .figure, .gallery .figure.w8, .gallery .figure.w4, .gallery .figure.w7, .gallery .figure.w5 { grid-column: span 12; }
  .gallery .w12 img { aspect-ratio: 4 / 3; }
}

/* Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,24,25,.96); display: none; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--blanc); cursor: pointer; padding: 12px; font-family: var(--sans); font-size: 1rem; }
.lightbox .lb-close { top: 10px; right: 14px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-cap { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: .9rem; padding: 0 16px; }

/* ---------- Bandeau d'appel ---------- */
.cta { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 80px); align-items: end; }
.cta .contact-lines { font-size: 1.1rem; line-height: 2; }
.cta .contact-lines a { text-decoration: none; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Formulaire ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.95rem; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--basalte);
  background: var(--blanc); border: 1px solid #C5CCCA; border-radius: 2px; padding: 13px 14px; min-height: 50px;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--eau); box-shadow: 0 0 0 3px rgba(36,97,106,.15); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--eau); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 18px 20px; border-left: 3px solid var(--eau); background: var(--blanc); margin-bottom: 28px; }
.notice--error { border-left-color: #9B3B2E; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ---------- Pages légales ---------- */
.legal h2 { font-size: 1.7rem; margin: 2.2em 0 .6em; }
.legal p, .legal li { max-width: 72ch; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--basalte); color: #C3CBCB; padding: clamp(56px, 8vw, 100px) 0 36px; font-size: 0.98rem; }
.site-footer a { color: var(--calcaire); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 5fr 3fr 3fr 3fr; gap: 40px; }
.footer-grid h2 { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--calcaire); margin-bottom: 14px; letter-spacing: 0.02em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand { font-family: var(--serif); font-size: 2.1rem; color: var(--calcaire); line-height: 1; margin-bottom: 18px; }
.footer-bottom { margin-top: clamp(40px, 6vw, 72px); padding-top: 22px; border-top: 1px solid rgba(238,237,232,.16); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 0.88rem; color: #8F9A9B; }
.footer-bottom a { color: #B5BFC0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
