/* =========================================================================
   Accueil des visiteurs (page vitrine). Chargé uniquement par layouts/landing.php.
   Un seul élément fort : les trois sphères du héros, qu'on peut toucher.
   Le reste reste calme : texte posé sur le fond, verre seulement là où il y a des données.
   ========================================================================= */

.lp-wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .lp-wrap { padding-inline: 24px; } }

.lp { display: block; }
.lp h2 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.lp h3 { font-size: 1.0625rem; line-height: 1.3; font-weight: 750; letter-spacing: -0.01em; margin: 0; }
.lp p { margin: 0; }
.lp-reassure, .lp-head p, .lp-steps p, .lp-reasons p, .lp-aside, .lp-final > p { color: var(--text-on-bg); }

/* --- En-tête --- */
.lp-header { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); }
.lp-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.lp-header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.lp-header-actions { display: flex; align-items: center; gap: 4px; }
.lp-header .btn-sm { padding-inline: 0.85rem; white-space: nowrap; }
@media (max-width: 420px) {
  .lp-header .brand { font-size: 1rem; }
  .lp-header [data-theme-toggle] { display: none; }
  .lp-header .btn-sm { padding-inline: 0.7rem; }
  .lp-header-actions { gap: 2px; }
}

/* --- 1. Héros --- */
.lp-hero { display: grid; gap: 28px; padding-top: 28px; padding-bottom: 8px; }
.lp-hero h1 {
  margin: 0; max-width: 17ch;
  font-size: clamp(2.375rem, 1.5rem + 3.9vw, 4.25rem);
  line-height: 1.02; font-weight: 850; letter-spacing: -0.04em; text-wrap: balance;
}
.lp-lead { margin-top: 18px !important; max-width: 50ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.55; color: var(--text-on-bg); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.lp-btn-quiet { --btn-bg: var(--glass-bg-subtle); }
.lp-reassure { margin-top: 14px !important; font-size: var(--fs-sm); }

/* Mobile : la carte « essaie » doit arriver vite, elle porte déjà son bouton d'inscription */
@media (max-width: 639px) {
  .lp-hero { padding-top: 20px; gap: 24px; }
  .lp-hero h1 { font-size: 2.25rem; }
  .lp-lead { font-size: 1rem; margin-top: 14px !important; }
  .lp-actions { margin-top: 20px; }
  .lp-actions .lp-btn-quiet { display: none; }
}
@media (min-width: 960px) {
  .lp-hero { grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr); align-items: center; gap: 56px; padding-top: 72px; min-height: min(78vh, 720px); }
}

/* Carte « essaie » : une vraie partie, points réels */
.lp-try { display: grid; gap: 18px; padding: 22px; border-radius: 34px; }
@media (min-width: 960px) { .lp-try { padding: 30px; gap: 22px; } }
.lp-try-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
.lp-live { width: 8px; height: 8px; border-radius: 50%; background: var(--switch-on); box-shadow: 0 0 0 0 color-mix(in srgb, var(--switch-on) 55%, transparent); animation: lp-pulse 2.4s ease-out infinite; }
@keyframes lp-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--switch-on) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.lp-try-title { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem) !important; letter-spacing: -0.025em !important; margin-top: -10px !important; }

.lp-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.lp-pick-opt { position: relative; min-width: 0; }
.lp-pick label {
  display: grid; justify-items: center; gap: 6px; padding: 14px 4px 12px;
  border-radius: 24px; cursor: pointer; text-align: center;
  transition: background-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.lp-pick .orb { --orb-size: clamp(64px, 18vw, 96px); transition: transform 420ms var(--spring), box-shadow var(--dur) var(--ease); }
.lp-pick-name { font-weight: 750; font-size: var(--fs-md); }
.lp-pick-pts { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lp-pick label:hover .orb { transform: translateY(-3px) scale(1.04); }
.lp-pick input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.lp-pick input:checked + label { background: var(--glass-bg-subtle); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.lp-pick input:checked + label .orb { transform: translateY(-4px) scale(1.1); }
.lp-pick input:checked + label .lp-pick-pts { color: var(--text); font-weight: 750; }
.lp-pick input:disabled + label { cursor: not-allowed; opacity: 0.38; }
.lp-pick input:disabled + label .orb { filter: grayscale(0.6); transform: none; }
/* Une couleur choisie : les deux autres s'effacent */
.lp-pick:has(input:checked) input:not(:checked):not(:disabled) + label { opacity: 0.55; }

.lp-try-out { min-height: 3.2em; }
.lp-out { font-size: var(--fs-md); line-height: 1.5; }
.lp-out strong { font-weight: 800; }
.lp-out-blue, .lp-out-white, .lp-out-red { display: none; }
.lp-try:has(#lp-c-blue:checked) .lp-out-blue,
.lp-try:has(#lp-c-white:checked) .lp-out-white,
.lp-try:has(#lp-c-red:checked) .lp-out-red { display: block; }
.lp-try:has(.lp-pick input:checked) .lp-out-none { display: none; }
.lp-out-none { color: var(--text-muted); }
.lp-why { display: flex; align-items: center; gap: 8px; margin-top: 8px !important; font-size: var(--fs-xs); color: var(--text-muted); }
.lp-try-foot { margin-top: -8px !important; text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }
.lp-try-off .lp-pick label { cursor: default; }

/* --- Sections --- */
.lp-section { padding-top: 64px; }
@media (min-width: 960px) { .lp-section { padding-top: 112px; } }
.lp-head { display: grid; gap: 10px; max-width: 62ch; margin-bottom: 28px; }
.lp-head p { font-size: var(--fs-lg); line-height: 1.5; }
.lp-head a { font-weight: 600; }

/* --- 2. Trois temps : une ligne de temps, pas des cartes --- */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; position: relative; }
.lp-steps li { display: grid; gap: 8px; align-content: start; position: relative; padding-left: 28px; }
.lp-steps li::before { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--tempo-blue); box-shadow: 0 0 0 4px var(--tempo-blue-soft); }
.lp-steps li:nth-child(2)::before { background: var(--orb-white); box-shadow: 0 0 0 1px var(--tempo-white-edge), 0 0 0 5px var(--glass-bg-subtle); }
.lp-steps li:nth-child(3)::before { background: var(--tempo-red); box-shadow: 0 0 0 4px var(--tempo-red-soft); }
.lp-steps li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 26px; bottom: -22px; width: 2px; background: var(--border-strong); border-radius: 2px; }
.lp-when { font-size: var(--fs-sm); font-weight: 700; color: var(--tempo-blue-strong); font-variant-numeric: tabular-nums; }
.lp-steps p { line-height: 1.55; max-width: 36ch; }
@media (min-width: 760px) {
  .lp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .lp-steps li { padding-left: 0; padding-top: 30px; }
  .lp-steps li::before { top: 0; }
  .lp-steps li:not(:last-child)::after { left: 22px; right: -26px; top: 5px; bottom: auto; width: auto; height: 2px; }
}

/* --- 3. Barème --- */
.lp-points { padding: 24px; border-radius: 34px; }
@media (min-width: 960px) { .lp-points { padding: 44px 48px; } }
.lp-scale { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lp-scale li { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.lp-scale li:first-child { border-top: 0; }
.lp-scale .orb { --orb-size: 44px; }
.lp-scale strong { font-size: 1.75rem; font-weight: 850; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; min-width: 3.4ch; }
.lp-scale span:last-child { color: var(--text-muted); line-height: 1.4; }
@media (min-width: 760px) {
  .lp-scale { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .lp-scale li { grid-template-columns: 1fr; justify-items: start; gap: 10px; padding: 0; border-top: 0; }
  .lp-scale .orb { --orb-size: 64px; }
  .lp-scale strong { font-size: 2.5rem; line-height: 1; }
}
.lp-bonus { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px !important; padding: 16px 18px; border-radius: 20px; background: var(--tempo-blue-soft); line-height: 1.5; }
.lp-bonus svg { width: 22px; height: 22px; flex: none; color: var(--tempo-blue-strong); margin-top: 1px; }

/* --- 4. Raisons de revenir : texte posé sur le fond --- */
.lp-reasons { display: grid; gap: 28px; }
.lp-reasons > div { display: grid; gap: 8px; align-content: start; }
.lp-reasons svg { width: 26px; height: 26px; color: var(--tempo-blue-strong); margin-bottom: 4px; }
.lp-reasons p { line-height: 1.55; max-width: 44ch; }
@media (min-width: 640px) { .lp-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; } }
@media (min-width: 1040px) { .lp-reasons { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lp-aside { margin-top: 36px !important; padding-top: 22px; border-top: 1px solid var(--border-strong); max-width: 72ch; line-height: 1.55; }
.lp-aside strong { color: var(--text); }

/* --- 5. Classement --- */
.lp-board { display: grid; gap: 20px; }
@media (min-width: 960px) { .lp-board.has-figures { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; } }
.lp-rank { padding: 22px; border-radius: 34px; }
@media (min-width: 960px) { .lp-rank { padding: 36px 40px; } }
.lp-rank .lp-head { margin-bottom: 18px; max-width: none; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lp-rank .lp-head { grid-template-columns: 1fr auto; align-items: end; } }
.lp-rank .lp-head h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); }
.lp-top { list-style: none; margin: 0; padding: 0; display: grid; }
.lp-top li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-height: 60px; }
.lp-top li:first-child { border-top: 0; }
.lp-top-pos { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: var(--fs-sm); font-weight: 800; background: var(--glass-bg-subtle); box-shadow: inset 0 0 0 1px var(--border-strong); font-variant-numeric: tabular-nums; }
.lp-top-pos.is-first { background: var(--fill-blue); color: #fff; box-shadow: var(--fill-blue-shadow); }
.lp-top .avatar-orb { --orb-size: 38px; }
.lp-top-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-top-stat { font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
.lp-top-pts { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 4.5ch; text-align: right; }
.lp-top-you { border-top-style: dashed !important; }
.lp-top-you .lp-top-pos { background: transparent; box-shadow: none; border: 1.5px dashed var(--border-strong); color: var(--text-muted); }
.lp-top-you .lp-top-name { font-weight: 650; color: var(--text-muted); white-space: normal; }
@media (max-width: 520px) { .lp-top-stat { display: none; } }
.lp-empty { display: grid; gap: 16px; justify-items: start; }
.lp-empty p { font-size: var(--fs-lg); line-height: 1.5; max-width: 46ch; }

.lp-figures { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lp-figures > div { display: flex; flex-direction: column-reverse; gap: 2px; }
.lp-figures dd { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem); font-weight: 850; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.lp-figures dt { font-size: var(--fs-sm); color: var(--text-on-bg); }
@media (min-width: 960px) { .lp-figures { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; } }

/* --- 6. Marques --- */
.lp-brands { display: grid; gap: 16px; padding: 22px; border-radius: 28px; }
.lp-brands h2 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem) !important; }
.lp-brands p { margin-top: 8px !important; color: var(--text-muted); line-height: 1.55; max-width: 64ch; }
.lp-brands-icon { width: 30px; height: 30px; color: var(--tempo-red); }
.lp-brands .btn { justify-self: start; }
@media (min-width: 760px) {
  .lp-brands { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 30px 36px; }
}

/* --- 7. FAQ --- */
@media (min-width: 960px) {
  .lp-faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
}
.lp-faq { padding: 6px 22px; border-radius: 28px; }
.lp-faq details { border-top: 1px solid var(--line); }
.lp-faq details:first-child { border-top: 0; }
.lp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--glass-bg-subtle); box-shadow: inset 0 0 0 1px var(--border-strong); font-size: 1.125rem; font-weight: 500; transition: transform var(--dur) var(--spring); }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq details p { padding: 0 44px 18px 0; color: var(--text-muted); line-height: 1.6; }

/* --- 8. Dernier appel --- */
.lp-final { display: grid; justify-items: center; gap: 14px; text-align: center; padding-top: 96px; padding-bottom: 24px; }
@media (min-width: 960px) { .lp-final { padding-top: 136px; } }
.lp-final-orbs { display: flex; gap: 10px; margin-bottom: 8px; }
.lp-final-orbs .orb { --orb-size: 40px; }
.lp-final h2 { max-width: 18ch; font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3rem) !important; }
.lp-final > p:not(.lp-reassure) { font-size: var(--fs-lg); }
.lp-final .btn { margin-top: 8px; }

.is-landing .footer { max-width: 1120px; margin-top: 48px; padding-inline: 24px; }

@media (prefers-reduced-motion: reduce) {
  .lp-live { animation: none; }
  .lp-pick .orb, .lp-faq summary::after { transition: none; }
}
