/* =========================================================
   SST Sans Tabou — couche visuelle & animations
   S'ajoute par-dessus Bootstrap et les styles existants.
   ========================================================= */

:root {
  --sst-navy: #22507e;
  --sst-navy-dark: #143656;
  --sst-navy-deep: #0d2742;
  --sst-orange: #f37331;
  --sst-orange-dark: #d65a20;
  --sst-bg: #f4f6f9;
  --sst-ink: #26323f;
  --sst-muted: #7a8696;
  --sst-radius: 1rem;
  --sst-shadow-sm: 0 2px 8px rgba(13, 39, 66, .08);
  --sst-shadow: 0 10px 30px rgba(13, 39, 66, .12);
  --sst-shadow-lg: 0 22px 50px rgba(13, 39, 66, .22);
  --sst-ease: cubic-bezier(.22, .9, .32, 1);
}

html { scroll-behavior: smooth; }
#contact { scroll-margin-top: 70px; }

body {
  background-color: var(--sst-bg) !important;
  color: var(--sst-ink) !important;
  overflow-x: hidden;
}

::selection { background: var(--sst-orange); color: #fff; }

/* ---------- Boutons : transitions communes ---------- */
.btn {
  transition: transform .25s var(--sst-ease), box-shadow .25s var(--sst-ease),
              background-color .2s, color .2s, border-color .2s;
}
.btn-primary:not(.disabled):not(:disabled):hover,
.btn-secondary:not(.disabled):not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(243, 115, 49, .35);
}
.btn-secondary:not(.disabled):not(:disabled):hover {
  box-shadow: 0 8px 18px rgba(34, 80, 126, .35);
}

/* ---------- Barre de progression de lecture ---------- */
#sst-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--sst-orange), #ffb07c);
  transform-origin: 0 50%; transform: scaleX(0);
  z-index: 2000; pointer-events: none;
}

/* =========================================================
   HERO
   ========================================================= */
.header-color {
  background:
    radial-gradient(ellipse 60% 70% at 50% 35%, rgba(255,255,255,.10), transparent 70%),
    radial-gradient(circle at 12% 0%, #2f6aa3 0, transparent 45%),
    radial-gradient(circle at 92% 100%, #1a426a 0, transparent 50%),
    linear-gradient(to top, #9c9c9c 0%, var(--sst-navy) 3%, var(--sst-navy-dark) 100%) !important;
}

/* halo orange qui respire derrière le logo */
.hero-glow {
  position: absolute; left: 50%; top: 42%;
  width: min(560px, 90vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(120,175,230,.30) 0%, rgba(120,175,230,0) 62%);
  border-radius: 50%;
  z-index: 1; pointer-events: none;
  animation: sst-breathe 6s ease-in-out infinite;
}
@keyframes sst-breathe {
  0%, 100% { opacity: .55; scale: .92; }
  50%      { opacity: 1;   scale: 1.06; }
}

/* éclairs décoratifs : flottement doux (la propriété "translate"
   se combine avec les "transform" déjà présents en ligne) */
.sst-slash {
  animation: sst-float 7s ease-in-out infinite;
  will-change: translate;
}
.sst-slash:nth-of-type(2n)  { animation-duration: 9s;  animation-delay: -2s; }
.sst-slash:nth-of-type(3n)  { animation-duration: 11s; animation-delay: -5s; }
.sst-slash:nth-of-type(4n)  { animation-direction: reverse; }
@keyframes sst-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

/* logo : entrée + léger survol */
.hero-logo {
  animation: sst-pop .9s var(--sst-ease) both;
  transition: transform .4s var(--sst-ease), filter .4s;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.25));
}
.hero-logo:hover { transform: scale(1.04) rotate(-1deg); }
@keyframes sst-pop {
  from { opacity: 0; transform: translateY(18px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

.hero-tagline {
  animation: sst-rise .9s .25s var(--sst-ease) both;
  letter-spacing: .01em;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.hero-tagline .accent { color: var(--sst-orange); }
@keyframes sst-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* égaliseur audio sous le slogan */
.sound-wave {
  position: relative; z-index: 3;
  display: flex; justify-content: center; align-items: center;
  gap: 4px; height: 34px; margin: -.5rem auto .5rem;
  animation: sst-rise .9s .45s var(--sst-ease) both;
}
.sound-wave span {
  display: block; width: 4px; height: 100%;
  border-radius: 4px;
  background: linear-gradient(to top, var(--sst-orange), #ffc39e);
  transform-origin: 50% 50%;
  animation: sst-eq 1.1s ease-in-out infinite;
  opacity: .9;
}
.sound-wave span:nth-child(odd)  { background: linear-gradient(to top, rgba(255,255,255,.55), #fff); }
.sound-wave span:nth-child(3n)   { animation-duration: .9s; }
.sound-wave span:nth-child(4n)   { animation-duration: 1.35s; }
.sound-wave span:nth-child(5n)   { animation-duration: .75s; }
@keyframes sst-eq {
  0%, 100% { transform: scaleY(.18); }
  50%      { transform: scaleY(1); }
}

/* =========================================================
   EN-TÊTE / NAVIGATION
   ========================================================= */
#siteHeader {
  border-radius: 0 0 var(--sst-radius) var(--sst-radius);
  box-shadow: var(--sst-shadow-sm);
}
#siteHeader.fixed {
  border-radius: 0;
  background: linear-gradient(90deg, var(--sst-navy-dark), var(--sst-navy)) !important;
  animation: sst-drop .35s var(--sst-ease);
}
@keyframes sst-drop {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
#siteHeader .nav-btn { position: relative; overflow: hidden; }
#siteHeader .nav-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(243,115,49,.3); }
#siteHeader .nav-btn.is-current,
#siteHeader .nav-btn.is-current:hover {
  background-color: var(--sst-orange);
  border-color: var(--sst-orange);
  color: #fff !important;
}
#siteHeader.fixed .nav-btn.is-current { border-color: #fff; }
#siteHeader.fixed .nav-btn:hover { background-color: rgba(255,255,255,.15); }
#siteHeader.fixed .nav-btn.is-current:hover { background-color: var(--sst-orange); }

/* =========================================================
   TITRES DE SECTION
   ========================================================= */
.section-title h2 { font-weight: 800; letter-spacing: -.01em; position: relative; }
.section-title h2::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.35rem;
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--sst-orange), rgba(243,115,49,0));
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s .15s var(--sst-ease);
}
.section-title.is-visible h2::after,
.no-anim .section-title h2::after { transform: scaleX(1); }
.section-title img { transition: transform .3s var(--sst-ease); }
.section-title.is-visible img { animation: sst-zap .7s .4s var(--sst-ease) both; }
.section-title:hover img { transform: translateY(-6px) rotate(-12deg) scale(1.15) !important; }
@keyframes sst-zap {
  0%   { rotate: 0deg;   scale: 1; }
  30%  { rotate: -18deg; scale: 1.35; }
  60%  { rotate: 10deg;  scale: .95; }
  100% { rotate: 0deg;   scale: 1; }
}

.about-text { font-size: 1.02rem; line-height: 1.75; max-width: 960px; margin-inline: auto; }

/* compteurs « À propos » */
.sst-stats {
  display: flex; justify-content: center; gap: .75rem;
  margin-top: 1.5rem;
}
.sst-stat {
  flex: 1 1 0; min-width: 0; max-width: 190px; padding: 1rem .5rem;
  background: #fff; border-radius: var(--sst-radius);
  box-shadow: var(--sst-shadow-sm);
  border-bottom: 3px solid var(--sst-orange);
  transition: transform .3s var(--sst-ease), box-shadow .3s;
}
.sst-stat:hover { transform: translateY(-4px); box-shadow: var(--sst-shadow); }
.sst-stat .num {
  display: block; font-size: 2.2rem; font-weight: 800; line-height: 1;
  color: var(--sst-navy);
}
.sst-stat .lbl { font-size: .78rem; font-weight: 600; color: var(--sst-muted); text-transform: uppercase; letter-spacing: .06em; }

/* =========================================================
   PANNEAU « NOS ÉPISODES RÉCENTS »
   ========================================================= */
.episodes-panel {
  position: relative; overflow: hidden;
  padding: 2rem 1.25rem !important;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(243,115,49,.18), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(255,255,255,.08), transparent 45%),
    linear-gradient(135deg, var(--sst-navy) 0%, var(--sst-navy-deep) 100%);
  box-shadow: var(--sst-shadow-lg);
}
.episodes-panel::before,
.episodes-panel::after {
  content: ""; position: absolute; pointer-events: none;
  background: url("/lib/img/sst_slash_bl.png") center / contain no-repeat;
  opacity: .06;
}
.episodes-panel::before { width: 260px; height: 260px; top: -60px; right: -50px; rotate: 14deg; animation: sst-float 10s ease-in-out infinite; }
.episodes-panel::after  { width: 200px; height: 200px; bottom: -50px; left: -40px; rotate: -18deg; animation: sst-float 12s ease-in-out infinite reverse; }
.episodes-panel > * { position: relative; z-index: 1; }
@media (min-width: 768px) { .episodes-panel { padding: 2.5rem 2rem !important; } }

/* =========================================================
   CARTES D'ÉPISODE
   ========================================================= */
.episode-card {
  border: 0;
  border-radius: var(--sst-radius) !important;
  overflow: hidden;
  box-shadow: var(--sst-shadow);
  transition: transform .4s var(--sst-ease), box-shadow .4s var(--sst-ease);
}
.episode-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sst-shadow-lg);
}
.episode-card h5 { font-weight: 800; color: var(--sst-navy); }
.episode-card h5 u { text-decoration: none; }
.episode-card h5 b {
  background: linear-gradient(transparent 62%, rgba(243,115,49,.28) 62%);
  padding: 0 .1em;
}
.episode-card .card-body { padding-bottom: 2rem; }
.episode-card .card-body p { font-weight: 400 !important; color: #4a5562; font-size: .95rem; line-height: 1.55; }
.episode-card .card-footer {
  background: #fff;
  border-top: 1px solid rgba(13,39,66,.08);
  padding: .85rem;
}
.episode-card .card-footer .btn { border-radius: 50rem; padding-inline: 1.25rem; font-weight: 600; }

/* vignette + bouton lecture en superposition */
.ep-thumb {
  position: relative; overflow: hidden;
  background: #fff; cursor: pointer;
}
.ep-thumb.is-disabled { cursor: default; }
.ep-img {
  display: block; width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: cover !important;
  transition: transform .7s var(--sst-ease), filter .4s;
}
.ep-img[src$="sst_logo_bl.jpg"] { object-fit: contain !important; }
.episode-card:hover .ep-thumb:not(.is-disabled) .ep-img { transform: scale(1.07); filter: brightness(.8); }
.ep-play {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sst-orange); color: #fff; font-size: 1.4rem;
  box-shadow: 0 0 0 0 rgba(243,115,49,.6);
  transform: translate(-50%, -50%) scale(.6);
  opacity: 0;
  transition: opacity .3s, transform .4s var(--sst-ease);
  pointer-events: none;
}
.ep-play i { margin-left: 4px; }
.episode-card:hover .ep-play {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
  animation: sst-ring 1.6s infinite;
}
@keyframes sst-ring {
  0%   { box-shadow: 0 0 0 0 rgba(243,115,49,.55); }
  80%  { box-shadow: 0 0 0 18px rgba(243,115,49,0); }
  100% { box-shadow: 0 0 0 0 rgba(243,115,49,0); }
}

/* « Lire la suite » */
.ep-desc.is-clamped {
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden;
}
.ep-more {
  border: 0; background: none; padding: 0;
  margin-top: -.6rem; margin-bottom: .4rem;
  font-size: .85rem; font-weight: 700; color: var(--sst-orange);
}
.ep-more:hover { text-decoration: underline; }
.ep-more i { transition: transform .3s; font-size: .75em; }
.ep-more[aria-expanded="true"] i { transform: rotate(180deg); }

/* pastilles */
.badge-new {
  box-shadow: 0 0 0 0 rgba(243,115,49,.7);
  animation: sst-ring 1.8s infinite;
}
.badge-new .fa-bell { animation: fa-shake 2s infinite; transform-origin: top center; }

/* épisode mis en vedette (orange) : léger halo */
.episode-card[style*="#f37331"] { box-shadow: 0 0 0 2px var(--sst-orange), var(--sst-shadow-lg); }

/* =========================================================
   PLATEFORMES & RÉSEAUX
   ========================================================= */
.social-grid .card { border: 0; background: transparent; }
.social-grid .card-body { padding: 0; }
.social-grid .btn {
  padding: 1.1rem .75rem;
  border-radius: var(--sst-radius);
  font-weight: 700;
  box-shadow: var(--sst-shadow-sm);
  position: relative; overflow: hidden;
}
.social-grid .btn i { display: inline-block; margin-bottom: .35rem; transition: transform .4s var(--sst-ease); }
.social-grid .btn:hover { transform: translateY(-5px); box-shadow: var(--sst-shadow) !important; color: #fff; }
.social-grid .btn:hover i { transform: scale(1.18) rotate(-6deg); }
/* reflet lumineux au survol */
.social-grid .btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--sst-ease);
}
.social-grid .btn:hover::after { transform: translateX(120%); }

.btn.brand-youtube:hover   { background: #ff0000 !important; }
.btn.brand-spotify:hover   { background: #1db954 !important; }
.btn.brand-apple:hover     { background: linear-gradient(135deg, #d56ef5, #8a2be2) !important; }
.btn.brand-facebook:hover  { background: #1877f2 !important; }
.btn.brand-linkedin:hover  { background: #0a66c2 !important; }
.btn.brand-tiktok:hover    { background: #111 !important; box-shadow: -3px -3px 0 #25f4ee, 3px 3px 0 #fe2c55 !important; }
.btn.brand-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%) !important; }

/* =========================================================
   CONTACT / PIED DE PAGE
   ========================================================= */
.footer-color-line {
  background: linear-gradient(to bottom, #9c9c9c 0%, var(--sst-navy) 10%, var(--sst-navy-dark) 100%) !important;
  padding-bottom: .5rem;
}
.footer-color {
  background-color: var(--sst-navy-dark) !important;
  font-size: .85rem;
  color: rgba(255,255,255,.75) !important;
  padding-top: .25rem;
}
#contact a[href^="mailto"] {
  display: inline-block; margin-top: .6rem;
  padding: .55rem 1.3rem; border-radius: 50rem;
  background: var(--sst-orange); color: #fff; text-decoration: none;
  font-weight: 700;
  transition: transform .25s var(--sst-ease), box-shadow .25s, background-color .2s;
}
#contact a[href^="mailto"]::before { content: "\f0e0"; font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; font-weight: 900; margin-right: .5rem; }
#contact a[href^="mailto"]:hover { transform: translateY(-3px); background: var(--sst-orange-dark); box-shadow: 0 10px 22px rgba(0,0,0,.25); }
#contact hr { opacity: .15; margin: 1.5rem 0 0; }

/* bouton retour en haut */
#sst-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 1040;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--sst-orange); color: #fff; font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(243,115,49,.4);
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity .3s, transform .35s var(--sst-ease), background-color .2s;
}
#sst-top.show { opacity: 1; transform: none; pointer-events: auto; }
#sst-top:hover { background: var(--sst-orange-dark); transform: translateY(-3px); }

/* =========================================================
   MODALE LECTEUR
   ========================================================= */
.modal-backdrop.show { opacity: .75; }
#modal_episode .modal-content {
  border: 0; border-radius: 1.25rem; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
#modal_episode .modal-header {
  background: linear-gradient(90deg, var(--sst-navy-dark), var(--sst-navy));
  color: #fff; border: 0;
}
#modal_episode .modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }
#modal_episode.fade .modal-dialog { transform: scale(.92) translateY(20px); transition: transform .4s var(--sst-ease); }
#modal_episode.show .modal-dialog { transform: none; }
#modal_episode .modal-footer { border-top: 1px solid rgba(13,39,66,.08); }
#modal_episode .modal-footer .btn { border-radius: 50rem; font-weight: 600; }

/* =========================================================
   PAGE ÉPISODES : recherche
   ========================================================= */
.ep-search {
  max-width: 520px; margin: 0 auto 2rem;
}
.ep-search-field { position: relative; }
.ep-search input {
  width: 100%; border: 2px solid transparent; border-radius: 50rem;
  padding: .85rem 1.25rem .85rem 3rem;
  background: #fff; box-shadow: var(--sst-shadow-sm);
  font-weight: 500;
  transition: border-color .2s, box-shadow .3s;
}
.ep-search input:focus { outline: none; border-color: var(--sst-orange); box-shadow: 0 0 0 .25rem rgba(243,115,49,.18); }
.ep-search-field > i {
  position: absolute; left: 1.2rem; top: 0; bottom: 0;
  display: flex; align-items: center;
  color: var(--sst-muted); pointer-events: none;
  transition: color .2s;
}
.ep-search-field:focus-within > i { color: var(--sst-orange); }
.ep-search-count { font-size: .85rem; color: var(--sst-muted); margin-top: .5rem; font-weight: 600; }
.ep-empty { display: none; color: var(--sst-muted); font-weight: 600; }
.ep-col-hidden { display: none !important; }
.ep-thumb-side { height: 100%; }
@media (min-width: 1200px) {
  /* vignette latérale : image entière, centrée sur fond marine */
  .ep-thumb-side { display: flex; align-items: center; background: var(--sst-navy); }
}

/* =========================================================
   APPARITION AU DÉFILEMENT
   (actif seulement si le JS a ajouté .js-anim sur <html>)
   ========================================================= */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--sst-ease), transform .8s var(--sst-ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js-anim .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Accessibilité : mouvement réduit
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .sound-wave span { transform: scaleY(.5); }
}

/* page Épisodes : la vignette latérale occupe toute la hauteur de la carte */
@media (min-width: 1200px) {
  .episode-card .card-body.p-0 { display: flex; }
  .episode-card .card-body.p-0 > .row { flex: 1 1 auto; }
}

/* laisse la place au bouton « retour en haut » sous le copyright */
@media (max-width: 767.98px) {
  .footer-color { padding-bottom: 4.5rem !important; }
}
