/* ==========================================================================
   PRRS – Peinture Revêtements Rénovation Service
   Feuille de style unique. Les couleurs et tailles principales sont
   regroupées en haut (variables) pour pouvoir les modifier facilement.
   ========================================================================== */

:root {
  /* Couleurs relevées sur la maquette de l’ancien site */
  --bg: #e7e7e9;
  --green: #c8e3c7;
  --blue: #c6dbe3;
  --card: #f5f5f5;
  --ink: #050505;

  /* Typographie */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Espacements et formes */
  --pad: clamp(1.25rem, 4vw, 4rem);          /* marge latérale de la page */
  --gap: clamp(1rem, 2.4vw, 2.25rem);         /* espace entre les photos */
  --r-xl: clamp(1.75rem, 4vw, 3.25rem);       /* grands arrondis (photos, cartes) */
  --r-lg: clamp(1.5rem, 3vw, 2.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, figure, address, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: .6rem;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--pad), 75rem); margin-inline: auto; }

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

/* ---------- Petits éléments réutilisables ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: .8125rem; font-weight: 500; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .14em;
}
.eyebrow img { width: 1.6rem; height: 1.6rem; flex: none; }

.glass {
  background: rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .10);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.btn--glass {
  padding: .9rem 2.4rem; border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  text-transform: uppercase; letter-spacing: .08em; font-size: 1rem; line-height: 1.4;
}
.btn--glass:hover { background: var(--ink); color: #fff; }
.btn--solid {
  padding: .85rem 1.9rem; border-radius: .9rem; background: var(--green);
  font-size: 1rem; line-height: 1.4;
}
.btn--solid:hover { background: #b4d6b2; }

.section-head { text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-title {
  margin-top: 1rem;
  font-size: clamp(2.75rem, 7vw, 4.5rem); font-weight: 300;
  line-height: 1.1; letter-spacing: -.01em;
}
.section-title--xl { font-size: clamp(3rem, 8vw, 5.25rem); }
.section-lead { margin: 1.5rem auto 0; max-width: 28rem; }
.nowrap { white-space: nowrap; }
.section-lead--caps {
  max-width: 26rem; font-size: .875rem; line-height: 1.9;
  text-transform: uppercase; letter-spacing: .14em;
}

/* ---------- En-tête ---------- */
.site-header { padding-block: clamp(1.25rem, 3vw, 2.25rem); }
.site-header .container { width: min(100% - 2 * var(--pad), 78rem); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: block; flex: none; }
.brand img { width: clamp(78px, 8vw, 102px); height: auto; }
.nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }
.nav a {
  display: inline-block; padding: .35rem 0;
  font-size: clamp(.8125rem, 1.5vw, 1.125rem);
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* ---------- Accueil : bandeau d'ouverture ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-inline: var(--pad);
  border-radius: clamp(1.75rem, 4vw, 3.5rem);
  min-height: clamp(34rem, 84vh, 56rem);
  padding: clamp(1.25rem, 4.5vw, 3.6rem) clamp(.75rem, 3vw, 2rem);
  display: flex; justify-content: center; align-items: flex-start;
}
.hero__img {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; object-fit: cover; object-position: center 45%;
}
.hero__card {
  width: min(100%, 44rem); text-align: center;
  border-radius: clamp(2rem, 4vw, 3.25rem);
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3.5rem);
}
.hero__title {
  margin-top: 1.25rem;
  font-size: clamp(2.35rem, 6.2vw, 4rem); font-weight: 300;
  line-height: 1.12; letter-spacing: 0; text-transform: uppercase;
}
.hero__title em { display: block; font-weight: 200; font-style: italic; }
.hero__lead { max-width: 30rem; margin: 1.5rem auto 0; }
.hero .btn { margin-top: 1.75rem; }

/* ---------- Accueil : les 3 étapes ---------- */
.steps { padding-block: clamp(4.5rem, 9vw, 8rem) clamp(5rem, 10vw, 9rem); }
.steps .container { width: min(100% - 2 * var(--pad), 68.75rem); }
.step {
  display: grid; grid-template-columns: 22.5rem minmax(0, 1fr); align-items: center;
  column-gap: clamp(2rem, 8vw, 7.25rem);
}
.step--reverse { grid-template-columns: minmax(0, 1fr) 22.5rem; }
.step + .step { margin-top: clamp(4rem, 9vw, 8rem); }
.step__media { position: relative; width: min(100%, 22.5rem); }
.step__media img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: var(--focus, center);
  border-radius: var(--r-xl);
}
.step--reverse .step__media { order: 2; justify-self: end; }
.step--reverse .step__body { padding-left: clamp(0rem, 3.5vw, 3rem); }
.step__body { max-width: 30rem; }
.step__title {
  margin-top: 1.1rem;
  font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 300;
  line-height: 1.12; letter-spacing: -.005em;
}
.step__title em { font-style: italic; font-weight: 200; }
.step__text { margin-top: 1.5rem; }

.badge {
  position: absolute; z-index: 1; white-space: nowrap; text-align: center;
  line-height: 1.3; top: clamp(.75rem, 2vw, 1.5rem);
}
.badge--right { right: calc(-1 * clamp(1rem, 4vw, 3.3rem)); }
.badge--left { left: calc(-1 * clamp(1rem, 4vw, 3.3rem)); }
.badge--stat { padding: 1.25rem 2rem; border-radius: 2.4rem; }
.badge--stat strong { display: block; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 300; line-height: 1.1; }
.badge--pill { padding: clamp(1.4rem, 3vw, 2.6rem) clamp(1.5rem, 3vw, 3rem); border-radius: 3.25rem; }

/* ---------- Accueil : bloc vert « Efficacité » ---------- */
.efficacite {
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23c8e3c7' d='M0 120V78C210 26 400 6 610 34S1000 102 1230 62 1390 22 1440 36V120Z'/%3E%3C/svg%3E");
  position: relative; background: var(--green);
  padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem);
}
.efficacite::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px);
  height: clamp(3.5rem, 8vw, 7.5rem);
  background: var(--wave) center / 100% 100% no-repeat;
}
.efficacite .container { width: min(100% - 2 * var(--pad), 86rem); }
.efficacite__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.efficacite__title {
  margin-top: 1.1rem; max-width: 40rem;
  font-size: clamp(2.1rem, 4.2vw, 3.25rem); font-weight: 300; line-height: 1.15;
}
.efficacite__lead { margin-top: 1.5rem; max-width: 34rem; }
.efficacite__media img {
  width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover;
  border-radius: var(--r-xl);
}

.features { margin-top: 2.75rem; display: grid; gap: 1.25rem; }
.feature summary {
  display: flex; align-items: center; gap: .9rem; cursor: pointer; list-style: none;
  font-size: .9375rem; font-weight: 500; line-height: 1.5;
  text-transform: uppercase; letter-spacing: .12em; opacity: .55;
  transition: opacity .2s ease;
}
.feature summary::-webkit-details-marker { display: none; }
.feature summary:hover, .feature[open] summary { opacity: 1; }
.feature summary img { width: 1.5rem; height: 1.5rem; flex: none; }
.feature p { margin-top: .5rem; max-width: 27rem; }

/* ---------- Accueil : avis clients ---------- */
.testimonials { padding-block: clamp(4rem, 8vw, 7rem) clamp(3.5rem, 7vw, 6rem); }
.testimonials .container { width: min(100% - 2 * var(--pad), 75rem); }

.carousel__controls { display: flex; justify-content: flex-end; gap: .75rem; }
.carousel__btn {
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}
.carousel__btn:hover { background: rgba(5, 5, 5, .08); }
.carousel__btn[aria-disabled="true"] { opacity: .3; cursor: default; pointer-events: none; }
.carousel__btn svg { width: 1.4rem; height: 1.4rem; }

.carousel__track {
  --g: clamp(1rem, 3vw, 2.5rem);
  display: flex; gap: var(--g); align-items: flex-start;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-top: 5rem; padding-bottom: 1rem;
}
.carousel__track::-webkit-scrollbar { display: none; }

.quote {
  position: relative; flex: 0 0 calc((100% - 2 * var(--g)) / 3);
  scroll-snap-align: start;
  min-height: 25.5rem; padding: 5.25rem clamp(1.5rem, 4vw, 3.5rem) 2.5rem;
  border-radius: 3rem; text-align: center; background: var(--card);
}
.quote:nth-child(3n + 2) { background: var(--green); margin-top: -1.2rem; min-height: 28rem; }
.quote:nth-child(3n) { background: var(--blue); }
.quote__avatar {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  width: 7.25rem; height: 7.25rem; border-radius: 50%;
  object-fit: cover; object-position: center 20%; background: #efefec;
}
.quote__text { font-size: 1.0625rem; letter-spacing: .03em; line-height: 1.8; }
.quote__author {
  margin-top: 2rem; font-size: .9375rem; font-weight: 500; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .12em;
}
.quote__project {
  margin-top: .15rem; font-size: .8125rem; line-height: 1.5;
  text-transform: uppercase; letter-spacing: .12em;
}

.carousel__dots { display: flex; justify-content: center; margin-top: 1.5rem; }
.carousel__dot {
  width: 1.5rem; height: 1.5rem; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.carousel__dot::before {
  content: ""; width: .9rem; height: .9rem; border-radius: 50%;
  background: rgba(5, 5, 5, .35); transition: background-color .2s ease;
}
.carousel__dot[aria-current="true"]::before { background: var(--ink); }

/* ---------- Accueil : questions fréquentes ---------- */
.faq { padding-block: clamp(3rem, 6vw, 5rem); }
.faq__list { width: min(100%, 52rem); margin: 3rem auto 0; display: grid; gap: 1.1rem; }
.faq__item {
  background: var(--card); border-radius: 2.25rem;
  padding-inline: clamp(1.4rem, 4vw, 3rem);
}
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-block: clamp(1.4rem, 3vw, 2.1rem); cursor: pointer; list-style: none;
  font-size: clamp(1.125rem, 2vw, 1.4rem); line-height: 1.4; letter-spacing: .01em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item[open] summary { padding-bottom: .9rem; }
.faq__answer { max-width: 36rem; padding-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.faq__answer strong { font-weight: 700; }

.toggle { position: relative; width: 1.25rem; height: 1.25rem; flex: none; }
.toggle::before, .toggle::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1.5px; margin-top: -.75px; background: currentColor;
}
.toggle::after { transform: rotate(90deg); transition: transform .2s ease; }
details[open] > summary .toggle::after { transform: rotate(0deg); }

/* ---------- Accueil : contact ---------- */
.contact { padding-block: clamp(3rem, 6vw, 5rem) clamp(5rem, 9vw, 8rem); }
.contact__direct {
  margin-top: 3.5rem; text-align: center; font-size: .875rem; line-height: 2;
  text-transform: uppercase; letter-spacing: .14em;
}
.contact__direct span { display: block; }
.contact__direct a { text-decoration: none; }
.contact__direct a:hover { text-decoration: underline; text-underline-offset: .3em; }
@media (min-width: 48rem) {
  .contact__direct span { display: inline; }
  .contact__direct span + span::before { content: " / "; }
}

.form { width: min(100%, 42.5rem); margin: 3rem auto 0; display: grid; gap: 1rem; }
.field label { display: block; margin-bottom: .35rem; font-size: .95rem; letter-spacing: .01em; }
.field input, .field textarea {
  width: 100%; padding: .95rem 1.25rem;
  font: inherit; letter-spacing: .01em; color: inherit;
  background: var(--card); border: 1px solid rgba(5, 5, 5, .1); border-radius: 1.5rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field ::placeholder { color: rgba(5, 5, 5, .5); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.form .btn { justify-self: start; }
.form__note { font-size: .8125rem; line-height: 1.6; opacity: .75; }
.form__note a { text-underline-offset: .2em; }
.form__status { font-size: .95rem; }
.form__status[data-state="ok"] { font-weight: 500; }
.form__status[data-state="error"] { color: #8a1c1c; font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green); padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem; }
.site-footer .container { width: min(100% - 2 * var(--pad), 86rem); }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3rem; }
.footer__logo { width: 78px; height: auto; }
.footer__insta { display: inline-flex; margin-top: 1rem; }
.footer__insta svg { width: 1.6rem; height: 1.6rem; }
.footer__tagline { margin-top: .6rem; max-width: 16rem; line-height: 1.7; }
.footer__cols { display: flex; gap: clamp(2rem, 7vw, 6rem); }
.footer__col { text-align: center; }
.footer__title {
  font-size: .9375rem; font-weight: 400; line-height: 1.5;
  text-transform: uppercase; letter-spacing: .14em;
}
.footer__col ul { margin-top: 1.25rem; display: grid; gap: 1rem; }
.footer__col a { text-decoration: none; font-size: 1rem; }
.footer__col a:hover { text-decoration: underline; text-underline-offset: .3em; }
.footer__bottom { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--ink); }

/* ---------- Galerie ---------- */
.gallery-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
.gallery {
  margin-inline: var(--pad); padding-bottom: clamp(4rem, 8vw, 7rem);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start;
}
/* Quand le script est actif, les photos sont réparties en colonnes (gauche/droite en alternance) */
.gallery.is-split { display: flex; }
.gallery__col { flex: 1 1 0; min-width: 0; display: grid; gap: var(--gap); align-content: start; }

.tile { margin: 0; }
.tile__btn {
  position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden;
  background: #d6d6da; border-radius: var(--r-xl); cursor: zoom-in;
}
.tile__btn img {
  width: 100%; height: auto; aspect-ratio: var(--ratio, 4 / 3); object-fit: cover;
  transition: transform .5s ease;
}
@media (hover: hover) { .tile__btn:hover img { transform: scale(1.03); } }
/* Ratios choisis pour que les deux colonnes s'emboîtent comme sur la maquette */
.tile[data-ratio="square"] { --ratio: 1 / 1; }
.tile[data-ratio="wide"] { --ratio: 16 / 9; }
.tile[data-ratio="portrait"] { --ratio: 3 / 4; }

/* Pastille « lecture » pour les vidéos */
.tile__btn[data-video]::after, .tile__btn[data-youtube]::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 4.5rem;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(255, 255, 255, .55) center / 1.6rem no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23050505' d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

@media (max-width: 43.75rem) {
  .gallery { grid-template-columns: 1fr; }
}

/* Visionneuse plein écran */
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: #fff;
}
.lightbox::backdrop { background: rgba(8, 8, 8, .9); }
.lightbox__stage {
  position: absolute; inset: 0; display: grid; place-items: center;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  padding: clamp(3.5rem, 8vw, 5rem) clamp(1rem, 8vw, 5.5rem);
}
.lightbox__stage img, .lightbox__stage video {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; border-radius: 1.25rem;
}
.lightbox__stage iframe { width: min(100%, 64rem); aspect-ratio: 16 / 9; border: 0; border-radius: 1.25rem; }
.lightbox__btn {
  position: absolute; z-index: 1; width: 3rem; height: 3rem; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .14);
  transition: background-color .2s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .28); }
.lightbox__btn:focus-visible { outline-color: #fff; }
.lightbox__btn svg { width: 1.4rem; height: 1.4rem; }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Pages légales ---------- */
.legal { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); }
.legal .container { width: min(100% - 2 * var(--pad), 48rem); }
.legal h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 300; line-height: 1.15; }
.legal__updated { margin-top: .75rem; font-size: .9375rem; opacity: .7; }
.legal__intro { margin-top: 1.5rem; }
.legal h2 { margin-top: 2.5rem; font-size: 1.25rem; font-weight: 500; line-height: 1.4; }
.legal p, .legal ul, .legal address { margin-top: .75rem; }
.legal address { font-style: normal; }
.legal ul { list-style: disc; padding-left: 1.25rem; }
.legal li + li { margin-top: .35rem; }
.legal a { text-underline-offset: .2em; }

/* ---------- Adaptation tablette et mobile ---------- */
@media (max-width: 56.25rem) {
  .step, .step--reverse { grid-template-columns: 1fr; row-gap: 2.25rem; }
  .step--reverse .step__media { order: 0; justify-self: start; }
  .step--reverse .step__body { padding-left: 0; }
  .step__media, .step--reverse .step__media { width: min(100% - 3rem, 22.5rem); }
  .step__body { max-width: none; }
  .efficacite__grid { grid-template-columns: 1fr; }
  .efficacite__media { order: -1; }
  .efficacite__media img { aspect-ratio: 4 / 3; }
  .quote { flex-basis: calc((100% - var(--g)) / 2); }
  .quote:nth-child(3n + 2) { margin-top: 0; min-height: 25.5rem; }
}

@media (max-width: 37.5rem) {
  body { font-size: 1rem; }
  .badge--pill { padding: 1.1rem 1.5rem; border-radius: 2rem; }
  .badge--stat { padding: 1rem 1.4rem; }
  .badge--left { left: -.75rem; }
  .badge--right { right: -.75rem; }
  .quote { flex-basis: 100%; }
  .quote, .quote:nth-child(3n + 2) { min-height: 0; }
  .footer__grid { flex-direction: column; }
  .footer__cols { justify-content: space-between; gap: 1.5rem; }
  .footer__col { text-align: left; }
}
