/* MemoryCore — site vitrine et connexion. Couleurs et typographies de la direction artistique. */
:root {
  --bg: #EFEBFF;
  --surface: #FFFFFF;
  --border: #DDD5FA;
  --text: #17142B;
  --muted: #4F4A6B;
  --track: #E6E0FB;
  --violet: #7C5CFF;
  --violet-deep: #5A3FD6;
  --blue: #4FA8FF;
  --pink: #FF7AC6;
  --lime: #A6EB3A;
  --lime-edge: #79B51E;
  --amber: #FFC94A;
  --amber-edge: #D9A021;
  --coral: #FF9B7F;
  --coral-edge: #D9563A;
  --lilac: #B9A8FF;
  --grad: linear-gradient(135deg, #7C5CFF, #4FA8FF 55%, #FF7AC6);
  --glow: radial-gradient(ellipse at 75% 25%, rgba(124,92,255,.38), rgba(79,168,255,.22) 40%, rgba(255,122,198,.14) 60%, rgba(255,122,198,0) 75%);
  --hero: #18152B;
  --alert-bg: #FFE4DC;
  --alert-text: #8A2A12;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0D1A;
    --surface: #1B1830;
    --border: #2C2846;
    --text: #F5F3FF;
    --muted: #A49FC0;
    --track: #2C2846;
    --glow: radial-gradient(ellipse at 70% 30%, rgba(124,92,255,.45), rgba(79,168,255,.18) 45%, rgba(255,122,198,0) 70%);
    --alert-bg: #3A1A12;
    --alert-text: #FFC2B0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 Onest, system-ui, sans-serif;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: "Bricolage Grotesque", Onest, sans-serif; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; }
.mono { font: 700 12px/16px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Boutons « relief » : ombre portée pleine sous le bouton. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 18px;
  font: 800 17px/1 "Bricolage Grotesque", sans-serif; letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  background: var(--surface); color: var(--text);
  box-shadow: 0 5px 0 var(--border);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--border); }
.btn:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn-primary { background: var(--lime); color: #17142B; box-shadow: 0 5px 0 var(--lime-edge); }
.btn-primary:active { box-shadow: 0 1px 0 var(--lime-edge); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--border); }
.btn-ghost:active { transform: none; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }

/* En-tête */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1160px; margin: 0 auto; padding: 20px 24px;
}
.top nav { display: flex; align-items: center; gap: 20px; font-weight: 600; }
.top nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top nav a:not(.btn):hover { color: var(--text); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 20px/1 "Bricolage Grotesque", sans-serif; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 13px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 18px;
}

/* Hero */
.hero {
  position: relative;
  max-width: 1160px; margin: 0 auto; padding: 48px 24px 72px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}
.glow { position: absolute; inset: -220px -200px auto; height: 640px; background: var(--glow); pointer-events: none; z-index: 0; }
.hero > *:not(.glow) { position: relative; z-index: 1; }
.eyebrow { font: 700 13px/18px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-deep); margin-bottom: 18px; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--lilac); } }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 22px; font-size: 19px; color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Aperçu de l'app */
.phone {
  justify-self: center; width: 100%; max-width: 360px;
  padding: 22px 18px; border-radius: 36px;
  background: var(--surface); border: 2px solid var(--border); border-bottom-width: 7px;
  display: flex; flex-direction: column; gap: 16px;
}
.pills { display: flex; gap: 8px; }
.pill { padding: 7px 12px; border-radius: 999px; background: var(--bg); font: 800 14px/18px "Bricolage Grotesque", sans-serif; }
.pill.streak { color: #D9563A; }
.pill.xp { color: #1F6FB0; }
@media (prefers-color-scheme: dark) { .pill.streak { color: #FF7A59; } .pill.xp { color: #4FB8FF; } }
.hello { font: 800 24px/1.1 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; }
.session { padding: 2px; border-radius: 26px; background: var(--grad); box-shadow: 0 6px 0 var(--violet-deep); }
.session-in { border-radius: 24px; background: var(--hero); color: #F5F3FF; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.session-in strong { font: 800 28px/1.1 "Bricolage Grotesque", sans-serif; }
.session-in .soft { color: #C9C4E3; font-size: 14px; margin-bottom: 10px; }
.session-in .mono { color: #C2B5FF; }
.path { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; border: 2px solid var(--border); border-bottom-width: 5px; }
.badge { width: 44px; height: 44px; border-radius: 14px; background: #4FB8FF; box-shadow: 0 4px 0 #2B8DD6; display: inline-flex; align-items: center; justify-content: center; font: 800 15px/1 "Bricolage Grotesque", sans-serif; color: #0F0D1A; flex: none; }
.path-body { flex: 1; display: flex; flex-direction: column; gap: 7px; font-weight: 700; font-size: 14px; }
.bar { height: 12px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar i { display: block; width: 42%; height: 100%; border-radius: 999px; background: var(--lime); }

/* Chiffres */
.stats {
  max-width: 1160px; margin: 0 auto; padding: 0 24px 72px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.stats div { background: var(--surface); border: 2px solid var(--border); border-bottom-width: 5px; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.stats strong { font: 800 40px/1 "Bricolage Grotesque", sans-serif; letter-spacing: -.03em; }
.stats span { color: var(--muted); font-weight: 600; }

/* Fonctionnalités */
.features, .how { max-width: 1160px; margin: 0 auto; padding: 0 24px 80px; }
.features h2, .how h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin-bottom: 28px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { border-radius: 24px; padding: 24px; color: #17142B; display: flex; flex-direction: column; gap: 10px; }
.feature h3 { font-size: 21px; font-weight: 800; }
.f-violet { background: var(--lilac); box-shadow: 0 6px 0 var(--violet); }
.f-lime { background: var(--lime); box-shadow: 0 6px 0 var(--lime-edge); }
.f-amber { background: var(--amber); box-shadow: 0 6px 0 var(--amber-edge); }
.f-coral { background: var(--coral); box-shadow: 0 6px 0 var(--coral-edge); }

/* Étapes */
.how ol { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how li { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 2px solid var(--border); border-bottom-width: 5px; border-radius: 22px; padding: 22px; }
.how h3 { font-size: 19px; margin-bottom: 6px; }
.how p { color: var(--muted); }
.step { flex: none; width: 40px; height: 40px; border-radius: 13px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 800 18px/1 "Bricolage Grotesque", sans-serif; }

.foot { max-width: 1160px; margin: 0 auto; padding: 28px 24px 40px; border-top: 2px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; }

/* Connexion */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--glow), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 2px solid var(--border); border-bottom-width: 7px; border-radius: 30px; padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 34px; font-weight: 800; margin-top: 10px; }
.form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.form label { font-weight: 700; font-size: 15px; margin-top: 8px; }
.form input {
  min-height: 52px; padding: 0 16px; border-radius: 16px; border: 2px solid var(--border);
  background: var(--bg); color: var(--text); font: 500 17px/1 Onest, sans-serif;
}
.form .btn { margin-top: 18px; }
.alert { background: var(--alert-bg); color: var(--alert-text); border-radius: 14px; padding: 12px 14px; font-weight: 600; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .how ol { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top { padding: 16px; }
  .top nav a:not(.btn) { display: none; }
  .hero, .stats, .features, .how { padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .cta .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
