/* HOUSE — feuille de styles unique, mobile d'abord.
   Tokens de départ issus du cahier des charges §3.1 (ajustables). */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-wght-normal.c47ff12887a3.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-wght-italic.3e2c4175a96d.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
}

:root {
  --ivoire: #f6f3ed;
  --sable: #eae3d9;
  --rose-sable: #f0e7e2;
  --anthracite: #302d29;
  --texte-2: #665c50;
  --bordeaux: #861e35;
  --bordeaux-fonce: #6b1629;
  --trait: #d9cec2;
  --blanc: #fffdf9;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --marge: clamp(1.25rem, 0.6rem + 3.2vw, 4.5rem);
  --largeur: 80rem;
  --rayon: 2px;
  --transition: 180ms ease;
  --entete-h: 4.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--entete-h) + 1rem);
}

body {
  margin: 0;
  background: var(--ivoire);
  color: var(--anthracite);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--bordeaux); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--bordeaux-fonce); }

:focus-visible {
  outline: 2px solid var(--bordeaux);
  outline-offset: 3px;
  border-radius: var(--rayon);
}
main:focus { outline: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--anthracite);
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

.lien-evitement {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--anthracite);
  color: var(--ivoire);
}
.lien-evitement:focus { top: 1rem; }

.bandeau-env {
  background: var(--anthracite);
  color: var(--ivoire);
  font-size: 0.8125rem;
  text-align: center;
  padding: 0.4rem var(--marge);
  letter-spacing: 0.01em;
}

/* --- Éléments typographiques partagés ----------------------------------- */
.filet {
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--bordeaux);
  margin-bottom: 1.5rem;
}

.surtitre {
  font-family: var(--serif);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.125rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--texte-2);
  margin: 0;
}
.surtitre--petit {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--bordeaux);
  margin-bottom: 0.75rem;
}

.titre-section {
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem);
  margin-bottom: 1.25rem;
}
.titre-page {
  font-size: clamp(2.5rem, 1.8rem + 3vw, 4rem);
  margin-bottom: 1.25rem;
}

.icone { width: 2.75rem; height: 2.75rem; color: var(--bordeaux); flex: none; }
.icone-fleche { display: inline-block; width: 1.125rem; height: 0.75rem; flex: none; transition: transform var(--transition); }

/* --- Boutons et liens ----------------------------------------------------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--bordeaux);
  border-radius: var(--rayon);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.bouton:hover .icone-fleche,
.lien-fleche:hover .icone-fleche { transform: translateX(3px); }

.bouton--plein { background: var(--bordeaux); color: var(--blanc); }
.bouton--plein:hover { background: var(--bordeaux-fonce); border-color: var(--bordeaux-fonce); color: var(--blanc); }

.bouton--contour { background: transparent; color: var(--bordeaux); padding: 0.65rem 1.25rem; min-height: 2.75rem; }
.bouton--contour:hover { background: var(--bordeaux); color: var(--blanc); }

.lien-fleche {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid currentColor;
}

/* --- En-tête ------------------------------------------------------------- */
.entete {
  position: relative;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ivoire) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--trait);
}
/* Collant seulement si le menu est repliable (JS) ou sur grand écran : sans JS,
   un en-tête mobile déplié occuperait une grande partie de l'écran. */
.js .entete { position: sticky; }

.entete__inner {
  max-width: var(--largeur);
  margin: 0 auto;
  min-height: var(--entete-h);
  padding: 0.75rem var(--marge);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.75rem;
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  color: var(--anthracite);
  text-decoration: none;
  line-height: 1;
}
.logo:hover { color: var(--anthracite); }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  width: 100%;
}
.nav__liens {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.nav__liens a {
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--anthracite);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nav__liens a:hover,
.nav__liens a[aria-current="page"] { border-bottom-color: var(--bordeaux); color: var(--anthracite); }

/* Menu mobile : actif seulement quand le script est chargé (sinon, liens visibles). */
.nav-bascule {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem;
  background: none;
  border: 0;
  color: var(--anthracite);
  font: 500 0.875rem var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-bascule[hidden] { display: none; }
.nav-bascule__barres,
.nav-bascule__barres::before,
.nav-bascule__barres::after {
  display: block;
  width: 1.375rem;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-bascule__barres { position: relative; }
.nav-bascule__barres::before,
.nav-bascule__barres::after { content: ""; position: absolute; left: 0; }
.nav-bascule__barres::before { top: -6px; }
.nav-bascule__barres::after { top: 6px; }
.nav-bascule[aria-expanded="true"] .nav-bascule__barres { background: transparent; }
.nav-bascule[aria-expanded="true"] .nav-bascule__barres::before { transform: translateY(6px) rotate(45deg); }
.nav-bascule[aria-expanded="true"] .nav-bascule__barres::after { transform: translateY(-6px) rotate(-45deg); }

.js .nav { display: none; }
.js .nav.est-ouverte {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem 0 1.25rem;
}
.js .nav.est-ouverte .nav__liens { flex-direction: column; gap: 0; }
.js .nav.est-ouverte .nav__liens a {
  display: block;
  padding: 0.9rem 0;
  font-size: 1.0625rem;
  border-bottom: 1px solid var(--trait);
}
.js .nav.est-ouverte .bouton { margin-top: 0.75rem; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column-reverse;
}
.hero__media { position: relative; overflow: hidden; background: var(--sable); }
.hero__image img {
  width: 100%;
  height: min(72svh, 34rem);
  object-fit: cover;
}
.hero__texte {
  padding: 2.25rem var(--marge) 3rem;
  animation: apparition 700ms ease-out both;
}
.hero__titre {
  font-size: clamp(3rem, 1.6rem + 5.6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}
.hero__accroche {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.625rem);
  line-height: 1.4;
  color: var(--texte-2);
  max-width: 30rem;
  margin: 1.5rem 0 2rem;
}

/* --- Atouts ---------------------------------------------------------------- */
.atouts {
  border-top: 1px solid var(--trait);
  border-bottom: 1px solid var(--trait);
}
.atouts__liste {
  list-style: none;
  margin: 0 auto;
  padding: 0 var(--marge);
  max-width: var(--largeur);
  display: grid;
}
.atout {
  padding: 2.25rem 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.25rem;
  align-items: start;
}
.atout + .atout { border-top: 1px solid var(--trait); }
.atout .icone { grid-row: span 2; }
.atout__titre { font-size: 1.625rem; margin: 0.35rem 0 0.5rem; }
.atout p { color: var(--texte-2); margin: 0; font-size: 0.9375rem; }

/* --- Éditorial ----------------------------------------------------------- */
.editorial {
  background: var(--sable);
  display: grid;
}
.editorial__media {
  margin: 0;
  padding: 2.5rem var(--marge) 0;
}
.editorial__image img {
  width: 100%;
  max-width: 25.5rem;
  aspect-ratio: 408 / 520;
  object-fit: cover;
  margin: 0 auto;
}
.editorial__media figcaption {
  max-width: 25.5rem;
  margin: 0.75rem auto 0;
  font-size: 0.8125rem;
  color: var(--texte-2);
  font-style: italic;
}
.editorial__texte {
  padding: 2.75rem var(--marge) 3.5rem;
  max-width: 38rem;
}
.editorial__texte p:not(.surtitre) { color: var(--texte-2); }
.editorial__texte .lien-fleche { margin-top: 0.75rem; }

/* --- Bandeau d'accès privé ------------------------------------------------- */
.acces-prive { background: var(--rose-sable); }
.acces-prive__inner {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 3.25rem var(--marge);
  display: grid;
  gap: 1.5rem;
}
.acces-prive__texte p { color: var(--texte-2); margin: 0; max-width: 36rem; }
.acces-prive__texte .titre-section { margin-bottom: 0.75rem; }
.acces-prive .bouton { justify-self: start; }

/* --- Pied de page -------------------------------------------------------- */
.pied { border-top: 1px solid var(--trait); }
.pied__inner,
.pied__legal {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 2rem var(--marge);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
}
.logo--pied { font-size: 1.375rem; }
.pied ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 2rem; }
.pied__nav a,
.pied__legal a { color: var(--texte-2); text-decoration: none; font-size: 0.875rem; display: inline-block; padding: 0.4rem 0; }
.pied__nav a:hover,
.pied__legal a:hover { color: var(--bordeaux); text-decoration: underline; }
.pied__lieu { margin: 0; font-family: var(--serif); font-size: 1rem; letter-spacing: 0.06em; color: var(--texte-2); }
.pied__legal { padding-top: 0; font-size: 0.8125rem; color: var(--texte-2); }
.pied__legal p { margin: 0; }

/* --- Pages simples (galerie privée, formulaire, légal, erreurs) ------------- */
.page-simple { padding: clamp(3rem, 2rem + 4vw, 6rem) var(--marge); }
.page-simple__inner { max-width: 44rem; margin: 0 auto; }
.page-simple__inner > .icone { margin-bottom: 1.5rem; }
.page-simple .intro { font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); line-height: 1.45; color: var(--texte-2); margin-bottom: 2rem; }
.page-simple .bouton { margin-top: 1rem; }

.etapes { counter-reset: etape; list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1rem; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--trait); }
.etapes li p { margin: 0; }
.etapes li::before { content: counter(etape, decimal-leading-zero); font-family: var(--serif); font-size: 1.5rem; color: var(--bordeaux); line-height: 1.2; }

.page-texte h2 { font-size: 1.75rem; margin: 2.25rem 0 0.75rem; }
.page-texte ul { padding-left: 1.25rem; }
.page-texte li { margin-bottom: 0.5rem; }

.avertissement {
  border-left: 3px solid var(--bordeaux);
  background: var(--blanc);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  font-size: 0.9375rem;
  color: var(--anthracite);
}
.avertissement strong { color: var(--bordeaux); }

/* --- Formulaire -------------------------------------------------------- */
.formulaire { display: grid; gap: 1.5rem; }
.champ { display: grid; gap: 0.45rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.champ > label,
.champ legend { font-size: 0.9375rem; font-weight: 500; color: var(--anthracite); padding: 0; }
.champ input[type="text"],
.champ input[type="email"],
.champ textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--anthracite);
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-bottom-color: #b9ab9b;
  border-radius: var(--rayon);
  padding: 0.8rem 0.9rem;
  min-height: 3rem;
  transition: border-color var(--transition);
}
.champ textarea { resize: vertical; min-height: 8rem; }
.champ input:focus-visible,
.champ textarea:focus-visible { border-color: var(--bordeaux); outline-offset: 1px; }
.champ--erreur input,
.champ--erreur textarea { border-color: var(--bordeaux); }
.champ__erreur,
.erreur-globale { color: var(--bordeaux); font-size: 0.875rem; font-weight: 500; margin: 0; }
.erreur-globale ul { margin: 0; padding-left: 1rem; }

.choix { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.choix__option,
.champ--case label { display: flex; align-items: flex-start; gap: 0.65rem; cursor: pointer; font-size: 0.9375rem; font-weight: 400; }
.choix__option { min-height: 2.75rem; align-items: center; }
.champ input[type="radio"],
.champ input[type="checkbox"] { accent-color: var(--bordeaux); width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; flex: none; }
.champ--case label span { color: var(--texte-2); }
.choix ul { list-style: none; padding: 0; margin: 0; }

.pot-de-miel { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.formulaire .bouton { justify-self: start; margin-top: 0.5rem; }
.mention { font-size: 0.8125rem; color: var(--texte-2); margin: 0; }

/* Média non encore généré : emplacement explicite, jamais d'image de substitution. */
.media-manquant {
  display: grid;
  place-items: center;
  min-height: 20rem;
  height: 100%;
  background: repeating-linear-gradient(135deg, var(--sable) 0 12px, var(--ivoire) 12px 24px);
  color: var(--texte-2);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

/* --- Tablette ------------------------------------------------------------ */
@media (min-width: 40rem) {
  .atouts__liste { grid-template-columns: repeat(3, 1fr); }
  .atout { grid-template-columns: 1fr; padding: 2.75rem 2rem 2.75rem 0; }
  .atout + .atout { border-top: 0; border-left: 1px solid var(--trait); padding-left: 2rem; }
  .atout .icone { grid-row: auto; margin-bottom: 1.25rem; }
  .atout__titre { font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.75rem); }
  .acces-prive__inner { grid-template-columns: auto 1fr; align-items: start; column-gap: 2rem; }
  .acces-prive .bouton { grid-column: 2; }
}

/* --- Ordinateur -------------------------------------------------------- */
@media (min-width: 56rem) {
  .entete { position: sticky; }
  .nav-bascule { display: none !important; }
  .js .nav,
  .nav {
    display: flex;
    flex: 1;
    width: auto;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 3rem;
    margin-left: clamp(2rem, 9vw, 9rem);
  }
  .nav__liens { gap: 2.25rem; flex-wrap: nowrap; }
  .entete__inner { flex-wrap: nowrap; }

  /* Façade provisoire verticale (478 px) : panneau portrait à droite, jamais
     étiré au-delà de ~1,25× sa largeur native. */
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, min(42vw, 37.5rem));
    min-height: min(calc(100svh - var(--entete-h) - 2rem), 42rem);
    max-width: 100rem;
    margin: 0 auto;
  }
  .hero__texte {
    align-self: center;
    padding: 4rem clamp(2rem, 5vw, 5rem) 4rem max(var(--marge), calc((100vw - var(--largeur)) / 2 + var(--marge)));
  }
  .hero__media::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 22%;
    z-index: 1;
    background: linear-gradient(90deg, var(--ivoire), transparent);
    pointer-events: none;
  }
  /* L'image remplit la cellule sans en dicter la hauteur. */
  .hero__media { min-height: 34rem; }
  .hero__image { position: absolute; inset: 0; }
  .hero__image img { width: 100%; height: 100%; }

  .editorial {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
  .editorial__media { padding: 4.5rem 3rem 4.5rem var(--marge); }
  .editorial__image img { margin-left: auto; margin-right: 0; }
  .editorial__media figcaption { margin-right: 0; }
  .editorial__texte { padding: 4.5rem var(--marge) 4.5rem 2rem; }

  .acces-prive__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding-top: 3.75rem;
    padding-bottom: 3.75rem;
    column-gap: 2.5rem;
  }
  .acces-prive .bouton { grid-column: auto; }
  .acces-prive .icone { align-self: start; margin-top: 2.6rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@keyframes apparition {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .entete, .bandeau-env, .nav-bascule, .acces-prive .bouton { display: none; }
}

/* =========================================================================
   Dossier privé
   ========================================================================= */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.entete--visite { position: sticky; }
.entete--visite .entete__inner { flex-wrap: nowrap; }
.entete__mention {
  margin: 0 auto 0 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--trait);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--texte-2);
}
.lien-discret {
  background: none;
  border: 0;
  padding: 0.6rem 0;
  font: 500 0.875rem var(--sans);
  color: var(--texte-2);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  min-height: 2.75rem;
}
.lien-discret:hover { color: var(--bordeaux); }

/* Navigation par chapitres : défilement horizontal sur mobile. */
.chapitres { border-top: 1px solid var(--trait); }
.chapitres__liste {
  position: relative; /* référence d'offsetLeft pour le défilement vers l'onglet courant */
  list-style: none;
  margin: 0 auto;
  padding: 0 var(--marge);
  max-width: var(--largeur);
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chapitres__liste::-webkit-scrollbar { display: none; }
.chapitres__liste a {
  display: block;
  padding: 0.85rem 0 0.75rem;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--texte-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.chapitres__liste a:hover { color: var(--anthracite); }
.chapitres__liste a[aria-current="page"] { color: var(--anthracite); border-bottom-color: var(--bordeaux); }

/* Introduction */
.visite-intro {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: clamp(2.5rem, 2rem + 3vw, 5rem) var(--marge);
  display: grid;
  gap: 2.5rem;
}
.visite-intro__texte .intro { font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); line-height: 1.45; color: var(--texte-2); }
.visite-intro__texte > p:last-child { color: var(--texte-2); }
.visite-intro__video { margin: 0; justify-self: center; width: 100%; max-width: 24rem; }
.visite-intro__video video { display: block; width: 100%; height: auto; background: var(--anthracite); }
.visite-intro__video figcaption,
.vignette__legende { font-size: 0.8125rem; color: var(--texte-2); margin: 0.6rem 0 0; }
.visite-intro__vide { min-height: 24rem; }

/* Sommaire des chapitres */
.sommaire { max-width: var(--largeur); margin: 0 auto; padding: 0 var(--marge) clamp(3rem, 2rem + 4vw, 6rem); }
.sommaire__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.carte a { display: block; text-decoration: none; color: var(--anthracite); }
.carte__image img,
.carte .media-manquant { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; min-height: 0; transition: opacity var(--transition); }
.carte a:hover img { opacity: 0.88; }
.carte__surtitre { display: block; margin-top: 0.9rem; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bordeaux); }
.carte__titre { display: block; font-family: var(--serif); font-size: 1.6rem; line-height: 1.15; margin-top: 0.25rem; }
.sommaire__tout { margin-top: 2rem; }

/* Chapitres et galerie */
.chapitre { max-width: var(--largeur); margin: 0 auto; padding: clamp(2.5rem, 2rem + 3vw, 5rem) var(--marge); }
.chapitre__entete { max-width: 44rem; margin-bottom: 2.5rem; }
.chapitre__entete .intro { font-family: var(--serif); font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.45rem); color: var(--texte-2); }
.groupe + .groupe { margin-top: 3rem; }
.groupe__titre {
  font-size: 1.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--trait);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.groupe__nombre { font: 400 0.8125rem var(--sans); color: var(--texte-2); letter-spacing: 0; }
.vignettes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.vignette a { display: block; position: relative; cursor: zoom-in; background: var(--sable); }
.vignette img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity var(--transition); }
.vignette a:hover img { opacity: 0.9; }
.chapitre__suivant { margin-top: 3rem; text-align: right; }
.ancres ul { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.ancres a { font-size: 0.875rem; }

/* Dossier de la propriété */
.documents { list-style: none; padding: 0; margin: 0 0 1rem; }
.document { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--trait); }
.etiquette { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-2); border: 1px solid var(--trait); padding: 0.2rem 0.6rem; border-radius: var(--rayon); white-space: nowrap; }
.caracteristiques div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--trait); }
.caracteristiques dt { color: var(--texte-2); }
.caracteristiques dd { margin: 0 0 0 auto; font-weight: 500; text-align: right; overflow-wrap: anywhere; min-width: 0; }

.pied--visite .pied__legal { padding-top: 2rem; }

/* Visionneuse */
.visionneuse {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #1c1a18;
  color: var(--ivoire);
  overflow: hidden;
}
.visionneuse[open] { display: grid; grid-template-rows: auto 1fr; }
.visionneuse::backdrop { background: rgb(28 26 24 / 0.96); }
.visionneuse__barre { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 1rem; }
.visionneuse__compteur { margin: 0; font-size: 0.875rem; letter-spacing: 0.06em; color: #cfc6ba; }
.visionneuse__fermer {
  background: none; border: 1px solid #5a534b; color: var(--ivoire);
  font: 500 0.875rem var(--sans); padding: 0.5rem 0.9rem; min-height: 2.75rem; cursor: pointer; border-radius: var(--rayon);
}
.visionneuse__fermer span { font-size: 1.25rem; line-height: 0; margin-left: 0.35rem; }
.visionneuse__figure { margin: 0; display: grid; grid-template-rows: 1fr auto; min-height: 0; padding: 0 0 1rem; }
.visionneuse__figure picture { min-height: 0; display: grid; place-items: center; }
.visionneuse__figure img {
  /* Bornes explicites : barre (~3.5rem) + légende (~3rem) + marges. */
  max-width: 100vw;
  max-height: calc(100dvh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
}
.visionneuse__legende { text-align: center; font-size: 0.875rem; color: #cfc6ba; padding: 0.75rem 1rem 0; min-height: 1.5em; }
.visionneuse__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 3rem; height: 4rem; border: 0; cursor: pointer;
  background: rgb(28 26 24 / 0.55); color: var(--ivoire); font-size: 2.25rem; line-height: 1;
}
.visionneuse__nav:hover { background: rgb(28 26 24 / 0.85); }
.visionneuse__nav--prec { left: 0; }
.visionneuse__nav--suiv { right: 0; }
.visionneuse :focus-visible { outline-color: var(--ivoire); }

@media (min-width: 40rem) {
  .vignettes { grid-template-columns: repeat(2, 1fr); }
  .sommaire__liste { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 56rem) {
  .visite-intro { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 4rem; }
  .vignettes { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .sommaire__liste { grid-template-columns: repeat(4, 1fr); }
  .visionneuse__nav { width: 4rem; }
  .visionneuse__nav--prec { left: 1rem; }
  .visionneuse__nav--suiv { right: 1rem; }
}
@media (max-width: 30rem) {
  .entete__mention { display: none; }
}

/* =========================================================================
   Administration propriétaire
   ========================================================================= */
.entete--admin { position: sticky; }
.entete--admin .entete__inner { flex-wrap: nowrap; }
.admin { max-width: var(--largeur); margin: 0 auto; padding: clamp(1.5rem, 1rem + 2vw, 3rem) var(--marge) 4rem; }
.admin .titre-page { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); margin-bottom: 1.5rem; }
.admin-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.admin-entete .titre-page { margin-bottom: 0.5rem; }
.admin-grille { display: grid; gap: 1.25rem; }
.admin-carte { background: var(--blanc); border: 1px solid var(--trait); padding: 1.5rem; min-width: 0; }
.admin-carte--etroite { max-width: 28rem; margin: 2rem auto; }
.admin-carte--moyenne { max-width: 42rem; }
.admin-titre { font-size: 1.5rem; margin-bottom: 1rem; }
.admin-sous-titre { font-size: 1.2rem; margin: 1.25rem 0 0.5rem; }
.ligne { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; margin: 0; border-bottom: 1px solid var(--trait); }
.ligne:last-of-type { border-bottom: 0; }
.notes { white-space: normal; background: var(--ivoire); padding: 0.75rem 1rem; }
.note { font-size: 0.8125rem; color: var(--texte-2); border-left: 2px solid var(--trait); padding-left: 0.75rem; margin: 1rem 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.bouton--danger { background: transparent; color: #8f1d1d; border-color: #8f1d1d; }
.bouton--danger:hover { background: #8f1d1d; color: var(--blanc); }

.messages { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.message { padding: 0.85rem 1rem; border-left: 3px solid var(--bordeaux); background: var(--blanc); margin-bottom: 0.5rem; font-size: 0.9375rem; }
.message--warning, .message--error { border-left-color: #8f1d1d; }

.indicateurs { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1rem; }
.indicateur a { display: block; background: var(--blanc); border: 1px solid var(--trait); padding: 1.1rem 1.25rem; text-decoration: none; color: var(--anthracite); height: 100%; }
.indicateur a:hover { border-color: var(--bordeaux); }
.indicateur__valeur { display: block; font-family: var(--serif); font-size: 2.5rem; line-height: 1; color: var(--bordeaux); font-variant-numeric: lining-nums tabular-nums; }
.indicateur__libelle { display: block; margin-top: 0.35rem; font-size: 0.875rem; color: var(--texte-2); }
.indicateur--discret .indicateur__valeur { color: var(--texte-2); font-size: 2rem; }

.filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1.25rem; margin: 0 0 1.25rem; }
.filtres label, .champ > label.champ { display: grid; gap: 0.3rem; font-size: 0.8125rem; color: var(--texte-2); }
.filtres select, .filtres input, .admin select, .admin input[type="number"], .admin input[type="password"], .admin input[type="search"] {
  font: inherit; font-size: 0.9375rem; min-height: 2.75rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--trait); border-bottom-color: #b9ab9b; border-radius: var(--rayon); background: var(--blanc); color: var(--anthracite);
}
.admin .champ input[type="password"], .admin .champ input[type="number"], .admin .champ select { width: 100%; }
.onglets { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 1.25rem; border-bottom: 1px solid var(--trait); }
.onglets a { padding: 0.6rem 0; text-decoration: none; color: var(--texte-2); border-bottom: 2px solid transparent; font-size: 0.9375rem; }
.onglets a[aria-current="page"] { color: var(--anthracite); border-bottom-color: var(--bordeaux); }

.tableau { width: 100%; border-collapse: collapse; background: var(--blanc); border: 1px solid var(--trait); font-size: 0.9375rem; }
.tableau th { text-align: left; font-weight: 500; font-size: 0.8125rem; color: var(--texte-2); padding: 0.75rem; border-bottom: 1px solid var(--trait); }
.tableau td { padding: 0.75rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau__actions { white-space: nowrap; display: flex; gap: 1rem; }
.etiquette--revoque, .etiquette--revoqu { color: #8f1d1d; border-color: #e3c1c1; }
.etiquette--actif { color: #2f5d3a; border-color: #c4d8c8; }
.etiquette--remplace { color: #5f5a52; border-color: #d9d3c8; }

.copie { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 0.5rem; }
.copie__champ { flex: 1 1 18rem; min-width: 0; font: 0.9375rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0.8rem 0.9rem; border: 1px solid var(--bordeaux); background: var(--ivoire); color: var(--anthracite); }

.admin-medias { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; }
.admin-media a { display: grid; gap: 0.25rem; text-decoration: none; color: var(--anthracite); background: var(--blanc); border: 1px solid var(--trait); padding: 0.5rem; height: 100%; }
.admin-media a:hover { border-color: var(--bordeaux); }
.admin-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.admin-media__nom { font-weight: 500; font-size: 0.875rem; }
.admin-media__alt { font-size: 0.8125rem; color: var(--texte-2); }

@media (max-width: 47.99rem) {
  /* Tableaux en fiches sur mobile. */
  .tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau tr { border-bottom: 1px solid var(--trait); padding: 0.5rem 0; }
  .tableau td { border: 0; padding: 0.3rem 0.9rem; display: flex; justify-content: space-between; gap: 1rem; }
  .tableau td[data-label]::before { content: attr(data-label); color: var(--texte-2); font-size: 0.8125rem; }
  .tableau__actions { justify-content: flex-end; }
}
@media (min-width: 56rem) {
  .admin-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-carte--large { grid-column: 1 / -1; }
}

/* Bandeau de choix du suivi facultatif : deux boutons de même poids visuel. */
.bandeau-suivi { background: var(--blanc); border-bottom: 1px solid var(--trait); }
.bandeau-suivi__inner {
  max-width: var(--largeur); margin: 0 auto; padding: 1.25rem var(--marge);
  display: grid; gap: 1rem; align-items: center;
}
.bandeau-suivi__question { margin: 0 0 0.35rem; font-weight: 500; }
.bandeau-suivi__texte .mention { margin: 0; }
.bandeau-suivi__choix, .page-texte .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; max-width: 22rem; }
.bouton--choix { background: var(--blanc); color: var(--anthracite); border-color: var(--anthracite); width: 100%; }
.bouton--choix:hover { background: var(--anthracite); color: var(--blanc); }
@media (min-width: 56rem) {
  .bandeau-suivi__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; }
  .bandeau-suivi__choix { min-width: 20rem; }
}

.contact-direct { margin: -1rem 0 2rem; color: var(--texte-2); }

/* Mentions à fournir (hors production) : visibles, jamais publiées en production. */
.a-fournir { background: #fbeec9; color: #6b4a00; padding: 0 .25em; border-radius: 2px; }

/* Caractéristiques validées et performance énergétique (annonce). */
.annonce { max-width: 72rem; margin: 0 auto; padding: 3rem 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.annonce > * { min-width: 0; }
.annonce p { overflow-wrap: anywhere; }
@media (min-width: 56rem) { .annonce { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; } }
.annonce__prix { font-family: "Cormorant Garamond", serif; font-size: clamp(1.9rem, 4vw, 2.6rem); margin: .25rem 0 1rem; }
.dpe__etiquettes { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); margin-bottom: 1rem; }
@media (min-width: 36rem) { .dpe__etiquettes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dpe__titre { margin: 0 0 .5rem; font-size: .95rem; }
.dpe-echelle { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.dpe-echelle__ligne { display: flex; align-items: center; gap: .6rem; font: 500 .78rem/1 Inter, sans-serif; }
/* Couleurs de l'étiquette réglementaire (arrêté du 31 mars 2021). */
.dpe-echelle__ligne:nth-child(1) .dpe-echelle__barre { width: 3.5rem; }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(1) .dpe-echelle__barre { background: #009c6d; }
.dpe-echelle--climat .dpe-echelle__ligne:nth-child(1) .dpe-echelle__barre { background: #a4dbf8; }
.dpe-echelle__ligne:nth-child(2) .dpe-echelle__barre { width: 4.6rem; }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(2) .dpe-echelle__barre { background: #52b153; }
.dpe-echelle--climat .dpe-echelle__ligne:nth-child(2) .dpe-echelle__barre { background: #8cb4d3; }
.dpe-echelle__ligne:nth-child(3) .dpe-echelle__barre { width: 5.7rem; }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(3) .dpe-echelle__barre { background: #78bd76; }
.dpe-echelle--climat .dpe-echelle__ligne:nth-child(3) .dpe-echelle__barre { background: #7792b1; }
.dpe-echelle__ligne:nth-child(4) .dpe-echelle__barre { width: 6.8rem; }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(4) .dpe-echelle__barre { background: #f4e70f; }
.dpe-echelle--climat .dpe-echelle__ligne:nth-child(4) .dpe-echelle__barre { background: #606f8f; }
.dpe-echelle__ligne:nth-child(5) .dpe-echelle__barre { width: 7.9rem; }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(5) .dpe-echelle__barre { background: #f0b50f; }
.dpe-echelle--climat .dpe-echelle__ligne:nth-child(5) .dpe-echelle__barre { background: #4d5271; }
.dpe-echelle__ligne:nth-child(6) .dpe-echelle__barre { width: 9.0rem; }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(6) .dpe-echelle__barre { background: #eb8235; }
.dpe-echelle--climat .dpe-echelle__ligne:nth-child(6) .dpe-echelle__barre { background: #393551; }
.dpe-echelle__ligne:nth-child(7) .dpe-echelle__barre { width: 10.1rem; }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(7) .dpe-echelle__barre { background: #d7221f; }
.dpe-echelle--climat .dpe-echelle__ligne:nth-child(7) .dpe-echelle__barre { background: #281b35; }
.dpe-echelle__barre { display: block; padding: .32rem .5rem; color: #fff; font-weight: 700; clip-path: polygon(0 0, calc(100% - .5rem) 0, 100% 50%, calc(100% - .5rem) 100%, 0 100%); }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(-n+3) .dpe-echelle__barre { color: #fff; }
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(4) .dpe-echelle__barre,
.dpe-echelle--energie .dpe-echelle__ligne:nth-child(5) .dpe-echelle__barre,
.dpe-echelle--climat .dpe-echelle__ligne:nth-child(-n+2) .dpe-echelle__barre { color: #1f1b16; }
.dpe-echelle__seuil { color: var(--texte-2, #6b6258); }
.dpe-echelle__ligne--active .dpe-echelle__barre { outline: 2px solid #1f1b16; outline-offset: 1px; font-size: .95rem; }
.dpe-echelle__ligne--active .dpe-echelle__seuil { color: inherit; font-weight: 600; }
.tableau--surfaces { width: 100%; margin: 0 0 1.25rem; border-collapse: collapse; }
.tableau--surfaces caption { text-align: left; font-weight: 600; padding: .5rem 0; }
.tableau--surfaces td, .tableau--surfaces th { padding: .35rem 0; border-bottom: 1px solid var(--trait, #e4ddd2); text-align: left; }
.tableau--surfaces td:last-child, .tableau--surfaces tfoot td { text-align: right; white-space: nowrap; }
.caracteristiques--texte div { display: block; }
.caracteristiques--texte dd { font-weight: 400; margin-top: .25rem; }
.risques { font-size: .9rem; }

/* Fermeture temporaire ou fin de commercialisation. */
.ferme { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 3rem 1.5rem; }

.hero__chiffres { font: 500 .95rem/1.6 Inter, sans-serif; letter-spacing: .02em; margin: 0 0 1.5rem; color: var(--texte-2, #6b6258); }
.hero__chiffres strong { color: var(--texte, #1f1b16); }
.document { flex-wrap: wrap; }
.document .mention { flex-basis: 100%; min-width: 0; overflow-wrap: anywhere; margin: .25rem 0 0; }
