/* DofusCodex — site public. Mêmes codes que l'app : fond « void », accents violet/cyan,
   Sora pour les titres, Inter pour le texte. */
:root {
  --bg: #070912;
  --bg2: #0b0e1c;
  --panel: rgba(18, 22, 46, 0.72);
  --line: rgba(148, 163, 184, 0.12);
  --line2: rgba(148, 163, 184, 0.22);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --purple: #8b5cf6;
  --violet: #a78bfa;
  --indigo: #6366f1;
  --cyan: #38bdf8;
  --pink: #f472b6;
  --ok: #34d399;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, .brand, .btn, .stats b, .float b, .dl b { font-family: Sora, Inter, sans-serif; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 40px); }

/* ── Fond animé ─────────────────────────────────────────── */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: drift 22s ease-in-out infinite alternate; }
.o1 { width: 620px; height: 620px; left: -160px; top: -200px; background: radial-gradient(circle, rgba(124, 58, 237, 0.55), transparent 65%); }
.o2 { width: 520px; height: 520px; right: -140px; top: 18%; background: radial-gradient(circle, rgba(56, 189, 248, 0.32), transparent 65%); animation-delay: -6s; }
.o3 { width: 700px; height: 700px; left: 30%; bottom: -380px; background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 65%); animation-delay: -12s; }
.grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.35;
}
@keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.08); } }

/* ── Boutons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 20px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line2); transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #8b5cf6, #6366f1 55%, #3b82f6);
  box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(124, 58, 237, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-ghost { background: rgba(148, 163, 184, 0.06); }
.btn-ghost:hover { border-color: rgba(167, 139, 250, 0.5); background: rgba(167, 139, 250, 0.08); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }

/* ── Navigation ─────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(7, 9, 18, 0.72); backdrop-filter: blur(16px) saturate(1.4); border-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; }
.brand img { border-radius: 9px; }
.brand b { background: linear-gradient(90deg, #a78bfa, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 56px 0 40px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.3); background: rgba(139, 92, 246, 0.1); color: #c4b5fd; font-size: 13px; font-weight: 500;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
h1 { font-size: clamp(40px, 5.4vw, 66px); font-weight: 800; margin: 22px 0 20px; }
.grad { background: linear-gradient(100deg, #c4b5fd 0%, #a78bfa 30%, #818cf8 55%, #38bdf8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.lead strong { color: var(--text); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 16px; color: var(--dim); font-size: 13.5px; }

.hero-shot { position: relative; perspective: 1600px; }
.tilt { transform: rotateY(-9deg) rotateX(4deg) rotateZ(0.5deg); transform-origin: left center; transition: transform 0.8s var(--ease); }
.hero-shot:hover .tilt { transform: rotateY(-3deg) rotateX(1deg); }
.float {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: rgba(13, 16, 34, 0.82); border: 1px solid var(--line2); backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8); font-size: 13px; color: var(--muted);
  animation: bob 6s ease-in-out infinite;
}
.float b { font-size: 22px; color: var(--text); }
.f1 { left: -28px; bottom: 16%; }
.f2 { right: -14px; top: 10%; animation-delay: -2s; }
.f3 { right: 8%; bottom: -18px; animation-delay: -4s; color: var(--text); }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: ping 2s infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ── Fenêtre d'app (cadre des captures) ─────────────────── */
.window {
  position: relative; border-radius: 14px; overflow: hidden; background: #0a0c18;
  border: 1px solid rgba(167, 139, 250, 0.22);
  box-shadow: 0 40px 100px -30px rgba(76, 29, 149, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.window::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.win-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #0d1022; border-bottom: 1px solid var(--line); }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.win-bar i:nth-child(2) { background: #febc2e; }
.win-bar i:nth-child(3) { background: #28c840; }
.win-bar span { flex: 1; text-align: center; margin-right: 52px; font-size: 12px; color: var(--dim); font-weight: 500; }
.window img { width: 100%; }

/* ── Chiffres ───────────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 40px; padding: 26px 10px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px);
}
.stats div { text-align: center; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font-size: 32px; font-weight: 700; background: linear-gradient(180deg, #fff, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font-size: 13px; color: var(--muted); }

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 110px 0 0; }
.head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--violet); margin-bottom: 14px; }
h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; }
.head p { margin-top: 14px; color: var(--muted); font-size: 17px; }

/* Rangées texte + capture */
.row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: center; }
.row.flip .row-copy { order: 2; }
.row-copy h2 { margin-bottom: 18px; }
.row-copy p { color: var(--muted); font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px;
  background: rgba(139, 92, 246, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22, 26, 54, 0.9), rgba(11, 14, 28, 0.9));
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(167, 139, 250, 0.35); box-shadow: 0 24px 60px -30px rgba(124, 58, 237, 0.7); }
.card.big { grid-column: span 2; }
.card-txt { padding: 24px 24px 18px; }
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; }
.card img {
  margin: auto 0 0 24px; width: calc(100% - 24px); aspect-ratio: 16 / 9; object-fit: cover; object-position: left top;
  border-radius: 12px 0 0 0; border: 1px solid var(--line2); border-right: 0; border-bottom: 0;
  transition: transform 0.6s var(--ease);
}
.card.big img { aspect-ratio: 21 / 9; }
.card:hover img { transform: scale(1.02) translate(-4px, -4px); }

/* Overlay */
.phones { display: flex; justify-content: center; gap: 26px; }
.window.slim { width: min(300px, 46%); border-radius: 18px; }
.window.slim.up { transform: translateY(-40px); }

/* Téléchargement */
.download .head { margin-bottom: 36px; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--line2); background: var(--panel); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.dl::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 100% 0%, rgba(139, 92, 246, 0.16), transparent 70%); opacity: 0; transition: opacity 0.3s; }
.dl:hover { transform: translateY(-4px); border-color: rgba(167, 139, 250, 0.5); box-shadow: 0 24px 60px -30px rgba(124, 58, 237, 0.8); }
.dl:hover::before, .dl.reco::before { opacity: 1; }
.dl .os { width: 34px; height: 34px; fill: #e2e8f0; margin-bottom: 14px; }
.dl b { font-size: 20px; }
.dl > span { color: var(--muted); font-size: 14px; }
.dl-go { margin-top: 20px; font-style: normal; font-weight: 600; color: var(--violet); display: flex; align-items: baseline; gap: 8px; }
.dl-go::after { content: "→"; transition: transform 0.25s; }
.dl:hover .dl-go::after { transform: translateX(4px); }
.dl-go small { color: var(--dim); font-weight: 500; }
.dl.reco { border-color: rgba(167, 139, 250, 0.6); }
.dl.reco::after {
  content: "Recommandé pour toi"; position: absolute; top: 18px; right: 18px; padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: #ddd6fe; background: rgba(139, 92, 246, 0.25); border: 1px solid rgba(167, 139, 250, 0.4);
}
.dl.off { opacity: 0.45; pointer-events: none; }
.dl-hint { margin-top: 20px; text-align: center; color: var(--dim); font-size: 14px; min-height: 22px; }

.install { max-width: 760px; margin: 28px auto 0; padding: 20px 24px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); display: grid; gap: 10px; color: var(--muted); font-size: 14.5px; }
.install b { color: var(--text); }

/* Footer */
.footer { margin-top: 120px; border-top: 1px solid var(--line); padding: 36px 0 48px; }
.foot-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.foot-in .brand { font-size: 17px; color: var(--text); }
.foot-in .muted { margin-left: auto; color: var(--dim); }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease) var(--d, 0s), transform 0.8s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .float, .live { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tilt { transform: none; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1020px) {
  .hero-in, .row { grid-template-columns: 1fr; gap: 40px; }
  .row.flip .row-copy { order: 0; }
  .hero { padding-top: 32px; }
  .tilt { transform: none; }
  .f1 { left: 8px; }
  .f2 { right: 8px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .card.big { grid-column: span 2; }
}
@media (max-width: 720px) {
  .wrap, .wrap.narrow { width: calc(100% - 32px); }
  .nav-links { display: none; }
  .nav-in { justify-content: space-between; }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .stats div:nth-child(4) { border-left: 0; }
  .stats b { font-size: 26px; }
  .section { padding-top: 80px; }
  .float { display: none; }
  .bento, .dl-grid { grid-template-columns: 1fr; }
  .card.big { grid-column: auto; }
  .card.big img { aspect-ratio: 16 / 9; }
  .window.slim.up { transform: none; }
  .foot-in .muted { margin-left: 0; }
}
