
/* ------------------------------------------------------------
   🌿 Bo-DONG — Vibration du Jour V2
   STYLE.CSS — Premium Responsive — V5 CLEAN
------------------------------------------------------------- */

/* Reset propre */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Root + body */
html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: #f6e9e2;
  color: #2b1e17;
  overflow: hidden;
}

/* ------------------------------------------------------------
   VARIABLES
------------------------------------------------------------- */
:root {
  --terracotta: #ce6c54;
  --cream: #fcf3e6;
  --text-main: #3c2f2a;
  --text-soft: #7b6455;
  --pill-bg: #ffffff;
  --radius-pill: 999px;
  --radius-card: 24px;
  --shadow-pill: 0 16px 45px rgba(0, 0, 0, 0.14);
}

/* ------------------------------------------------------------
   DESKTOP BLOCKED MESSAGE
------------------------------------------------------------- */
#desktop-message {
  display: none;
}

#desktop-message .desktop-inner {
  text-align: center;
  padding: 64px 24px;
  max-width: 700px;
  margin: 0 auto;
}

#desktop-message h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

/* Desktop : on bloque l'app */
@media (min-width: 768px) {
  #desktop-message {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--cream);
    align-items: center;
    justify-content: center;
    z-index: 50;
  }

  #vibration-app {
    display: none;
  }
}

/* ------------------------------------------------------------
   SCREENS – FOUNDATION LAYOUT
------------------------------------------------------------- */
.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 2.5rem 1.6rem;
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  /* TRANSITION DÉSACTIVÉE pour éviter blocage pendant animation */
  transition: none;
  z-index: 1; /* Assurer que les screens sont au-dessus du background */
}

.screen--visible {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0);
  z-index: 1; /* Assurer que la screen visible est cliquable */
  /* TRANSITION DÉSACTIVÉE */
  transition: none;
}

/* Empêche TOUT écran non actif d’être affiché, sauf le splash
   (le splash est géré par sa propre classe + ID) */
.screen:not(.screen--visible):not(#screen-splash) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.screen-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ------------------------------------------------------------
   WAVES SVG XXL
------------------------------------------------------------- */
.bg-waves {
  position: absolute;
  inset: -60px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.bg-waves .waves-svg {
  width: 150%;
  height: 150%;
  transform: translate3d(-18%, -6%, 0);
  animation: wavesDrift 22s ease-in-out infinite alternate;
}

@keyframes wavesDrift {
  0% {
    transform: translate3d(-18%, -8%, 0) scale(1.02);
  }
  50% {
    transform: translate3d(-10%, -4%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-14%, 0%, 0) scale(1.03);
  }
}

/* ------------------------------------------------------------
   🌿 Bo-DONG — SPLASH V7 (Strict Maquette)
   Logo centré • Ombre forte • Tagline middle • Footer bas
------------------------------------------------------------- */

/* Container de l'app */
#vibration-app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  background: #CE6C54;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  overflow: hidden;
}

/* ------------------------------------------------------------
   🌿 FIX SPLASH — ALIGNEMENT PARFAIT
------------------------------------------------------------- */

#screen-splash {
  background: #CE6C54;
  color: #ffffff;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  padding: 0 22px;

  display: flex;
  flex-direction: column;   /* ✔ */
  justify-content: center;  /* ✔ Centre vertical */
  align-items: center;      /* ✔ Centre horizontal */
  text-align: center;
}

.splash-inner {
  width: 100%;
  max-width: 420px;

  display: flex;
  flex-direction: column;

  justify-content: space-between; /* ✔ Footer en bas */
  height: 100%;                    /* ✔ Centrage parfait */
  padding: 40px 0 34px;
}
/* Zone haute : logo + tagline */
.splash-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;  /* <-- Le centre parfait */
  flex-grow: 1;             /* <-- Zone haute prend toute la place disponible */
}

/* Logo */
.splash-logo {
  width: 160px;
  height: auto;
  margin-bottom: 22px;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.25));
}

/* Tagline */
.splash-tagline {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.36;
  margin: 0;
}

/* Footer */
.splash-footer {
  font-size: 12px;
  opacity: 0.92;
  line-height: 1.42;
}

/* ------------------------------------------------------------
   INTRO (slide 0)
------------------------------------------------------------- */
.screen--intro {
  background: var(--cream);
}

.intro-content {
  width: 100%;
  height: 100%;
  text-align: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intro-title {
  font-size: 24px;
  color: var(--text-main);
  line-height: 1.4;
  font-weight: 600;
}

/* ------------------------------------------------------------
   TAP (slide 1)
------------------------------------------------------------- */
.screen--tap {
  background: var(--cream);
}

.tap-content {
  width: 100%;
  height: 100%;
  text-align: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tap-title {
  font-size: 24px;
  color: var(--text-main);
  line-height: 1.4;
  font-weight: 600;
  margin-bottom: 14px;
}

.tap-subtitle {
  font-size: 18px;
  color: var(--text-soft);
  line-height: 1.4;
}

/* ------------------------------------------------------------
   SHAKE
------------------------------------------------------------- */
.screen--shake {
  background: var(--cream);
}

.screen-inner--shake {
  justify-content: center;
}

.shake-text {
  text-align: center;
}

.shake-title {
  font-size: 24px;
  margin-bottom: 14px;
}

.shake-sub {
  font-size: 18px;
  color: var(--text-soft);
}

/* texte d’aide en bas (2 lignes max) */
.shake-help-bottom {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 280px;
  padding: 0 12px;
  font-size: 0.82rem;
  line-height: 1.35rem;
  color: var(--text-soft);
  text-align: center;
}

/* ------------------------------------------------------------
   STEP DOTS
------------------------------------------------------------- */
.steps-indicator {
  position: absolute;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
}

/* Dots actifs - gérés par JS maintenant */
.step-dot.active {
  background: rgba(0, 0, 0, 0.4);
  width: 18px;
}

.steps-indicator--vibration {
  display: none;
}

/* ------------------------------------------------------------
   HEADER VIBRATION
------------------------------------------------------------- */
.screen--vibration {
  background: var(--cream);
}

.app-header {
  position: absolute;
  top: 22px;
  right: 20px;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Brand chip */
.brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-main);
  text-decoration: none;
}

/* Bell */
.notif-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  padding: 0 6px;
  height: 18px;
  min-width: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------
   VIBRATION
------------------------------------------------------------- */
.vibration-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.vibration-text {
  font-size: 24px;
  line-height: 1.55;
  opacity: 0;
  color: var(--text-main);
  font-weight: 700;
}

.vibration-sub {
  margin-top: 26px;
  font-size: 15px;
  color: var(--text-soft);
}

/* Animation de texte */
@keyframes vibrationIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------
   ACTION BUTTONS
------------------------------------------------------------- */
.actions-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 20px) + 16px);
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px;
}

/* Actions bar sur écran vibration (remontée à la hauteur des anciens points) */
.actions-bar--vibration {
  bottom: 78px;
}

/* Masquer les dots sur la slide vibration */
.screen--vibration .steps-indicator {
  display: none;
}

/* Animation fade + shift vertical pour les transitions */
@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen--visible {
  animation: slideFadeIn 0.5s ease-out;
}

.action-btn {
  flex: 1 1 0;
  height: 50px;
  min-width: 104px;
  padding: 0 12px;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-main);
  gap: 8px;
  white-space: nowrap;
  line-height: 1;
}

.action-btn i,
.action-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Cœur Lucide : état normal */
.action-btn--like svg {
  stroke: #2b1e17;
  stroke-width: 2.4;
  fill: transparent;
  transition: transform 0.18s ease, stroke 0.18s ease, fill 0.18s ease;
}

/* Cœur actif */
.action-btn--like.liked {
  background: rgba(206, 108, 84, 0.18);
  color: var(--terracotta);
}

.action-btn--like.liked svg {
  fill: #ce6c54;
  stroke: #ce6c54;
  transform: scale(1.12);
}

/* ------------------------------------------------------------
   MODAL
------------------------------------------------------------- */
.notif-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 40;
  align-items: center;
  justify-content: center;
}

.notif-modal--visible {
  display: flex;
}

.notif-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
}

.notif-modal-card {
  position: relative;
  background: #fff;
  padding: 24px 22px 18px;
  border-radius: var(--radius-card);
  margin: 0 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.26);
  z-index: 2;
  text-align: center;
}

.notif-modal-icon {
  font-size: 22px;
  margin-bottom: 10px;
}

.notif-modal-text {
  font-size: 15px;
  line-height: 1.5;
}

.notif-close {
  background: none;
  border: none;
  color: var(--terracotta);
  font-size: 15px;
  margin-top: 10px;
  display: inline-block;
}

/* ------------------------------------------------------------
   SMALL SCREENS TWEAK
------------------------------------------------------------- */
@media (max-width: 360px) {
  .screen {
    padding: 2rem 1.2rem;
  }

  .actions-bar {
    bottom: calc(env(safe-area-inset-bottom, 18px) + 12px);
    padding: 0 12px;
    gap: 8px;
  }

  .steps-indicator {
    bottom: 72px;
  }

  .action-btn {
    min-width: 100px;
    padding: 0 10px;
    font-size: 14px;
    gap: 7px;
    height: 48px;
  }
}

/* ------------------------------------------------------------
   OVERRIDE MOBILE (app.bo-dong.fr dans le navigateur)
------------------------------------------------------------- */
@media (max-width: 767px) {
  #desktop-message {
    display: none !important;
  }

  #vibration-app {
    display: block !important;
  }
}
