@charset "UTF-8";

/* =====================================================================
   Cabirol — feuille de style unique

   Mobile d'abord. L'accueil s'ouvre sur une grande photo portant le nom :
   sur un téléphone, on voit la maison avant de lire quoi que ce soit.
   Le menu se replie derrière un bouton dès que la place manque.
   ===================================================================== */

:root {
  /* Pierre calcaire et or de Sauternes — les deux couleurs du pays. */
  --paper:  #FAF8F3;
  --card:   #FFFFFF;
  --ink:    #22201A;
  --muted:  #746E62;
  --line:   #E5DFD2;
  --accent: #8A6320;
  --wash:   #F4EDDF;
  --sur-photo: #FFFFFF;

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;

  --mesure: 36rem;
  --page:   72rem;
  --entete: 3.5rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:  #15140F;
    --card:   #1E1C16;
    --ink:    #EDE9DF;
    --muted:  #9A9384;
    --line:   #322E24;
    --accent: #C9A052;
    --wash:   #2A2418;
  }
}

:root[data-theme="dark"] {
  --paper:  #15140F;
  --card:   #1E1C16;
  --ink:    #EDE9DF;
  --muted:  #9A9384;
  --line:   #322E24;
  --accent: #C9A052;
  --wash:   #2A2418;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  /* 17 px de base plutôt que 16 : sur un téléphone tenu à bout de bras,
     la différence est nette. Rien ne descend sous 15 px dans ce fichier. */
  font-size: 1.15rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.centre { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 1.25rem; }
.etroit { max-width: var(--mesure); }

/* ------------------------------------------------------------------ */
/* En-tête : barre fine et collante, menu repliable                    */
/* ------------------------------------------------------------------ */

.entete {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.entete__in {
  max-width: var(--page); margin: 0 auto; padding: 0 1.25rem;
  min-height: var(--entete);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.marque {
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem;
  letter-spacing: .06em; text-decoration: none; line-height: 1.1;
  padding: .6rem 0;
}

.marque span {
  display: block; font-family: var(--sans);
  font-size: .92rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-top: .1rem;
}

/* Bouton du menu : visible seulement quand la barre est trop étroite. */
.bascule {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 2.75rem; height: 2.75rem; padding: 0 .55rem;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; flex: none;
}

.bascule span {
  display: block; height: 1.5px; background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

.bascule[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.bascule[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.bascule[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Sans JavaScript, le menu reste une simple rangée qui passe à la ligne :
   tout le site demeure accessible. Le panneau repliable n'existe que si le
   script a pu s'exécuter et poser la classe « js ». */
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: .5rem 0; }

/* Indispensable : la regle « [hidden] { display: none } » du navigateur
   perd toujours face a une declaration de la feuille de style de l'auteur,
   quelle que soit sa specificite. Sans cette ligne, .nav { display: flex }
   annule l'attribut hidden et le menu reste ouvert. */
.nav[hidden] { display: none; }

.nav a {
  font-size: .95rem; letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); white-space: nowrap;
}

.nav a:hover { color: var(--ink); }

/* --- Sous 52rem, avec JavaScript : panneau déroulant --- */
@media (max-width: 51.99rem) {
  .js .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; flex-wrap: nowrap; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem;
    box-shadow: 0 12px 24px rgba(34, 32, 26, .08);
  }
  .js .nav a {
    padding: 1rem 0; font-size: 1.15rem;
    border-bottom: 1px solid var(--line);
  }
  .js .nav a:last-child { border-bottom: none; }
  .nav a[aria-current="page"] { color: var(--ink); }
  .js .nav a[aria-current="page"]::before { content: "— "; color: var(--accent); }
}

/* --- À partir de 52rem : menu déplié en ligne, bouton masqué --- */
@media (min-width: 52rem) {
  .bascule { display: none; }
  .nav { gap: 1.75rem; align-items: center; }
  .nav[hidden] { display: flex; }
  .nav a { padding: .4rem 0; border-bottom: 1px solid transparent; }
  .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
}

/* L'en-tête doit pouvoir ancrer le panneau déroulant. */
.entete { position: sticky; }
.entete__in { position: relative; }

/* ------------------------------------------------------------------ */
/* Photo d'ouverture, nom par-dessus                                   */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  /* Assez haut pour impressionner, assez court pour que la suite de la
     page reste devinée sous le pli. */
  min-height: min(72vh, 34rem);
  display: grid; align-items: end;
  overflow: hidden;
}

.hero__fond {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

/* Voile sombre : sans lui, un texte blanc sur pierre claire serait illisible. */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(20, 17, 10, .72) 0%,
    rgba(20, 17, 10, .38) 38%,
    rgba(20, 17, 10, .12) 70%,
    rgba(20, 17, 10, .22) 100%);
}

.hero__texte {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--page); margin: 0 auto;
  padding: 3rem 1.25rem 2.5rem;
  color: var(--sur-photo);
  text-align: center;
}

.hero__nom {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.75rem, 15vw, 5.5rem);
  line-height: 1; letter-spacing: .04em;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.hero__sous {
  /* Ce span vit dans le h1 : sans display:block il se collerait au nom. */
  display: block;
  font-family: var(--sans);
  font-size: clamp(.95rem, 3.9vw, 1.05rem); font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
  margin: .9rem 0 0;
}

.hero__accroche {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.2rem, 4.8vw, 1.45rem); margin: 1.25rem auto 0; max-width: 26rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}

.bouton {
  display: inline-block; margin-top: 1.75rem;
  padding: .85rem 2rem;
  font-family: var(--sans); font-size: 1.05rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  color: var(--sur-photo);
  border: 1px solid rgba(255, 255, 255, .75);
  background: rgba(20, 17, 10, .25);
  transition: background .2s ease, border-color .2s ease;
}

.bouton:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }

/* ------------------------------------------------------------------ */
/* Titres et sections                                                  */
/* ------------------------------------------------------------------ */

.titre-page {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 7.4vw, 2.9rem);
  line-height: 1.14; margin: 0 0 .8rem; text-wrap: balance;
}

.titre-section {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  line-height: 1.2; margin: 0 0 .6rem; text-wrap: balance;
}

.chapo {
  max-width: var(--mesure); color: var(--muted);
  font-family: var(--serif); font-size: 1.3rem; font-style: italic;
  margin: 0;
}

.section { padding-top: 3rem; padding-bottom: 3rem; }
.section--pale { background: var(--wash); }
.section__tete { margin-bottom: 1.75rem; }

.prose { max-width: var(--mesure); }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }

.lien-suite {
  display: inline-block; margin-top: 1.25rem;
  font-size: 1rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  text-decoration: none; border-bottom: 1px solid currentColor;
  padding-bottom: .15rem;
}

/* ------------------------------------------------------------------ */
/* Équipements                                                         */
/* ------------------------------------------------------------------ */

/* Sur téléphone : une seule colonne, icône à gauche, texte à droite sur
   toute la largeur disponible. Deux colonnes de 158 px comprimaient les
   libellés en mots isolés ; il vaut mieux dérouler la page. */
.equipements {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
  list-style: none; margin: 0; padding: 0;
}

.equipement {
  display: grid; grid-template-columns: auto 1fr;
  gap: .1rem 1rem; align-items: start;
}

.equipement svg {
  width: 1.9rem; height: 1.9rem; display: block; grid-row: span 2;
  stroke: var(--accent); stroke-width: 1.35;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}

.equipement b {
  font-family: var(--serif); font-size: 1.32rem;
  font-weight: 600; line-height: 1.3;
}

.equipement span { font-size: 1.1rem; color: var(--muted); }

/* À partir de la tablette, la place revient : on repasse en colonnes,
   icône au-dessus du libellé. */
@media (min-width: 40rem) {
  .equipements { grid-template-columns: repeat(3, 1fr); gap: 2rem 1.75rem; }
  .equipement { display: block; }
  .equipement svg { grid-row: auto; margin-bottom: .6rem; }
  .equipement b { display: block; }
  .equipement span { display: block; margin-top: .15rem; }
}

@media (min-width: 58rem) { .equipements { grid-template-columns: repeat(4, 1fr); } }

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

.galerie {
  display: grid; gap: 1rem; grid-template-columns: 1fr;
  list-style: none; margin: 0; padding: 0;
}

@media (min-width: 34rem) { .galerie { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (min-width: 58rem) { .galerie { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.oeuvre { margin: 0; }

.oeuvre__cadre {
  display: block; width: 100%; cursor: zoom-in;
  background: var(--card); border: 1px solid var(--line);
  overflow: hidden; transition: border-color .2s ease;
}

.oeuvre__cadre:hover { border-color: var(--accent); }

/* Les photos sont de formats variés : un cadrage commun évite une
   grille en escalier. */
.oeuvre__cadre img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.oeuvre figcaption {
  margin-top: .5rem; font-size: 1.15rem;
  font-family: var(--serif); color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Réserver                                                            */
/* ------------------------------------------------------------------ */

.reserver { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }

@media (min-width: 40rem) { .reserver { grid-template-columns: repeat(2, 1fr); } }

.reserver a {
  display: block; height: 100%;
  background: var(--card); border: 1px solid var(--line);
  padding: 1.1rem 1.25rem; text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}

.reserver a:hover { border-color: var(--accent); background: var(--wash); }

.reserver b {
  display: block; font-family: var(--serif); font-size: 1.35rem;
  font-weight: 600; margin-bottom: .15rem;
}

.reserver span { color: var(--muted); font-size: 1.1rem; }

/* La flèche accompagne le nom : accrochée à la description, elle passait
   seule à la ligne dès que celle-ci était longue. */
.reserver b::after { content: " →"; color: var(--accent); }

/* ------------------------------------------------------------------ */
/* Coordonnées                                                         */
/* ------------------------------------------------------------------ */

.coord { display: grid; gap: 1.5rem; margin: 0; }

@media (min-width: 44rem) {
  .coord { grid-template-columns: repeat(3, auto); justify-content: start; gap: 3rem; }
}

.coord dt {
  font-size: .92rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: .3rem;
}

.coord dd { margin: 0; font-size: 1.25rem; }
.coord dd a { text-decoration-color: var(--line); text-underline-offset: .2em; }
.coord dd a:hover { text-decoration-color: var(--accent); }

/* ------------------------------------------------------------------ */
/* Visionneuse                                                         */
/* ------------------------------------------------------------------ */

.vue { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(12, 11, 8, .93); padding: 1rem; }
.vue.ouverte { display: grid; grid-template-rows: 1fr auto; gap: .75rem; }

.vue__scene { display: grid; place-items: center; min-height: 0; }
.vue__scene img { max-width: 100%; max-height: 100%; background: #fff; padding: .4rem; }

.vue__pied {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  color: #F2EDE1; font-size: 1rem; max-width: 40rem; width: 100%; margin: 0 auto;
}

.vue__legende { display: flex; align-items: baseline; justify-content: center; gap: .9rem; flex: 1; min-width: 0; }
.vue__titre { font-family: var(--serif); font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vue__rang { color: #A79E8B; font-variant-numeric: tabular-nums; flex: none; }

.vue button {
  font: inherit; color: #F2EDE1;
  background: rgba(18, 16, 11, .72);
  border: 1px solid rgba(242, 237, 225, .35);
  width: 2.75rem; height: 2.75rem; flex: none; cursor: pointer;
  display: grid; place-items: center; font-size: 1.35rem; line-height: 1;
}

.vue button:hover { border-color: #F2EDE1; background: rgba(18, 16, 11, .92); }
.vue__fermer { position: absolute; top: 1rem; right: 1rem; }

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

.pied {
  border-top: 1px solid var(--line); margin-top: 3rem;
  padding: 2rem 0 3rem; color: var(--muted); font-size: 1.05rem;
}

.pied__in {
  max-width: var(--page); margin: 0 auto; padding: 0 1.25rem;
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: baseline;
}

.pied a { color: var(--muted); }
.pied .droite { margin-left: auto; }

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