/* baimi-algo.b2dev.net — styles (spec site 4). Aucune ressource externe. */

:root {
  --bleu: #0b6bcb;
  --bleu-fonce: #083d80;
  --bleu-nuit: #062a5a;
  --jaune: #ffc72c;
  --texte: #1f2328;
  --texte-doux: #57606a;
  --fond: #ffffff;
  --fond-doux: #f4f8fd;
  --carte: #ffffff;
  --bordure: #d8e2ee;
  --code: #f6f8fa;
  --rayon: 16px;
  --ombre: 0 1px 2px rgb(8 61 128 / 0.06), 0 12px 32px rgb(8 61 128 / 0.12);
  --ombre-forte: 0 24px 60px rgb(4 24 54 / 0.35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --texte: #e8eef5;
    --texte-doux: #a5b3c2;
    --fond: #0f1720;
    --fond-doux: #131e2a;
    --carte: #172331;
    --bordure: #263445;
    --code: #1c2938;
    --ombre: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.0625rem) / 1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--texte);
  background: var(--fond);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: #6cb6ff; } }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9em; background: var(--code); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 3px; border-radius: 4px; }

.conteneur { width: min(1160px, 100% - 2.25rem); margin-inline: auto; }
.evitement { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--jaune); color: #1f2328; padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700; }
.evitement:focus { top: 1rem; }
.surtitre { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 700; color: var(--bleu); margin-bottom: 0.8rem; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgb(8 61 128 / 0.08);
}
@media (prefers-color-scheme: dark) { .entete { background: rgb(15 23 32 / 0.82); border-bottom-color: rgb(255 255 255 / 0.06); } }
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.marque { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.15rem; color: var(--texte); text-decoration: none; letter-spacing: -0.01em; }
.marque img { border-radius: 9px; }
.navigation { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.navigation a { color: var(--texte); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 0.5rem 0.8rem; border-radius: 999px; }
.navigation a:hover { background: var(--fond-doux); }
.navigation .navigation-action { background: var(--bleu); color: #fff; }
.navigation .navigation-action:hover { background: var(--bleu-fonce); }
.menu-bouton { display: none; }

@media (max-width: 767px) {
  .js .menu-bouton {
    display: inline-grid; place-content: center; gap: 5px;
    width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  }
  .js .menu-bouton span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--texte); transition: transform 0.2s, opacity 0.2s; }
  .js .menu-bouton[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .js .menu-bouton[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
  .js .menu-bouton[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .js .navigation { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 0 0 1rem; }
  .js .menu-bouton[aria-expanded='true'] + .navigation { display: flex; }
  .js .navigation a { padding: 0.85rem 1rem; border-radius: 12px; }
  .js .navigation .navigation-action { text-align: center; margin-top: 0.4rem; }
}

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.75rem 1.4rem; border-radius: 12px;
  font-weight: 700; font-size: 1.02rem; text-decoration: none; line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.bouton:hover { transform: translateY(-1px); }
.bouton-principal { background: var(--jaune); color: #1b1f24; box-shadow: 0 10px 24px rgb(255 199 44 / 0.35); }
.bouton-principal:hover { background: #ffd34f; box-shadow: 0 14px 30px rgb(255 199 44 / 0.45); }
.bouton-discret { color: #fff; border: 1.5px solid rgb(255 255 255 / 0.45); }
.bouton-discret:hover { background: rgb(255 255 255 / 0.1); }

/* ---------- Accroche ---------- */
.accroche {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgb(108 182 255 / 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgb(255 199 44 / 0.16), transparent 60%),
    linear-gradient(160deg, var(--bleu) 0%, var(--bleu-fonce) 62%, var(--bleu-nuit) 100%);
  padding: clamp(3rem, 2rem + 4vw, 6rem) 0 clamp(3.5rem, 2rem + 6vw, 7rem);
}
.accroche::after { /* trame de points discrète */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgb(255 255 255 / 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.accroche-grille { position: relative; z-index: 1; display: grid; gap: clamp(2.5rem, 4vw, 4rem); align-items: center; }
@media (min-width: 960px) { .accroche-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); } }
.accroche .surtitre { color: var(--jaune); }
.accroche h1 span { display: block; color: var(--jaune); }
.chapeau { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); color: rgb(255 255 255 / 0.88); max-width: 36rem; margin: 1.2rem 0 2rem; }
.accroche-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
@media (max-width: 479px) { .accroche-actions .bouton { flex: 1 1 100%; } }
.note-ios { margin: 1rem 0 0; padding: 0.7rem 0.9rem; border-radius: 10px; background: rgb(255 255 255 / 0.12); font-size: 0.95rem; }
.accroche-faits { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; list-style: none; padding: 0; margin: 1.6rem 0 0; font-size: 0.95rem; color: rgb(255 255 255 / 0.85); }
.accroche-faits li { display: inline-flex; align-items: center; gap: 0.45rem; }
.accroche-faits li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--jaune); }

.accroche-visuel { position: relative; padding: 0 0 2.5rem; }
@media (min-width: 560px) { .accroche-visuel { padding: 0 3.5rem 3rem 0; } }
.fenetre { margin: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--ombre-forte); border: 1px solid rgb(255 255 255 / 0.25); }
.fenetre-barre { display: flex; gap: 7px; padding: 10px 12px; background: #eef2f7; border-bottom: 1px solid #dde4ec; }
.fenetre-barre i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.fenetre-barre i:nth-child(2) { background: #febc2e; }
.fenetre-barre i:nth-child(3) { background: #28c840; }
.telephone {
  position: absolute; right: 0; bottom: 0; margin: 0;
  width: clamp(110px, 24%, 170px);
  padding: 7px; border-radius: 26px; background: #111821;
  box-shadow: var(--ombre-forte), inset 0 0 0 1.5px #2c3846;
}
.telephone img { border-radius: 20px; }
@media (max-width: 559px) { .telephone { right: -0.25rem; width: 31%; } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 3rem + 4vw, 7rem) 0; }
.section-teintee { background: var(--fond-doux); }
.section-entete { max-width: 46rem; margin: 0 auto clamp(2.5rem, 4vw, 3.5rem); text-align: center; }
.section-entete p:last-child { color: var(--texte-doux); font-size: 1.08rem; margin: 0; }

.cartes { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.carte {
  background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon);
  overflow: hidden; box-shadow: var(--ombre);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.carte:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgb(8 61 128 / 0.06), 0 22px 48px rgb(8 61 128 / 0.18); }
.carte img { border-bottom: 1px solid var(--bordure); aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; width: 100%; background: #fff; }
.carte-texte { padding: 1.4rem 1.5rem 1.6rem; }
.carte-texte p { color: var(--texte-doux); margin: 0; }

/* ---------- Atouts ---------- */
.atouts { background: var(--bleu-fonce); color: #fff; padding: clamp(2.5rem, 2rem + 2vw, 3.5rem) 0; }
.atouts-liste { list-style: none; display: grid; gap: 1.6rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); padding: 0; margin-block: 0; }
.atouts-liste li { display: grid; grid-template-columns: auto 1fr; column-gap: 0.85rem; align-items: start; }
.atouts-liste svg { grid-row: span 2; width: 30px; height: 30px; fill: none; stroke: var(--jaune); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.atouts-liste strong { font-size: 1.02rem; }
.atouts-liste span { color: rgb(255 255 255 / 0.78); font-size: 0.93rem; }

/* ---------- Téléchargements ---------- */
.systemes { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.systeme {
  position: relative; display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--carte); border: 1.5px solid var(--bordure); border-radius: var(--rayon);
  padding: 1.6rem 1.4rem 1.4rem; box-shadow: var(--ombre);
}
.systeme h3 { margin: 0.2rem 0 0; font-size: 1.3rem; }
.systeme-icone { width: 38px; height: 38px; fill: none; stroke: var(--bleu); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.systeme-icone .plein { fill: var(--bleu); stroke: none; }
@media (prefers-color-scheme: dark) { .systeme-icone { stroke: #6cb6ff; } .systeme-icone .plein { fill: #6cb6ff; } }
.systeme-detail { color: var(--texte-doux); margin: 0 0 0.4rem; font-size: 0.95rem; }
.systeme-note { color: var(--texte-doux); font-size: 0.88rem; margin: 0.2rem 0 0; }
.systeme .bouton { width: 100%; justify-content: space-between; min-height: 54px; }
.bouton small { font-weight: 600; font-size: 0.8rem; opacity: 0.85; white-space: nowrap; }
.bouton-telecharger { background: var(--bleu); color: #fff; }
.bouton-telecharger:hover { background: var(--bleu-fonce); }
.bouton-secondaire { background: transparent; color: var(--texte); border: 1.5px solid var(--bordure); }
.bouton-secondaire:hover { border-color: var(--bleu); }
.systeme.recommande { border-color: var(--jaune); box-shadow: 0 0 0 3px rgb(255 199 44 / 0.35), var(--ombre); }
.systeme.recommande::before {
  content: 'Pour votre appareil'; position: absolute; top: -0.8rem; left: 1.2rem;
  background: var(--jaune); color: #1b1f24; font-size: 0.75rem; font-weight: 800;
  padding: 0.25rem 0.65rem; border-radius: 999px; letter-spacing: 0.02em;
}
.note-signature { text-align: center; color: var(--texte-doux); font-size: 0.93rem; max-width: 44rem; margin: 2rem auto 0; }

/* ---------- Installation ---------- */
.onglets { max-width: 52rem; margin: 0 auto; }
.onglets-liste { display: none; }
.js .onglets-liste {
  display: flex; gap: 0.3rem; overflow-x: auto; padding: 0.3rem; margin-bottom: 1.2rem;
  background: var(--fond-doux); border: 1px solid var(--bordure); border-radius: 14px; scrollbar-width: none;
}
.onglets-liste button {
  flex: 1 0 auto; min-height: 46px; padding: 0.5rem 1.1rem; border: 0; border-radius: 10px;
  background: transparent; color: var(--texte-doux); font: inherit; font-weight: 700; cursor: pointer;
}
.onglets-liste button[aria-selected='true'] { background: var(--carte); color: var(--texte); box-shadow: 0 1px 3px rgb(0 0 0 / 0.1); }
.notice { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1.4rem 1.6rem; margin-bottom: 1rem; }
.js .notice h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.notice ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.7rem; }
.notice li::marker { color: var(--bleu); font-weight: 800; }
.premier-essai { max-width: 52rem; margin: 1.5rem auto 0; padding: 1.2rem 1.5rem; border-radius: var(--rayon); border-left: 4px solid var(--jaune); background: var(--fond-doux); }
.premier-essai h3 { margin-bottom: 0.3rem; }
.premier-essai p { margin: 0; }

/* ---------- Auteur ---------- */
.auteur { background: var(--fond-doux); }
.auteur-grille { display: grid; gap: 1.5rem 2.5rem; align-items: center; max-width: 52rem; }
@media (min-width: 640px) { .auteur-grille { grid-template-columns: auto 1fr; } }
.auteur-photo { width: 160px; height: 160px; border-radius: 50%; box-shadow: 0 0 0 6px var(--carte), 0 0 0 8px var(--jaune), var(--ombre); }
.auteur h2 { margin-bottom: 0.2rem; }
.auteur-role { color: var(--bleu); font-weight: 600; }
@media (prefers-color-scheme: dark) { .auteur-role { color: #6cb6ff; } }

/* ---------- Pied de page ---------- */
.pied { background: var(--bleu-nuit); color: rgb(255 255 255 / 0.8); font-size: 0.92rem; padding: 2rem 0; }
.pied-ligne { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.pied p { margin: 0; }
.pied a { color: #fff; }

/* ---------- Apparitions au défilement ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .apparait { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .apparait.visible { opacity: 1; transform: none; }
  .cartes .apparait:nth-child(2), .systemes .apparait:nth-child(2) { transition-delay: 0.08s; }
  .cartes .apparait:nth-child(3), .systemes .apparait:nth-child(3) { transition-delay: 0.16s; }
  .cartes .apparait:nth-child(4), .systemes .apparait:nth-child(4) { transition-delay: 0.24s; }
}

/* ---------- Page 404 ---------- */
.introuvable { min-height: calc(100vh - 64px - 5rem); display: grid; place-items: center; padding: 4rem 0; text-align: center; }
.introuvable pre {
  display: inline-block; text-align: left; margin: 0 auto 2rem; padding: 1.2rem 1.5rem;
  font: 500 clamp(0.85rem, 0.8rem + 0.4vw, 1.05rem) / 1.7 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--carte); border: 1px solid var(--bordure); border-radius: 12px; box-shadow: var(--ombre);
  max-width: 100%; overflow-x: auto;
}
.introuvable .mc { color: #7b2fbf; }
.introuvable .ch { color: #a3151d; }
@media (prefers-color-scheme: dark) { .introuvable .mc { color: #d2a8ff; } .introuvable .ch { color: #ff9b8e; } }
.introuvable p { color: var(--texte-doux); }
.introuvable .bouton-principal { box-shadow: none; }
.introuvable-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.5rem; }
.introuvable .bouton-secondaire { min-height: 52px; }

/* Ancres : le titre ne passe pas sous l'en-tête collant. */
[id] { scroll-margin-top: 80px; }
/* Sur une colonne, la carte du système détecté vient en premier. */
@media (max-width: 559px) { .systeme.recommande { order: -1; margin-top: 0.6rem; } }
.systeme .bouton-secondaire { font-size: 0.95rem; }
