/*
Theme Name: Socrate
Theme URI: https://monchiensappellesocrate.fr
Author: Mon chien s'appelle Socrate
Author URI: https://monchiensappellesocrate.fr
Description: Thème WordPress standalone pour le podcast « Mon chien s'appelle Socrate ». Design éditorial sophistiqué, intégration Ausha, Customizer complet, Gravity Forms. Pas de page builder, tout en templates PHP.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: socrate
Tags: podcast, editorial, blog, custom-logo, custom-menu, custom-colors, featured-images, translation-ready
*/

/* ═══════════════════════════════════════════════════════════
   RESET & VARIABLES
   Les couleurs sont également injectées inline via le
   Customizer (cf. socrate_customizer_css() dans functions.php)
   ═══════════════════════════════════════════════════════════ */

:root {
  --cream: #F5F0E8;
  --ink: #1A1612;
  --terracotta: #C4623A;
  --terracotta-dark: #A8502D;
  --terracotta-light: #D4795A;
  --sage: #7A8B6F;
  --gold: #D4A853;
  --warm-gray: #A09889;
  --light-sage: #E8EDE4;
  --deep-brown: #2C2118;
  --sand: #D5C9B8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.5;
}

/* Grain overlay décoratif */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta); }

/* Accessibilité — skip link */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--cream); clip: auto !important;
  color: var(--ink); display: block;
  font-size: .9rem; font-weight: 700;
  height: auto; left: 5px; line-height: normal;
  padding: 15px 23px 14px; text-decoration: none;
  top: 5px; width: auto; z-index: 100000;
}

:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

/* ═══════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 22, 18, 0.06);
  transition: all 0.4s ease;
}

.site-nav.scrolled {
  padding: 0.8rem 3rem;
  box-shadow: 0 2px 30px rgba(26, 22, 18, 0.08);
}

.site-nav.on-terra {
  background: rgba(196, 98, 58, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.site-nav.on-terra .nav-logo,
.site-nav.on-terra .nav-logo a { color: #fff; }
.site-nav.on-terra .nav-logo span { color: var(--gold); }
.site-nav.on-terra .nav-links a { color: rgba(255, 255, 255, 0.75); }
.site-nav.on-terra .nav-links a:hover { color: #fff; }
.site-nav.on-terra .nav-links a::after { background: #fff; }
.site-nav.on-terra .nav-cta a { background: #fff !important; color: var(--terracotta) !important; }

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-logo a { color: inherit; text-decoration: none; }
.nav-logo span { color: var(--terracotta); }
.nav-logo img { max-height: 40px; width: auto; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li { list-style: none; }

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s;
  display: inline-block;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--terracotta);
  transition: width 0.3s ease;
}

.nav-links li:not(.nav-cta) a:hover::after { width: 100%; }
.nav-links li:not(.nav-cta) a:hover { color: var(--terracotta); }

/* CTA — dernier item du menu WP */
.nav-links .nav-cta a {
  background: var(--ink) !important;
  color: var(--cream) !important;
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  font-size: 0.8rem !important;
  letter-spacing: 0.08em !important;
  transition: background 0.3s, transform 0.2s !important;
}
.nav-links .nav-cta a:hover { background: var(--terracotta) !important; transform: scale(1.03); }
.nav-links .nav-cta a::after { display: none !important; }

/* Burger mobile */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  color: var(--ink);
}
.nav-burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  margin: 6px 0;
  transition: transform .3s, opacity .3s;
}
.site-nav.on-terra .nav-burger { color: #fff; }

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-element {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}
.hero-bg-1 { width: 600px; height: 600px; background: var(--terracotta); top: -200px; right: -100px; }
.hero-bg-2 { width: 500px; height: 500px; background: var(--sage); bottom: -150px; left: -100px; animation-delay: -7s; }
.hero-bg-3 { width: 300px; height: 300px; background: var(--gold); top: 30%; left: 15%; animation-delay: -14s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(196, 98, 58, 0.1);
  border: 1px solid rgba(196, 98, 58, 0.2);
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--terracotta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease both;
}

.hero-badge .pulse {
  width: 8px; height: 8px;
  background: var(--terracotta);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 0.3em;
  animation: fadeInUp 0.8s ease 0.15s both;
  position: relative; z-index: 2;
}

.hero h1 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--terracotta);
  font-weight: 400;
}

.hero-sub {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--warm-gray);
  max-width: 540px;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease 0.3s both;
  position: relative; z-index: 2;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 0.8s ease 0.45s both;
  position: relative; z-index: 2;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--terracotta); color: white;
  padding: 1rem 2rem; border-radius: 100px;
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
  transition: all 0.3s; border: none; cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover {
  background: var(--deep-brown);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(196, 98, 58, 0.25);
  color: #fff;
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: transparent; color: var(--ink);
  padding: 1rem 2rem; border-radius: 100px;
  text-decoration: none; font-weight: 500; font-size: 0.9rem;
  border: 1.5px solid rgba(26, 22, 18, 0.2);
  transition: all 0.3s; cursor: pointer;
  font-family: inherit;
}
.btn-secondary:hover { border-color: var(--ink); background: var(--ink); color: var(--cream); }

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  animation: fadeInUp 0.8s ease 0.8s both;
}
.scroll-indicator span { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--warm-gray); }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--warm-gray), transparent); animation: scrollDown 2s ease-in-out infinite; }

@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ═══════════════════════════════════════════════════════════
   ÉPISODES — fond terracotta
   ═══════════════════════════════════════════════════════════ */

.section-episodes {
  padding: 6rem 3rem;
  background: var(--terracotta);
  color: #fff;
  position: relative;
}

.section-episodes::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--cream), var(--terracotta));
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative; z-index: 2;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}
.section-header h2 em { font-family: 'Instrument Serif', serif; font-weight: 400; color: var(--gold); }

.section-header a {
  color: var(--gold); text-decoration: none;
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500; transition: color 0.3s;
}
.section-header a:hover { color: #fff; }

/* Filtres catégories */
.ep-filters {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  position: relative; z-index: 2;
}

.ep-filter-btn {
  padding: 0.5rem 1.2rem; border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: transparent; color: rgba(255,255,255,0.8);
  font-family: 'DM Sans', sans-serif; font-size: 0.78rem;
  font-weight: 500; letter-spacing: 0.04em;
  cursor: pointer; transition: all 0.3s;
}
.ep-filter-btn:hover { border-color: #fff; color: #fff; }
.ep-filter-btn.active { background: #fff; color: var(--terracotta); border-color: #fff; font-weight: 600; }

/* Grille épisodes */
.episodes-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative; z-index: 2;
}

.episode-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s ease; cursor: pointer;
  position: relative; overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}
.episode-card.has-cover { padding: 0; }
.episode-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.episode-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.episode-card:hover .episode-cover img { transform: scale(1.04); }
.episode-card.has-cover .episode-body { padding: 1.8rem 2rem 2rem; }

.episode-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #fff, var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s ease;
}
.episode-card:hover::before { transform: scaleX(1); }
.episode-card:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.2); }

.episode-number { font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 900; color: rgba(255, 255, 255, 0.1); line-height: 1; margin-bottom: 1rem; }
.episode-meta { display: flex; gap: 1rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.episode-tag { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.episode-duration { font-size: 0.7rem; color: rgba(255,255,255,0.5); letter-spacing: 0.05em; }
.episode-card h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; margin-bottom: 0.8rem; line-height: 1.3; color: #fff; }
.episode-card p { font-size: 0.88rem; line-height: 1.6; color: rgba(255,255,255,0.6); margin-bottom: 1.5rem; }

.episode-play {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: #fff; font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  transition: gap 0.3s;
}
.episode-card:hover .episode-play { gap: 0.8rem; }
.episode-play svg { width: 32px; height: 32px; fill: #fff; transition: transform 0.3s; }
.episode-card:hover .episode-play svg { transform: scale(1.1); }

.episode-card.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  cursor: default;
}
.episode-card.empty:hover { transform: none; background: rgba(255,255,255,0.08); }

/* ═══════════════════════════════════════════════════════════
   PLAYER AUSHA
   ═══════════════════════════════════════════════════════════ */

.player-wrap {
  max-width: 1200px;
  margin: 3rem auto 0;
  position: relative; z-index: 2;
}

.player-ausha {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px; padding: 1rem;
}

.player-ausha iframe {
  width: 100%;
  border: 0;
  display: block;
  border-radius: 16px;
}

/* ═══════════════════════════════════════════════════════════
   SÉRIES
   ═══════════════════════════════════════════════════════════ */

.section-series {
  padding: 6rem 3rem;
  background: var(--cream);
}

.series-header {
  max-width: 1200px; margin: 0 auto 3rem; text-align: center;
}
.series-header h2 {
  font-family: 'Playfair Display', serif; font-size: 3rem;
  font-weight: 900; letter-spacing: -0.02em; margin-bottom: 0.8rem;
}
.series-header h2 em { font-family: 'Instrument Serif', serif; font-weight: 400; color: var(--terracotta); }
.series-header p { color: var(--warm-gray); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

.series-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}
.series-grid[data-count="1"] { grid-template-columns: 1fr; max-width: 400px; }
.series-grid[data-count="2"] { grid-template-columns: repeat(2, 1fr); max-width: 800px; }
.series-grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.series-grid[data-count="4"] { grid-template-columns: repeat(4, 1fr); }

.series-card {
  border-radius: 20px; overflow: hidden;
  cursor: pointer; transition: all 0.4s ease;
}
.series-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(26, 22, 18, 0.12); }

.series-cover {
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem; text-align: center;
  position: relative;
  background: linear-gradient(145deg, var(--terracotta), var(--terracotta-dark));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Gradients par défaut (quand pas de cover image) */
.series-card:nth-child(4n+1) .series-cover:not(.has-image) { background: linear-gradient(145deg, var(--terracotta), var(--terracotta-dark)); }
.series-card:nth-child(4n+2) .series-cover:not(.has-image) { background: linear-gradient(145deg, var(--sage), #5F7353); }
.series-card:nth-child(4n+3) .series-cover:not(.has-image) { background: linear-gradient(145deg, var(--gold), #B8903A); }
.series-card:nth-child(4n+4) .series-cover:not(.has-image) { background: linear-gradient(145deg, var(--deep-brown), #1A120D); }

/* Overlay terracotta semi-transparent au-dessus de la cover image */
.series-cover.has-image .series-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(196, 98, 58, 0.55), rgba(26, 22, 18, 0.75));
  transition: background 0.4s ease;
  z-index: 1;
}
.series-card:hover .series-cover.has-image .series-overlay {
  background: linear-gradient(145deg, rgba(196, 98, 58, 0.30), rgba(26, 22, 18, 0.55));
}

.series-content {
  position: relative;
  z-index: 2;
}

.series-emoji { font-size: 2.5rem; margin-bottom: 1rem; }
.series-cover h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 0.5rem; }
.series-cover > span { font-size: 0.72rem; color: rgba(255,255,255,0.6); letter-spacing: 0.08em; text-transform: uppercase; }

.series-count {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
  padding: 0.3rem 0.7rem; border-radius: 100px;
  font-size: 0.7rem; color: #fff; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   NEWSLETTER
   ═══════════════════════════════════════════════════════════ */

.section-newsletter {
  padding: 6rem 3rem;
  background: var(--light-sage);
}

.newsletter-inner {
  max-width: 700px; margin: 0 auto; text-align: center;
}
.newsletter-inner h2 {
  font-family: 'Playfair Display', serif; font-size: 2.5rem;
  font-weight: 900; margin-bottom: 1rem; letter-spacing: -0.02em;
}
.newsletter-inner h2 em { font-family: 'Instrument Serif', serif; font-weight: 400; color: var(--sage); }
.newsletter-inner p { color: var(--warm-gray); margin-bottom: 2.5rem; font-size: 1.05rem; line-height: 1.7; }

.newsletter-form {
  display: flex; gap: 0.8rem; max-width: 500px; margin: 0 auto;
}
.newsletter-form input[type="email"],
.newsletter-form input[type="text"] {
  flex: 1; padding: 1rem 1.5rem;
  border: 1.5px solid rgba(26, 22, 18, 0.12);
  border-radius: 100px; font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; background: white;
  transition: border-color 0.3s; outline: none;
}
.newsletter-form input:focus { border-color: var(--sage); }
.newsletter-form input::placeholder { color: var(--warm-gray); }
.newsletter-form button {
  padding: 1rem 2rem; background: var(--sage); color: white;
  border: none; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: all 0.3s; white-space: nowrap;
}
.newsletter-form button:hover { background: var(--deep-brown); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════
   INSTAGRAM
   ═══════════════════════════════════════════════════════════ */

.section-instagram {
  padding: 5rem 3rem;
  background: var(--cream);
  text-align: center;
}
.section-instagram h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 900;
}
.section-instagram h3 em { font-family: 'Instrument Serif', serif; font-weight: 400; color: var(--terracotta); }
.section-instagram .instagram-handle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border: 1px solid rgba(26,22,18,.1);
  border-radius: 100px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  transition: all .3s;
}
.section-instagram .instagram-handle:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* ═══════════════════════════════════════════════════════════
   PLATEFORMES
   ═══════════════════════════════════════════════════════════ */

.section-platforms {
  padding: 5rem 3rem; text-align: center;
}
.section-platforms h3 {
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--warm-gray); margin-bottom: 2.5rem;
  font-family: 'DM Sans', sans-serif; font-weight: 500;
}
.platforms-logos { display: flex; justify-content: center; gap: 3rem; align-items: center; flex-wrap: wrap; }

.platform-badge {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.5rem; border-radius: 100px;
  border: 1px solid rgba(26, 22, 18, 0.1);
  font-weight: 600; font-size: 0.88rem; color: var(--ink);
  transition: all 0.3s; cursor: pointer; text-decoration: none;
}
.platform-badge:hover { border-color: var(--terracotta); background: rgba(196, 98, 58, 0.05); transform: translateY(-2px); color: var(--terracotta); }
.platform-badge .p-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--terracotta);
}
.platform-badge .p-icon svg { width: 100%; height: 100%; display: block; }
.platform-badge:hover .p-icon { color: var(--deep-brown); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.site-footer {
  background: var(--deep-brown); color: var(--cream); padding: 4rem 3rem 2rem;
}

.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}

.footer-brand h4 { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 900; margin-bottom: 1rem; }
.footer-brand h4 span { color: var(--terracotta); }
.footer-description { font-size: 0.88rem; line-height: 1.7; color: rgba(245, 240, 232, 0.5); max-width: 400px; white-space: pre-line; }

.footer-col h5 { font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1.2rem; color: var(--gold); font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { list-style: none; }
.footer-col a { display: block; color: rgba(245, 240, 232, 0.6); text-decoration: none; font-size: 0.88rem; margin-bottom: 0.6rem; transition: color 0.3s; }
.footer-col a:hover { color: var(--cream); }

.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding-top: 2rem;
  border-top: 1px solid rgba(245, 240, 232, 0.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: rgba(245, 240, 232, 0.3);
}
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: rgba(245, 240, 232, 0.4); text-decoration: none; font-size: 1.1rem; transition: color 0.3s; }
.footer-social a:hover { color: var(--terracotta); }

/* ═══════════════════════════════════════════════════════════
   PAGES GÉNÉRIQUES (page, single, archive, 404)
   ═══════════════════════════════════════════════════════════ */

.page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 10rem 2rem 5rem;
}
.page-wrap.wide { max-width: 1200px; }

.page-header {
  text-align: center;
  margin-bottom: 4rem;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.page-header h1 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--terracotta);
  font-weight: 400;
}
.page-header .subtitle {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--warm-gray);
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: .6em;
  letter-spacing: -0.01em;
}
.entry-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: .5em;
}
.entry-content a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
  border-left: 3px solid var(--terracotta);
  padding-left: 1.5rem;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--warm-gray);
  margin: 2rem 0;
}
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }
.entry-content img { border-radius: 12px; margin: 1.5rem auto; }
.entry-content code {
  background: rgba(26,22,18,.06);
  padding: .15em .4em;
  border-radius: 4px;
  font-size: .9em;
}
.entry-content pre {
  background: var(--deep-brown);
  color: var(--cream);
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
}

/* Article / blog list */
.post-list {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  padding: 0 2rem;
}
.post-card {
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: 16px;
  padding: 2rem;
  transition: all .3s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(26,22,18,.08); }
.post-card .post-meta {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: .8rem;
}
.post-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .8rem;
  line-height: 1.3;
}
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--terracotta); }
.post-card .excerpt { font-size: .95rem; color: var(--warm-gray); line-height: 1.6; }
.post-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--terracotta);
  text-decoration: none;
}
.post-card .read-more:hover { color: var(--deep-brown); }

/* Pagination */
.pagination {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 2rem;
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .8rem;
  border-radius: 100px;
  border: 1.5px solid rgba(26,22,18,.15);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .85rem;
  transition: all .3s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}

/* 404 */
.error-404 {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 10rem 2rem 5rem;
}
.error-404 .code {
  font-family: 'Playfair Display', serif;
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 900;
  line-height: 1;
  color: var(--terracotta);
  letter-spacing: -0.05em;
}
.error-404 h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 1rem 0;
}
.error-404 p {
  color: var(--warm-gray);
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════════════════════
   SHORTCODE [ausha_episode]
   ═══════════════════════════════════════════════════════════ */

.ausha-episode-card {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
}
.ausha-episode-card .ausha-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.ausha-episode-card iframe {
  width: 100%;
  border: 0;
  border-radius: 12px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   GRAVITY FORMS — Overrides Socrate
   Cible les classes réelles de GF 2.7+ (framework Orbital).
   Priorité renforcée via .gform_wrapper pour passer devant
   les styles natifs d'Orbital.
   ═══════════════════════════════════════════════════════════ */

/* Wrapper global : reset de la typo */
.gform_wrapper,
.gform_wrapper * {
  font-family: 'DM Sans', sans-serif;
  box-sizing: border-box;
}

/* Masque le container honeypot (champ anti-spam invisible) */
.gform_wrapper .gform_validation_container { display: none !important; }

/* Espace vertical entre les champs */
.gform_wrapper .gform_fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gform_wrapper .gfield { margin: 0; padding: 0; }

/* Labels : small-caps sobre */
.gform_wrapper .gfield_label,
.gform_wrapper .gform-field-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: .5rem;
  line-height: 1.3;
}

/* Marque "(Nécessaire)" discrète */
.gform_wrapper .gfield_required,
.gform_wrapper .gfield_required_text {
  color: var(--terracotta);
  font-weight: 400;
  margin-left: .25rem;
}

/* Inputs texte / email / url / tel / select */
.gform_wrapper .gfield input[type="text"],
.gform_wrapper .gfield input[type="email"],
.gform_wrapper .gfield input[type="tel"],
.gform_wrapper .gfield input[type="url"],
.gform_wrapper .gfield input[type="number"],
.gform_wrapper .gfield input[type="password"],
.gform_wrapper .gfield select {
  width: 100%;
  padding: .95rem 1.3rem;
  border: 1.5px solid rgba(26, 22, 18, 0.12);
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
  outline: none;
  box-shadow: 0 1px 0 rgba(26,22,18,.02);
}

/* Textarea */
.gform_wrapper .gfield textarea {
  width: 100%;
  padding: 1rem 1.3rem;
  border: 1.5px solid rgba(26, 22, 18, 0.12);
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  min-height: 160px;
  resize: vertical;
  transition: border-color .25s ease, box-shadow .25s ease;
  outline: none;
}

/* Placeholders */
.gform_wrapper .gfield input::placeholder,
.gform_wrapper .gfield textarea::placeholder {
  color: var(--warm-gray);
  opacity: .85;
  font-style: italic;
}

/* Focus */
.gform_wrapper .gfield input:focus,
.gform_wrapper .gfield textarea:focus,
.gform_wrapper .gfield select:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(196, 98, 58, .12);
}

/* Descriptions sous le champ */
.gform_wrapper .gfield_description {
  font-size: .8rem;
  color: var(--warm-gray);
  margin-top: .4rem;
  font-style: italic;
}

/* Messages d'erreur */
.gform_wrapper .gfield_error .gfield_label { color: var(--terracotta); }
.gform_wrapper .gfield_error input,
.gform_wrapper .gfield_error textarea,
.gform_wrapper .gfield_error select {
  border-color: var(--terracotta);
  background: rgba(196, 98, 58, 0.04);
}
.gform_wrapper .gfield_validation_message,
.gform_wrapper .validation_message {
  color: var(--terracotta);
  font-size: .82rem;
  margin-top: .4rem;
  font-weight: 500;
}
.gform_wrapper .gform_validation_errors {
  background: rgba(196, 98, 58, 0.08);
  border: 1px solid rgba(196, 98, 58, 0.25);
  border-radius: 14px;
  padding: 1rem 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--terracotta);
  font-size: .9rem;
}
.gform_wrapper .gform_validation_errors h2,
.gform_wrapper .gform_submission_error {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--terracotta);
  margin: 0 0 .3rem;
}

/* Footer / bouton submit — centré horizontalement */
.gform_wrapper .gform_footer,
.gform_wrapper .gform-footer,
.gform_wrapper .gform_page_footer {
  display: flex;
  justify-content: center;
  margin-top: 2.2rem;
  padding: 0;
}

.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"].gform_button,
.gform_wrapper input[type="submit"].button,
.gform_wrapper button.gform_button {
  display: inline-flex !important;
  align-items: center;
  gap: .6rem;
  background: var(--terracotta) !important;
  background-image: none !important;
  color: #fff !important;
  padding: 1.05rem 2.4rem !important;
  border: none !important;
  border-radius: 100px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600 !important;
  font-size: .9rem !important;
  letter-spacing: .04em !important;
  text-transform: none !important;
  cursor: pointer !important;
  transition: background .3s ease, transform .2s ease, box-shadow .3s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  line-height: 1 !important;
  width: auto !important;
  min-width: 0 !important;
  box-shadow: none;
}
.gform_wrapper .gform_button:hover,
.gform_wrapper input[type="submit"].gform_button:hover,
.gform_wrapper input[type="submit"].button:hover {
  background: var(--deep-brown) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(196, 98, 58, .22) !important;
}
.gform_wrapper .gform_button:focus-visible {
  outline: 3px solid var(--gold) !important;
  outline-offset: 3px;
}

/* Confirmation après envoi */
.gform_confirmation_wrapper,
.gform_confirmation_message {
  background: rgba(122, 139, 111, 0.10);
  border: 1px solid rgba(122, 139, 111, 0.30);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  color: var(--sage);
  line-height: 1.5;
}

/* ── NEWSLETTER — layout horizontal compact ── */
.section-newsletter .gform_wrapper {
  max-width: 520px;
  margin: 0 auto;
}
.section-newsletter .gform_wrapper form { margin: 0; }
.section-newsletter .gform_wrapper .gform_fields {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1.5px solid rgba(26, 22, 18, 0.10);
  border-radius: 100px;
  padding: .35rem;
  box-shadow: 0 8px 30px rgba(26, 22, 18, 0.06);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.section-newsletter .gform_wrapper .gform_fields:focus-within {
  border-color: var(--sage);
  box-shadow: 0 10px 40px rgba(122, 139, 111, 0.18);
}
.section-newsletter .gform_wrapper .gfield { flex: 1; }
.section-newsletter .gform_wrapper .gfield_label,
.section-newsletter .gform_wrapper .gform-field-label {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}
.section-newsletter .gform_wrapper .gfield input[type="email"] {
  border: none;
  background: transparent;
  border-radius: 100px;
  padding: .85rem 1.5rem;
  font-size: .95rem;
  box-shadow: none;
}
.section-newsletter .gform_wrapper .gfield input[type="email"]:focus {
  box-shadow: none;
  border: none;
}
.section-newsletter .gform_wrapper .gform_footer {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.section-newsletter .gform_wrapper .gform_footer,
.section-newsletter .gform_wrapper .gform-footer {
  margin: 0 !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-newsletter .gform_wrapper .gform_button,
.section-newsletter .gform_wrapper input[type="submit"].gform_button,
.section-newsletter .gform_wrapper input[type="submit"].button {
  background: var(--sage) !important;
  padding: .85rem 1.8rem !important;
  font-size: .85rem !important;
  border-radius: 100px !important;
  white-space: nowrap;
  margin: 0 !important;
}
.section-newsletter .gform_wrapper .gform_button:hover {
  background: var(--deep-brown) !important;
  box-shadow: 0 10px 30px rgba(122, 139, 111, .28) !important;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .episodes-grid { grid-template-columns: repeat(2, 1fr); }
  .series-grid,
  .series-grid[data-count="3"],
  .series-grid[data-count="4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 100% !important;
  }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .site-nav { padding: 1rem 1.5rem; }
  .site-nav.scrolled { padding: .8rem 1.5rem; }
  .nav-links {
    display: none;
    position: fixed;
    top: 62px; left: 0; right: 0;
    background: rgba(245,240,232,.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(26,22,18,.06);
  }
  .site-nav.on-terra .nav-links { background: rgba(196,98,58,.98); }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .site-nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .site-nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  .site-nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .section-episodes { padding: 4rem 1.5rem; }
  .episodes-grid { grid-template-columns: 1fr; }
  .section-series { padding: 4rem 1.5rem; }
  .series-grid,
  .series-grid[data-count="1"],
  .series-grid[data-count="2"],
  .series-grid[data-count="3"],
  .series-grid[data-count="4"] {
    grid-template-columns: 1fr !important;
    max-width: 400px !important;
  }
  .section-header,
  .series-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .newsletter-form { flex-direction: column; }
  .section-newsletter .gform_wrapper.gravity-theme .gform_fields { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .ep-filters { gap: 0.4rem; }
  .section-instagram,
  .section-newsletter,
  .section-platforms { padding: 4rem 1.5rem; }
  .site-footer { padding: 3rem 1.5rem 2rem; }
}
