/* KeepThemLive — sombre, intime, tendu. */
:root {
  --bg: #0d1118;
  --bg2: #11161f;
  --card: #161d29;
  --card2: #1c2434;
  --line: #263041;
  --text: #e8edf4;
  --muted: #8a93a2;
  --accent: #ff7a26;
  --accent2: #ff5a1f;
  --red: #e6453c;
  --ok: #5fbf77;
  --bubble: #222c3d;
  --bubble-out: #2f5cad;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* aucun débordement horizontal, jamais */
}
h1, h2, h3, .brand-name, .footer-brand { font-family: "Montserrat", -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ intro chat */
#intro {
  position: fixed; inset: 0; z-index: 50;
  background: radial-gradient(ellipse at 50% 30%, #141b28 0%, #0a0d13 70%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.4s ease;
}
#intro.fading { opacity: 0; pointer-events: none; }
.intro-phone { width: min(430px, 92vw); }
.intro-header {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.intro-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card2); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.intro-name { font-weight: 600; font-size: 16px; }
.intro-status { font-size: 12.5px; color: var(--ok); }
.intro-feed { min-height: 220px; display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: 84%; padding: 9px 14px; border-radius: 16px;
  background: var(--bubble); color: var(--text);
  font-size: 15px; width: fit-content;
  border-bottom-left-radius: 5px;
  animation: pop .28s ease;
}
.bubble.out {
  align-self: flex-end; background: var(--bubble-out);
  border-bottom-left-radius: 16px; border-bottom-right-radius: 5px;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.typing {
  display: inline-flex; gap: 5px; padding: 13px 16px;
  background: var(--bubble); border-radius: 16px; border-bottom-left-radius: 5px;
  width: fit-content;
}
.typing i {
  width: 7px; height: 7px; border-radius: 50%; background: #7d8899;
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 70%, 100% { opacity: .25; } 30% { opacity: 1; } }
.intro-replies { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.intro-replies button {
  background: transparent; border: 1px solid var(--bubble-out);
  color: #9db9ea; border-radius: 20px; padding: 9px 18px;
  font-size: 14.5px; cursor: pointer; transition: background .2s;
  animation: pop .3s ease;
}
.intro-replies button:hover { background: rgba(47, 92, 173, .25); }
.intro-skip {
  position: fixed; bottom: 22px; right: 26px;
  background: none; border: none; color: #4d5665;
  font-size: 13px; cursor: pointer; letter-spacing: .5px;
}
.intro-skip:hover { color: var(--muted); }
.intro-sound {
  position: fixed; bottom: 18px; left: 24px;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-size: 14px; padding: 5px 10px; cursor: pointer;
}

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px clamp(16px, 4vw, 40px);
  background: rgba(13, 17, 24, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 9px; }
.brand-name { font-weight: 800; letter-spacing: .5px; font-size: 15px; }
.brand-name em, .footer-brand em { color: var(--red); }
.nav-right { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); }
.nav-links { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); font-size: 14px; color: var(--muted); }
.nav-links a { white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-app { color: var(--accent); font-weight: 600; }
.icon-btn, .lang-btn, .burger {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 4px 9px; cursor: pointer; font-size: 13px;
}
.icon-btn:hover, .lang-btn:hover, .burger:hover { color: var(--text); border-color: #3a4658; }
.burger { display: none; font-size: 17px; line-height: 1; padding: 3px 9px 5px; }

/* Mobile : les liens passent dans un panneau sous la barre (menu burger). */
@media (max-width: 800px) {
  .burger { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(13, 17, 24, .98); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 22px; font-size: 15px;
    border-top: 1px solid #1a2230;
  }
}

/* --------------------------------------------------------- hero (compact) */
.hero {
  text-align: center; padding: clamp(28px, 4.5vh, 52px) 20px 8px;
  background: radial-gradient(ellipse at 50% -20%, #1a2231 0%, var(--bg) 65%);
}
.hero h1 { font-size: clamp(26px, 4.2vw, 42px); font-weight: 800; letter-spacing: -0.5px; }
.hero-tag {
  margin-top: 8px; font-size: clamp(15px, 2vw, 18px);
  color: var(--accent); font-weight: 600; letter-spacing: .3px;
}
.kpis {
  display: flex; gap: clamp(14px, 3.5vw, 42px); justify-content: center;
  margin-top: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted);
}
.kpis b { color: var(--text); font-family: "Montserrat", sans-serif; font-size: 16px; margin-right: 4px; }
.kpis i { font-style: normal; }

/* -------------------------------------------------------------- stories */
.stories { padding: 18px clamp(14px, 3.5vw, 40px) 30px; }
.grid {
  display: grid; gap: 14px; max-width: 1120px; margin: 0 auto;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
  cursor: pointer;
}
.card:hover { transform: translateY(-3px); border-color: #35455f; }
/* Illustration d'ambiance en tête de carte, texte en dessous : rien ne se
   superpose. Remplaçable par une vraie image (assets/covers/<id>.svg|jpg). */
.cover { position: relative; }
.cover img {
  display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover;
  filter: saturate(.85);
  transition: filter .25s ease, transform .3s ease;
}
.card:hover .cover img { filter: saturate(1.05); }
.cover .price {
  position: absolute; top: 10px; right: 10px;
  background: rgba(8, 11, 17, .82); backdrop-filter: blur(3px);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 9px; font-size: 12.5px; font-weight: 700; color: var(--accent);
}
.cover .price.free { color: var(--ok); }
.card-body { padding: 13px 16px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card .tagline { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.card h3 { font-size: 18px; font-weight: 700; }
.card .desc {
  font-size: 13.5px; color: #a6b0bf; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta {
  display: flex; gap: 13px; align-items: center; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 10px;
}
.diff { display: inline-flex; gap: 3px; align-items: center; }
.diff i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2c3a52; display: inline-block;
}
.diff i.on { background: var(--red); }
.success { color: var(--muted); }
.success b { color: var(--text); font-weight: 600; }

/* Aperçu chat au survol : les messages S'ÉCRIVENT (rien de pré-affiché).
   Panneau à la taille EXACTE de la carte : les messages s'empilent en bas
   et « remontent » comme dans une vraie conversation — les plus anciens
   sortent par le haut, rien ne déborde jamais. */
.card .peek {
  position: absolute; inset: 0;
  padding: 14px 16px;
  background: var(--bg2);
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
  overflow: hidden;
}
.card.peeking .peek { opacity: 1; pointer-events: auto; }
.peek .who { font-size: 11.5px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.peek .peek-feed {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 7px;
  justify-content: flex-end; /* le bas de la conversation reste visible */
}
.peek .bubble { font-size: 13.5px; padding: 7px 12px; }
.peek .typing { padding: 10px 14px; }
.peek .typing i { width: 6px; height: 6px; }
.peek .peek-cta { display: flex; gap: 8px; }
.peek .peek-cta .btn { padding: 7px 14px; font-size: 13px; border-radius: 9px; }

/* ---------------------------------------------------------------- divers */
section { scroll-margin-top: 64px; }
.pack, .gift, .app-section { padding: clamp(30px, 6vh, 64px) clamp(16px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; text-align: center; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 10px auto 0; font-size: 15px; }
.stories-note { text-align: center; color: #5d6675; font-size: 13px; margin-top: 16px; }
.btn {
  display: inline-block; border-radius: 12px; padding: 11px 24px;
  font-size: 14.5px; font-weight: 600; cursor: pointer; border: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent2), var(--accent));
  color: #14100c; box-shadow: 0 4px 24px rgba(255, 106, 31, .25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 30px rgba(255, 106, 31, .38); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #3a4658; }
.pack-card {
  max-width: 880px; margin: 0 auto;
  background: linear-gradient(120deg, #1b2333, #151c29);
  border: 1px solid #2c3a52; border-radius: 20px;
  padding: clamp(22px, 4vw, 36px);
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.pack-card h2 { text-align: left; }
.pack-card p { color: var(--muted); margin-top: 6px; }
.pack-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pack-price { font-size: 28px; font-weight: 800; font-family: "Montserrat", sans-serif; color: var(--accent); }
.badges { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.store-badge { border: 1px solid var(--line); border-radius: 12px; padding: 12px 26px; font-weight: 600; font-size: 15px; }
.store-soon { color: var(--muted); font-size: 14px; }
.footer {
  border-top: 1px solid var(--line); text-align: center;
  padding: 36px 20px 42px; color: var(--muted); font-size: 13.5px;
}
.footer-brand { font-weight: 800; letter-spacing: .5px; margin-bottom: 10px; }
.footer-fiction { margin-bottom: 14px; font-size: 12.5px; color: #5d6675; }
.footer nav a:hover { color: var(--text); }
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5, 7, 10, .75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: var(--card2); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px; max-width: 420px; text-align: center;
}
.modal-card h3 { font-size: 20px; margin-bottom: 10px; }
.modal-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }

/* pages légales */
.legal-body { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.legal-body h1 { font-size: 28px; margin-bottom: 8px; }
.legal-body h2 { font-size: 19px; margin: 28px 0 8px; text-align: left; }
.legal-body p, .legal-body li { color: #b6bfcc; font-size: 15px; margin-bottom: 10px; }
.legal-body ul { padding-left: 22px; }
.legal-updated { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
