/* ==========================================================
   Thème : modifier uniquement ces variables pour changer le look
   ========================================================== */
:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --surface-2: #f2ece1;
  --text: #1f2a37;
  --muted: #6b7686;
  --primary: #0f5c78;
  --primary-dark: #0a4258;
  --primary-soft: #dcedf3;
  --accent: #e4572e;
  --border: #e5dccb;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(31, 42, 55, .08);
  --shadow-lg: 0 20px 60px rgba(31, 42, 55, .28);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-title: Georgia, "Times New Roman", serif;
  --map-sea: #d9ecf3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.5;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { width: min(1100px, 100% - 2rem); margin-inline: auto; }
[hidden] { display: none !important; }
.ico { display: inline-flex; width: 1.2em; height: 1.2em; }
.ico svg { width: 100%; height: 100%; fill: currentColor; }

/* ---------- En-tête ---------- */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; padding-top: .6rem;
  position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(10, 30, 40, .25);
}
.header-inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .9rem; }
.brand-mark {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--accent); font-size: 1.3rem;
}
h1 { margin: 0; font-family: var(--font-title); font-size: 1.4rem; letter-spacing: .01em; }
.tagline { margin: 0; opacity: .85; font-size: .9rem; min-height: 1.4em; }

.mode-switch { border: 0; margin: 0; padding: 0; display: flex; gap: .25rem; align-items: center; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: .25rem; }
.mode-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mode-switch label span { display: block; padding: .35rem .9rem; border-radius: 999px; cursor: pointer; font-size: .9rem; }
.mode-switch input { position: absolute; opacity: 0; }
.mode-switch input:checked + span { background: #fff; color: var(--primary-dark); font-weight: 600; }
.mode-switch input:focus-visible + span { outline: 3px solid var(--accent); }

.page-menu { display: flex; gap: .4rem; margin-bottom: .6rem; flex-wrap: wrap; }
.page-menu a {
  color: rgba(255, 255, 255, .85); text-decoration: none; padding: .35rem 1rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35); font-size: .9rem; font-weight: 500;
}
.page-menu a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.page-menu a[aria-current="page"] { background: #fff; color: var(--primary-dark); border-color: #fff; font-weight: 700; }
.header-end { height: 1rem; }

.tabs { display: flex; gap: .25rem; margin-top: .6rem; overflow-x: auto; }
.tab {
  background: transparent; border: 0; color: rgba(255, 255, 255, .8); padding: .5rem 1.2rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0; white-space: nowrap; font-weight: 500;
}
.tab:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.tab[aria-selected="true"] { background: var(--bg); color: var(--primary-dark); font-weight: 700; }

main { padding: 1.5rem 0 3rem; min-height: 60vh; }

/* ---------- Barre d'outils, recherche, lettres ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.search {
  flex: 1 1 280px; padding: .8rem 1rem .8rem 1rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font: inherit; box-shadow: var(--shadow);
}
.search:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.result-count { margin: 0; color: var(--muted); font-size: .95rem; }

.letters { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.25rem; }
.letter {
  min-width: 2.2rem; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-weight: 600; transition: background .15s, color .15s, transform .15s;
}
.letter:hover:not(:disabled) { background: var(--primary-soft); transform: translateY(-1px); }
.letter.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.letter:disabled { opacity: .35; }
/* Recherche + lettres : restent visibles sous l'en-tête fixe (--header-h mesurée en JS) */
.sticky-bar {
  position: sticky; top: var(--header-h, 0px); z-index: 10; background: var(--bg);
  padding: .5rem 0 .1rem; margin-bottom: .75rem; border-bottom: 1px solid var(--border);
}
.sticky-bar .toolbar { margin-bottom: .45rem; gap: .75rem; }
.sticky-bar .search { padding: .5rem 1rem; }
.sticky-bar .letters { margin-bottom: .45rem; gap: .25rem; }
.sticky-bar .letter { min-width: 1.9rem; padding: .2rem .4rem; font-size: .9rem; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.2rem; margin-bottom: .45rem; }
.filter { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.filter-row span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.type-filter { min-width: 0; max-width: 100%; padding: .35rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font: inherit; }

@media (max-height: 420px) {
  .site-header, .sticky-bar { position: static; }
  .tagline { display: none; }
}

/* ---------- Cartes de danses ---------- */
.dance-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.dance-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .6rem;
  transition: transform .15s, box-shadow .15s;
}
.dance-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 42, 55, .12); }
.dance-name {
  align-self: flex-start; background: none; border: 0; padding: 0; text-align: left;
  font-family: var(--font-title); font-size: 1.2rem; font-weight: 700; color: var(--primary-dark);
}
.dance-name::before { content: "▶"; font-size: .7em; margin-right: .5rem; color: var(--accent); }
.dance-name:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.dance-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.dance-count { color: var(--muted); font-size: .9rem; white-space: nowrap; }

/* Vue « par partie de danse » : noms seuls */
.part-list { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.part-name {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: .6rem .9rem; text-align: left; font-family: var(--font-title); font-size: 1.05rem; font-weight: 700; color: var(--primary-dark);
  transition: transform .15s, box-shadow .15s;
}
.part-name::before { content: "▶"; font-size: .7em; margin-right: .5rem; color: var(--accent); }
.part-name:hover, .part-name:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(31, 42, 55, .12); }
.part-name:hover .part-label, .part-name:focus-visible .part-label { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.part-terroirs { display: block; margin: .2rem 0 0 1.2rem; font-family: var(--font); font-size: .8rem; font-weight: 400; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; flex-direction: column; padding: .25rem .65rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid transparent; font-size: .88rem; line-height: 1.2; text-align: left;
}
.chip small { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.chip-link { background: var(--primary-soft); cursor: pointer; }
.chip-link:hover { border-color: var(--primary); }
.chip-link small { color: var(--primary); }
a.chip { color: inherit; text-decoration: none; }
.chip-site { max-width: min(22rem, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.group { margin-bottom: 1.75rem; scroll-margin-top: calc(var(--header-h, 0px) + var(--bar-h, 0px) + .5rem); }
.group-title {
  margin: 0 0 .6rem; font-family: var(--font-title); font-size: 1.6rem; color: var(--accent);
  border-bottom: 2px solid var(--border); padding-bottom: .2rem;
}
.empty { color: var(--muted); padding: 1.5rem; text-align: center; }
.group-count { margin-left: .8rem; font-family: var(--font); font-size: .9rem; font-weight: 400; color: var(--muted); }

/* ---------- Vue par album ---------- */
.album-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.album-card {
  display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.album-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 42, 55, .12); }
.album-cover-btn { flex: none; align-self: flex-start; padding: 0; border: 0; background: none; border-radius: var(--radius-sm); overflow: hidden; line-height: 0; box-shadow: 0 6px 16px rgba(31, 42, 55, .25); }
.album-cover-btn img { width: 110px; height: 110px; object-fit: cover; transition: transform .2s; }
.album-cover-btn:hover img { transform: scale(1.06); }
.album-info { min-width: 0; flex: 1; }
.link-btn { background: none; border: 0; padding: 0; text-align: left; color: var(--primary); font-weight: 600; }
.link-btn:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.link-btn.album-name { font-family: var(--font-title); font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); margin-bottom: .4rem; display: block; }
.album-meta { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin: 0; font-size: .92rem; }
.album-meta dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; align-self: center; }
.album-meta dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.album-meta small { color: var(--muted); text-transform: capitalize; }
/* ---------- Médiathèque ---------- */
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.media-card {
  --cat: var(--primary); display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.media-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 42, 55, .12); }
.media-card[data-cat="dvd-spectacle"] { --cat: #c2410c; }
.media-card[data-cat="dvd-apprentissage"] { --cat: #0f766e; }
.media-card[data-cat="vhs"] { --cat: #6d28d9; }
.media-card[data-cat="livre"] { --cat: #a16207; }
.media-zoom { flex: none; align-self: flex-start; padding: 0; border: 0; background: none; line-height: 0; border-radius: var(--radius-sm); cursor: zoom-in; position: relative; }
.media-zoom::after {
  content: "\2315"; position: absolute; right: .3rem; bottom: .3rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; line-height: 1;
  border-radius: 50%; background: rgba(20, 28, 38, .75); color: #fff; font-size: .9rem; opacity: 0; transition: opacity .15s;
}
.media-zoom:hover::after, .media-zoom:focus-visible::after { opacity: 1; }
.media-zoom:hover .media-img { transform: scale(1.03); }
.media-img { transition: transform .15s; }
.lightbox { padding: 1rem; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); max-width: 92vw; max-height: 92vh; overflow: auto; }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; gap: .8rem; animation: pop .2s ease-out; }
.lightbox::backdrop { background: rgba(10, 30, 40, .7); backdrop-filter: blur(3px); }
.lightbox img { display: block; height: min(78vh, 720px); width: auto; max-width: 86vw; border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.lightbox-close { align-self: flex-end; }
.lightbox-caption { margin: 0; text-align: center; color: var(--muted); }
.lightbox-caption strong { color: var(--primary-dark); font-family: var(--font-title); }
.media-img { flex: none; width: 100px; height: 142px; border-radius: var(--radius-sm); object-fit: cover; box-shadow: 0 6px 16px rgba(31, 42, 55, .25); background: var(--surface-2); }
.media-body { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.media-badge { align-self: flex-start; background: var(--cat); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.media-title { margin: 0; font-family: var(--font-title); font-size: 1.15rem; color: var(--primary-dark); }
.media-meta { margin: 0; color: var(--muted); font-size: .85rem; }
.media-desc { margin: 0; font-size: .92rem; white-space: pre-line; overflow-wrap: anywhere; }

.tile-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.album-tile { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .8rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.album-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 42, 55, .12); }
.album-tile .album-cover-btn img { width: 72px; height: 72px; }
.album-tile .link-btn.album-name { margin: 0; font-size: 1.05rem; }
.album-tile .album-info { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; }
.api-error { background: #fdecea; color: #8a1c13; border-bottom: 1px solid #f5b5ae; padding: .7rem 1rem; text-align: center; font-weight: 600; }
.load-status { text-align: center; color: var(--muted); font-size: .9rem; min-height: 1.5rem; margin: 1rem 0 0; }
.sentinel { height: 1px; }
.link-btn.type-link { font-size: .8rem; font-weight: 500; color: var(--muted); background: var(--surface-2); padding: .05rem .5rem; border-radius: 999px; }
.link-btn.type-link:hover { color: var(--primary-dark); background: var(--primary-soft); }

/* ---------- Accueil ---------- */
.block { margin-bottom: 2.5rem; }
.block-title { margin: 0 0 1rem; font-family: var(--font-title); font-size: 1.5rem; color: var(--primary-dark); display: flex; align-items: center; gap: .6rem; }
.block-title::after { content: ""; flex: 1; height: 2px; background: var(--border); }

/* ---------- Bloc d'en-tête de l'accueil ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hero-player { align-items: flex-start; padding: 1.4rem 1.5rem; }
.hero-player .now-cover { width: 110px; height: 110px; }
.hero-kicker { color: #ffd2c2; }
.hero-meta { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; margin: .4rem 0 .9rem; font-size: .9rem; }
.hero-meta dt { opacity: .7; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; align-self: center; }
.hero-meta dd { margin: 0; }
.link-btn.hero-link { color: #fff; font-weight: 500; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 3px; }
.link-btn.hero-link:hover { text-decoration-color: var(--accent); }
.hero-news { display: flex; }
.hero-feature { display: flex; flex-direction: column; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.hero-feature:hover .news-title { text-decoration: underline; text-decoration-color: var(--accent); }
.hero-feature:hover .news-more { text-decoration: underline; }
.hero-feature img { width: 100%; height: 150px; object-fit: cover; }
.hero-feature-body { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1.2rem 1.1rem; flex: 1; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hero-player { flex-direction: column; } }

.new-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.new-album { display: flex; flex-direction: column; gap: .15rem; }
.new-cover {
  position: relative; padding: 0; border: 0; background: none; line-height: 0; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 8px 22px rgba(31, 42, 55, .22); margin-bottom: .5rem; transition: transform .2s, box-shadow .2s;
}
button.new-cover:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31, 42, 55, .3); }
.new-cover img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.badge { position: absolute; top: .5rem; left: .5rem; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; padding: .3rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.link-btn.new-title { font-family: var(--font-title); font-weight: 700; font-size: 1.05rem; color: var(--primary-dark); }
.link-btn.new-artist { font-weight: 500; font-size: .9rem; }
span.new-title { font-family: var(--font-title); font-weight: 700; font-size: 1.05rem; color: var(--primary-dark); }
span.new-artist { font-weight: 500; font-size: .9rem; }
.new-year { color: var(--muted); text-transform: capitalize; }

.news-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .news-grid { grid-template-columns: 1fr; } }
.news-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31, 42, 55, .15); }
.news-btn { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 0; background: none; text-align: left; }
.news-btn img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.news-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.news-title { font-family: var(--font-title); font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); }
.news-summary { color: var(--muted); font-size: .95rem; }
.live-line { font-size: .85rem; font-weight: 600; color: var(--primary-dark); background: var(--primary-soft); padding: .3rem .6rem; border-radius: var(--radius-sm); }
.news-more { margin-top: auto; padding-top: .4rem; color: var(--accent); font-weight: 600; font-size: .9rem; }
.news-btn:hover .news-more { text-decoration: underline; }

.article { padding: 0 0 1rem; }
.article-img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.article-text { padding: 1.25rem 1.5rem 0; }
.article-text p { margin: 0 0 1rem; }
.live-tiles { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tile { flex: 1 1 160px; background: var(--primary-soft); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; }
.tile strong { font-size: 1.9rem; font-family: var(--font-title); color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: .85rem; }
.live h3 { margin: 0 0 .5rem; font-size: 1rem; }
.live-top { margin: 0; padding-left: 1.4rem; display: grid; gap: .4rem; }
.live-top li { padding-left: .3rem; }
.live-top li::marker { color: var(--accent); font-weight: 700; }
.live-title { font-weight: 600; margin-right: .5rem; }
.live-top small { color: var(--muted); }
.live-plays { float: right; font-variant-numeric: tabular-nums; color: var(--primary-dark); font-weight: 600; }
.article-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.5rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.nav-btn { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.nav-btn:hover { background: var(--primary-soft); border-color: var(--primary); }
.article-dots { display: flex; gap: .5rem; }
.dot { width: .8rem; height: .8rem; padding: 0; border-radius: 50%; border: 0; background: var(--border); }
.dot:hover { background: var(--muted); }
.dot[aria-current="true"] { background: var(--accent); transform: scale(1.25); }

/* ---------- Vue par artiste ---------- */
.artist-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.artist-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .5rem; transition: transform .15s, box-shadow .15s;
}
.artist-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 42, 55, .12); }
.artist-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.link-btn.artist-name { font-family: var(--font-title); font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); }
.artist-label { margin: 0; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.artist-albums { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.artist-album {
  width: 100%; display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem; border: 1px solid transparent;
  border-radius: var(--radius-sm); background: var(--surface-2); text-align: left;
}
.artist-album:hover { border-color: var(--primary); background: var(--primary-soft); }
.artist-album img { width: 36px; height: 36px; border-radius: 5px; object-fit: cover; flex: none; }
.artist-album span { flex: 1; font-weight: 600; min-width: 0; }
.artist-album small { color: var(--muted); }
.artist-site { margin-top: auto; padding-top: .3rem; color: var(--primary); font-size: .9rem; word-break: break-all; }
.artist-site::before { content: "↗"; margin-right: .35rem; color: var(--accent); }
.type-artists { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.type-artists li { display: flex; flex-direction: column; padding: .4rem .6rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.type-artists .artist-site { margin-top: 0; padding-top: 0; font-size: .85rem; }

/* ---------- Carte interactive ---------- */
.map-layout { --op: .55; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.1rem; align-items: start; }
.map-stage { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; line-height: 0; }
.map-stage img { display: block; width: 100%; height: auto; }
.map-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-zone { fill-opacity: var(--op); cursor: pointer; outline: none; transition: fill-opacity .12s; }
svg.plain .map-zone { fill-opacity: 0; }
.map-zone:hover, .map-zone:focus-visible { fill-opacity: .85; }
svg.plain .map-zone:hover, svg.plain .map-zone:focus-visible { fill-opacity: .6; }
.map-hl { pointer-events: none; fill-opacity: .15; filter: drop-shadow(0 0 1.2px #000) drop-shadow(0 0 1px #000); }
.map-sel { pointer-events: none; fill-opacity: .5; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #000) drop-shadow(0 0 1px #000); }
svg.plain .map-sel { fill-opacity: .35; }
.map-tip {
  position: absolute; z-index: 5; pointer-events: none; transform: translate(12px, 14px); display: none; white-space: nowrap;
  background: rgba(20, 28, 38, .92); color: #fff; padding: .4rem .65rem; border-radius: var(--radius-sm); font-size: .85rem; line-height: 1.3;
}
.map-tip small { display: block; opacity: .75; }

.map-side { display: flex; flex-direction: column; gap: .8rem; }
.map-card-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow); }
.map-card-box h2 { margin: 0 0 .5rem; font-size: 1rem; font-family: var(--font-title); color: var(--primary-dark); }
.map-controls { display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; }
.map-controls label { display: flex; align-items: center; gap: .5rem; }
.map-controls input[type=range] { flex: 1; accent-color: var(--primary); }
.map-controls input[type=checkbox] { accent-color: var(--primary); width: 1.05rem; height: 1.05rem; }
.map-empty { margin: .3rem 0; color: var(--muted); font-size: .9rem; }
.map-name { display: flex; align-items: center; gap: .5rem; font-family: var(--font-title); font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); }
.map-sw { width: 1rem; height: 1rem; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .3); flex: none; display: inline-block; }
.map-dl { margin: .5rem 0; display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; font-size: .9rem; }
.map-dl dt { color: var(--muted); }
.map-dl dd { margin: 0; }
.map-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 .6rem; }
.map-btn, .map-chip { font-size: .85rem; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .2rem .7rem; }
.map-btn:hover, .map-chip:hover { border-color: var(--primary); color: var(--primary); }
.map-btn-main { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; padding: .4rem 1rem; margin: .3rem .4rem .3rem 0; }
.map-btn-main:hover { background: #f06a40; border-color: #f06a40; color: #fff; }
.map-search { width: 100%; padding: .45rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-size: .9rem; margin-bottom: .5rem; }
.map-legend { max-height: 46vh; overflow: auto; }
.map-legend h3 { margin: .7rem 0 .2rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.map-legend h3:first-child { margin-top: 0; }
.map-lg { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; font-size: .9rem; border: 0; background: transparent; padding: .2rem .4rem; border-radius: 6px; }
.map-lg:hover, .map-lg:focus-visible, .map-lg.on { background: var(--primary-soft); outline: none; }
.map-lg.on { font-weight: 700; }

/* ---------- Lecteur ---------- */
.inline-player {
  margin-bottom: 1.5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h, 0px) + 1rem);
}
.player-dialog {
  width: min(980px, 94vw); max-height: 90vh; padding: 0; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden;
}
.player-dialog[open] { display: flex; flex-direction: column; animation: pop .2s ease-out; }
.player-dialog::backdrop { background: rgba(10, 30, 40, .55); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.player { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
.player-dialog .player { max-height: 90vh; }
.player-head { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem 1rem; }
.kicker { margin: 0; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; color: var(--accent); font-weight: 700; }
.player-head h2 { margin: .1rem 0 .6rem; font-family: var(--font-title); font-size: 1.6rem; color: var(--primary-dark); }
.icon-btn { align-self: flex-start; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); }
.icon-btn:hover { background: var(--surface-2); }

.now {
  display: flex; gap: 1.25rem; align-items: center; padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff;
}
.now-cover { width: 96px; height: 96px; border-radius: var(--radius-sm); object-fit: cover; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); flex: none; background: #d7dfe6; }
.now-body { flex: 1; min-width: 0; }
.now-title { margin: 0; font-family: var(--font-title); font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-sub { margin: .1rem 0 .7rem; opacity: .85; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-controls { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ctl { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; }
.ctl:hover { background: rgba(255, 255, 255, .3); }
.ctl-main { width: 3.2rem; height: 3.2rem; background: var(--accent); }
.ctl-main:hover { background: #f06a40; }
.ctl-main .ico, .row-play .ico { grid-area: 1 / 1; }
.progress { display: flex; align-items: center; gap: .6rem; flex: 1 1 240px; min-width: 200px; }
.time { font-variant-numeric: tabular-nums; font-size: .8rem; opacity: .9; min-width: 2.4em; }

/* Bascule play / pause */
.ico:nth-of-type(2) { display: none; }
.is-playing .ctl-main .ico:nth-of-type(1), .is-playing.track-row .row-play .ico:nth-of-type(1) { display: none; }
.is-playing .ctl-main .ico:nth-of-type(2), .is-playing.track-row .row-play .ico:nth-of-type(2) { display: inline-flex; }

.seek { --pos: 0%; flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; cursor: pointer;
  background: linear-gradient(to right, var(--accent) var(--pos), rgba(255, 255, 255, .3) var(--pos)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }

/* ---------- Tableau des morceaux ---------- */
.tracks-status { margin: 0; padding: .7rem 1rem; text-align: center; color: var(--muted); font-size: .85rem; }
.inline-player .table-wrap { max-height: 70vh; }
.table-wrap { overflow: auto; min-height: 0; flex: 1; }
.tracks { width: 100%; border-collapse: collapse; }
.tracks th {
  position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 0; z-index: 1;
  border-bottom: 1px solid var(--border);
}
.sort-btn { width: 100%; text-align: left; background: none; border: 0; padding: .7rem 1rem; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sort-btn:hover { color: var(--primary-dark); }
.arrow::after { content: "↕"; margin-left: .4rem; opacity: .35; }
th[aria-sort="ascending"] .arrow::after { content: "↑"; opacity: 1; color: var(--accent); }
th[aria-sort="descending"] .arrow::after { content: "↓"; opacity: 1; color: var(--accent); }
th[aria-sort] .sort-btn { color: var(--text); }
.tracks td { padding: .55rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.track-row { cursor: pointer; transition: background .12s; }
.track-row:hover { background: var(--primary-soft); }
.track-row.is-current { background: #fff1ea; }
.track-row.is-current .cell-title { color: var(--accent); }
.cell-title { font-weight: 600; }
.col-play { width: 3rem; padding-right: 0 !important; }
.row-play { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--primary-dark); }
.track-row.is-current .row-play { background: var(--accent); border-color: var(--accent); color: #fff; }
.album-cell { display: flex; align-items: center; gap: .7rem; }
.album-cell img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.album-title { font-weight: 500; }
.album-cell small { color: var(--muted); text-transform: capitalize; }

/* ---------- Pied de page ---------- */
.site-footer { padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }
.site-footer p { margin: .15rem 0; }
.site-footer p { overflow-wrap: anywhere; }
.site-footer a { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .map-layout { grid-template-columns: 1fr; }
  .now { flex-direction: column; align-items: stretch; text-align: center; }
  .now-cover { align-self: center; }
  .now-controls { justify-content: center; }
  .tracks td, .sort-btn { padding-inline: .6rem; }
  .player-head h2 { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Page Statistiques ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.stat-grid-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.stat-card {
  display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; background: var(--surface);
  border: 1px solid var(--border); border-top: 4px solid var(--primary); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-card:nth-child(even) { border-top-color: var(--accent); }
.stat-number { font-family: var(--font-title); font-size: 2rem; line-height: 1.1; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .9rem; }
.stat-card-wide .stat-label { order: -1; color: var(--text); font-weight: 600; }
.stat-sub { color: var(--muted); font-size: .85rem; }
.bars-track { display: block; height: .55rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bars-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.meter { margin-top: .5rem; }
.stat-detail { margin-top: .6rem; font-size: .88rem; }
.stat-detail summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.bars { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .35rem; max-height: 18rem; overflow-y: auto; }
.bars li { display: grid; grid-template-columns: minmax(0, 11rem) 1fr auto; gap: .5rem; align-items: center; }
.bars-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars-value { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 2.5ch; text-align: right; }

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem 1.2rem; }
.chart-caption { margin: 0 0 1rem; color: var(--muted); }
.chart-caption strong { color: var(--accent); }
.chart-scroll { overflow-x: auto; padding: .8rem 0 .3rem; }
.chart { --h: 240px; min-width: calc(var(--n) * 28px + 2.6rem); padding-left: 2.6rem; }
.chart-area { position: relative; height: var(--h); }
.chart-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--border); }
.chart-line:first-child { border-top: 2px solid var(--border); }
.chart-line span { position: absolute; left: -2.6rem; width: 2.2rem; text-align: right; top: -.6rem; font-size: .75rem; color: var(--muted); }
.chart-cols { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 4px; }
.chart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.chart-value { font-size: .72rem; color: var(--muted); line-height: 1.4; }
.chart-bar {
  display: block; width: 100%; max-width: 34px; min-height: 0; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #2a9bc2, var(--primary)); transition: filter .15s, transform .15s; transform-origin: bottom;
}
.chart-col:hover .chart-bar { filter: brightness(1.15); transform: scaleX(1.08); }
.chart-col.is-best .chart-bar { background: linear-gradient(180deg, #ff8a5c, var(--accent)); }
.chart-col.is-best .chart-value { color: var(--accent); font-weight: 700; }
.chart-axis { display: flex; gap: 4px; margin-top: .35rem; }
.chart-axis span { flex: 1; min-width: 0; text-align: center; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: visible; }

.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.top-item {
  display: grid; grid-template-columns: 2.4rem 1fr auto; gap: .9rem; align-items: center; padding: .7rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.top-rank {
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-weight: 700;
  background: var(--primary-soft); color: var(--primary-dark);
}
.rank-1 .top-rank { background: #f6c945; color: #5b4300; }
.rank-2 .top-rank { background: #cfd5dc; color: #3a4350; }
.rank-3 .top-rank { background: #d9995f; color: #4a2a08; }
.top-info { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.top-info strong { overflow-wrap: anywhere; }
.top-info small { color: var(--muted); }
.top-info .bars-track { margin-top: .25rem; height: .4rem; }
.top-plays { text-align: right; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.top-plays b { display: block; font-size: 1.2rem; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .top-item { grid-template-columns: 2.2rem 1fr; }
  .top-plays { grid-column: 2; text-align: left; }
  .top-plays b { display: inline; }
}
/* ---------- Article « Qui suis-je ? » : photos et organismes ---------- */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 260px)); gap: .6rem; padding: 1rem 1.5rem 0; }
.photo-thumb { padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); cursor: zoom-in; }
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.photo-thumb:hover img, .photo-thumb:focus-visible img { transform: scale(1.06); }
.org { margin: 0 0 1.3rem; }
.org h3 { margin: 0; font-size: 1.05rem; color: var(--primary-dark); }
.org-role { margin: .1rem 0 .4rem !important; color: var(--muted); }
.org ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .15rem; }
.org a { color: var(--primary); overflow-wrap: anywhere; }
.pv { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.pv::backdrop { background: rgba(0, 0, 0, .85); }
.pv-img { display: block; max-width: 94vw; max-height: 86vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); cursor: zoom-out; }
.pv-count { display: block; margin-top: .5rem; text-align: center; color: #fff; font-size: .9rem; }
.pv-btn { position: fixed; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--text); font-size: 1.5rem; line-height: 1; }
.pv-btn:hover { background: #fff; }
.pv-close { top: 1rem; right: 1rem; }
.pv-prev { top: 50%; left: 1rem; transform: translateY(-50%); }
.pv-next { top: 50%; right: 1rem; transform: translateY(-50%); }
.article-text h3.article-sub { margin: 1.4rem 0 .5rem; font-size: 1.1rem; color: var(--primary-dark); }
.article-text a { color: var(--primary); overflow-wrap: anywhere; }
.embed-wrap { display: flex; justify-content: center; padding-top: .4rem; }
.embed-wrap iframe { border: 0; width: 100%; max-width: 280px; height: 216px; }
.info-photo { display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; }
.news-btn .info-photo img { object-fit: contain; background: #000; }
.info-links { margin: .6rem 0 0; }
.info-links a { color: var(--primary); }
.map-label { font: 700 22px var(--font); fill: #000; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; paint-order: stroke; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.map-main { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.map-other .map-empty { margin: 0 0 .5rem; }
.map-other-list { max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .1rem .6rem; }
.map-lg:disabled { opacity: .5; cursor: not-allowed; }
.map-lg:disabled:hover { background: transparent; }
.map-sw-none { background: repeating-linear-gradient(45deg, #c9ced4, #c9ced4 3px, #eef0f2 3px, #eef0f2 6px); }

/* Lecteur : recherche + accès par lettre */
.player-tools { flex: none; display: grid; gap: .45rem; padding: .7rem 1.5rem .5rem; border-bottom: 1px solid var(--border); }
.player-tools[hidden] { display: none; }
.player-search-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.player-tools .search { padding: .45rem 1rem; }
.player-letters { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.player-letters .letters { margin: 0; gap: .25rem; }
.player-tools .letter { min-width: 1.8rem; padding: .15rem .35rem; font-size: .85rem; }
.player-letter-label { color: var(--muted); font-size: .8rem; margin-right: .4rem; text-transform: uppercase; letter-spacing: .04em; }
