/* Styles spécifiques Acacia Médias */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800;900&display=swap');

:root {
  --vert-acacia: #00875A;
  --vert-lumineux: #10B981;
  --rouge-dynamic: #D92D20;
  --fond-body: #FFFFFF;
  --fond-secondary: #F8FAFC;
  --texte-principal: #0F172A;
  --texte-secondaire: #475569;
  --bordure-douce: #E2E8F0;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--texte-principal);
  background-color: var(--fond-body);
}

/* Protection contre les débordements de mots longs et URL sur petits écrans */
h1, h2, h3, h4, h5, h6, p, a, span, label, li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Médias 100% fluides */
img, video, iframe, canvas {
  max-width: 100%;
}

.font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Ombre douce du cahier des charges */
.card-shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-shadow-hover {
  transition: all 0.25s ease-in-out;
}
.card-shadow-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

/* Animation Point clignotant Rouge */
@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.2);
  }
}

.animate-pulse-dot {
  animation: pulse-dot 1.2s infinite ease-in-out;
}

/* Animation Ticker Défilant */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 35s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

/* Spectre sonore animé en Vert Menthe #10B981 */
.equalizer-bar {
  display: inline-block;
  width: 3px;
  background-color: var(--vert-lumineux);
  border-radius: 2px;
  transition: height 0.15s ease;
  height: 4px;
}

.equalizer-playing .bar-1 { animation: eq 0.6s infinite ease-in-out alternate; }
.equalizer-playing .bar-2 { animation: eq 0.9s infinite ease-in-out 0.2s alternate; }
.equalizer-playing .bar-3 { animation: eq 0.7s infinite ease-in-out 0.4s alternate; }
.equalizer-playing .bar-4 { animation: eq 0.8s infinite ease-in-out 0.1s alternate; }
.equalizer-playing .bar-5 { animation: eq 0.65s infinite ease-in-out 0.3s alternate; }

@keyframes eq {
  0% { height: 4px; }
  100% { height: 20px; }
}

/* Barre de défilement discrète */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Lettrine stylisée */
.dropcap::first-letter {
  float: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 3.5rem;
  line-height: 0.8;
  font-weight: 800;
  color: var(--vert-acacia);
  padding-right: 0.6rem;
  padding-top: 0.2rem;
}

/* Modale de transition */
.modal-backdrop {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background-color: rgba(15, 23, 42, 0.7);
}

/* Toast Notification */
.toast-notice {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Ratio Carré 1:1 Strict */
.aspect-square {
  aspect-ratio: 1 / 1 !important;
}

.video-thumb-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden;
}

.video-card-square {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1rem;
  overflow: hidden;
}

/* ==========================================================================
   OPTIMISATIONS RESPONSIVES MOBILES & ERGONOMIE TACTILE
   ========================================================================== */

/* Gestion des zones sécurisées (Notch & Home Indicator iOS) */
.safe-bottom {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}
.safe-top {
  padding-top: max(0.25rem, env(safe-area-inset-top));
}

/* Masquage discret de la scrollbar pour défilement horizontal fluide et inertiel */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch;
}

@supports (padding: max(0px)) {
  body {
    padding-bottom: max(6rem, calc(5rem + env(safe-area-inset-bottom)));
  }
  #radio-bottom-player {
    padding-bottom: max(0.625rem, env(safe-area-inset-bottom));
  }
}

/* Prévention du zoom automatique gênant d'iOS Safari lors du focus d'un champ texte */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="datetime-local"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Interactions tactiles et retours haptiques visuels */
.touch-action-manipulation {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tap-active {
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.tap-active:active {
  transform: scale(0.96);
  opacity: 0.88;
}

/* Tiroir de Navigation Mobile (Off-Canvas Drawer) */
#mobile-drawer-overlay {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-drawer-overlay.drawer-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#mobile-drawer-panel {
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
#mobile-drawer-overlay.drawer-open #mobile-drawer-panel {
  transform: translateX(0) !important;
}


/* Support du scroll fluide avec snapping */
.scroll-snap-x {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.scroll-snap-item {
  scroll-snap-align: start;
}

/* Sécurité & Anti-Bot : Masquage invisible des champs pièges Honeypot */
.acacia-hp-field,
.hp-field-wrap {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* =========================================================================
   SYSTÈME DE LECTEUR VIDÉO PERSISTANT & MINI-PLAYER (CONTINUITÉ ABSOLUE)
   ========================================================================= */

#floating-video-player {
  will-change: transform, top, left, width, height;
}

/* Mode Docked : Intégré géométriquement sans remount dans la page /videos/[slug] */
#floating-video-player.docked-mode {
  position: absolute !important;
  bottom: auto !important;
  right: auto !important;
  transform: none !important;
  max-width: none !important;
  z-index: 35 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-shadow: none !important;
  transition: none !important;
}

#floating-video-player.docked-mode #acacia-persistent-card {
  border-radius: 1.5rem !important; /* rounded-3xl */
  border-color: #1e293b !important; /* slate-800 */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04) !important;
  background-color: #020617 !important;
}

#floating-video-player.docked-mode #mini-player-bottom-bar,
#floating-video-player.docked-mode #mini-player-overlay {
  display: none !important;
}

/* Mode Flottant : Picture-in-Picture en bas à droite */
#floating-video-player.floating-mode {
  position: fixed !important;
  z-index: 50 !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease-out;
}

