/* ==========================================================================
   L.C.Z — Couverture & zinguerie
   ========================================================================== */

:root {
  --ardoise: #17191b;
  --ardoise-2: #1e2124;
  --trait: #2c3033;
  --trait-fort: #4a5055;
  --zinc: #9aa3a8;
  --texte: #ecebe7;
  --texte-2: #c9ccce;
  --texte-3: #b7bbbe;
  --cuivre: oklch(0.66 0.13 55);
  --cuivre-clair: oklch(0.72 0.13 55);
  --cuivre-hover: oklch(0.74 0.12 60);

  --font-titre: "Unbounded", sans-serif;
  --font-texte: "Manrope", sans-serif;

  --marge: clamp(20px, 4vw, 56px);
  --section: clamp(64px, 9vw, 128px);
}

/* Base ------------------------------------------------------------------ */

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

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--ardoise);
  color: var(--texte);
  font-family: var(--font-texte);
  line-height: 1.5;
}

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

a { color: inherit; }
a:hover { color: var(--cuivre-clair); }

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

::selection { background: var(--cuivre); color: var(--ardoise); }

h1, h2, h3, p, figure, blockquote { margin: 0; }

section[id] { scroll-margin-top: 72px; }

.accent { color: var(--cuivre-clair); }

/* Apparition au défilement (classes ajoutées par le script dans <head>) */
.apparition .a-venir {
  opacity: 0;
  transform: translateY(18px);
}
.apparition .a-venir.vu {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--delai, 0ms);
}

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

.btn {
  display: inline-block;
  padding: 18px 26px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--trait-fort);
  transition: background .2s, border-color .2s;
}
.btn:hover { color: var(--texte); border-color: var(--texte); }

.btn--primaire {
  background: var(--cuivre);
  border-color: var(--cuivre);
  color: var(--ardoise);
  font-weight: 700;
}
.btn--primaire:hover {
  background: var(--cuivre-hover);
  border-color: var(--cuivre-hover);
  color: var(--ardoise);
}

.btn--petit { padding: 12px 18px; font-size: 14px; }

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

.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--marge);
  background: rgba(23, 25, 27, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--trait);
}

.entete__logo {
  --h-logo: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

/* On ne garde que le toit + L.C.Z de l'image (la partie gauche) ;
   « Couverture. Zinguerie » est écrit en vrai texte, lisible à cette taille */
.entete__toit {
  height: var(--h-logo);
  width: calc(var(--h-logo) * 1.8);
  overflow: hidden;
}
.entete__toit img {
  height: 100%;
  width: auto;
  max-width: none;
  filter: invert(1);
  mix-blend-mode: screen; /* fait disparaître le fond blanc du logo */
}

.entete__metier {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--texte-2);
}
.entete__logo:hover .entete__metier { color: var(--texte); }

.entete__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}
.entete__nav a:not(.btn) { text-decoration: none; }

@media (max-width: 700px) {
  .entete__nav a:not(.btn) { display: none; }
  .entete__logo { --h-logo: 44px; gap: 10px; }
  .entete__metier { font-size: 10px; letter-spacing: 0.14em; }
}

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

.hero {
  padding: clamp(40px, 7vw, 96px) var(--marge) 0;
  overflow: hidden;
}

.surtitre {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--zinc);
  margin-bottom: 28px;
}

.hero__titre {
  font-family: var(--font-titre);
  font-weight: 800;
  font-size: clamp(34px, 9.2vw, 164px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.hero__titre span { display: block; }
.hero__titre span + span { color: var(--zinc); }

.hero__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 40px;
  align-items: end;
  margin-top: clamp(32px, 5vw, 64px);
}

.hero__texte { padding-bottom: 48px; }
.hero__texte p {
  font-size: 19px;
  line-height: 1.6;
  max-width: 44ch;
  color: var(--texte-2);
}

.boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Photo découpée en forme de toit, comme le logo */
.hero__photo {
  aspect-ratio: 16 / 10;
  background: var(--trait);
  clip-path: polygon(0% 100%, 50% 0%, 64% 28%, 64% 4%, 76% 4%, 76% 52%, 100% 100%);
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  filter: grayscale(0.3) contrast(1.05);
}

/* Chiffres -------------------------------------------------------------- */

.chiffres {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--trait);
  border-bottom: 1px solid var(--trait);
}
.chiffres a {
  --pad: min(var(--marge), 32px); /* 4 colonnes : marges intérieures limitées */
  position: relative;
  padding: clamp(24px, 4vw, 48px) var(--pad);
  text-decoration: none;
  transition: background .2s;
}
.chiffres a:first-child { --pad: var(--marge); } /* aligné sur le reste de la page */
.chiffres a + a { border-left: 1px solid var(--trait); }
.chiffres a:hover { background: var(--ardoise-2); color: inherit; }

/* Petit trait cuivre qui s'allonge au survol */
.chiffres a::before {
  content: "";
  position: absolute;
  top: -1px;
  left: var(--pad);
  width: 24px;
  height: 2px;
  background: var(--cuivre);
  transition: width .3s;
}
.chiffres a:hover::before { width: 64px; }

.chiffres strong {
  display: block;
  font-family: var(--font-titre);
  font-weight: 600;
  font-size: clamp(24px, 3.2vw, 52px);
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--texte);
}
.chiffres span {
  display: block;
  font-size: 14px;
  color: var(--zinc);
  margin-top: 12px;
}

/* Tablette et mobile : 2 × 2 */
@media (max-width: 900px) {
  .chiffres { grid-template-columns: repeat(2, 1fr); }
  .chiffres a { --pad: var(--marge); }
  .chiffres strong { font-size: clamp(24px, 6vw, 44px); }
  .chiffres a:nth-child(odd) { border-left: 0; }
  .chiffres a:nth-child(n + 3) { border-top: 1px solid var(--trait); }
}
@media (max-width: 700px) {
  .chiffres span { font-size: 13px; }
}

/* Titres de section ----------------------------------------------------- */

.titre-section {
  font-family: var(--font-titre);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: -0.02em;
}

/* Prestations ----------------------------------------------------------- */

.prestations { padding: var(--section) var(--marge); }
.prestations .titre-section { margin-bottom: 48px; }

.prestation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px 48px;
  align-items: baseline;
  padding: 30px 0;
  border-top: 1px solid var(--trait);
  transition: background .2s;
}
.prestation:hover { background: var(--ardoise-2); }

.prestation__nom {
  display: flex;
  gap: 24px;
  align-items: baseline;
}
.prestation__nom span {
  font-family: var(--font-titre);
  font-size: 14px;
  color: var(--cuivre-clair);
}
.prestation h3 {
  font-family: var(--font-titre);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
}
.prestation p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--texte-3);
  max-width: 52ch;
}

/* Chantiers ------------------------------------------------------------- */

.chantiers { padding-bottom: var(--section); }

.chantiers__entete {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0 var(--marge) 36px;
}
.galerie__fleches { display: flex; gap: 8px; }
.galerie__fleches button,
.visionneuse button {
  width: 48px;
  height: 48px;
  font: inherit;
  font-size: 18px;
  color: var(--texte);
  background: transparent;
  border: 1px solid var(--trait-fort);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.galerie__fleches button:hover,
.visionneuse button:hover { border-color: var(--cuivre); color: var(--cuivre-clair); }
.galerie__fleches .galerie__pause { font-size: 12px; letter-spacing: -0.1em; }

/* Mobile : défilement au doigt, photo par photo */
.galerie {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--marge);
  padding-bottom: 16px;
  scrollbar-width: none;
}
.galerie::-webkit-scrollbar { display: none; }

.galerie__piste {
  position: relative; /* repère pour les positions des photos (JS) */
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 0 var(--marge);
}

.galerie figure {
  flex: 0 0 clamp(260px, 30vw, 420px);
  scroll-snap-align: start;
}

/* Ordinateur : défilement continu, la piste glisse (transform = fluide) */
.galerie--auto {
  overflow: hidden;
  scroll-snap-type: none;
}
.galerie--auto .galerie__piste { will-change: transform; }

/* Contour de focus à l'intérieur, sinon coupé par le défilement */
.galerie__img:focus-visible { outline-offset: -4px; }
.galerie__img {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--trait);
  cursor: zoom-in;
}
.galerie__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.galerie figure:hover img { transform: scale(1.04); }

.galerie figcaption {
  display: flex;
  gap: 14px;
  padding-top: 14px;
  font-size: 14px;
  color: var(--texte-2);
}
.galerie figcaption span {
  font-family: var(--font-titre);
  font-size: 12px;
  color: var(--cuivre-clair);
}

/* Visionneuse plein écran */
.visionneuse {
  --legende: 50px; /* place réservée à la légende sous la photo */
  --bord: clamp(16px, 2.5vw, 36px); /* distance des boutons au bord de l'écran */
  position: fixed;
  inset: 0;
  width: auto; /* et non 100vw, qui passe sous la barre de défilement */
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--bord);
  border: 0;
  background: transparent;
  color: var(--texte);
}
.visionneuse[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: var(--bord);
}
.visionneuse::backdrop { background: rgba(10, 11, 12, 0.94); }

/* La page derrière ne défile plus pendant l'agrandissement */
html:has(.visionneuse[open]) { overflow: hidden; }

.visionneuse figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
/* La photo tient toujours dans l'écran, légende comprise */
.visionneuse img {
  max-width: 100%;
  max-height: calc(100vh - 2 * var(--bord) - var(--legende));
  max-height: calc(100dvh - 2 * var(--bord) - var(--legende));
  object-fit: contain;
}
.visionneuse figcaption {
  display: flex;
  gap: 14px;
  font-size: 15px;
  color: var(--texte-2);
}
.visionneuse figcaption span {
  font-family: var(--font-titre);
  font-size: 12px;
  color: var(--cuivre-clair);
}

.visionneuse .visionneuse__fermer {
  position: absolute;
  top: var(--bord);
  right: var(--bord);
  z-index: 1;
  font-size: 26px;
  background: var(--ardoise);
}

/* Sur mobile : flèches sous la photo, balayage possible */
@media (max-width: 700px) {
  .visionneuse[open] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    padding-top: 72px;
  }
  .visionneuse figure { grid-column: 1 / -1; grid-row: 1; }
  /* en haut : bouton fermer ; en bas : flèches (48px + écart) */
  .visionneuse img {
    max-height: calc(100vh - 72px - 3 * var(--bord) - 48px - var(--legende));
    max-height: calc(100dvh - 72px - 3 * var(--bord) - 48px - var(--legende));
  }
  .visionneuse__nav[data-sens="-1"] { grid-row: 2; justify-self: end; }
  .visionneuse__nav[data-sens="1"]  { grid-row: 2; justify-self: start; }
}

/* Avis ------------------------------------------------------------------ */

.avis {
  background: var(--texte);
  color: var(--ardoise);
  padding: var(--section) var(--marge);
}
.avis a:hover { color: var(--ardoise); }

.avis__note {
  font-family: var(--font-titre);
  font-weight: 800;
  font-size: clamp(64px, 10vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.avis__source {
  font-size: 16px;
  color: var(--trait-fort);
  margin: 16px 0 56px;
}

.avis__liste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 40px;
}
.avis__liste figure {
  border-top: 3px solid var(--ardoise);
  padding-top: 24px;
}
.avis__liste blockquote {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 500;
}
.avis__liste figcaption {
  font-size: 14px;
  color: var(--trait-fort);
  margin-top: 18px;
}

/* Contact --------------------------------------------------------------- */

.contact {
  background: var(--cuivre);
  color: var(--ardoise);
  padding: var(--section) var(--marge);
}

.contact h2 {
  font-family: var(--font-titre);
  font-weight: 800;
  font-size: clamp(36px, 6.5vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.contact h2 span { display: block; }

.contact__infos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 32px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 2px solid var(--ardoise);
}
.contact__infos h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.contact__infos p { font-size: 17px; }

.contact__tel {
  font-family: var(--font-titre);
  font-size: 24px;
  text-decoration: none;
}
.contact__tel:hover { color: var(--ardoise); text-decoration: underline; }

.contact__zone {
  margin-top: 48px;
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.6;
}
.contact__zone strong { font-weight: 700; }

.contact__mail {
  font-size: 17px;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: rgba(23, 25, 27, 0.35);
  overflow-wrap: anywhere; /* une adresse longue ne déborde pas sur mobile */
}
.contact__mail:hover { color: var(--ardoise); }

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

.pied {
  padding: 40px var(--marge) 28px;
  font-size: 13px;
  color: var(--zinc);
}

/* Ligne du haut : logo à gauche, liens à droite */
.pied__haut {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--trait);
}
.pied img {
  height: 48px;
  width: auto;
  filter: invert(1);
  mix-blend-mode: screen;
}

.pied__liens {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  font-size: 14px;
  color: var(--texte-2);
}
.pied__liens a { text-decoration: none; }
.pied__insta { display: inline-flex; align-items: center; gap: 8px; }

/* Ligne du bas : informations légales, discrètes */
.pied__legal { padding-top: 20px; }

/* Mentions légales ------------------------------------------------------ */

.mentions {
  max-width: 760px;
  padding: var(--section) var(--marge);
}
.mentions h1 {
  font-family: var(--font-titre);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 56px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.mentions__retour { font-size: 14px; color: var(--zinc); }
.mentions h2 {
  font-family: var(--font-titre);
  font-weight: 600;
  font-size: 18px;
  margin: 48px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--trait);
}
.mentions p { color: var(--texte-2); line-height: 1.7; }
.mentions p + p { margin-top: 12px; }
.mentions dl {
  display: grid;
  grid-template-columns: minmax(140px, max-content) 1fr;
  gap: 8px 24px;
  margin: 0;
  color: var(--texte-2);
}
.mentions dt { color: var(--zinc); font-size: 14px; padding-top: 2px; }
.mentions dd { margin: 0; }
@media (max-width: 520px) {
  .mentions dl { grid-template-columns: 1fr; gap: 2px; }
  .mentions dd { margin-bottom: 12px; }
}
