/* Vitrine « Galerie de finitions » : atelier de salles de bains. Ivoire très clair, noir doux, vieux rose (--accent, depuis donnees.json) en aplat
   seulement, laiton brossé en filets seulement. Titres : Bodoni Moda (--police-titre), texte : DM Sans (--police-texte).
   Règles tenues : le texte posé sur l'accent est noir doux (4,5 et plus) ; l'accent n'est jamais une couleur de texte ; le laiton ne porte aucun texte. */
:root {
  --ivoire: #fbf9f6;
  --ivoire-fonce: #f3efe9;
  --encre: #1c1a19;
  --encre-douce: #57524d;
  --laiton: #a98a52;
  --filet: #d6cec2;                  /* teinte des filets de l'ouverture : change avec la finition choisie */
  --sur-accent: #1c1a19;
  --etiquette: 2rem;
  --rayon: 2px;
  /* voile mesuré : le blanc garde au moins 4,8 de contraste sur le pire pixel des cinq photos (alpha utile 0,48 à 0,59 mesuré, 0,64 posé) ;
     côté texte seulement, le reste de la photo reste lumineux ; la 2e couche, radiale, couvre le bas à droite (légende du sélecteur) */
  --voile: linear-gradient(90deg, rgba(18, 16, 15, .66) 0%, rgba(18, 16, 15, .64) 46%, rgba(18, 16, 15, .26) 76%, rgba(18, 16, 15, .08) 100%),
           radial-gradient(ellipse 72% 62% at 100% 100%, rgba(18, 16, 15, .68) 0%, rgba(18, 16, 15, .66) 46%, rgba(18, 16, 15, 0) 100%)
}
@media (max-width: 899px) {
  :root { --voile: linear-gradient(180deg, rgba(18, 16, 15, .68) 0%, rgba(18, 16, 15, .64) 50%, rgba(18, 16, 15, .72) 100%); }
}

/* fond de la page = noir doux : le haut (étiquette) et le bas (pied) sont sombres, le rebond tactile et tout rendu transitoire restent sombres */
html { background: var(--encre); }
body { background: var(--ivoire); color: var(--encre); font-family: var(--police-texte); font-size: 1.0625rem; line-height: 1.65; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 400; line-height: 1.08; letter-spacing: -0.012em; margin: 0 0 .6em; }
h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); }
h2.grand { font-size: clamp(2.2rem, 1.1rem + 3.8vw, 4.6rem); max-width: 17ch; }
h3 { font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.2rem); }
em { font-style: italic; }
p { margin: 0 0 1em; }
a { color: inherit; }
.intro { max-width: 52ch; color: var(--encre-douce); font-size: 1.125rem; }

/* repères et légendes : capitales fines et espacées */
.repere, .legende, .finitions-etiquette, .finitions-compte, .finitions-aide, .marque-sous { font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.repere { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.4rem; color: var(--encre-douce); }
.filet-laiton { display: block; width: 2.75rem; height: 1px; background: var(--laiton); }
.legende { margin: .85rem 0 0; color: var(--encre-douce); line-height: 1.5; }

.etiquette-demo { height: var(--etiquette); line-height: var(--etiquette); padding-block: 0; background: var(--encre); color: var(--ivoire); }

/* ---------- en-tête : posé sur la photo (fond sombre translucide), puis barre ivoire au défilement ---------- */
.entete { position: fixed; top: var(--etiquette); left: 0; right: 0; z-index: 70; color: #fff; background: rgba(20, 18, 17, .76); transition: background-color .25s, color .25s, box-shadow .25s; }
html.defile .entete { top: 0; background: var(--ivoire); color: var(--encre); box-shadow: 0 1px 0 rgba(169, 138, 82, .55); }
.entete-interieur { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }
.marque { display: inline-flex; flex-direction: column; justify-content: center; min-height: 2.75rem; text-decoration: none; line-height: 1.05; }
.marque-sous { font-size: .6875rem; letter-spacing: .34em; }
.marque-nom { font-family: var(--police-titre); font-size: 1.5rem; letter-spacing: -.005em; }
.menu ul { display: flex; gap: 2.2rem; list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; font-size: .9375rem; letter-spacing: .04em; }
.menu a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--laiton); }
.menu-telephone { font-weight: 500; }
.menu-bouton { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 .9rem; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: var(--rayon); font: inherit; font-weight: 500; letter-spacing: .06em; }
.menu-bouton-barres { width: 1.1rem; height: 1px; background: currentColor; position: relative; }
.menu-bouton-barres::before, .menu-bouton-barres::after { content: ""; position: absolute; left: 0; width: 100%; height: 1px; background: currentColor; }
.menu-bouton-barres::before { top: -6px; }
.menu-bouton-barres::after { top: 6px; }
@media (min-width: 900px) { .menu { display: flex; align-items: center; gap: 2.2rem; } }
@media (max-width: 899px) {
  .menu { position: absolute; top: 100%; left: 0; right: 0; padding: 1rem var(--gouttiere) 1.5rem; background: var(--encre); color: var(--ivoire); }
  .menu ul { flex-direction: column; gap: 0; }
  .menu li a, .menu-telephone { display: block; padding: .85rem 0; }
  .menu-telephone { border-top: 1px solid rgba(169, 138, 82, .6); margin-top: .5rem; }
}

/* ---------- boutons (4 px au plus, texte noir doux sur l'accent) ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.6rem; background: var(--accent); color: var(--sur-accent); border: 1px solid var(--accent); border-radius: var(--rayon); font: inherit; font-weight: 600; letter-spacing: .03em; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.bouton:hover { background: #c78d9d; border-color: #c78d9d; }
.bouton-contour { background: transparent; border-color: #fff; color: #fff; }
.bouton-contour:hover { background: #fff; border-color: #fff; color: var(--encre); }

/* ---------- ouverture : très grande photo plein cadre, une finition à la fois ---------- */
.ouverture { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(100svh - var(--etiquette)); background: var(--encre); color: #fff; overflow: hidden; }
.ouverture-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.finition-calque { position: absolute; inset: 0; opacity: 0; }
.finition-calque.est-actif { opacity: 1; transition: opacity .9s cubic-bezier(.4, 0, .2, 1); }
.finition-img { width: 100%; height: 100%; object-fit: cover; }
.finition-calque:nth-child(4) .finition-img { object-position: 50% 40%; }
/* le voile fait partie du décor : photo et voile sont mesurés ensemble par le contrôle de contraste, sur les cinq finitions */
.ouverture-photo::after { content: ""; position: absolute; inset: 0; z-index: 9999; pointer-events: none; background-image: var(--voile); background-repeat: no-repeat; background-size: 100% 100%; }
.ouverture-interieur { position: relative; z-index: 1; padding-block: 7.5rem 2.25rem; }
.ouverture-texte { max-width: 44rem; }
.surtitre { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.3rem; font-size: .8125rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.trait { display: block; flex: none; width: 2.75rem; height: 1px; background: var(--filet); transition: background-color .9s ease; }
.ouverture h1 { font-size: clamp(2.4rem, 1rem + 4.1vw, 4.5rem); max-width: 15ch; margin-bottom: .5em; font-weight: 400; }
.chapo { max-width: 46ch; font-size: clamp(1rem, .95rem + .35vw, 1.2rem); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 0; }

.finitions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: end; margin-top: 2.4rem; padding-top: 1.5rem; border-top: 1px solid var(--filet); transition: border-color .9s ease; }
.finitions-nom { margin: 0 0 .35rem; font-family: var(--police-titre); font-style: italic; font-size: clamp(2rem, 1.1rem + 2.4vw, 3.4rem); line-height: 1.05; letter-spacing: -.01em; }
.finitions-note { max-width: 44ch; margin: 0; font-size: 1.0625rem; line-height: 1.5; }
.finitions-tete { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.finitions-etiquette, .finitions-compte { margin: 0; }
.echantillons { display: flex; gap: .65rem; padding: .35rem .35rem .45rem; margin: 0 -.35rem; }
.echantillon { position: relative; flex: none; width: 3.4rem; height: 3.4rem; padding: 0; border: 0; border-radius: 3px; background: none; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.echantillon:hover { transform: translateY(-3px); }
.echantillon[aria-checked="true"] { transform: translateY(-5px); box-shadow: 0 0 0 2px rgba(18, 16, 15, .9), 0 0 0 4px #fff; }
.echantillon:focus-visible { outline: 3px solid #fff; outline-offset: 7px; }
.echantillon-matiere { position: absolute; inset: 0; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38); }
.matiere-marbre { background: linear-gradient(112deg, #f5f2ed 0 34%, #d5d0c9 34.4% 35.2%, #f7f4ef 35.8% 66%, #bfbab3 66.4% 67%, #f5f2ed 67.6%); }
.matiere-pierre { background: repeating-linear-gradient(0deg, rgba(120, 88, 48, .2) 0 1px, transparent 1px 6px), linear-gradient(180deg, #dcc7a5, #c8ab82); }
.matiere-beton { background: radial-gradient(circle at 30% 35%, rgba(255, 255, 255, .16) 0 8%, transparent 9%), radial-gradient(circle at 72% 68%, rgba(0, 0, 0, .12) 0 10%, transparent 11%), linear-gradient(160deg, #a3a29e, #8b8a86); }
.matiere-zellige { background: linear-gradient(135deg, rgba(255, 255, 255, .22) 0 18%, transparent 19%), linear-gradient(135deg, #1f9468, #0e6948); }
.matiere-boisnoir { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 5px), linear-gradient(90deg, #7a4d30 0 50%, #151312 50% 100%); }
.finitions-aide { margin: .8rem 0 0; font-size: .6875rem; letter-spacing: .16em; }
/* sans JavaScript : première finition fixe, le choix ne ferait rien, on ne le montre pas */
html:not(.js) .finitions-commande { display: none; }
html:not(.js) .finitions { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 899px) {
  .ouverture-interieur { padding-block: 6.75rem 1.5rem; }
  .finitions { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; margin-top: 1.6rem; padding-top: 1.2rem; }
  .finitions-aide { display: none; }
}
@media (max-width: 767px) {
  .ouverture-interieur { padding-bottom: calc(1.5rem + 3.25rem + env(safe-area-inset-bottom, 0px)); }   /* la barre d'appel (3,25 rem) ne recouvre pas les échantillons */
}
@media (max-width: 599px) {
  .chapo { display: none; }
  .actions { margin-top: 1.1rem; }
  .finitions-note { font-size: .9375rem; }
  .echantillon { width: 3.1rem; height: 3.1rem; }
  .echantillons { gap: .5rem; }
}

/* ---------- l'atelier ---------- */
.atelier { padding-block: clamp(4rem, 9vw, 8rem); }
.atelier-bas { display: grid; gap: 1.5rem 4rem; grid-template-columns: minmax(0, 1fr); margin-top: 2.2rem; align-items: start; }
@media (min-width: 900px) { .atelier-bas { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.atelier-bas .intro, .atelier-bas .legende { margin: 0; }
.atelier-bas .legende { padding-top: .6rem; border-top: 1px solid var(--laiton); }

/* ---------- prestations : cinq chapitres, une photo chacun ---------- */
.prestations { padding-bottom: clamp(3rem, 7vw, 6rem); }
.prestations-tete { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.prestations-tete h2 { max-width: 18ch; margin: 0; }
.chapitre { margin-bottom: clamp(3.5rem, 8vw, 7rem); }
.chapitre:last-child { margin-bottom: 0; }
.photo-img { display: block; width: 100%; height: auto; }
.chapitre-photo { margin: 0; }
.chapitre-gauche .photo-img, .chapitre-droite .photo-img { max-height: min(70vh, 600px); object-fit: cover; }
.chapitre-num { display: block; margin-bottom: 1rem; font-family: var(--police-titre); font-style: italic; font-size: 1.2rem; color: var(--encre-douce); }
.chapitre-texte h3 { margin-bottom: .5em; }
.chapitre-texte p { max-width: 46ch; color: var(--encre-douce); }
.chapitre-texte .aussi { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid rgba(169, 138, 82, .6); }

.chapitre-gauche, .chapitre-droite { width: min(100% - 2 * var(--gouttiere), var(--largeur-max)); margin-inline: auto; display: grid; gap: 1.8rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) {
  .chapitre-gauche { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 6rem); }
  .chapitre-droite { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 6rem); }
  .chapitre-droite .chapitre-photo { order: 2; }
}
.chapitre-bande .chapitre-photo .photo-img { width: 100%; height: min(60vh, 520px); object-fit: cover; }
.chapitre-bande .legende { width: min(100% - 2 * var(--gouttiere), var(--largeur-max)); margin-inline: auto; }
.chapitre-bande .chapitre-texte { width: min(100% - 2 * var(--gouttiere), var(--largeur-max)); margin: clamp(1.6rem, 3vw, 2.4rem) auto 0; display: grid; gap: .5rem 4rem; grid-template-columns: minmax(0, 1fr); }
.chapitre-bande .chapitre-texte p { margin: 0; }
@media (min-width: 900px) {
  .chapitre-bande .chapitre-texte { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .chapitre-bande .chapitre-num { grid-column: 1 / -1; margin-bottom: 0; }
}
@media (max-width: 899px) {
  .chapitre-bande .chapitre-photo .photo-img { height: auto; aspect-ratio: 3 / 2; }
}

/* ---------- méthode : cinq étapes ---------- */
.methode { background: var(--ivoire-fonce); padding-block: clamp(4rem, 9vw, 7.5rem); }
.methode h2 { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2rem 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .etapes { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.etape { padding-top: 1.2rem; border-top: 1px solid var(--laiton); }
.etape-num { display: block; margin-bottom: .6rem; font-family: var(--police-titre); font-style: italic; font-size: 2.8rem; line-height: 1; }
.etape h3 { font-size: 1.45rem; margin-bottom: .45em; }
.etape p { margin: 0; color: var(--encre-douce); font-size: 1rem; }

/* ---------- zone d'intervention ---------- */
.zone { padding-block: clamp(4rem, 9vw, 7.5rem); }
.zone-interieur { display: grid; gap: 2rem 5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .zone-interieur { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .zone-liste, .avis { grid-column: 2; } .zone-texte { grid-row: 1 / span 2; } }
.zone-texte h2 { max-width: 16ch; }
.nowrap { white-space: nowrap; }
.zone-liste { list-style: none; margin: 0; padding: 0; }
.zone-liste li { padding: .55rem 0; border-top: 1px solid rgba(169, 138, 82, .6); font-family: var(--police-titre); font-size: clamp(1.5rem, 1rem + 1.6vw, 2.3rem); line-height: 1.2; }
.zone-liste li:last-child { border-bottom: 1px solid rgba(169, 138, 82, .6); }
.avis { margin: 0; padding: 1.1rem 1.3rem; border: 1px solid var(--laiton); border-radius: var(--rayon); font-family: var(--police-titre); font-style: italic; font-size: 1.25rem; color: var(--encre-douce); }

/* ---------- contact ---------- */
.contact { background: var(--ivoire-fonce); padding-block: clamp(4rem, 9vw, 7rem); }
.contact-interieur { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .contact-interieur { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5rem; } }
.contact-tel { display: inline-block; padding-block: .4rem; font-family: var(--police-titre); font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.5rem); text-decoration: none; }
address { font-style: normal; margin-bottom: 1.25rem; }
.horaires { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1.25rem; margin: 0; }
@media (max-width: 599px) { .horaires { grid-template-columns: minmax(0, 1fr); gap: 0; } .horaires dd { margin-bottom: .5rem; } }
.horaires dt { font-weight: 600; }
.horaires dd { margin: 0; }
.formulaire { display: grid; gap: 1.05rem; }
.champ label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: .35rem; }
.champ-requis { color: var(--encre); }
.champ input, .champ textarea { width: 100%; min-height: 3rem; padding: .7rem .9rem; background: #fff; color: var(--encre); border: 1px solid #8a847d; border-radius: var(--rayon); font: inherit; }
.champ textarea { min-height: 8rem; resize: vertical; }
.formulaire .bouton { justify-self: start; }
.formulaire-statut { padding: .9rem 1rem; background: #fff; border-left: 3px solid var(--laiton); border-radius: var(--rayon); margin: 0; }

/* ---------- pied ---------- */
.pied { background: var(--encre); color: var(--ivoire); }
.pied-interieur { padding-block: 3rem 1rem; }
.pied-nom { font-family: var(--police-titre); font-size: 1.7rem; margin-bottom: .6rem; }
.mention-pied { border-top: 1px solid rgba(169, 138, 82, .5); color: #d8d1c7; }

/* ---------- barre d'appel (téléphone) ---------- */
.barre-appel a { background: var(--encre); color: #fff; font-weight: 600; border-top: 1px solid var(--laiton); }
