/* Couleurs reprises de app/Sources/Theme.swift */
:root {
  --fond: #F5F7FB; --carte: #FFFFFF; --ligne: #DCE2EC; --texte: #121826;
  --texte2: #2E3A4E; --discret: #4E5C73; --action: #2F6FE4; --sur-action: #FFFFFF;
  --potentiel: #E39A10; --bandeau: #E6EDF8; color-scheme: light;
}
/* Sombre : choisi explicitement, ou automatique quand le Mac est en mode sombre */
:root[data-theme="dark"] {
    --fond: #0E121A; --carte: #151B26; --ligne: #232C3D; --texte: #E9EEF6;
    --texte2: #C9D2E0; --discret: #9AA7BA; --action: #4F8DFF; --sur-action: #0B1220;
    --potentiel: #F5A524; --bandeau: #142036; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0E121A; --carte: #151B26; --ligne: #232C3D; --texte: #E9EEF6;
    --texte2: #C9D2E0; --discret: #9AA7BA; --action: #4F8DFF; --sur-action: #0B1220;
    --potentiel: #F5A524; --bandeau: #142036; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans",
        "Apple SD Gothic Neo", "Segoe UI", Roboto, sans-serif;
}
a { color: var(--action); }
img { max-width: 100%; height: auto; }

.haut {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 12px max(16px, calc(50% - 540px));
  background: color-mix(in srgb, var(--fond) 85%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--ligne);
}
.marque { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--texte); text-decoration: none; }
nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
nav a { color: var(--texte2); text-decoration: none; }
nav a:hover { color: var(--action); }
.langue select {
  font: inherit; color: var(--texte); background: var(--carte);
  border: 1px solid var(--ligne); border-radius: 8px; padding: 4px 8px;
}
.visuel-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0 8px; }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 12px 0 16px; letter-spacing: -0.02em; }
h2 { font-size: 28px; margin: 0 0 20px; }
h3 { margin: 0; font-size: 21px; }

.hero { text-align: center; padding-top: 64px; }
.badge {
  display: inline-block; margin: 0; padding: 4px 12px; border-radius: 999px;
  background: var(--bandeau); color: var(--action); font-size: 14px; font-weight: 600;
}
.lead { font-size: 20px; color: var(--texte2); max-width: 720px; margin: 0 auto 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.bouton {
  display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600;
  text-decoration: none; background: var(--action); color: var(--sur-action); border: 0;
}
.bouton.secondaire { background: var(--carte); color: var(--texte); border: 1px solid var(--ligne); }
.bouton.inactif { opacity: .6; pointer-events: none; }
.meta { color: var(--discret); font-size: 14px; margin-top: 14px; }
.capture-hero {
  margin-top: 36px; border-radius: 12px; border: 1px solid var(--ligne);
  box-shadow: 0 24px 60px rgba(0,0,0,.25); background: var(--carte); aspect-ratio: 16 / 10;
}

ul.coches { list-style: none; padding: 0; margin: 0; }
ul.coches li { position: relative; padding: 6px 0 6px 28px; }
ul.coches li::before { content: "✓"; position: absolute; left: 4px; color: var(--action); font-weight: 700; }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 28px; }

.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: 14px; padding: 24px; }
.carte.accent { border-color: var(--action); }
.sous { color: var(--discret); margin: 4px 0 14px; font-size: 15px; }

.captures { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
figure { margin: 0; }
figure img { border-radius: 10px; border: 1px solid var(--ligne); background: var(--carte); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
figcaption { color: var(--discret); font-size: 14px; font-style: italic; margin-top: 6px; }

.etapes { padding-left: 22px; }
.etapes li { padding: 4px 0; }
.note { background: var(--bandeau); border-radius: 10px; padding: 12px 16px; color: var(--texte2); }

.prix { max-width: 440px; margin: 0 auto; text-align: center; }
.prix ul { text-align: left; margin-bottom: 20px; }
.montant { font-size: 44px; font-weight: 800; margin: 8px 0 0; }

details { border-bottom: 1px solid var(--ligne); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--texte2); margin: 8px 0 0; }

.versions dt { font-weight: 700; }
.versions dd { margin: 2px 0 14px; color: var(--texte2); }

footer {
  margin-top: 64px; padding: 28px max(16px, calc(50% - 540px)); border-top: 1px solid var(--ligne);
  color: var(--discret); font-size: 14px;
}
footer a { color: var(--discret); }

/* Pages légales */
.legal { max-width: 760px; }
.legal h1 { font-size: 34px; }
.legal h2 { font-size: 21px; margin-top: 28px; }

@media (max-width: 640px) {
  nav a { display: none; }
  section { padding-top: 40px; }
}

/* Sélecteur d'apparence : Auto / Clair / Sombre */
.theme { display: inline-flex; border: 1px solid var(--ligne); border-radius: 8px; overflow: hidden; }
.theme button {
  font: inherit; font-size: 14px; line-height: 1; padding: 6px 8px; border: 0; cursor: pointer;
  background: var(--carte); color: var(--discret);
}
.theme button + button { border-left: 1px solid var(--ligne); }
.theme button[aria-pressed="true"] { background: var(--bandeau); color: var(--action); }
