/* =========================================================
   Charles Aznavour – Les bons moments
   Feuille de style principale (2026)
   Ambiance : music-hall parisien — noir de scène, ivoire,
   rouge de rideau et une touche d'or.
   ========================================================= */

:root {
  --ink: #221c19;
  --ink-soft: #4a403a;
  --muted: #7a6e65;
  --paper: #f6f1e9;
  --card: #fffdf9;
  --line: #e7ddcf;
  --stage: #15100e;
  --stage-2: #231a16;
  --crimson: #9e1b22;
  --crimson-dark: #7a141a;
  --gold: #b8955a;
  --gold-soft: #d9c39a;
  --mark: #f3d77a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(34, 28, 25, .06), 0 8px 24px rgba(34, 28, 25, .06);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--crimson); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--crimson-dark); }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 12px; }

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

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--stage-2), var(--stage));
  border-bottom: 3px solid var(--crimson);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .25);
}

.header-inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 74px;
}

.brand {
  display: flex; flex-direction: column; line-height: 1.05;
  text-decoration: none; color: #f8f1e4; flex-shrink: 0;
}
.brand:hover { color: #fff; }
.brand-name {
  font-family: var(--serif); font-weight: 700; font-size: 1.7rem; letter-spacing: .01em;
}
.brand-tag {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  color: var(--gold-soft); font-size: 1rem; margin-top: 3px;
}

.main-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-left: auto; }
.main-nav a {
  color: #e9dfd0; text-decoration: none; font-size: .95rem; font-weight: 600;
  letter-spacing: .02em; padding: 8px 11px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.main-nav a[aria-current="page"] { color: var(--gold-soft); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 6px 6px 0 0; }

.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; color: #f2e9db; border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 6px; padding: 7px 14px; font: 600 .95rem var(--sans); cursor: pointer;
}

/* ---------- Mise en page ---------- */

.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 210px;
  grid-template-areas: "subnav content side";
  gap: 32px;
  padding-top: 36px; padding-bottom: 56px;
  align-items: start;
}
.layout.no-side { grid-template-columns: 230px minmax(0, 1fr); grid-template-areas: "subnav content"; }
.layout.no-subnav { grid-template-columns: minmax(0, 1fr) 210px; grid-template-areas: "content side"; }
.layout.no-subnav.no-side { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content"; max-width: 1000px; }

.subnav { grid-area: subnav; position: sticky; top: 104px; }
.content { grid-area: content; min-width: 0; }
.side { grid-area: side; }

/* ---------- Sous-menu de section (ancien #topic) ---------- */

.subnav-inner {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 8px; font-size: .95rem; line-height: 1.35;
  max-height: calc(100vh - 130px); overflow: auto;
}
.subnav-inner::before {
  content: "Dans cette section";
  display: block; padding: 2px 12px 10px; margin-bottom: 6px;
  font-family: var(--serif); font-style: italic; color: var(--muted); font-size: .9rem;
  border-bottom: 1px solid var(--line);
}
.section-accueil .subnav-inner::before { content: "Bienvenue"; }
.subnav-inner p { margin: 0; padding: 0; }
.subnav-inner p a {
  display: block; padding: 7px 12px; border-radius: 6px;
  color: var(--ink-soft); text-decoration: none; font-weight: 600;
}
.subnav-inner p a:hover { background: #f3ebdf; color: var(--crimson); }
.subnav-inner p.sub a { padding-left: 28px; font-weight: 400; position: relative; }
.subnav-inner p.sub a::before {
  content: ""; position: absolute; left: 15px; top: 50%; width: 5px; height: 5px;
  border-radius: 50%; background: var(--gold); transform: translateY(-50%);
}
.subnav-inner strong a, .subnav-inner a strong { color: var(--crimson); }
.subnav-inner a.current { background: #f3ebdf; color: var(--crimson); }
.subnav-inner table { width: 100%; margin-top: 10px; }
.subnav-inner td { padding: 4px 12px; font-size: .9rem; }
.subnav-inner img { max-width: 100%; height: auto; border-radius: 6px; }

/* ---------- Outils de page : recherche ---------- */

.page-tools {
  position: sticky; top: 86px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  background: rgba(246, 241, 233, .94); backdrop-filter: blur(6px);
  padding: 8px 0 12px; margin-bottom: 4px;
}
.search { flex: 1; }
.search input {
  width: 100%; font: 400 1rem var(--sans); color: var(--ink);
  padding: 10px 14px 10px 40px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237a6e65' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
  box-shadow: var(--shadow);
}
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 149, 90, .25); }
.search-count { font-size: .9rem; color: var(--muted); white-space: nowrap; min-width: 0; }
.search-nav {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-soft); cursor: pointer; font-size: 1rem;
  display: none;
}
.page-tools.has-results .search-nav { display: inline-block; }
.search-nav:hover { border-color: var(--gold); color: var(--crimson); }
mark.hit { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
mark.hit.current { background: var(--crimson); color: #fff; }

/* ---------- Contenu (ancien #content) ---------- */

.content-body {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px 44px 44px;
  color: var(--ink); overflow-wrap: anywhere;
}

.content-body h1, .content-body h2 {
  font-family: var(--serif); font-weight: 700; color: var(--crimson-dark);
  font-size: 2rem; line-height: 1.2; letter-spacing: .005em;
  margin: 0 0 18px; padding: 0 0 14px; border-bottom: 1px solid var(--line);
  text-transform: none;
}
.content-body h2 ~ h2 { margin-top: 36px; font-size: 1.55rem; }
.content-body h2:empty { display: none; }
.content-body h3 {
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink);
  margin: 28px 0 10px;
}
.content-body h4 { font-size: 1.05rem; margin: 20px 0 6px; color: var(--crimson-dark); }

.content-body p { margin: 0 0 .55em; color: var(--ink); }
.content-body b, .content-body strong { color: var(--ink); font-weight: 700; }
.content-body a { color: var(--crimson); font-weight: 600; }
.content-body a:hover { color: var(--crimson-dark); }
.content-body hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.content-body ul, .content-body ol { padding-left: 1.3em; }
.content-body li { margin: 3px 0; }
.content-body li::marker { color: var(--gold); }
.content-body blockquote {
  margin: 16px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold);
  font-family: var(--serif); font-style: italic; color: var(--ink-soft);
}
.content-body font { font-family: inherit; }
.content-body font[size="1"] { font-size: .85rem; }
.content-body font[size="2"] { font-size: .95rem; }
.content-body img { max-width: 100%; height: auto; }

/* Tableaux : discographies, listes avec pochettes */
.content-body table { border-collapse: collapse; width: 100% !important; max-width: 100%; }
.content-body table[border="1"] td, .content-body table[border="1"] th { border: 1px solid var(--line); }
.content-body td, .content-body th { padding: 14px 14px; vertical-align: top; text-align: left; }
.content-body > table > tbody > tr + tr > td,
.content-body > table > tr + tr > td { border-top: 1px solid var(--line); }
.content-body > table > tbody > tr:hover > td { background: #fcf8f1; }
.content-body td img {
  border-radius: 4px; display: block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 6px 16px rgba(34, 28, 25, .16);
  transition: transform .2s ease, box-shadow .2s ease;
}
.content-body td img:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 2px 4px rgba(0, 0, 0, .14), 0 12px 26px rgba(34, 28, 25, .22); }
.content-body td p:has(> img) { margin: 0; }
.content-body td b:first-child {
  font-family: var(--serif); font-size: 1.12rem; font-weight: 700; color: var(--crimson-dark);
}
.content-body td:first-child:has(img) { width: 152px; }

/* Paragraphes d'espacement hérités (<p>&nbsp;</p>) : on les resserre */
.content-body p.spacer { margin: 0; line-height: .6; font-size: .6em; }

/* Catalogue des chansons : une ligne par enregistrement, retrait suspendu */
.page-catalogue-catalogue .content-body p,
.page-catalogue-alter .content-body p,
.page-catalogue-sessions-barclay .content-body p { padding-left: 1.4em; text-indent: -1.4em; margin-bottom: .35em; }

/* Citation de la page Discographie */
.content-body p[align="right"] { font-family: var(--serif); font-style: italic; color: var(--muted); }

/* ---------- Colonne de droite (ancien #sidebar) ---------- */

.side {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; font-size: .92rem; line-height: 1.45;
}
.side p { margin: 0 0 .6em; }
.side img {
  max-width: 100%; height: auto; display: block; margin: 0 auto 8px; border-radius: 6px;
  filter: sepia(.12) contrast(1.02);
}
.side table { width: 100%; border-collapse: collapse; }
.side td { padding: 4px; vertical-align: top; }
.side font { font-family: inherit; }
.side font[size="1"] { font-size: .88rem; }
.side b { color: var(--crimson-dark); letter-spacing: .03em; }

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

.site-footer {
  background: var(--stage); color: #bfb2a2; font-size: .9rem;
  padding: 26px 0; border-top: 3px solid var(--crimson);
}
.site-footer .wrap { font-family: var(--serif); font-style: italic; text-align: center; }

.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--crimson); color: #fff; text-decoration: none; font-size: 1.2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .2s;
}
.to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--crimson-dark); color: #fff; }

/* ---------- Accueil ---------- */

.section-accueil .content-body h2 { font-size: 2.3rem; }
.section-accueil .content-body > p:first-of-type { font-size: 1.1rem; }

/* ---------- Adaptation tablettes et téléphones ---------- */

@media (max-width: 1150px) {
  .layout, .layout.no-side { grid-template-columns: 210px minmax(0, 1fr); grid-template-areas: "subnav content" "side side"; }
  .layout.no-subnav { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "side"; }
  .side { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
  .side > * { flex: 0 1 auto; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .header-inner { flex-wrap: wrap; min-height: 64px; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .brand-name { font-size: 1.4rem; }
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; flex-direction: column; padding: 6px 0 10px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 8px; }
  .layout, .layout.no-side, .layout.no-subnav, .layout.no-subnav.no-side {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "subnav" "content" "side"; gap: 18px; padding-top: 18px;
  }
  .subnav { position: static; }
  .subnav-inner { max-height: none; }
  .page-tools { top: 64px; }
  .content-body { padding: 22px 18px 26px; }
  .content-body h1, .content-body h2 { font-size: 1.6rem; }
  .content-body td, .content-body th { padding: 10px 8px; }
  .content-body td:first-child:has(img) { width: 96px; }
  .content-body td img { width: 88px !important; }
}

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

@media print {
  .site-header, .subnav, .page-tools, .to-top, .site-footer, .side { display: none !important; }
  .layout { display: block; padding: 0; }
  .content-body { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; }
}

/* ---------- Page « Sessions d'enregistrement » : tableau large ---------- */
/* Le sous-menu passe au-dessus pour donner toute la largeur au tableau */
.page-catalogue-sessions-barclay .layout.no-side {
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "subnav" "content"; gap: 18px;
}
.page-catalogue-sessions-barclay .subnav { position: static; }
.page-catalogue-sessions-barclay .subnav-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; max-height: none;
}
.page-catalogue-sessions-barclay .subnav-inner::before { border: 0; margin: 0; padding: 0 10px 0 6px; }
.page-catalogue-sessions-barclay .content-body { overflow-x: auto; padding-left: 28px; padding-right: 28px; }
.page-catalogue-sessions-barclay .content-body table { width: auto !important; min-width: 100%; font-size: .95rem; }
.page-catalogue-sessions-barclay .content-body td {
  padding: 5px 10px; white-space: nowrap; width: auto !important;
}
.page-catalogue-sessions-barclay .content-body td:empty { padding: 0; }
/* Seul le titre peut passer à la ligne, et seulement s'il est vraiment long */
.page-catalogue-sessions-barclay .content-body tr > td:nth-child(6):not([colspan]) { white-space: normal; min-width: 17em; }
/* Crédits de séance (direction, prise de son, studio) : texte libre qui peut passer à la ligne */
.page-catalogue-sessions-barclay .content-body td[colspan] { white-space: normal; }
.page-catalogue-sessions-barclay .content-body td b:first-child { font-family: inherit; font-size: inherit; color: var(--ink-soft); }
.page-catalogue-sessions-barclay .content-body td p { margin: 0; padding: 0; text-indent: 0; }
/* Ligne de date / direction : bandeau de séance */
.page-catalogue-sessions-barclay .content-body tr:has(> td[colspan]) > td,
.page-catalogue-sessions-barclay .content-body tr:has(> td:only-child) > td {
  padding-top: 20px; padding-bottom: 6px; color: var(--crimson-dark); background: transparent !important; border-top: 0 !important;
}
.page-catalogue-sessions-barclay .content-body tr:first-child > td {
  border-bottom: 2px solid var(--ink-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em;
}
.page-catalogue-sessions-barclay .content-body > table > tbody > tr:hover > td { background: #fcf3e6; }

/* ---------- Pages « Catalogue des chansons » et « Versions alternatives » : même élargissement ---------- */
.page-catalogue-catalogue .layout,
.page-catalogue-alter .layout,
.page-catalogue-catalogue .layout.no-side,
.page-catalogue-alter .layout.no-side {
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "subnav" "side" "content"; gap: 18px;
}
.page-catalogue-catalogue .subnav,
.page-catalogue-alter .subnav { position: static; }
.page-catalogue-catalogue .subnav-inner,
.page-catalogue-alter .subnav-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; max-height: none;
}
.page-catalogue-catalogue .subnav-inner::before,
.page-catalogue-alter .subnav-inner::before { border: 0; margin: 0; padding: 0 10px 0 6px; }
/* La colonne de droite (date de mise à jour) devient une petite mention sous le menu */
.page-catalogue-catalogue .side,
.page-catalogue-alter .side {
  display: block; background: none; border: 0; box-shadow: none; padding: 0 8px;
  color: var(--muted); font-style: italic;
}
.page-catalogue-catalogue .side br,
.page-catalogue-alter .side br { display: none; }
.page-catalogue-catalogue .content-body,
.page-catalogue-alter .content-body { padding-left: 28px; padding-right: 28px; }

/* ---------- Discographies : sections par année ---------- */
.content-body tr.annee > td,
.content-body > table > tbody > tr.annee > td,
.content-body > table > tbody > tr.annee:hover > td {
  padding: 30px 0 6px; border-top: 0; background: transparent;
}
.content-body table tr.annee:first-child > td { padding-top: 6px; }
.content-body > table > tbody > tr.annee + tr > td,
.content-body table tr.annee + tr > td { border-top: 0; }
.content-body h3.annee-titre {
  margin: 0; padding: 0 0 6px;
  font-family: var(--serif); font-weight: 700; font-size: 1.45rem; line-height: 1.2;
  color: var(--crimson); letter-spacing: .02em;
  border-bottom: 2px solid var(--gold-soft);
}
@media (max-width: 860px) {
  .content-body tr.annee > td { padding-top: 22px; }
  .content-body h3.annee-titre { font-size: 1.25rem; }
}

/* ---------- Discographies : boutons vers les sous-sections ---------- */
.page-tools:has(.saut-sections) { flex-wrap: wrap; }
.saut-sections { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.saut-sections a {
  font: 700 .92rem var(--sans); color: #fff; text-decoration: none; line-height: 1.2;
  padding: 8px 16px; border: 1px solid var(--stage); border-radius: 999px; background: var(--stage);
  box-shadow: 0 1px 2px rgba(34, 28, 25, .15);
  transition: background .15s, border-color .15s;
}
.saut-sections a:hover, .saut-sections a:focus-visible {
  background: var(--crimson); border-color: var(--crimson); color: #fff; outline: none;
}
.content-body h2[id], .content-body table[id] { scroll-margin-top: 190px; }
@media (max-width: 860px) { .content-body h2[id], .content-body table[id] { scroll-margin-top: 165px; } }
