/* =========================================================
   Site "Micheline" — feuille de style commune
   -----------------------------------------------------------
   Ce fichier gère les couleurs, les polices et la mise en page
   de toutes les pages. Vous n'avez normalement pas besoin d'y
   toucher : pour ajouter du contenu, modifiez plutôt les
   fichiers .html (index.html, documents.html, chansons.html).
   ========================================================= */

:root {
  /* Couleurs */
  --paper: #f2e8d8;
  --paper-deep: #e9dabd;
  --ink: #2a251e;
  --ink-soft: #5c5346;
  --gold: #93712f;
  --teal: #3f5b4e;
  --rule: #d8c6a0;
  --white: #fffdf8;

  /* Typographie */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Lora", Georgia, serif;
  --font-ui: "Lora", Georgia, serif;

  --max-width: 720px;
  --max-width-wide: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--gold); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- En-tête / navigation ---------- */

.site-header {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-header .wrap-wide {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

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

.site-footer {
  margin-top: 5rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Accueil : hero ---------- */

.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}
.hero-portrait {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.8rem;
  border: 4px solid var(--white);
  box-shadow: 0 6px 18px rgba(42, 37, 30, 0.18);
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin: 0 0 0.6rem;
}
.hero p.tagline {
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 46ch;
  margin: 0 auto;
}

/* ---------- Cartes de navigation (accueil) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0 5rem;
}
.card {
  display: block;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(42, 37, 30, 0.12);
  color: var(--ink);
}
.card .card-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.6rem;
}
.card h2 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* ---------- Page "Son histoire" ---------- */

.story-hero {
  padding: 4rem 0 2rem;
  text-align: center;
}
.story-hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
}
.story-hero .lead {
  max-width: 62ch;
  margin: 1.2rem auto 0;
  font-size: 1.12rem;
  color: var(--ink-soft);
  white-space: pre-line;
}
.story-hero-photo {
  margin: 2.4rem auto 0;
  max-width: 380px;
}
.story-hero-photo img {
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(42, 37, 30, 0.2);
}

.chapter {
  padding: 3.2rem 0;
  border-top: 1px solid var(--rule);
}
.chapter-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.chapter h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin: 0 0 1.3rem;
}
.chapter .chapter-text p {
  margin: 0 0 1.1rem;
}
.chapter .chapter-text p:last-child { margin-bottom: 0; }


.chapter-left {
  text-align: left;
}
.chapter-left p {
  margin: 0 0 1.1rem;
}
.chapter-left p:last-child { margin-bottom: 0; }


.section-divider {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}
.section-divider h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  margin: 0 0 0.8rem;
}
.section-divider p {
  max-width: 56ch;
  margin: 0 auto;
  color: var(--ink-soft);
  white-space: pre-line;
}
.section-divider .ornament {
  color: var(--gold);
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Photo layouts within a chapter */
.photo-row {
  display: grid;
  gap: 0.9rem;
  margin: 1.6rem 0;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: start;
}
.photo-row.count-1 { grid-template-columns: minmax(0, 460px); justify-content: center; }
.photo-card {
  background: var(--white);
  padding: 0.5rem 0.5rem 0.7rem;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(42, 37, 30, 0.12);
}
.photo-card img {
  border-radius: 2px;
  width: 100%;
  height: auto;
}

/* ---------- Galerie de fin ---------- */

.gallery {
  columns: 3 260px;
  column-gap: 1rem;
  padding: 1rem 0 5rem;
}
.gallery figure {
  margin: 0 0 1rem;
  break-inside: avoid;
  background: var(--white);
  padding: 0.5rem 0.5rem 0.8rem;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(42, 37, 30, 0.12);
}
.gallery img { border-radius: 2px; width: 100%; }
.gallery figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 0.5rem 0.3rem 0;
  font-style: italic;
}

/* ---------- Pages Documents / Chansons ---------- */

.page-hero {
  padding: 4rem 0 1rem;
  text-align: center;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.page-hero p {
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0.8rem auto 0;
}

.list-block {
  padding: 1.5rem 0 5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.doc-item, .song-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: var(--ink);
}
.doc-item:hover, .song-item:hover {
  border-color: var(--gold);
  color: var(--ink);
}
.doc-icon, .song-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
}
.doc-item .label, .song-item .label {
  font-weight: 600;
}
.doc-item .sub, .song-item .sub {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 400;
  margin-top: 0.15rem;
}

.empty-note {
  border: 1px dashed var(--rule);
  border-radius: 6px;
  padding: 1.4rem;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .gallery { columns: 2 180px; }
  .hero { padding: 3rem 0 2rem; }
}

/* ---------- Photos cliquables (agrandissement) ---------- */

img.zoomable {
  cursor: zoom-in;
}
img.zoomable:hover {
  opacity: 0.94;
}

/* ---------- Visionneuse photo (lightbox) ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 17, 12, 0.92);
  padding: 3rem 1rem;
}
.lightbox-overlay.is-open { display: flex; }

body.lightbox-open { overflow: hidden; }

.lightbox-figure {
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: var(--ink);
}
.lightbox-caption {
  color: var(--white);
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 1rem;
  text-align: center;
  max-width: 60ch;
}
.lightbox-caption:empty { display: none; }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  line-height: 1;
  opacity: 0.85;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; color: var(--gold); }

.lightbox-close {
  top: 1.2rem;
  right: 1.4rem;
  font-size: 2.4rem;
  padding: 0.2rem 0.5rem;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 0.5rem 0.8rem;
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { font-size: 2.2rem; padding: 0.4rem 0.6rem; }
  .lightbox-close { font-size: 2rem; top: 0.6rem; right: 0.8rem; }
}
