/* ===================================================
   ANTIGONE — Jean Anouilh — Podcast Littéraire
   Palette : gris ardoise, ocre doré, ivoire, noir
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Lora:ital,wght@0,400;0,500;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ── Variables ── */
:root {
  --bg-main:        #f5f0e8;        /* ivoire chaud */
  --bg-dark:        #1a1a2e;        /* bleu nuit profond */
  --bg-card:        #ffffff;
  --bg-accent:      #2c2c3e;        /* ardoise foncé */
  --color-gold:     #c9a84c;        /* ocre doré */
  --color-gold-lt:  #e8c97a;
  --color-red:      #8b1a1a;        /* rouge tragique */
  --color-text:     #1e1e2e;
  --color-muted:    #5a5a6e;
  --color-light:    #f5f0e8;
  --nav-height:     64px;
  --radius:         8px;
  --shadow:         0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.18);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--bg-main);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}

p { margin-bottom: 1rem; }
a { color: var(--color-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── HEADER ── */
header {
  background: var(--bg-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-brand {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: #aaa;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.header-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-gold);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* ── NAVIGATION ── */
nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

nav a {
  color: #ccc;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

nav a:hover {
  background: rgba(201,168,76,0.15);
  color: var(--color-gold-lt);
  text-decoration: none;
}

nav a.active {
  background: var(--color-gold);
  color: var(--bg-dark);
  font-weight: 600;
}

/* ── HAMBURGER (mobile) ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ccc;
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-accent);
  border-top: 1px solid rgba(201,168,76,0.2);
}

.mobile-menu a {
  color: #ccc;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s, color 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: rgba(201,168,76,0.15);
  color: var(--color-gold-lt);
  text-decoration: none;
}

.mobile-menu a.active {
  background: var(--color-gold);
  color: var(--bg-dark);
  font-weight: 600;
}

.mobile-menu.open { display: flex; }

/* ── FOOTER ── */
footer {
  background: var(--bg-dark);
  color: #888;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
  font-family: 'Source Sans 3', sans-serif;
  margin-top: 4rem;
  border-top: 2px solid var(--color-gold);
}

footer a { color: var(--color-gold); }

/* ── PAGE WRAPPER ── */
.page { display: none; }
.page.active { display: block; }

/* ── HERO SECTION ── */
.hero {
  position: relative;
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  background: var(--bg-dark);
}

.hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center top;
  opacity: 0.88;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(26,26,46,0.92));
  padding: 3rem 2rem 2rem;
  color: #fff;
}

.hero-overlay h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-gold-lt);
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  margin-bottom: 0.3rem;
}

.hero-overlay .subtitle {
  font-family: 'Lora', serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #ddd;
  font-style: italic;
}

/* ── CONTAINER ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── SECTION TITLES ── */
.section-title {
  font-size: 1.75rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-gold);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title .icon { font-size: 1.4rem; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.card-dark {
  background: var(--bg-accent);
  color: #eee;
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

/* ── AUDIO PLAYER ── */
.audio-player {
  background: var(--bg-dark);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.audio-player-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.audio-player-icon {
  width: 42px;
  height: 42px;
  background: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-dark);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.audio-player-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--color-gold-lt);
  font-weight: 600;
}

.audio-player-subtitle {
  font-size: 0.85rem;
  color: #aaa;
  font-style: italic;
}

.audio-player audio {
  width: 100%;
  border-radius: 4px;
  accent-color: var(--color-gold);
}

/* ── DOWNLOAD BUTTONS ── */
.download-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

.download-section h3 {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.download-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-dark);
  color: var(--color-gold-lt);
  border: 1px solid var(--color-gold);
  border-radius: 6px;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  text-decoration: none;
}

.btn-download:hover {
  background: var(--color-gold);
  color: var(--bg-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── VIDEO EMBED ── */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin: 1.5rem 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ── INFOGRAPHIC ── */
.infographic {
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.infographic img {
  width: 100%;
}

/* ── SLIDESHOW ── */
.slideshow-container {
  background: var(--bg-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  margin: 1.5rem 0;
}

.slide-display {
  position: relative;
  text-align: center;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-display img {
  max-width: 100%;
  max-height: 600px;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  margin: 0 auto;
}

.slide-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.btn-slide {
  background: var(--color-gold);
  color: var(--bg-dark);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: 'Source Sans 3', sans-serif;
}

.btn-slide:hover { background: var(--color-gold-lt); transform: translateY(-1px); }
.btn-slide:disabled { background: #555; color: #888; cursor: default; transform: none; }

.slide-counter {
  color: #ccc;
  font-size: 0.95rem;
  font-family: 'Source Sans 3', sans-serif;
  min-width: 60px;
  text-align: center;
}

/* ── FICHE DE LECTURE ── */
.fiche-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--color-gold);
}

.fiche-section h2 {
  font-size: 1.25rem;
  color: var(--color-red);
  margin-bottom: 1rem;
}

.fiche-section ul {
  list-style: none;
  padding: 0;
}

.fiche-section ul li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  border-bottom: 1px solid #f0ebe0;
}

.fiche-section ul li:last-child { border-bottom: none; }

.fiche-section ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-weight: 700;
}

/* ── PERSONNAGES TABLE ── */
.perso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.perso-card {
  background: var(--bg-main);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  border-top: 3px solid var(--color-gold);
}

.perso-card h4 {
  color: var(--color-red);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.perso-card p {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin: 0;
}

/* ── DISCUSSION PAGE ── */
.activite-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border-top: 4px solid var(--color-gold);
}

.activite-card h2 {
  font-size: 1.3rem;
  color: var(--bg-dark);
  margin-bottom: 0.4rem;
}

.activite-type {
  display: inline-block;
  background: var(--color-gold);
  color: var(--bg-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.question-list {
  list-style: none;
  padding: 0;
  counter-reset: q;
}

.question-list li {
  counter-increment: q;
  padding: 0.75rem 0 0.75rem 2.5rem;
  position: relative;
  border-bottom: 1px solid #f0ebe0;
  font-size: 1rem;
}

.question-list li:last-child { border-bottom: none; }

.question-list li::before {
  content: counter(q);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--color-gold);
  color: var(--bg-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.role-card {
  background: var(--bg-main);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--color-gold);
}

.role-card strong { color: var(--color-red); display: block; margin-bottom: 0.25rem; }
.role-card span { font-size: 0.88rem; color: var(--color-muted); }

.prolongement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.prolongement-card {
  background: var(--bg-dark);
  color: #eee;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border-top: 3px solid var(--color-gold);
}

.prolongement-card h4 {
  color: var(--color-gold-lt);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.prolongement-card p, .prolongement-card ul {
  font-size: 0.88rem;
  color: #bbb;
}

.prolongement-card ul { padding-left: 1.2rem; }
.prolongement-card ul li { margin-bottom: 0.25rem; }

.glossaire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.glossaire-item {
  background: var(--bg-main);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

.glossaire-item strong { color: var(--color-red); }

/* ── AUTEUR PAGE ── */
.auteur-hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.auteur-photo {
  flex-shrink: 0;
  width: 260px;
}

.auteur-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  filter: grayscale(20%);
}

.auteur-intro {
  flex: 1;
  min-width: 260px;
}

.auteur-intro h1 {
  font-size: 2.2rem;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.auteur-intro .dates {
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--color-muted);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.timeline {
  border-left: 3px solid var(--color-gold);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.85rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  background: var(--color-gold);
  border-radius: 50%;
  border: 2px solid var(--bg-main);
}

.timeline-year {
  font-weight: 700;
  color: var(--color-gold);
  font-size: 0.9rem;
  font-family: 'Source Sans 3', sans-serif;
}

.timeline-event {
  font-size: 0.95rem;
  color: var(--color-text);
}

.oeuvres-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.oeuvres-table th {
  background: var(--bg-dark);
  color: var(--color-gold-lt);
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
}

.oeuvres-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #e8e0d0;
  vertical-align: top;
}

.oeuvres-table tr:nth-child(even) td { background: #faf7f0; }

.citation-box {
  background: var(--bg-dark);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.75rem;
  margin: 1.5rem 0;
  color: #eee;
}

.citation-box blockquote {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-gold-lt);
  margin-bottom: 0.5rem;
}

.citation-box cite {
  font-size: 0.85rem;
  color: #aaa;
}

.pistes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.piste-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--color-gold);
}

.piste-card h4 { font-size: 0.95rem; color: var(--color-red); margin-bottom: 0.4rem; }
.piste-card p { font-size: 0.85rem; color: var(--color-muted); margin: 0; }

/* ── RAP PAGE ── */
.paroles-container {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.paroles-section {
  margin-bottom: 1.5rem;
}

.paroles-tag {
  display: inline-block;
  background: var(--color-gold);
  color: var(--bg-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.paroles-section p {
  font-family: 'Lora', serif;
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--color-text);
  margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
  nav { display: none; }
  .hamburger { display: flex; }

  .header-inner {
    gap: 0.75rem;
  }

  .header-brand { font-size: 0.8rem; }
  .header-title { font-size: 0.85rem; }

  .hero-overlay h1 { font-size: 1.6rem; }
  .hero-overlay .subtitle { font-size: 0.95rem; }

  .auteur-hero { flex-direction: column; }
  .auteur-photo { width: 100%; max-width: 280px; }

  .container, .container-wide { padding: 1.5rem 1rem; }
  .card, .card-dark, .fiche-section, .activite-card { padding: 1.25rem 1.25rem; }
  .audio-player { padding: 1.25rem 1.25rem; }

  .slide-controls { gap: 0.75rem; }
  .btn-slide { padding: 0.5rem 1rem; font-size: 0.85rem; }
}

@media (min-width: 768px) {
  .hamburger { display: none; }
  nav { display: flex; }
  .mobile-menu { display: none !important; }
}

/* ── UTILITY ── */
.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-muted); }
.italic { font-style: italic; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.highlight-box {
  background: linear-gradient(135deg, #fff8e7, #fff3d0);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.highlight-box p { margin: 0; font-size: 0.95rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-gold { background: var(--color-gold); color: var(--bg-dark); }
.badge-dark { background: var(--bg-dark); color: var(--color-gold-lt); }
.badge-red  { background: var(--color-red); color: #fff; }
