/* ============================================================
   Jean-Luc Persécuté — Podcast Littéraire
   Palette inspirée de l'aquarelle hivernale :
   - Blanc neige / bleu glacier / brun terre / ocre chaud
   ============================================================ */

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

/* ── Variables ── */
:root {
  --col-dark:       #1e2a35;   /* bleu nuit profond */
  --col-mid:        #2e4057;   /* bleu ardoise */
  --col-accent:     #7a9bb5;   /* bleu glacier */
  --col-warm:       #b5845a;   /* brun terre / ocre */
  --col-warm-light: #d4a574;   /* ocre clair */
  --col-snow:       #f0f4f7;   /* blanc neige */
  --col-snow-warm:  #f5f0e8;   /* blanc crème */
  --col-text:       #2c2c2c;
  --col-text-light: #5a6a7a;
  --col-border:     #c8d8e4;
  --nav-height:     64px;
  --radius:         8px;
  --shadow:         0 2px 12px rgba(30,42,53,0.12);
  --shadow-lg:      0 6px 32px rgba(30,42,53,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-color: var(--col-snow);
  color: var(--col-text);
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--col-dark);
  line-height: 1.25;
}

p { margin-bottom: 1rem; }

a { color: var(--col-mid); text-decoration: none; }
a:hover { color: var(--col-warm); }

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

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--col-dark);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
}

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

.header-brand .separator {
  color: #4a6070;
  font-size: 1rem;
}

.header-brand .podcast-label {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 400;
  color: #d4e4f0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

.site-nav a {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: #c0d4e0;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.site-nav a:hover {
  color: #fff;
  background-color: rgba(122,155,181,0.2);
  border-color: rgba(122,155,181,0.4);
}

.site-nav a.active {
  background-color: var(--col-accent);
  color: #fff;
  border-color: var(--col-accent);
}

/* ── Hamburger (mobile) ── */
.hamburger {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

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

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Dropdown Menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: var(--col-dark);
  z-index: 99;
  padding: 0.5rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border-top: 1px solid rgba(122,155,181,0.2);
}

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

.mobile-menu a {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  color: #c0d4e0;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid rgba(122,155,181,0.1);
  transition: background 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background-color: rgba(122,155,181,0.15);
  color: #fff;
}

.mobile-menu a.active { color: var(--col-accent); font-weight: 600; }

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

/* ── Main content ── */
.page-content {
  min-height: calc(100vh - var(--nav-height) - 60px);
  padding: 0 0 3rem;
}

/* ── Hero Section ── */
.hero {
  position: relative;
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  background-color: var(--col-dark);
}

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

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(30,42,53,0.85) 0%, transparent 100%);
  padding: 2.5rem 2rem 2rem;
  color: #fff;
}

.hero-overlay h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-bottom: 0.3rem;
}

.hero-overlay .author-name {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  color: var(--col-warm-light);
  font-style: italic;
}

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

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

/* ── Section titles ── */
.section-title {
  font-size: 1.6rem;
  color: var(--col-dark);
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--col-accent);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title .icon {
  color: var(--col-warm);
  font-size: 1.3rem;
}

/* ── Audio Player ── */
.audio-player-wrapper {
  background: linear-gradient(135deg, var(--col-dark) 0%, var(--col-mid) 100%);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-lg);
}

.audio-player-wrapper .player-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #d4e4f0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-player-wrapper .player-label::before {
  content: '▶';
  color: var(--col-warm-light);
  font-size: 0.9rem;
}

.audio-player-wrapper audio {
  width: 100%;
  height: 40px;
  border-radius: 4px;
}

/* Style the native audio player */
.audio-player-wrapper audio::-webkit-media-controls-panel {
  background-color: rgba(255,255,255,0.1);
}

.audio-player-wrapper .player-desc {
  font-size: 0.85rem;
  color: #8aacbe;
  margin-top: 0.6rem;
  font-style: italic;
}

/* ── Cards / Thematic boxes ── */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--col-accent);
  margin-bottom: 1.2rem;
}

.card.warm { border-left-color: var(--col-warm); }
.card.dark { border-left-color: var(--col-dark); }

.card h3 {
  font-size: 1.1rem;
  color: var(--col-mid);
  margin-bottom: 0.5rem;
}

/* ── Download Buttons ── */
.download-section {
  background-color: var(--col-snow-warm);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border: 1px solid var(--col-border);
}

.download-section h3 {
  font-size: 1rem;
  color: var(--col-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
}

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

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--col-mid);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(46,64,87,0.25);
}

.btn-download:hover {
  background-color: var(--col-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46,64,87,0.35);
}

.btn-download .icon {
  font-size: 1rem;
}

/* ── Table ── */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}

.styled-table th {
  background-color: var(--col-mid);
  color: #fff;
  padding: 0.7rem 1rem;
  text-align: left;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
}

.styled-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--col-border);
}

.styled-table tr:nth-child(even) td { background-color: var(--col-snow); }
.styled-table tr:hover td { background-color: #e8f0f6; }

/* ── Discussion / Activity boxes ── */
.activity-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--col-warm);
}

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

.activity-box .activity-number {
  background-color: var(--col-warm);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.activity-box .activity-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--col-dark);
}

.activity-box .activity-type {
  font-size: 0.8rem;
  color: var(--col-text-light);
  font-style: italic;
  margin-bottom: 0.75rem;
}

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

.question-list li {
  padding: 0.6rem 0 0.6rem 1.5rem;
  border-bottom: 1px solid var(--col-border);
  position: relative;
  font-size: 0.97rem;
}

.question-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--col-warm);
  font-weight: 700;
}

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

/* ── Role cards ── */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.role-card {
  background: var(--col-snow);
  border: 2px solid var(--col-border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-align: center;
}

.role-card .role-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }
.role-card .role-name { font-weight: 600; font-size: 0.9rem; color: var(--col-dark); }
.role-card .role-desc { font-size: 0.8rem; color: var(--col-text-light); margin-top: 0.2rem; }

/* ── Glossary ── */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.glossary-item {
  background: var(--col-snow-warm);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--col-warm-light);
}

.glossary-item .term {
  font-weight: 700;
  color: var(--col-dark);
  font-family: 'Lora', serif;
}

.glossary-item .definition {
  font-size: 0.88rem;
  color: var(--col-text-light);
  margin-top: 0.2rem;
}

/* ── Video page ── */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin: 1.5rem 0;
}

.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
}

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

.infographic-container img {
  width: 100%;
  height: auto;
}

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

.slideshow-frame {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-frame img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  display: none;
}

.slideshow-frame img.active { display: block; }

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

.btn-slide {
  background-color: var(--col-accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-slide:hover { background-color: var(--col-mid); }
.btn-slide:disabled { opacity: 0.4; cursor: not-allowed; }

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

/* ── Author page ── */
.author-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin: 2rem 0;
}

.author-photo-wrapper {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}

.author-photo-wrapper img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--col-warm-light);
}

.author-meta {
  background: var(--col-snow-warm);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1rem;
  border: 1px solid var(--col-border);
}

.author-meta table { width: 100%; font-size: 0.85rem; }
.author-meta td { padding: 0.3rem 0.5rem; }
.author-meta td:first-child { font-weight: 600; color: var(--col-mid); width: 45%; }

.bio-section { margin-bottom: 2rem; }
.bio-section h2 {
  font-size: 1.3rem;
  color: var(--col-warm);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.works-table-wrapper { overflow-x: auto; }

/* ── "Why read" section ── */
.why-read {
  background: linear-gradient(135deg, var(--col-mid) 0%, var(--col-dark) 100%);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  color: #fff;
  margin: 1.5rem 0;
}

.why-read h3 {
  color: var(--col-warm-light);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.why-read ul {
  list-style: none;
  padding: 0;
}

.why-read ul li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  font-size: 0.97rem;
  color: #d4e4f0;
}

.why-read ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--col-warm-light);
  font-size: 0.75rem;
  top: 0.55rem;
}

/* ── Fiche de lecture specific ── */
.lecture-intro {
  background: linear-gradient(135deg, var(--col-snow-warm) 0%, #e8f0f6 100%);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  border: 1px solid var(--col-border);
}

.theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.theme-tag {
  background-color: var(--col-accent);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

.theme-tag.warm { background-color: var(--col-warm); }
.theme-tag.dark { background-color: var(--col-dark); }

/* ── Highlight box ── */
.highlight-box {
  background-color: #fff;
  border-left: 5px solid var(--col-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.5rem;
  margin: 1.2rem 0;
  box-shadow: var(--shadow);
}

.highlight-box.blue { border-left-color: var(--col-accent); }
.highlight-box.dark { border-left-color: var(--col-dark); }

/* ── Footer ── */
.site-footer {
  background-color: var(--col-dark);
  color: #8aacbe;
  text-align: center;
  padding: 1.2rem 1rem;
  font-size: 0.85rem;
  font-family: 'Source Sans 3', sans-serif;
}

.site-footer a { color: var(--col-accent); }
.site-footer a:hover { color: var(--col-warm-light); }

/* ── Podcast page intro ── */
.podcast-intro {
  padding: 2rem 0 1rem;
}

.podcast-intro h2 {
  font-size: 1.4rem;
  color: var(--col-mid);
  margin-bottom: 0.75rem;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .author-layout {
    grid-template-columns: 1fr;
  }
  .author-photo-wrapper {
    position: static;
    max-width: 240px;
    margin: 0 auto;
  }
  .hero-overlay h1 { font-size: 1.5rem; }
  .container, .container-wide { padding: 0 1rem; }
  .audio-player-wrapper { padding: 1rem 1.2rem; }
  .activity-box { padding: 1.2rem 1.2rem; }
  .download-buttons { flex-direction: column; }
  .btn-download { justify-content: center; }
  .slideshow-controls { gap: 0.75rem; }
  .btn-slide { padding: 0.5rem 1rem; font-size: 0.85rem; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .hero { max-height: 280px; }
  .hero img { max-height: 280px; }
}
