/* ═══════════════════════════════════════════════
   SafePlace — Global Styles
   ═══════════════════════════════════════════════ */

/* ── Full-page layout + no horizontal scroll ── */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: #f9f9f7;
}
body {
  width: 100%;
  min-height: 100svh;
  overflow-x: hidden;
  background: transparent;
}

/* ── Fond ambiant — halos aux couleurs de la marque + trame discrète ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 88% -12%, rgba(159,247,0,0.16), transparent 62%),
    radial-gradient(800px 560px at -14% 18%, rgba(11,61,46,0.10), transparent 60%),
    radial-gradient(950px 700px at 50% 118%, rgba(160,209,188,0.24), transparent 65%),
    linear-gradient(180deg, #fafdf6 0%, #f9f9f7 30%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(0,38,27,0.055) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.15) 55%, transparent);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.15) 55%, transparent);
}

/* ── Small phone adjustments (≤ 390px) ── */
@media (max-width: 390px) {
  .btn-lime, .btn-glass {
    padding: 10px 18px;
    font-size: 0.8rem;
    gap: 6px;
  }
  .btn-outline {
    padding: 8px 14px;
    font-size: 0.78rem;
  }
  .section-title {
    font-size: 1.25rem !important;
  }
  .sp-section {
    padding: 1.75rem 0;
  }
  .pill-badge {
    font-size: 0.62rem;
    padding: 5px 10px;
  }
}

/* ── Sélection & focus aux couleurs de la marque ── */
::selection { background: rgba(159,247,0,0.35); color: #00261b; }
:focus-visible { outline: 2px solid #9ff700; outline-offset: 2px; border-radius: 4px; }

/* ── Barre de progression de lecture (haut de page) ── */
#sp-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #416900, #9ff700);
  z-index: 200;
  box-shadow: 0 0 12px rgba(159,247,0,0.55);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── Bouton retour en haut ── */
#sp-back-top {
  position: fixed;
  bottom: 110px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #00261b;
  color: #9ff700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34,1.56,0.64,1), background 0.2s;
  box-shadow: 0 10px 30px rgba(0,38,27,0.35);
}
#sp-back-top.show { opacity: 1; transform: none; pointer-events: auto; }
#sp-back-top:hover { background: #9ff700; color: #00261b; }
@media (max-width: 1023px) {
  #sp-back-top { bottom: 24px; }
}

/* ── Liens de navigation : soulignement animé ── */
header nav a:not(.rounded-full) { position: relative; }
header nav a:not(.rounded-full)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: #9ff700;
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
header nav a:not(.rounded-full):hover::after { transform: scaleX(1); }

/* ── Zoom doux des visuels au survol des cartes ── */
.ep-card .episode-cover img,
.vid-card .episode-cover img,
.ep-card img,
.vid-card img {
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.ep-card:hover .episode-cover img,
.vid-card:hover .episode-cover img { transform: scale(1.06); }

/* ── Apparition douce du contenu de page ── */
@keyframes spPageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
main { animation: spPageIn 0.45s ease both; }

/* ── Buttons ── */
.btn-lime {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.82rem 1.5rem;
  background: #9ff700;
  color: #00261b;
  font-weight: 800;
  font-family: 'Poppins', 'Montserrat', sans-serif;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.18s ease,
              background 0.18s ease;
}
.btn-lime:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(159,247,0,0.45);
}
.btn-lime:active { transform: scale(0.96); }

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.82rem 1.5rem;
  background: rgba(255,255,255,0.13);
  color: #fff;
  font-weight: 700;
  font-family: 'Poppins', 'Montserrat', sans-serif;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.22);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.88rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
.btn-glass:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}
.btn-glass:active { transform: scale(0.96); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  border: 1.5px solid rgba(0,38,27,0.18);
  color: #00261b;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.83rem;
  background: transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.btn-outline:hover {
  background: rgba(0,38,27,0.05);
  border-color: rgba(0,38,27,0.35);
  transform: translateY(-1px);
}

/* ── Pill badge ── */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
}

/* ── Section title ── */
.section-title {
  font-family: 'Poppins', 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #00261b;
  line-height: 1.2;
}

/* ── Bento cards ── */
.bento-card {
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.3s ease;
}
.bento-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 28px 70px rgba(0,38,27,0.32);
}
.card-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}

/* ── Episode card (carousel) ── */
.ep-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,38,27,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ep-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 50px rgba(0,38,27,0.12);
}

/* ── Video card (home) ── */
.vid-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,38,27,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.vid-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 50px rgba(0,38,27,0.12);
}

/* ── Episode cover (video thumb) ── */
.episode-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #00261b, #416900);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Play FAB ── */
.play-fab {
  background: #9ff700;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(159,247,0,0.5);
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.22s ease;
  color: #00261b;
}
.play-fab:hover {
  transform: scale(1.14);
  box-shadow: 0 8px 36px rgba(159,247,0,0.65);
}

/* ── Reveal animation ── */
.sp-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.sp-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Section spacing ── */
.sp-section {
  padding: 3rem 0;
}

/* ── Live dot ── */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ff700;
  animation: livePulse 2s infinite;
  flex-shrink: 0;
}

/* ── Scroll indicator bounce ── */
.scroll-ind {
  animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

/* ── Host / action bar (podcast detail) ── */
.host-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #f4f4f1;
  border-radius: 20px;
  margin-top: 1rem;
}
.action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Share panel ── */
.share-panel {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0,38,27,0.18);
  z-index: 20;
  min-width: 210px;
  animation: fadeDown 0.2s ease;
}
.share-panel.open { display: block; }
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.share-btn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #1a1c1b;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.share-btn-item:hover { background: #f4f4f1; }

/* ── Reminder toast ── */
#sp-reminder-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #00261b;
  color: #9ff700;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 300;
  white-space: nowrap;
}
#sp-reminder-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Popup d'installation PWA (Android/desktop + iOS) ── */
.sp-install-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sp-install-modal.show { opacity: 1; visibility: visible; pointer-events: auto; }
.sp-install-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,21,15,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sp-install-modal__card {
  position: relative;
  background: #fff;
  border-radius: 28px;
  padding: 2.1rem 1.75rem 1.75rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,38,27,0.4);
  transform: scale(0.9) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.sp-install-modal.show .sp-install-modal__card { transform: scale(1) translateY(0); }
.sp-install-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f4f4f1;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00261b;
  transition: background 0.15s ease;
}
.sp-install-modal__close:hover { background: #e8e8e6; }
.sp-install-modal__icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  margin: 0 auto 1.25rem;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0,38,27,0.28);
}
.sp-install-modal__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-install-modal__card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #00261b;
  margin: 0 0 0.65rem;
  line-height: 1.3;
}
.sp-install-modal__card p {
  font-size: 0.87rem;
  color: rgba(0,38,27,0.6);
  line-height: 1.6;
  margin: 0 0 1.6rem;
}
.sp-install-modal__cta {
  width: 100%;
  background: #9ff700;
  color: #00261b;
  border: none;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(159,247,0,0.35);
  transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
}
.sp-install-modal__cta:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(159,247,0,0.45); }
.sp-install-modal__cta:active { transform: scale(0.97); }
.sp-install-modal__cta--ghost {
  background: #f4f4f1;
  color: #00261b;
  box-shadow: none;
}
.sp-install-modal__cta--ghost:hover { background: #e8e8e6; box-shadow: none; transform: none; }
