/* ═══════════════════════════════════════════════════════
   BALADES MUSÉALES — Feuille de style unique
   ═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=Inter:wght@300;400&display=swap');

:root {
  --white:     #ffffff;
  --off-white: #f8f7f4;
  --stone:     #e8e4de;
  --ink:       #1a1814;
  --ink-light: #6b6560;
  --accent:    #8b7355;
  --gap:       clamp(1rem, 3vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: #FFFFFA;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* ── Header ──────────────────────────────────────────── */
/* ── Header ──────────────────────────────────────────── */
.site-header {
  padding: 1.5rem var(--gap) 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
 
}

.header-left {
  display: flex;
  align-items: baseline;
  flex: 1;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: 0.04em;
  color: var(--ink);
}
.site-title span { font-style: italic; color: var(--accent); }

.breadcrumb {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-left: 3rem;
}
.breadcrumb:hover { color: var(--accent); }

.musee-lieu {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  text-align: right;
}

/* ── Intro musée ─────────────────────────────────────── */
.musee-intro {
  padding: 1rem var(--gap) 1.5rem;
  max-width: 900px;
}
.musee-titre {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem;
}

.musee-nom {
  font-style: normal;
  font-weight: 500;
  /* taille héritée = grande */
}

.musee-sep {
  color: var(--stone);
  font-weight: 300;
  font-size: 0.7em;   /* ← tiret plus petit */
}

.musee-sujet {
  font-style: italic;
  font-weight: 300;
  font-size: 0.7em;   /* ← 60% de la taille du nom, soit environ 1.1rem */
  color: var(--ink-light);
}

.musee-sous-titre {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--ink-light);
  margin-top: 0.4rem;
}

/* ── Grille d'œuvres ─────────────────────────────────── */
.grille-musee {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem var(--gap);
  margin: 1.5rem var(--gap) 4rem;
  align-items: start;        /* ← à ajouter */
}
.oeuvre {
  display: flex;
  flex-direction: column;
}
.oeuvre-img-lien {
  display: block;
  cursor: zoom-in;
  text-decoration: none;
}

.oeuvre-img {
  background: var(--white);
  overflow: hidden;
}
.oeuvre-img img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease, filter 0.4s ease;
  filter: saturate(0.9);
}

.oeuvre:hover .oeuvre-img img {
  transform: scale(1.03);
  filter: saturate(1);
}
.oeuvre-legende {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-light);
  padding-top: 0.6rem;
  text-align: center;
  line-height: 1.35;
}

/* ── Bouton retour ───────────────────────────────────── */
.retour {
  text-align: center;
  padding: 0 var(--gap) 3rem;
}
.retour a {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  border-bottom: 1px solid var(--stone);
  padding-bottom: 0.3rem;
  transition: color 0.2s, border-color 0.2s;
}
.retour a:hover { color: var(--accent); border-color: var(--accent); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--stone);
  padding: 1.8rem var(--gap);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.68rem;
  color: var(--ink-light);
  letter-spacing: 0.08em;
}
.site-footer a { color: var(--ink-light); transition: color 0.2s; }
.site-footer a:hover { color: var(--accent); }

/* ── Lightbox ────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,18,15,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.lightbox[hidden] { display: none; }

.lb-img {
  max-width: 100%;
  max-height: 85vh;          /* ← 88 → 85 pour laisser de la marge */
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}


.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  font-family: 'Cormorant Garamond', serif;
}


.lb-close,
.lb-prev,
.lb-next {
  position: fixed;              /* ← changé : absolute → fixed */
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  font-family: 'Cormorant Garamond', serif;
  z-index: 1001;                /* ← ajouté : au-dessus de la lightbox */
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 1rem; right: 1.5rem; font-size: 2rem; }
.lb-prev  { left: 1.5rem;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }


.lb-legende {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #e8e4de;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  text-align: center;
  max-width: 80%;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .grille-musee { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
  .oeuvre-legende { font-size: 0.85rem; }
  .lb-prev, .lb-next { font-size: 2rem; }
  .musee-lieu { display: none; }
}
/* ── Titres de section dans la grille ────────────────── */
.grille-section {
  grid-column: 1 / -1;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--accent);
  padding: 2rem 0 0.5rem;
  border-bottom: 1px solid var(--stone);
  margin-bottom: 0.5rem;
}
.grille-musee {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem var(--gap);
  margin: 1.5rem var(--gap) 4rem;
  align-items: start;
}


/* ── Texte d'introduction d'un musée ─────────────────── */
.musee-texte {
  max-width: 720px;
  padding: 0 var(--gap) 2rem;
  margin: 0 auto;           /* le bloc reste centré dans la page */
  /* PAS de text-align ici */
}
.musee-texte-date {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 1rem;
  /* reste aligné à gauche par défaut */
}
.musee-texte p {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-light);
  line-height: 1.65;
  margin-bottom: 0.8rem;
  text-align: center;       /* ← centré seulement ici */
}
.musee-sous-titre {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--ink-light);
  margin-top: 0.4rem;
}
/* ── Liens externes sous les légendes ────────────────── */
.oeuvre-lien {
  display: block;
  margin-top: 0.4rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.oeuvre-lien:hover {
  border-bottom-color: var(--accent);
}


.oeuvre-lien a {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.oeuvre.oeuvre-large {
  grid-column: span 2;
}

/* ── Bandeau image des pages musée ───────────────────── */
.bandeau-musee {
  width: 100%;
  overflow: hidden;
  margin: 0 0 1.5rem;
}

.bandeau-musee img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 5px;
  object-fit: cover;
  object-position: center;
}


/* ── Champ de recherche ──────────────────────────────── */
.search-box {
  padding: 2rem var(--gap) 0;
  max-width: 560px;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  border: 1px solid var(--stone);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-box input::placeholder {
  color: var(--ink-light);
  opacity: 0.6;
}

/* ── Compteur de peintre dans les cartes ────────────── */
.card-info-peintre {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: var(--accent);
  margin-top: 0.5rem;
  font-style: italic;
  letter-spacing: 0.05em;
  display: none;
}

/* ── Liste des peintres au survol ───────────────────── */
.card-img {
  position: relative;   /* ← pour positionner la liste en absolu */
}

.card-peintres {
  position: absolute;
  inset: 0;
  background: rgba(20,18,15,0.75);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  line-height: 1.5;
}



.card:hover .card-peintres {
  opacity: 1;
}

/* ── Commentaire sous la légende ─────────────────────── */
.oeuvre-commentaire {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--ink-light);
  margin-top: 0.5rem;
  padding: 0 0.3rem;
}