/* ==========================================================================
   Wave Storia — styles des composants
   Rempli progressivement, section par section, à mesure qu'on construit
   chaque template (header, sidebar, footer, hero, cartes, single post...).
   Toutes les valeurs (espacements, tailles, couleurs) sont reprises à
   l'identique de la maquette validée (wave-storia-maquette-finale.html).
   ========================================================================== */

/* ---- shell / layout général ---- */
.shell{
	min-height:100vh;
	width:100%;
}
.main{
	margin-left:var(--sidebar-width);
	display:flex;
	justify-content:center;
	padding:0 40px;
}
.wave-page{
	max-width:var(--content-max);
	width:100%;
	padding:56px 0 80px;
}

/* ---- sidebar ---- */
.sidebar{
	width:var(--sidebar-width);
	background:var(--surface);
	border-right:1px solid var(--border-soft);
	display:flex;
	flex-direction:column;
	padding:22px 18px;
	position:fixed;
	top:0; left:0; bottom:0;
	overflow-y:auto;
	z-index:4;
}
.new-search{
	display:flex; align-items:center; gap:10px;
	padding:11px 14px;
	border-radius:10px;
	border:1px solid var(--border);
	color:var(--text);
	font-size:13.5px;
	font-weight:500;
	text-decoration:none;
	margin-bottom:26px;
	transition:.15s ease;
}
.new-search:hover{border-color:var(--accent); color:var(--accent);}
.new-search .plus{
	width:18px; height:18px;
	display:flex; align-items:center; justify-content:center;
	font-size:15px; color:var(--accent);
}
.sb-label{
	font-family:'JetBrains Mono', monospace;
	font-size:11px;
	letter-spacing:.08em;
	text-transform:uppercase;
	color:var(--text-faint);
	margin-bottom:12px;
}
.featured-list{display:flex; flex-direction:column; gap:2px; margin-bottom:28px;}
.featured-item{
	padding:9px 10px;
	border-radius:8px;
	font-size:13.5px;
	color:var(--text-muted);
	cursor:pointer;
	transition:.12s ease;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
	display:block;
	text-decoration:none;
}
.featured-item:hover{background:var(--surface-2); color:var(--text);}

/* carte contextuelle sidebar : épisode / podcast / dernier épisode (accueil).
   Visuel volontairement plus grand que les vignettes de cartes, mais reste
   modeste pour garder le site léger. object-fit:contain -> jamais rogné. */
.sidebar-context{margin-bottom:24px;}
.sidebar-context-cover{
	width:100%;
	aspect-ratio:1/1;
	border-radius:12px;
	margin-bottom:12px;
	overflow:hidden;
	background:
		repeating-linear-gradient(100deg, #3a3d40 0 2px, transparent 2px 5px),
		linear-gradient(160deg, #2c2f32, #201f21);
}
.sidebar-context-cover img{
	width:100%; height:100%;
	object-fit:contain;
	background:var(--surface-2);
}
.sidebar-context-podcast{
	display:block;
	font-size:13.5px;
	font-weight:600;
	color:var(--text);
	margin-bottom:6px;
	text-decoration:none;
}
.sidebar-context-meta{
	font-family:'JetBrains Mono', monospace;
	font-size:11px;
	color:var(--text-faint);
	line-height:1.7;
}
.sidebar-platforms{display:flex; gap:8px; margin-top:14px;}
.sidebar-platform-icon{
	width:30px; height:30px;
	border-radius:50%;
	border:1px solid var(--accent-border);
	display:flex; align-items:center; justify-content:center;
	color:var(--accent);
	transition:.15s ease;
}
.sidebar-platform-icon svg{width:15px; height:15px;}
.sidebar-platform-icon:hover{background:var(--accent-dimmer); border-color:var(--accent);}
.sidebar-last-title{
	display:block;
	font-size:13px; font-weight:600;
	color:var(--text);
	line-height:1.4;
	margin:6px 0 14px;
	text-decoration:none;
}
.sidebar-player{display:flex; align-items:center; gap:8px;}
.sidebar-player-play{
	width:26px; height:26px;
	border-radius:50%;
	background:var(--accent);
	border:none;
	color:var(--accent-ink);
	flex-shrink:0;
	display:flex; align-items:center; justify-content:center;
	font-size:10px;
	cursor:pointer;
}
.sidebar-player-track{
	flex:1; height:3px; border-radius:999px;
	background:var(--border);
	position:relative; overflow:hidden;
}
.sidebar-player-track::before{
	content:''; position:absolute; top:0; left:0; bottom:0;
	width:var(--progress, 0%); background:var(--accent); border-radius:999px;
}
.sidebar-spacer{flex:1;}
.sidebar-foot{
	border-top:1px solid var(--border-soft);
	padding-top:14px;
	display:flex; flex-direction:column; gap:2px;
}
.account-chip{
	display:flex; align-items:center; gap:10px;
	padding:9px 10px; border-radius:10px;
	background:var(--surface-2);
}
.avatar{
	width:26px; height:26px; border-radius:50%;
	background:linear-gradient(135deg, var(--accent), #12321f);
	flex-shrink:0;
}
.account-chip span{font-size:12.5px; color:var(--text-muted);}

/* ---- bouton CTA persistant ---- */
.cta-produce{
	position:fixed;
	top:26px; right:32px;
	font-size:13px; font-weight:500;
	color:var(--accent);
	background:var(--accent-dimmer);
	border:1px solid var(--accent-border);
	padding:10px 18px;
	border-radius:999px;
	text-decoration:none;
	white-space:nowrap;
	z-index:5;
	transition:.15s ease;
}
.cta-produce:hover{background:var(--accent-dim); border-color:var(--accent);}

/* ---- footer ---- */
.site-footer{
	margin-top:80px;
	padding-top:28px;
	border-top:1px solid var(--border-soft);
	display:flex; align-items:center; justify-content:space-between;
	flex-wrap:wrap;
	gap:16px;
}
.footer-links{display:flex; flex-wrap:wrap; gap:4px;}
.footer-link{
	font-size:12.5px; color:var(--text-faint);
	text-decoration:none;
	padding:6px 10px; border-radius:8px;
	transition:.15s ease;
}
.footer-link:hover{background:var(--surface); color:var(--text-muted);}
.footer-social{display:flex; gap:8px;}
.footer-social-icon{
	width:30px; height:30px;
	border-radius:50%;
	border:1px solid var(--border-soft);
	display:flex; align-items:center; justify-content:center;
	font-size:12px;
	color:var(--text-faint);
	text-decoration:none;
	transition:.15s ease;
}
.footer-social-icon:hover{border-color:var(--accent); color:var(--accent);}
.footer-copyright{
	font-family:'JetBrains Mono', monospace;
	font-size:11px;
	color:var(--text-faint);
	width:100%;
	text-align:center;
}

@media (max-width: 760px){
	.sidebar{display:none;}
	.main{margin-left:0; padding:0 18px;}
	.wave-page{padding:34px 0 60px;}
	.cta-produce{top:16px; right:16px; padding:8px 14px; font-size:12px;}
}

/* ---- barre d'admin WordPress : nos éléments position:fixed ne sont pas
   décalés automatiquement par WP (qui ne pousse que le flux normal du
   document), donc on compense nous-mêmes. ---- */
body.admin-bar .sidebar{top:32px;}
body.admin-bar .cta-produce{top:58px;}
@media screen and (max-width: 782px){
	body.admin-bar .sidebar{top:46px;}
	body.admin-bar .cta-produce{top:62px;}
}

/* ==========================================================================
   Hero (logo + accroche + champ de recherche) — accueil, univers, podcast,
   résultats, et bloc de bas de single post. Un seul composant partagé,
   dont seules les parties variables changent selon la page (cf. templates).
   ========================================================================== */
.hero{
	display:flex; flex-direction:column; align-items:center;
	padding-top:4vh;
}
.wordmark{height:56px; width:auto; margin-bottom:42px;}

.hero-slot{
	min-height:96px;
	width:100%;
	display:flex; flex-direction:column;
	justify-content:flex-end; align-items:center;
}
.hero-headline{
	font-family:'Fraunces', serif;
	font-weight:500;
	font-size:18px;
	line-height:1.4;
	color:var(--text);
	margin-bottom:8px;
	text-align:center;
}
.hero-hint{
	font-family:'JetBrains Mono', monospace;
	font-size:11.5px;
	color:var(--text-faint);
	letter-spacing:.03em;
	text-align:center;
	margin-bottom:38px;
}

.breadcrumb{
	font-family:'JetBrains Mono', monospace;
	font-size:12px;
	color:var(--text-faint);
	width:100%;
	max-width:var(--search-max);
	margin-bottom:38px;
	text-align:left;
}
.breadcrumb a{color:var(--text-faint); text-decoration:none;}
.breadcrumb a:hover{color:var(--accent);}
.breadcrumb .sep{margin:0 8px; opacity:.5;}
.breadcrumb .current{color:var(--text-muted);}

.search-wrap{
	position:relative;
	width:100%;
	max-width:var(--search-max);
	display:flex; justify-content:center;
}
/* halo à calque unique : couleur active à faible opacité, agrandi pour la
   présence. Positionné sous le champ de recherche uniquement -> ne touche
   jamais le logo. Changer d'univers = ne changer que --accent (cf. body
   style inline injecté par wave_storia_body_color_vars()). */
.halo{
	position:absolute;
	top:78%; left:50%;
	width:780px; height:300px;
	transform:translate(-50%,-50%);
	background:radial-gradient(closest-side, var(--accent-dim), transparent 72%);
	filter:blur(18px);
	pointer-events:none;
	z-index:0;
}
.waveform{
	position:absolute;
	bottom:-42px; left:50%;
	transform:translateX(-50%);
	display:flex; align-items:flex-end; gap:3px;
	height:18px;
	opacity:.35;
	z-index:0;
}
.waveform span{width:2.5px; background:var(--accent); border-radius:2px; animation:wf 1.8s ease-in-out infinite;}
.waveform span:nth-child(1){height:6px; animation-delay:.0s;}
.waveform span:nth-child(2){height:14px; animation-delay:.15s;}
.waveform span:nth-child(3){height:8px; animation-delay:.3s;}
.waveform span:nth-child(4){height:18px; animation-delay:.45s;}
.waveform span:nth-child(5){height:10px; animation-delay:.6s;}
.waveform span:nth-child(6){height:15px; animation-delay:.75s;}
.waveform span:nth-child(7){height:7px; animation-delay:.9s;}
.waveform span:nth-child(8){height:12px; animation-delay:1.05s;}
.waveform span:nth-child(9){height:5px; animation-delay:1.2s;}
@keyframes wf{0%,100%{transform:scaleY(.6);} 50%{transform:scaleY(1);}}
@media (prefers-reduced-motion: reduce){.waveform span{animation:none;}}

.search-bar{
	position:relative; z-index:1;
	width:100%;
	display:flex; align-items:center;
	background:var(--surface);
	border:1px solid var(--border);
	border-radius:999px;
	padding:8px;
	box-shadow:0 20px 50px -20px rgba(0,0,0,.6);
}
.search-bar input[type="search"], .search-bar input[type="text"]{
	flex:1;
	background:transparent;
	border:none;
	outline:none;
	color:var(--text);
	font-family:'Space Grotesk', sans-serif;
	font-size:16px;
	padding:10px 12px;
}
.search-bar input::placeholder{color:var(--text-faint);}
.universe-select{
	display:flex; align-items:center; gap:6px;
	background:var(--surface-2);
	cursor:pointer;
	border:1px solid var(--border-soft);
	border-radius:999px;
	padding:9px 14px;
	font-size:12.5px;
	color:var(--text-muted);
	white-space:nowrap;
	font-family:'JetBrains Mono', monospace;
	appearance:none;
	-webkit-appearance:none;
}
.universe-select-wrap{position:relative; display:flex; align-items:center;}
.universe-select-wrap::before{
	content:'';
	width:7px; height:7px; border-radius:50%;
	background:var(--accent);
	position:absolute; left:14px; pointer-events:none;
}
.universe-select-wrap select.universe-select{padding-left:28px;}
.search-submit{
	width:42px; height:42px;
	border-radius:50%;
	background:var(--accent);
	border:none;
	color:var(--accent-ink);
	display:flex; align-items:center; justify-content:center;
	cursor:pointer;
	margin-left:10px;
	flex-shrink:0;
	transition:.15s ease;
}
.search-submit:hover{filter:brightness(1.08); transform:scale(1.03);}

/* ---- titre H1 de page (accueil / univers / podcast) : même traitement
   typographique que hero-headline, positionné juste au-dessus du texte de
   présentation, sous le waveform. ---- */
.page-title{
	font-family:'Fraunces', serif;
	font-weight:500;
	font-size:18px;
	color:var(--text);
	text-align:left;
	max-width:var(--search-max);
	margin:76px auto 8px;
}
.page-description{
	font-size:14.5px;
	line-height:1.7;
	color:var(--text-muted);
	max-width:var(--search-max);
	margin:0 auto 40px;
}

/* ---- ligne de tri ---- */
.sort-row{
	display:flex; align-items:center; gap:8px;
	margin:40px 0 40px;
	padding-bottom:40px;
	border-bottom:1px solid var(--border-soft);
}
.sort-label{
	font-family:'JetBrains Mono', monospace;
	font-size:11px;
	color:var(--text-faint);
	margin-right:6px;
	text-transform:uppercase;
	letter-spacing:.06em;
}
.sort-pill{
	font-family:'JetBrains Mono', monospace;
	font-size:12px;
	padding:6px 13px;
	border-radius:999px;
	background:transparent;
	border:1px solid var(--accent-border);
	color:var(--text);
	cursor:pointer;
	transition:.15s ease;
	text-decoration:none;
}
.sort-pill:hover{border-color:var(--accent); color:var(--accent);}
.sort-pill.active{background:var(--accent-dim); border-color:var(--accent); color:var(--accent);}

/* ---- carte épisode ---- */
.episode-list{display:flex; flex-direction:column; gap:2px;}
.episode-card{
	display:flex; gap:16px;
	padding:18px 14px;
	margin:0 -14px;
	border-bottom:1px solid var(--border-soft);
	transition:.15s ease;
}
.episode-card:hover{background:var(--surface);}
.episode-cover, .podcast-card-cover{
	width:64px; height:64px;
	border-radius:9px;
	flex-shrink:0;
	position:relative;
	overflow:hidden;
	background:var(--surface-2);
}
.episode-cover img, .podcast-card-cover img{width:100%; height:100%; object-fit:cover;}
.episode-cover .bars, .podcast-card-cover .bars{
	position:absolute; inset:0;
	display:flex; align-items:center; justify-content:center; gap:2.5px;
}
.episode-cover .bars span, .podcast-card-cover .bars span{
	width:2.5px; height:16px; border-radius:2px; background:var(--text-faint);
}
.episode-body, .podcast-card-body{flex:1; min-width:0;}
.ep-podcast{
	display:inline-block;
	font-family:'JetBrains Mono', monospace;
	font-size:11px;
	color:var(--accent);
	text-transform:uppercase;
	letter-spacing:.05em;
	margin-bottom:5px;
	text-decoration:none;
}
.podcast-link{cursor:pointer;}
.podcast-link:hover{text-decoration:underline;}
.ep-title, .podcast-card-name{
	display:block;
	font-size:16px; font-weight:600;
	margin-bottom:6px;
	line-height:1.35;
	color:var(--text);
	text-decoration:none;
}
.ep-title:hover, .podcast-card-name:hover{color:var(--accent);}
.ep-desc, .podcast-card-desc{
	font-size:13px; color:var(--text-muted);
	line-height:1.55;
	max-width:560px;
	overflow:hidden;
	display:-webkit-box;
	-webkit-line-clamp:2;
	-webkit-box-orient:vertical;
}
.ep-right{
	display:flex; flex-direction:column; align-items:flex-end; justify-content:space-between;
	flex-shrink:0;
}
.ep-date{font-family:'JetBrains Mono', monospace; font-size:11px; color:var(--text-faint);}
.ep-listen, .podcast-card-cta{
	font-size:12px; font-weight:500;
	color:var(--text);
	border:1px solid var(--border);
	padding:7px 14px;
	border-radius:999px;
	white-space:nowrap;
	text-decoration:none;
	transition:.15s ease;
	flex-shrink:0;
}
.episode-card:hover .ep-listen, .podcast-card:hover .podcast-card-cta{border-color:var(--accent); color:var(--accent);}

/* ---- carte podcast (liste d'un univers) ---- */
.podcast-list{display:flex; flex-direction:column; gap:2px;}
.podcast-card{
	display:flex; gap:16px; align-items:center;
	padding:18px 14px;
	margin:0 -14px;
	border-bottom:1px solid var(--border-soft);
	transition:.15s ease;
}
.podcast-card:hover{background:var(--surface);}

/* ---- single post (épisode) ---- */
.wave-single{max-width:var(--content-max); margin:0 auto;}
.post-title{
	font-family:'Fraunces', serif;
	font-weight:500;
	font-size:34px;
	line-height:1.25;
	color:var(--text);
	margin-bottom:22px;
}
.post-chapeau{
	font-size:15px;
	font-style:italic;
	color:var(--text-muted);
	line-height:1.7;
	margin-bottom:34px;
}
.post-player{
	display:flex; align-items:center; gap:14px;
	padding:14px 18px;
	border-radius:14px;
	background:var(--surface);
	border:1px solid var(--border-soft);
	margin-bottom:40px;
}
.post-player-play{
	width:36px; height:36px;
	border-radius:50%;
	background:var(--accent);
	border:none;
	color:var(--accent-ink);
	flex-shrink:0;
	display:flex; align-items:center; justify-content:center;
	font-size:13px;
	cursor:pointer;
}
.post-player-track{
	flex:1; height:4px; border-radius:999px;
	background:var(--border);
	position:relative; overflow:hidden;
}
.post-player-track::before{
	content:''; position:absolute; top:0; left:0; bottom:0;
	width:var(--progress, 0%); background:var(--accent); border-radius:999px;
}
.post-player-time{
	font-family:'JetBrains Mono', monospace;
	font-size:11px; color:var(--text-faint);
	flex-shrink:0; white-space:nowrap;
}
.post-subtitle{
	font-family:'Fraunces', serif;
	font-weight:500;
	font-size:20px;
	color:var(--text);
	margin-bottom:24px;
	line-height:1.4;
}
.post-body{font-size:15px; line-height:1.8; color:var(--text);}
.post-body p{margin-bottom:20px;}
.post-body h3{font-size:18px; margin:32px 0 14px;}
.post-body img{border-radius:12px; margin:24px 0;}
.post-tags{display:flex; flex-wrap:wrap; gap:8px; margin:36px 0 56px;}
.post-tag{
	font-family:'JetBrains Mono', monospace;
	font-size:11.5px;
	padding:6px 13px;
	border-radius:999px;
	background:transparent;
	border:1px solid var(--accent-border);
	color:var(--text-muted);
	text-decoration:none;
	cursor:pointer;
	transition:.15s ease;
}
.post-tag:hover{border-color:var(--accent); color:var(--accent);}
.post-similar{margin-bottom:70px;}
.post-similar-label{
	font-family:'JetBrains Mono', monospace;
	font-size:11px;
	letter-spacing:.06em;
	text-transform:uppercase;
	color:var(--text-faint);
	margin-bottom:8px;
}
.post-search-hero{padding-top:8px;}
