/* Ridgeline · site de présentation. Polices du système (aucun service tiers). */
:root {
  --ink: #0b1a24;
  --bg: #0f2531;
  --bg-2: #13303b;
  --panel: rgba(255, 255, 255, .06);
  --panel-2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .1);
  --text: #eef5f3;
  --muted: #9fb7b5;
  --green: #9bd27a;
  --sand: #e6cf86;
  --teal: #5fd0b6;
  --red: #ef4b45;
  --blue: #3d74ff;
  --radius: 22px;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; font: 17px/1.6 var(--body); color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(1100px 700px at 85% -10%, rgba(95, 208, 182, .16), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(61, 116, 255, .12), transparent 60%),
    linear-gradient(180deg, #13303d 0%, #0f2531 40%, #0c1f29 100%);
  min-height: 100vh; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #8be6d1; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(44px, 8vw, 84px); font-weight: 800; }
h2 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 750; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: #cfe0dd; max-width: 640px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: rgba(13, 32, 42, .72); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 21px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.nav-links { display: flex; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { color: #cfe0dd; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; background: var(--panel); }
.nav .btn { margin-left: 6px; }
.menu-toggle { display: none; margin-left: auto; background: var(--panel); border: 0; color: var(--text); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: rgba(13, 32, 42, .97); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 17px; }
  .nav > .btn { display: none; }
}

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 16px/1 var(--body); padding: 14px 22px; border-radius: 14px; color: var(--ink); background: #fff; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.btn.ghost { background: var(--panel-2); color: var(--text); }
.btn.ghost:hover { background: rgba(255, 255, 255, .16); color: var(--text); }
.btn.small { padding: 10px 16px; font-size: 14px; border-radius: 12px; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 11px 20px 11px 16px; border-radius: 14px; text-decoration: none;
  background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, .25); min-width: 210px; transition: transform .15s, border-color .15s; }
.store:hover { transform: translateY(-1px); color: #fff; border-color: rgba(255, 255, 255, .5); }
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 11.5px; opacity: .8; letter-spacing: .02em; }
.store strong { display: block; font-size: 19px; line-height: 1.15; font-family: var(--display); }
.store.soon { cursor: default; opacity: .9; background: rgba(0, 0, 0, .45); }
.store.soon:hover { transform: none; border-color: rgba(255, 255, 255, .25); }
.store .tag { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--teal); color: var(--ink); }

/* Héros */
.hero { position: relative; padding: clamp(40px, 8vw, 90px) 0 clamp(60px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: .2em; background: linear-gradient(180deg, #fff 30%, #bfe8dd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tagline { font-family: var(--display); font-size: clamp(22px, 3vw, 30px); font-weight: 700; color: var(--sand); margin-bottom: .6em; }
.hero .store-row { margin: 28px 0 18px; }
.hero-note { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-note span::before { content: "✓"; color: var(--teal); font-weight: 800; margin-right: 6px; }
.phones { position: relative; height: 640px; }
.phone { position: absolute; width: 280px; border-radius: 46px; padding: 10px; background: linear-gradient(145deg, #2a3b44, #0c161c);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .5), inset 0 0 0 1.5px rgba(255, 255, 255, .12); }
.phone img { border-radius: 37px; width: 100%; height: auto; aspect-ratio: 1206 / 2622; object-fit: cover; background: #10262f; }
.phones .phone:nth-child(1) { right: 150px; top: 40px; transform: rotate(-7deg); z-index: 1; opacity: .92; }
.phones .phone:nth-child(2) { right: 0; top: 0; transform: rotate(4deg); z-index: 2; animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead, .hero-note, .hero .store-row { margin-inline: auto; justify-content: center; }
  .phones { height: 520px; max-width: 420px; margin: 10px auto 0; width: 100%; }
  .phone { width: 230px; border-radius: 38px; padding: 8px; }
  .phone img { border-radius: 31px; }
  .phones .phone:nth-child(1) { right: auto; left: 0; top: 40px; }
  .phones .phone:nth-child(2) { right: 0; }
}
@media (max-width: 480px) { .phones { height: 430px; } .phone { width: 190px; } }

/* Lignes de niveau en décor */
.contours { position: absolute; inset: 0; z-index: -1; opacity: .35; pointer-events: none; overflow: hidden;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 75%); }
.contours svg { width: 100%; height: 100%; }

/* Sections */
section { position: relative; padding: clamp(60px, 9vw, 110px) 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.band { background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .045)); border-block: 1px solid var(--line); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-2); margin-bottom: 16px; color: var(--teal); }
.card .icon svg { width: 26px; height: 26px; }
.num-badge { font-family: var(--display); font-weight: 800; font-size: 15px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal); color: var(--ink); margin-bottom: 14px; }

/* Pièces */
.piece-card { text-align: center; padding-top: 32px; }
.piece-card svg.shape { width: 92px; height: 92px; margin: 0 auto 14px; display: block; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .4)); }
.stats { display: grid; gap: 8px; margin: 16px 0; text-align: left; }
.stat { display: grid; grid-template-columns: 96px 1fr 22px; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.stat b { color: var(--text); text-align: right; }
.pips { display: flex; gap: 4px; }
.pips i { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.pips i.on { background: var(--teal); }
.pips.force i.on { background: var(--sand); }

/* Terrains */
.terrains { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.terrain { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.terrain .relief { flex: none; width: 54px; height: 34px; display: flex; align-items: flex-end; gap: 2px; }
.terrain .relief i { flex: 1; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, var(--sand), var(--green)); min-height: 3px; }
.terrain strong { display: block; font-size: 15.5px; }
.terrain span { font-size: 13px; color: var(--muted); line-height: 1.35; display: block; }

/* Modes */
.mode { display: flex; flex-direction: column; }
.mode ul { padding-left: 0; list-style: none; margin: 12px 0 0; }
.mode li { padding: 6px 0 6px 28px; position: relative; font-size: 15.5px; color: #d5e4e1; }
.mode li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 12px; border-radius: 4px; background: var(--teal); opacity: .8; transform: rotate(45deg) scale(.75); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--panel-2); color: #dceae7; }

/* Galerie */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 230px; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px max(20px, calc((100% - 1180px) / 2)) 30px; scrollbar-width: thin; }
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery .phone { position: relative; width: 100%; padding: 8px; border-radius: 38px; }
.gallery .phone img { border-radius: 31px; }
.gallery figcaption { text-align: center; margin-top: 14px; font-weight: 650; font-size: 15px; }
.gallery figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }

/* Chiffres */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; text-align: center; }
.figures b { display: block; font-family: var(--display); font-size: clamp(40px, 6vw, 60px); font-weight: 800; line-height: 1;
  background: linear-gradient(180deg, #fff, var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.figures span { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; } }

/* Questions fréquentes */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 650; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 26px; color: var(--teal); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; color: #cfdfdc; }

/* Appel final */
.cta { text-align: center; border-radius: 32px; padding: clamp(40px, 7vw, 70px) 24px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(95, 208, 182, .22), rgba(61, 116, 255, .18)); border: 1px solid rgba(255, 255, 255, .14); }
.cta img.app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px; box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
.cta .store-row { justify-content: center; margin-top: 26px; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 50px; font-size: 14.5px; color: var(--muted); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
.site-footer h4 { color: var(--text); font-size: 14px; margin: 0 0 12px; letter-spacing: .04em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 13px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Pages de texte (règles, confidentialité…) */
.page-hero { padding: clamp(50px, 8vw, 90px) 0 30px; }
.page-hero h1 { font-size: clamp(38px, 6vw, 62px); }
.doc { padding-top: 10px; }
.doc h2 { font-size: clamp(26px, 3.4vw, 34px); margin-top: 1.8em; scroll-margin-top: 90px; }
.doc h3 { margin-top: 1.4em; scroll-margin-top: 90px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: .45em; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 15.5px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 650; font-size: 13.5px; }
.note { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 14px; padding: 16px 18px; margin: 1.2em 0; }
.note.warn { border-left-color: var(--sand); }
.toc { position: sticky; top: 90px; align-self: start; font-size: 14.5px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.active { background: var(--panel); color: var(--text); }
.with-toc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 50px; }
@media (max-width: 900px) { .with-toc { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } .toc ol { display: flex; flex-wrap: wrap; gap: 6px; } .toc a { background: var(--panel); } }
.updated { font-size: 14px; color: var(--muted); }

/* Schémas des règles */
.figure { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; margin: 1.4em 0; }
.figure figcaption { font-size: 14.5px; color: var(--muted); margin-top: 12px; }
.figure svg { width: 100%; height: auto; display: block; }
.calc { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-weight: 650; margin-top: 12px; }
.calc .term { background: var(--panel-2); border-radius: 10px; padding: 6px 12px; font-size: 15px; }
.calc .term.red { box-shadow: inset 3px 0 0 var(--red); }
.calc .term.blue { box-shadow: inset 3px 0 0 var(--blue); }
.calc .op { color: var(--muted); }
.end-cards .card h3 { display: flex; gap: 10px; align-items: center; font-size: 18px; }

/* Démonstration interactive du déplacement */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
@media (max-width: 760px) { .demo { grid-template-columns: minmax(0, 1fr); } }
.demo-board { display: grid; gap: 4px; grid-auto-rows: 1fr; aspect-ratio: 1; max-width: 460px; width: 100%; margin: 0 auto; user-select: none; }
.cell { position: relative; min-height: 0; min-width: 0; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: clamp(11px, 2.4vw, 15px); color: rgba(0, 0, 0, .55);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); transition: outline-color .15s; outline: 3px solid transparent; outline-offset: -3px; }
.cell .h { position: absolute; top: 3px; left: 5px; font-size: 10px; font-weight: 700; color: rgba(0, 0, 0, .45); }
.cell.reach { outline-color: rgba(255, 255, 255, .95); }
.cell.reach::after { content: attr(data-cost); position: absolute; inset: 0; display: grid; place-items: center; background: rgba(95, 208, 182, .42); border-radius: 7px; color: #062019; font-size: clamp(13px, 2.6vw, 17px); }
.cell.special { outline-color: #ffd36b; }
.cell.special::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 211, 107, .45); border-radius: 7px; color: #3b2a00; }
.cell .pc { width: 72%; height: 72%; position: absolute; inset: 14%; }
.demo-controls { display: grid; gap: 10px; }
.seg { display: flex; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; color: var(--muted); font-weight: 700; padding: 9px 6px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.legend { font-size: 14px; color: var(--muted); display: grid; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 8px; }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
