/* Base graphique – Le Livre des Sons */
/* Fond sombre + texte de base */
html, body {
  margin: 0;
  padding: 0;
  background: #121212;   /* anthracite doux */
  color: #e6e6e6;        /* gris clair lisible */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* Hiérarchie typographique */
h1 {
  font-size: 1.9rem;
  font-weight: 500;
  margin: 0.2rem 0 0.6rem 0;
}

h2 {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 2rem 0 0.6rem 0;
}

.id {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.cat {
  font-size: 0.8rem;
  color: #b0b0b0;
  margin-bottom: 1.5rem;
}

p {
  max-width: 720px;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

/* Layout global : centré */
.wrap{
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

/* Typo de base : Arial partout */
html, body{
  font-family: Arial, Helvetica, sans-serif;
}

/* Titres “forts” : serif expressive (présente partout) */
.site-title{
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 2.2rem;
  font-weight: 600;
  margin: 0 0 0.3rem 0;
}

.site-subtitle{
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.1rem;
  font-style: italic;
  color: #cfcfcf;
  margin: 0 0 2rem 0;
  max-width: 760px;
}

/* Bloc étude */
.study-title{
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0.4rem 0 0.6rem 0;
}

.id{
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.cat{
  font-size: 0.9rem;
  font-style: italic;
  color: #bdbdbd;
  margin-bottom: 1.5rem;
}

/* Nav : visible sur fond sombre */
nav a{
  color: #e6e6e6;
  text-decoration: none;
  margin-right: 1rem;
  opacity: 0.85;
}
nav a:hover{
  text-decoration: underline;
  opacity: 1;
}

/* Audio : respirer */
audio{
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0.8rem 0 1.2rem 0;
}

/* NAV : forcer la lisibilité même si un CSS local traîne */
nav { margin-top: 1.6rem; }
nav a, nav a:visited {
  color: #e6e6e6 !important;
  text-decoration: none;
  opacity: 0.9;
}
nav a:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Respiration responsive : plus d'air sur grands écrans */
@media (min-width: 900px) {
  .wrap { padding-top: 72px; padding-bottom: 96px; }
  header { margin-bottom: 3rem; }
  .study-title { margin-top: 0.8rem; margin-bottom: 1rem; }
  .cat { margin-bottom: 2rem; }
  audio { margin-top: 1.2rem; margin-bottom: 1.8rem; }
  nav { margin-top: 2.2rem; }
}

@media (min-width: 1200px) {
  .wrap { max-width: 960px; }
  .site-title { font-size: 2.5rem; }
  .study-title { font-size: 2.1rem; }
  body { font-size: 18px; }
}

/* Espacement global : effet visible partout */
header { margin-bottom: 2.6rem; }

.study-title { margin-top: 0.8rem; margin-bottom: 1.1rem; }
.cat { margin-bottom: 2rem; }

audio { margin-top: 1.4rem; margin-bottom: 1.6rem; }

nav { margin-top: 2rem; display: flex; gap: 1.4rem; flex-wrap: wrap; }
nav a { margin-right: 0 !important; } /* annule les vieux styles */

@media (min-width: 1100px) {
  .wrap { padding-top: 84px; padding-bottom: 110px; }
  header { margin-bottom: 3.4rem; }
  nav { margin-top: 2.6rem; }
}

/* Liens – style éditorial sobre */
a,
a:visited {
  color: #e6e6e6;
  text-decoration: none;
  border-bottom: 1px solid rgba(230,230,230,0.25);
}

a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,0.8);
}

/* Catalogue — hiérarchie chapitres / études */

/* Titres de chapitres (Études laborieuses, etc.) */
section h2 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2.6rem;
  margin-bottom: 0.8rem;
}

/* Liens d’études (Étude 001, 002…) */
section p {
  margin: 0.2rem 0;
}

section p a {
  font-size: 0.95rem;
  font-style: italic;
  color: #d6d6d6;
  border-bottom: 1px solid rgba(214,214,214,0.25);
}

section p a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,0.8);
}

/* "À venir" discret */
section p em {
  font-size: 0.9rem;
  font-style: italic;
  color: #9a9a9a;
}

/* Grille éditoriale — rythme vertical */

:root {
  --rhythm: 0.6rem;
}

/* Blocs principaux alignés sur la grille */
header {
  margin-bottom: calc(var(--rhythm) * 6);
}

.study-title {
  margin-bottom: calc(var(--rhythm) * 2);
}

.cat {
  margin-bottom: calc(var(--rhythm) * 4);
}

section {
  margin-bottom: calc(var(--rhythm) * 5);
}

/* Chapitres */
section h2 {
  margin-top: calc(var(--rhythm) * 4);
  margin-bottom: calc(var(--rhythm) * 2);
}

/* Entrées d’études (liens) */
section p {
  margin: calc(var(--rhythm) * 0.6) 0;
}

/* Navigation et audio (pour les pages d’étude) */
audio {
  margin-top: calc(var(--rhythm) * 3);
  margin-bottom: calc(var(--rhythm) * 4);
}

nav {
  margin-top: calc(var(--rhythm) * 4);
}

/* Fond image — page catalogue (solution robuste) */
body.page-catalogue::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("./image/fond-sommaire.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 68%;
  filter: invert(1) brightness(1);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

/* Voile sombre pour la lisibilité */
body.page-catalogue::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  pointer-events: none;
  z-index: 1;
}

/* Le contenu doit passer AU-DESSUS */
body.page-catalogue .wrap {
  position: relative;
  z-index: 2;
}

/* Zone d’écoute — mise en valeur */
.audio-block {
  margin-top: calc(var(--rhythm) * 4);
  padding-top: calc(var(--rhythm) * 2);
  border-top: 1px solid rgba(255,255,255,0.15);
}

.audio-block p {
  font-size: 0.9rem;
  color: #cfcfcf;
  margin-bottom: 0.6rem;
}

/* Playlist — état actif */
.track-list {
  list-style: none;
  padding: 0;
  margin: 0 0 calc(var(--rhythm) * 2) 0;
}

.track-list li {
  margin: calc(var(--rhythm) * 0.7) 0;
}

.track-list a {
  display: inline-block;
  font-style: italic;
  border-bottom: 1px solid rgba(214,214,214,0.25);
  padding: 2px 0;
}

/* Indication cliquable (toujours visible) */
.track-list a::before {
  content: "▶ ";
  opacity: 0.5;
}

/* État actif */
.track-list a.is-active {
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,0.8);
}

.track-list a.is-active::before {
  opacity: 1;
  letter-spacing: 0.02em;
}

/* Métadonnées du sommaire */
.meta {
  font-size: 0.8rem;
  color: #9a9a9a;
  margin-left: 0.4rem;
  white-space: nowrap;
}

section p {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Contrôles audio custom */
.controls {
  display: flex;
  gap: 0.8rem;
  margin-top: calc(var(--rhythm) * 2);
  flex-wrap: wrap;
}

.ctrl {
  background: transparent;
  color: #e6e6e6;
  border: 1px solid rgba(230,230,230,0.35);
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
}

.ctrl:hover {
  border-color: rgba(255,255,255,0.8);
}

.ctrl:active {
  transform: translateY(1px);
}

/* Signature auteur */
.site-signature {
  margin-top: calc(var(--rhythm) * 6);
  font-size: 0.5rem;
  line-height: 1.4;
  color: #8e8e8e;
  opacity: 0.5;
  text-align: right;
}

/* =========================
   Fonds spécifiques — Études
   ========================= */

/* Base commune à toutes les pages d’étude */
body.page-etude::before {
  content: "";
  position: fixed;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 68%;
  filter: invert(1) brightness(1);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* Voile sombre pour la lisibilité */
body.page-etude::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  pointer-events: none;
  z-index: 1;
}

/* Le contenu passe au-dessus */
body.page-etude .wrap {
  position: relative;
  z-index: 2;
}

/* Étude 001 */
body.etude-001::before {
  background-image: url("./image/fond-etude-001.jpg");
}

/* Étude 002 */
body.etude-002::before {
  background-image: url("./image/fond-etude-002.jpg");
}

/* Étude 003 */
body.etude-003::before {
  background-image: url("./image/fond-etude-003.jpg");
}

/* Étude 004 */
body.etude-004::before {
  background-image: url("./image/fond-etude-004.jpg");
}

/* Étude 005 */
body.etude-005::before {
  background-image: url("./image/fond-etude-005.jpg");
}

/* Étude 006 */
body.etude-006::before {
  background-image: url("./image/fond-etude-006.jpg");
}

/* Étude 007 */
body.etude-007::before {
  background-image: url("./image/fond-etude-007.jpg");
}

/* Étude 008 */
body.etude-008::before {
  filter: none;
  background-image: url("./image/fond-etude-008.jpg");
}

/* Étude 009 */
body.etude-009::before {
  background-image: url("./image/fond-etude-009.jpg");
}

/* Étude 010 */
body.etude-010::before {
  background-image: url("./image/fond-etude-010.jpg");
}

/* Étude 011 */
body.etude-011::before {
  background-image: url("./image/fond-etude-011.jpg");
}

/* Étude 012 */
body.etude-012::before {
  background-image: url("./image/fond-etude-012.jpg");
}

/* Étude 013 */
body.etude-013::before {
  filter: none;
  background-image: url("./image/fond-etude-013.jpg");
}

/* Étude 014 */
body.etude-014::before {
  filter: none;
  background-image: url("./image/fond-etude-014.jpg");
}

/* Étude 015 */
body.etude-015::before {
  filter: none;
  background-image: url("./image/fond-etude-015.jpg");
}
