/* ==========================================================================
   Entreprise Grochowski — design system
   Palette : bleu nuit / orange / blanc — sombre et contrasté
   Typo : Archivo variable — display extra-large étendu, labels condensés
   Signature : « appareillage » — blocs décalés + joints de mortier
   ========================================================================== */

:root {
  --bg: #0f1a2b;
  --surface: #172740;
  --surface-2: #1c2e4a;
  --line: #2a3f5f;
  --txt: #f5f7fa;
  --muted: #a3b1c6;
  --accent: #f28134;
  --accent-soft: #ff9c55;
  --dark-bg: #0a1220;
  --dark-txt: #f5f7fa;
  --dark-muted: #94a3bb;
  --dark-line: #24364f;
  --radius: 6px;
  --container: 1180px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--txt);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #14100a; padding: .6rem 1rem; z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* --- Typographie ------------------------------------------------------- */

h1, h2, h3 { line-height: 1.08; margin: 0 0 .6em; }

.display {
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: -.015em;
}

h2.display { font-size: clamp(1.7rem, 4.2vw, 2.6rem); }

.eyebrow {
  display: block;
  font-stretch: 75%;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .8rem;
  color: var(--accent);
  margin-bottom: .9rem;
}

.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); max-width: 46rem; }

p { margin: 0 0 1em; }
.muted { color: var(--muted); }

/* --- Joint de mortier (séparateur signature) --------------------------- */

.joint {
  border: 0;
  height: 7px;
  margin: 0;
  background:
    linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat,
    linear-gradient(var(--line), var(--line)) bottom / 100% 1px no-repeat;
}

/* --- Header ------------------------------------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 72px;
}

.brand {
  display: flex; align-items: center; gap: .7rem;
  color: var(--txt); font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; font-size: .95rem;
}
.brand:hover { text-decoration: none; }
.brand img { width: 42px; height: auto; mix-blend-mode: screen; }
.brand .brand-sub {
  display: block; font-stretch: 75%; font-weight: 500;
  font-size: .68rem; letter-spacing: .28em; color: var(--muted);
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--muted); font-weight: 500; font-size: .95rem;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--txt); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--txt); }
.site-nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; background: var(--accent); margin-top: 2px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--txt); padding: .5rem .7rem; font-size: 1.05rem; cursor: pointer;
}

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

.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #1c1005; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--accent-soft); }

.btn-ghost { border-color: var(--line); color: var(--txt); background: transparent; }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--muted); }

.btn-cta-header { padding: .55rem 1.1rem; font-size: .9rem; }

/* --- Hero (accueil) ----------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .hero-bg {
  position: absolute; inset: 0;
}
.hero .hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 70% 45%;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(13, 21, 37, .95) 0%, rgba(13, 21, 37, .74) 45%, rgba(13, 21, 37, .28) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  padding-block: clamp(4.5rem, 12vh, 8.5rem);
}

/* Titre en appareillage : rangées décalées comme des parpaings */
.blockwork { margin: 0 0 1.4rem; }
.blockwork .row {
  display: table;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--line);
  padding: .18em .45em;
  font-size: clamp(2rem, 6.5vw, 4.1rem);
}
.blockwork .row + .row { margin-top: 6px; }
.blockwork .row:nth-child(2) { margin-left: clamp(1rem, 4vw, 3rem); }
.blockwork .row:nth-child(3) { margin-left: clamp(.4rem, 1.6vw, 1.2rem); }
.blockwork .accent { color: var(--accent); }

.hero .lead { margin-bottom: 1.8rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.2rem; }

.trust-row {
  display: flex; flex-wrap: wrap; gap: .6rem 1.8rem;
  padding: 0; margin: 0; list-style: none;
  color: var(--muted); font-size: .92rem;
}
.trust-row li { display: flex; align-items: center; gap: .5rem; }
.trust-row li::before {
  content: ""; width: 8px; height: 8px; background: var(--accent);
  display: inline-block;
}

/* --- Sous-hero des pages internes --------------------------------------- */

.page-hero { padding-block: clamp(3rem, 8vh, 5rem) clamp(2rem, 5vh, 3rem); }
.page-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); }

.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.breadcrumb a { color: var(--muted); }

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

.section { padding-block: clamp(3.5rem, 9vh, 6rem); }
.section-header { margin-bottom: 2.5rem; }

.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

/* --- Cartes services ----------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.service-card:nth-child(2) { margin-top: 1.6rem; }
.service-card:hover { border-color: var(--muted); transform: translateY(-3px); }
.service-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
.service-card .card-body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.service-card h3 { font-size: 1.25rem; text-transform: uppercase; font-stretch: 110%; font-weight: 700; }
.service-card p { color: var(--muted); font-size: .98rem; flex: 1; }
.card-link { font-weight: 600; }
.card-link::after { content: " →"; }

/* --- Galeries ------------------------------------------------------------ */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0; margin: 0; list-style: none;
}
.gallery figure { margin: 0; }
.gallery a {
  display: block; position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.gallery img {
  aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto;
  transition: transform .25s ease;
}
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: .5rem .75rem;
  font-size: .8rem; color: var(--txt);
  background: linear-gradient(transparent, rgba(5,5,6,.85));
}

/* --- Processus ----------------------------------------------------------- */

.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem;
  counter-reset: step;
  padding: 0; margin: 0; list-style: none;
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.5rem;
}
.steps li::before {
  content: "0" counter(step);
  display: block;
  font-weight: 800; font-stretch: 115%;
  font-size: 1.9rem; color: var(--accent);
  margin-bottom: .6rem;
}
.steps h3 { font-size: 1.05rem; text-transform: uppercase; font-weight: 700; }
.steps p { color: var(--muted); font-size: .93rem; margin: 0; }

/* --- Témoignages ---------------------------------------------------------- */

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.quotes blockquote {
  margin: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.3rem;
  display: flex; flex-direction: column;
}
.quotes p { font-size: .98rem; flex: 1; }
.quotes footer { color: var(--muted); font-size: .88rem; font-weight: 600; }

/* --- FAQ ------------------------------------------------------------------ */

.faq { max-width: 46rem; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 600;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > p { color: var(--muted); padding-bottom: 1.1rem; margin: 0; }

/* --- Bandeau CTA ---------------------------------------------------------- */

.cta-band {
  background: var(--dark-bg);
  color: var(--dark-txt);
  text-align: center;
}
.cta-band .lead { color: var(--dark-muted); }
.cta-band .btn-primary { background: var(--accent); color: #1c1005; }
.cta-band .btn-primary:hover, .cta-band .btn-primary:focus-visible { background: var(--accent-soft); }
.cta-band .btn-ghost { border-color: var(--dark-line); color: var(--dark-txt); }
.cta-band .btn-ghost:hover, .cta-band .btn-ghost:focus-visible { border-color: var(--dark-muted); }
.cta-band .lead { margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; margin-top: 1.6rem; margin-bottom: 0; }

/* --- Formulaire de devis --------------------------------------------------- */

.contact-layout {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem;
  align-items: start;
}

.form-devis { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label {
  display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--txt);
  padding: .75rem .9rem;
  font: inherit;
  font-size: .98rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent);
}
.field textarea { min-height: 140px; resize: vertical; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; color: var(--muted); }
.consent input { margin-top: .3rem; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; }

/* Retour d'envoi du formulaire de devis (genere par script.js).
   .form-devis a display:grid, qui l'emporte sur la regle navigateur
   [hidden] { display:none } : il faut donc la reecrire ici. */
.form-devis[hidden] { display: none; }
.form-devis button[disabled] { opacity: .6; cursor: progress; }

.form-succes {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.form-succes h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.form-succes p { margin: 0 0 .6rem; color: var(--muted); }
.form-succes p:last-child { margin-bottom: 0; }
.form-succes-tel a { font-weight: 600; }

.form-erreur {
  margin: 0;
  padding: .8rem 1rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  font-size: .95rem;
}

.contact-aside { display: grid; gap: 1rem; }
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.info-card h2, .info-card h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-bottom: .8rem; }
.info-card address { font-style: normal; color: var(--muted); }
.info-card a { font-weight: 600; }
.info-card ul { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.info-card li { padding-block: .15rem; }

/* --- Modale de devis -------------------------------------------------------- */

.devis-modal {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: var(--surface);
  color: var(--txt);
  width: min(620px, calc(100vw - 2rem));
  max-height: min(92dvh, 860px);
}
.devis-modal::backdrop {
  background: rgba(10, 18, 32, .74);
  backdrop-filter: blur(3px);
}
.devis-inner {
  padding: clamp(1.2rem, 4vw, 1.8rem);
  overflow-y: auto;
  max-height: inherit;
}
.devis-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.devis-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  font-stretch: 112%;
  text-transform: uppercase;
}
.devis-close {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--txt);
  font-size: 1.35rem;
  line-height: 1;
  padding: .3rem .65rem;
  cursor: pointer;
}
.devis-close:hover { border-color: var(--muted); }
.devis-sub { color: var(--muted); font-size: .93rem; margin: .5rem 0 1.2rem; }
.devis-modal .form-devis { gap: .9rem; }
.devis-modal textarea { min-height: 110px; }
.devis-modal .btn { width: 100%; }

body:has(.devis-modal[open]) { overflow: hidden; }

@media (max-width: 640px) {
  /* Feuille en bas d'écran : plein cadre, coins arrondis en haut */
  .devis-modal {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    max-height: 94dvh;
  }
}

/* --- Lightbox -------------------------------------------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 5, 6, .93);
  display: none;
  align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 86vh; width: auto; border: 1px solid var(--line); }
.lightbox-close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: 1px solid var(--dark-line); border-radius: var(--radius);
  color: var(--dark-txt); font-size: 1.4rem; line-height: 1; padding: .45rem .7rem; cursor: pointer;
}
.lightbox-close:hover { border-color: var(--dark-muted); }
.lightbox img { border-color: var(--dark-line); }

/* --- Footer ----------------------------------------------------------------- */

.site-footer {
  background: var(--dark-bg);
  color: var(--dark-muted);
  padding-block: 3rem 2rem;
  font-size: .93rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.site-footer h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .18em; color: #7f8fa8; font-weight: 600; margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding-block: .18rem; }
.site-footer a { color: var(--dark-txt); font-weight: 500; }
.site-footer a:hover { color: var(--accent-soft); }
.site-footer address { font-style: normal; color: var(--dark-muted); }
.site-footer address strong { color: var(--dark-txt); }
.footer-brand img { width: 54px; mix-blend-mode: screen; margin-bottom: .8rem; }
.footer-bottom {
  border-top: 1px solid var(--dark-line);
  padding-top: 1.4rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  color: #7f8fa8; font-size: .85rem;
}

/* --- Révélation au scroll ---------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

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

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .services-grid, .quotes { grid-template-columns: 1fr 1fr; }
  .service-card:nth-child(2) { margin-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 1rem var(--pad) 1.4rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: .9rem; }
  .nav-toggle { display: block; }
  .header-cta { display: none; }

  .blockwork .row { font-size: clamp(1.4rem, 7.6vw, 2rem); }
  .blockwork .row:nth-child(2) { margin-left: .8rem; }
  .blockwork .row:nth-child(3) { margin-left: .3rem; }
  .eyebrow { letter-spacing: .14em; }

  .section { padding-block: 2.6rem; }
  .section-header { margin-bottom: 1.6rem; }
  .hero-inner { padding-block: 2.4rem 2.8rem; gap: 1.6rem; }

  .services-grid, .quotes, .steps { grid-template-columns: 1fr; }

  /* Une photo par ligne : plus lisible sur petit écran */
  .gallery { grid-template-columns: 1fr; gap: 14px; }
  .gallery figcaption { font-size: .92rem; padding: .65rem .85rem; }

  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }

  .hero-actions { gap: .7rem; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .trust-row { gap: .5rem 1.2rem; font-size: .88rem; }
}
