/* ============================================================
   TonTchat — page d'accueil (location de tchat KikooTchat)
   Plan : aplat violet en ouverture, papier clair pour lire,
   encre profonde pour les offres. Jaune réservé au Premium et
   aux actions. Rouge uniquement pour les pastilles "en direct".
   ============================================================ */
:root {
  --vio: #5232eb;
  --vio-2: #3a21c2;
  --vio-soft: #b9a8ff;
  --ink: #150f33;
  --ink-2: #211850;
  --paper: #f5f3fc;
  --white: #ffffff;
  --sun: #ffd23f;
  --sun-hi: #ffe07a;
  --sun-ink: #2a1f00;
  --live: #ff4560;
  --text: #1b1535;
  --muted-l: #5a5477;
  --muted-d: rgba(255, 255, 255, .74);
  --line-l: #e4dff6;
  --line-d: rgba(255, 255, 255, .14);
  --focus: #ffd23f;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  background: var(--vio); z-index: 60;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.inc, .install, .faq { --focus: var(--vio); }

.wrap {
  width: 100%; max-width: 1200px; margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
}

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -.025em; }
.sub { margin: 14px 0 0; max-width: 44em; color: var(--muted-l); font-size: 1.1rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  padding: .9rem 1.35rem; border-radius: 12px; border: 2px solid transparent;
  font: 600 1rem/1.1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sun { background: var(--sun); color: var(--sun-ink); }
.btn-sun:hover { background: var(--sun-hi); }
.btn-line { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-line:hover { background: rgba(255, 255, 255, .12); }
.btn-sm { padding: .62rem 1rem; font-size: .95rem; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--vio); color: #fff; --focus: #ffd23f; }
.top-in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; font: 800 1.35rem/1 var(--display); letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.links { display: flex; gap: 26px; margin-left: 14px; }
.links a, .login { color: rgba(255, 255, 255, .9); text-decoration: none; font-weight: 500; }
.links a:hover, .login:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.top-cta { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 0; position: relative; border-radius: 10px; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .15s ease, top .15s ease; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }
.mnav { display: flex; flex-direction: column; background: var(--vio-2); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); }
.mnav a { color: #fff; text-decoration: none; font-weight: 500; padding: .85rem 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }

/* ---------- Ouverture ---------- */
.hero { background: var(--vio); color: #fff; overflow-x: clip; position: relative; z-index: 2; --focus: #ffd23f; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: start; padding-top: 52px; }
.hero-copy { padding-bottom: 84px; }
.hero h1 { font-weight: 800; font-size: clamp(2.5rem, 5.4vw, 4.3rem); line-height: 1.02; letter-spacing: -.035em; }
.lead { margin: 22px 0 0; font-size: 1.2rem; line-height: 1.55; color: rgba(255, 255, 255, .88); max-width: 33em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-note { margin: 22px 0 0; color: rgba(255, 255, 255, .8); font-size: .98rem; }
.hero-note strong { color: #fff; font-variant-numeric: tabular-nums; }

/* Fenêtre de tchat (illustration) */
.stage { position: relative; align-self: center; z-index: 3; }
.win { background: #fff; color: var(--text); border-radius: 18px; overflow: hidden; box-shadow: 0 34px 80px rgba(12, 6, 70, .5); font-size: .85rem; line-height: 1.4; }
.win-bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #eeebfa; border-bottom: 1px solid var(--line-l); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #cfc8ea; display: block; }
.win-title { font-weight: 600; color: #4a4470; }
.live-count { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #4a4470; }
.live-count b, .tag-live b { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: block; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.win-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 340px; }
.rooms { background: #f7f5fd; border-right: 1px solid var(--line-l); padding: 14px 10px; }
.rooms p { margin: 0 8px 8px; font-weight: 700; color: #6b6590; font-size: .78rem; }
.rooms ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rooms li { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; color: #3c3560; font-weight: 500; }
.rooms li span { color: #9a93bd; }
.rooms li em { margin-left: auto; font-style: normal; font-size: .75rem; color: #7d76a0; font-variant-numeric: tabular-nums; }
.rooms li.on { background: var(--vio); color: #fff; }
.rooms li.on span, .rooms li.on em { color: rgba(255, 255, 255, .8); }
.room { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-width: 0; }
.cams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cam { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.cam::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .5) 0 13%, transparent 14%),
  radial-gradient(ellipse at 50% 104%, rgba(255, 255, 255, .38) 0 40%, transparent 41%); }
.c1 { background: linear-gradient(155deg, #ff8a65, #7b2ff7); }
.c2 { background: linear-gradient(155deg, #29c4a9, #3a21c2); }
.c3 { background: linear-gradient(155deg, #ffb347, #d6336c); }
.tag-live { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 99px; background: rgba(21, 15, 51, .7); color: #fff; font-size: .68rem; font-weight: 700; }
.tag-live b { width: 6px; height: 6px; }
.cam-name { position: absolute; left: 7px; bottom: 6px; color: #fff; font-weight: 600; font-size: .75rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.msgs { list-style: none; margin: 0; padding: 4px 0 0; display: grid; gap: 8px; flex: 1; align-content: start; }
.msgs li { display: grid; grid-template-columns: 38px auto minmax(0, 1fr); gap: 8px; align-items: baseline; animation: rise .45s ease both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msgs time { color: #9a93bd; font-size: .74rem; font-variant-numeric: tabular-nums; }
.msgs b { font-weight: 700; }
.u1 { color: #d6336c; } .u2 { color: #2b7de0; } .u3 { color: #0f9b82; }
.msgs .sys { grid-template-columns: 38px minmax(0, 1fr); }
.msgs .sys span { background: #fff6d6; color: #6b5200; padding: 4px 9px; border-radius: 8px; justify-self: start; font-weight: 500; }
.typing { display: flex; align-items: center; gap: 8px; color: #7d76a0; font-size: .78rem; animation: rise .45s ease 1.5s both; }
.typing span { display: inline-flex; gap: 3px; background: #eeebfa; padding: 6px 8px; border-radius: 99px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #8a82b3; display: block; animation: bob 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-3px); } }
.input { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-l); border-radius: 12px; padding: 7px 7px 7px 12px; color: #9a93bd; }
.input b { margin-left: auto; background: var(--vio); color: #fff; border-radius: 9px; padding: 6px 12px; font-weight: 600; }
.chip { position: absolute; display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 10px 14px; box-shadow: 0 14px 36px rgba(12, 6, 70, .35); }
.chip b { display: block; font-size: .88rem; }
.chip small { display: block; font-size: .76rem; opacity: .85; }
.chip-gift { top: -22px; right: -18px; background: var(--sun); color: var(--sun-ink); animation: rise .5s ease 1.2s both; }
.chip-jack { left: -26px; bottom: 138px; background: var(--ink); color: #fff; display: block; animation: rise .5s ease 1.4s both; }
.chip-jack b { color: var(--sun); }
.ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Contenu par version ---------- */
.inc { background: var(--paper); padding: 96px 0; }
.inc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; align-items: start; }
.inc-col { background: #fff; border: 1px solid var(--line-l); border-radius: 18px; padding: 32px; }
.inc-col h3 { font-weight: 700; font-size: 1.7rem; letter-spacing: -.02em; }
.inc-col h3 span { display: block; margin-top: 4px; font: 500 .98rem/1.4 var(--body); letter-spacing: 0; color: var(--muted-l); }
.feat { list-style: none; margin: 22px 0 0; padding: 0; }
.feat li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-l); }
.feat li > .ic { box-sizing: content-box; padding: 9px; border-radius: 12px; background: var(--paper); color: var(--vio); }
.feat b { display: block; font-size: 1.05rem; }
.feat p { margin: 3px 0 0; color: var(--muted-l); font-size: .98rem; }
.prem { background: var(--ink); border-color: var(--ink); color: #fff; }
.prem h3 span, .prem .feat p { color: var(--muted-d); }
.prem .feat li { border-top-color: var(--line-d); }
.prem .feat li > .ic { background: rgba(255, 255, 255, .08); color: var(--sun); }

/* ---------- Offres ---------- */
.offers { background: var(--ink); color: #fff; padding: 96px 0; --focus: #ffd23f; }
.offers .sub { color: var(--muted-d); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; margin-top: 28px; background: rgba(255, 255, 255, .09); border-radius: 14px; }
.tabs button { border: 0; background: transparent; color: rgba(255, 255, 255, .85); padding: .65rem 1.5rem; border-radius: 10px; font: 600 1rem/1 var(--body); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); }
.panel .sub { margin-top: 22px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 34px; border-radius: 22px; background: var(--ink-2); border: 1px solid var(--line-d); }
.plan.star { background: var(--vio); border-color: var(--vio); }
.plan h3 { font-weight: 700; font-size: 1.6rem; letter-spacing: -.02em; }
.for { margin: -8px 0 0; color: var(--muted-d); }
.flag { position: absolute; top: -15px; left: 34px; margin: 0; background: var(--sun); color: var(--sun-ink); padding: .32rem .85rem; border-radius: 99px; font-weight: 700; font-size: .85rem; }
.price { margin: 4px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .6rem; }
.price strong { font: 800 clamp(2.5rem, 4.6vw, 3.5rem)/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price span { color: var(--muted-d); }
.plan ul { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 11px; }
.plan li { position: relative; padding-left: 28px; }
.plan li::before { content: ""; position: absolute; left: 0; top: .28em; width: 17px; height: 17px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23b9a8ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.plan.star li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23ffd23f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.plan .btn { margin-top: auto; }
.pay-note { margin: 28px 0 0; color: var(--muted-d); font-size: .95rem; }

/* ---------- Installation ---------- */
.install { background: var(--paper); padding: 96px 0; }
.install-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.steps { list-style: none; counter-reset: s; margin: 30px 0 0; padding: 0; display: grid; gap: 22px; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--vio); color: #fff; display: grid; place-items: center; font: 700 1rem/1 var(--display); }
.steps b { display: block; font: 700 1.2rem/1.3 var(--display); letter-spacing: -.01em; }
.steps p { margin: 4px 0 0; color: var(--muted-l); }
.term { background: #0e0a24; border-radius: 16px; overflow: hidden; color: #e8e3ff; box-shadow: 0 24px 60px rgba(21, 15, 51, .28); min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #1a1340; font-size: .85rem; color: #b4a9e6; }
.term-bar .dots i { background: #4a3f8a; }
.copy { margin-left: auto; background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 8px; padding: .4rem .85rem; font: 600 .85rem/1 var(--body); cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, .2); }
.term-body { margin: 0; padding: 18px 18px 20px; font: 400 .9rem/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.term-body code { display: block; color: #fff; }
.term-body code::before { content: "$ "; color: var(--vio-soft); }
.term-body .out { display: block; margin-top: 12px; color: #b4a9e6; }

/* ---------- Questions ---------- */
.faq { background: #fff; padding: 96px 0; }
.faq-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: 56px; align-items: start; }
.faq-list { border-bottom: 1px solid var(--line-l); }
.faq details { border-top: 1px solid var(--line-l); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 2.2rem 1.15rem 0; font-weight: 600; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 500 1.6rem/1 var(--body); color: var(--vio); transition: rotate .15s ease; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { margin: 0 0 1.25rem; color: var(--muted-l); max-width: 40em; }
.faq a { color: var(--vio); font-weight: 600; }

/* ---------- Appel final + pied ---------- */
.final { background: var(--vio); color: #fff; padding: 84px 0; --focus: #ffd23f; }
.final-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px; }
.final h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); max-width: 16em; }
.final-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.foot { background: var(--ink); color: rgba(255, 255, 255, .78); padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); --focus: #ffd23f; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-left: auto; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.copy-right { flex-basis: 100%; margin: 6px 0 0; font-size: .9rem; color: rgba(255, 255, 255, .55); }

/* ---------- Adaptation ---------- */
@media (max-width: 1000px) {
  .links, .login { display: none; }
  .burger { display: block; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-copy { padding-bottom: 0; }
  .inc-grid, .plans, .install-in, .faq-in { grid-template-columns: minmax(0, 1fr); }
  .install-in, .faq-in { gap: 36px; }
  .chip-gift { right: -8px; }
  .chip-jack { left: -8px; }
}
@media (max-width: 600px) {
  .win-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .rooms { display: none; }
  .win-title { display: none; }
  .live-count { margin-left: 0; }
  .chip-gift { top: -16px; padding: 8px 11px; }
  .chip-jack { display: none; }
  .inc, .offers, .install, .faq { padding-block: 72px; }
  .inc-col, .plan { padding: 24px; }
  .flag { left: 24px; }
  .tabs { display: flex; }
  .tabs button { flex: 1; padding-inline: .5rem; }
  .final { padding-block: 64px; }
  .foot-links { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
