/* Charte Sidge (docs/CHARTE.md) : fond nuit, le violet est l'accent, pas le décor. */
:root {
  --bg: #0b0618;
  --surface: #140a28;
  --night-700: #241046;
  --ink: #0e0620;
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.64);
  --text-3: rgba(255, 255, 255, 0.4);
  --accent: #8e6af5;
  --violet-500: #6e4ad8;
  --lavender: #b9a2ff;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* En-tête : bloc-marque (charte §5) */
.topbar {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.picto {
  width: 28px;
  height: 28px;
  flex: none;
}

.logotype {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.025em;
}

/* Héros : promesse à gauche, cube à droite, sur le fond de l'icône (§3) */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 16px 96px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -120px -20% 0 30%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--night-700), transparent);
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--lavender);
  font-size: 13px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 20px;
  max-width: 34rem;
  font-size: 18px;
  line-height: 26px;
  color: var(--text-2);
}

.cube {
  position: relative;
  width: min(100%, 380px);
  justify-self: center;
  animation: float 6s ease-in-out infinite alternate;
}

.cube img {
  display: block;
  width: 100%;
  height: auto;
}

/* Le cube qui respire : la lumière intérieure monte et redescend en 2,4 s (§9). */
.cube .light {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: breathe 2.4s ease-in-out infinite alternate;
}

@keyframes breathe {
  to {
    opacity: 1;
  }
}

@keyframes float {
  from {
    transform: translateY(-6px);
  }
  to {
    transform: translateY(6px);
  }
}

/* Téléchargements : l'hôte choisit la vue (script de la page), production par défaut. */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
}

.store small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
}

a.store:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

/* Bouton principal (§8) : dégradé, filet en haut, lueur dessous. */
.store-apk {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--violet-500));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 24px rgba(110, 74, 216, 0.35);
}

.store-apk small {
  color: rgba(255, 255, 255, 0.72);
}

.store[hidden],
:root[data-env='staging'] [data-env='production'],
:root:not([data-env='staging']) [data-env='staging'] {
  display: none;
}

/* Macarons réseaux (première section) */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.social-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.social-badge:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.social-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
}

.social-instagram .social-icon {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}

.social-facebook .social-icon {
  background: #1877f2;
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 16px;
}

.section h2,
.end h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-lead {
  margin-top: 8px;
  font-size: 16px;
  line-height: 22px;
  color: var(--text-2);
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.how,
.who,
.promises {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.how {
  grid-template-columns: repeat(3, 1fr);
}

.how li {
  padding: 24px;
}

.num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(142, 106, 245, 0.16);
  color: var(--lavender);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

h3 {
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
}

.how p,
.promises p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 22px;
  color: var(--text-2);
}

.who {
  grid-template-columns: repeat(4, 1fr);
}

.who li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  padding: 20px;
  font-size: 17px;
  font-weight: 600;
}

.who svg {
  color: var(--accent);
}

.promises {
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}

.promises li {
  display: flex;
  gap: 12px;
}

.promises svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--lavender);
}

/* Fin de page */
.end {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--max);
  margin: 48px auto 0;
  padding: 64px 16px 72px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.picto-lg {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
}

.end .lead {
  margin-top: 12px;
}

.end .stores {
  justify-content: center;
}

/* Pied de page : langues et liens légaux */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--text-3);
}

.social {
  display: flex;
  gap: 20px;
  margin-bottom: 4px;
}

.social a {
  display: flex;
  padding: 4px;
}

.languages,
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

.languages [aria-current] {
  color: var(--text);
  font-weight: 600;
}

/* Pages légales */
.legal {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.legal h1 {
  font-size: 28px;
  line-height: 34px;
}

.back {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 16px;
    padding-bottom: 48px;
  }

  .cube {
    grid-row: 1;
    width: 220px;
  }

  .hero::before {
    inset: -80px 0 40% 0;
  }

  .how,
  .promises {
    grid-template-columns: 1fr;
  }

  .who {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cube,
  .cube .light {
    animation: none;
  }
}
