/* Page d'accueil statique de chessflux.fr (dans index.html). Tout est rangé
   sous #landing pour ne pas toucher l'application Flutter, qui démarre dans
   la même page pour les autres adresses. */
#landing {
  --bg: #070a10;
  --glow: #0c131e;
  --card: #0c1320;
  --raised: #1c3050;
  --text: #ddeaff;
  --text-2: #b2bdcf;
  --muted: #949eae;
  --dim: #6c7686;
  --primary: #4d9fff;
  --gold: #f5c451;
  --line: rgba(221, 234, 255, .1);
  --line-soft: rgba(221, 234, 255, .08);
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: radial-gradient(circle at 50% 0, var(--glow), var(--bg) 62rem) no-repeat, var(--bg);
  -webkit-font-smoothing: antialiased;
}
html.app-mode #landing { display: none; }
html:not(.app-mode) #splash { display: none; }
html:not(.app-mode) body { background: #070a10; }

#landing *, #landing *::before, #landing *::after { box-sizing: border-box; }
#landing img { display: block; max-width: 100%; height: auto; }
#landing a { color: inherit; }
#landing h1, #landing h2, #landing h3, #landing p { margin: 0; overflow-wrap: break-word; }
#landing :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
#landing .wrap { width: min(calc(100% - 40px), 1080px); margin-inline: auto; }

/* Barre du haut */
#landing .lp-header { position: sticky; top: 0; z-index: 10; background: rgba(7, 10, 16, .88); border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(14px) saturate(130%); }
#landing .lp-nav { min-height: 56px; display: flex; align-items: center; gap: 12px; padding-inline: 24px; }
#landing .lp-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; text-decoration: none; }
#landing .lp-brand img { width: 26px; height: 26px; border-radius: 6px; }
#landing .lp-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#landing .lp-lang { display: flex; padding: 2px; border: 1px solid rgba(221, 234, 255, .14); border-radius: 6px; }
#landing .lp-lang button { border: 0; border-radius: 4px; padding: 3px 8px; background: transparent; color: var(--dim); font: 600 11px/1.5 inherit; font-family: inherit; cursor: pointer; }
#landing .lp-lang button[aria-pressed="true"] { color: var(--text); background: var(--raised); }
#landing .lp-link { padding: 6px 10px; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; }
#landing .lp-link:hover { background: rgba(221, 234, 255, .06); }

/* Boutons */
#landing .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 18px; border: 1px solid rgba(221, 234, 255, .22); border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; transition: background .18s, border-color .18s; }
#landing .btn:hover { background: rgba(221, 234, 255, .05); }
#landing .btn-primary { border-color: transparent; background: var(--primary); color: #fff; }
#landing .btn-primary:hover { background: #64acff; }
#landing .btn-small { min-height: 34px; padding: 7px 13px; font-size: 13px; }

/* Héros */
#landing .lp-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; padding: 72px 0 64px; }
#landing .eyebrow { margin-bottom: 14px; color: var(--primary); font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
#landing h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 650; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
#landing h1 em { font-style: normal; color: var(--primary); }
#landing .lead { max-width: 560px; margin-top: 18px; color: var(--text-2); font-size: 16.5px; line-height: 1.6; }
#landing .lp-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
#landing .lp-note { margin-top: 14px; color: var(--dim); font-size: 12.5px; }
/* Exercice de l'en-tête: la Partie italienne à jouer */
#landing .lp-demo { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
#landing .lp-demo-head { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
#landing .lp-demo-count { font-variant-numeric: tabular-nums; }
#landing .lp-board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 6px; overflow: hidden; touch-action: none; user-select: none; }
#landing .lp-board.shake { animation: lp-shake .32s; }
@keyframes lp-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
#landing .lp-sq { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 0; border: 0; cursor: pointer; }
#landing .lp-sq.light { background: #e2ebf8; }
#landing .lp-sq.dark { background: #7096d8; }
#landing .lp-sq.light.last { background: #f3e6ae; }
#landing .lp-sq.dark.last { background: #c8bd7a; }
#landing .lp-sq.sel { box-shadow: inset 0 0 0 100px rgba(77, 159, 255, .45); }
#landing .lp-sq.hint::after { content: ""; position: absolute; inset: 8%; border: 3px solid var(--gold); border-radius: 50%; }
#landing .lp-sq img { width: 88%; height: 88%; pointer-events: none; }
#landing .lp-sq img.own { cursor: grab; }
#landing .lp-sq img.dragging { position: relative; z-index: 5; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
#landing .lp-sq .rk, #landing .lp-sq .fl { position: absolute; font-size: 10px; font-weight: 600; line-height: 1; pointer-events: none; }
#landing .lp-sq .rk { left: 3px; top: 3px; }
#landing .lp-sq .fl { right: 3px; bottom: 3px; }
#landing .lp-sq.light .rk, #landing .lp-sq.light .fl { color: #7096d8; }
#landing .lp-sq.dark .rk, #landing .lp-sq.dark .fl { color: #e2ebf8; }
#landing .lp-demo-moves { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; min-height: 26px; }
#landing .lp-demo-moves .chip { padding: 2px 7px; border-radius: 4px; background: rgba(221, 234, 255, .06); color: var(--muted); font: 500 12px/1.6 "Roboto Mono", ui-monospace, monospace; }
#landing .lp-demo-moves .chip.played { color: var(--text); }
#landing .lp-demo-moves .chip.next { background: rgba(77, 159, 255, .18); color: var(--primary); }
#landing .lp-demo-panel { margin-top: 12px; min-height: 120px; }
#landing .lp-demo-step { color: var(--primary); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
#landing .lp-demo-bar { display: flex; gap: 4px; margin: 8px 0 10px; }
#landing .lp-demo-bar i { width: 26px; height: 3px; border-radius: 2px; background: rgba(221, 234, 255, .14); }
#landing .lp-demo-bar i.on { background: var(--primary); }
#landing .lp-demo-bar i.cur { background: rgba(77, 159, 255, .55); }
#landing .lp-demo-ask { font-size: 17px; font-weight: 600; }
#landing .lp-demo-wrong { margin-top: 4px; color: var(--gold); font-size: 13.5px; }
#landing .lp-demo-note { margin-top: 6px; color: var(--dim); font-size: 12.5px; }
#landing .lp-demo-done { color: #3ecf8e; font-size: 13px; font-weight: 600; }
#landing .lp-demo-panel h3 { margin-top: 6px; font-size: 19px; font-weight: 650; }
#landing .lp-demo-body { margin-top: 4px; color: var(--muted); font-size: 13.5px; }
#landing .lp-demo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#landing .lp-demo-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; }
#landing .lp-demo-links a { color: var(--primary); text-decoration: none; }
#landing .lp-demo-links button { border: 0; padding: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
#landing .lp-demo-links button:hover { color: var(--text); }

/* Sections */
#landing section { padding: 56px 0; border-top: 1px solid var(--line-soft); }
#landing h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); font-weight: 650; line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
#landing .section-lead { max-width: 640px; margin-top: 12px; color: var(--muted); font-size: 15px; }

/* Fonctionnalités */
#landing .lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
#landing .lp-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; transition: border-color .18s, transform .18s; }
#landing .lp-card:has(.lp-card-link:hover) { border-color: rgba(77, 159, 255, .55); transform: translateY(-2px); }
#landing .lp-card-link { text-decoration: none; }
#landing .lp-card-link::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
#landing .lp-card .tag { color: var(--primary); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
#landing .lp-card h3 { font-size: 16.5px; font-weight: 600; line-height: 1.3; }
#landing .lp-card p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
#landing .lp-card .more { margin-top: auto; padding-top: 6px; color: var(--primary); font-size: 13px; font-weight: 500; }
#landing .lp-card.new { border-color: rgba(77, 159, 255, .35); }

/* Étapes */
#landing .lp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; }
#landing .lp-steps li { counter-increment: step; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
#landing .lp-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 12px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; }
#landing .lp-steps h3 { font-size: 15.5px; font-weight: 600; }
#landing .lp-steps p { margin-top: 6px; color: var(--muted); font-size: 13.5px; }

/* Questions */
#landing .lp-faq { display: grid; gap: 10px; margin-top: 28px; max-width: 820px; }
#landing details { border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
#landing summary { cursor: pointer; padding: 14px 18px; font-size: 15px; font-weight: 600; list-style: none; }
#landing summary::-webkit-details-marker { display: none; }
#landing summary::after { content: "+"; float: right; color: var(--primary); }
#landing details[open] summary::after { content: "–"; }
#landing details p { padding: 0 18px 16px; color: var(--muted); font-size: 14px; }

/* Appel final et pied de page */
#landing .lp-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px; border: 1px solid rgba(77, 159, 255, .3); border-radius: 14px; background: linear-gradient(135deg, rgba(77, 159, 255, .12), rgba(12, 19, 32, .9)); }
#landing .lp-cta p { margin-top: 6px; color: var(--muted); }
#landing footer { padding: 28px 0 40px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 13px; }
#landing footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
#landing footer ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
#landing footer a { text-decoration: none; }
#landing footer a:hover { color: var(--text); }

@media (max-width: 860px) {
  #landing .lp-hero { grid-template-columns: 1fr; gap: 32px; }
  #landing .lp-features, #landing .lp-steps { grid-template-columns: 1fr; }
  #landing .lp-hero { padding: 44px 0; }
  #landing .lp-nav { padding-inline: 16px; }
  #landing .lp-actions .lp-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #landing .lp-board.shake { animation: none; }
  #landing .lp-card { transition: none; }
  #landing .lp-card:has(.lp-card-link:hover) { transform: none; }
}
