/* ==========================================================================
   PLINK — premier écran de l'accueil : ciel étoilé, bord de planète bleu,
   titre, boutons et aperçu de l'espace PLINK (compte d'exemple).
   Toujours sombre, quel que soit le thème. Chargé seulement par index.html.
   La scène est dessinée sur 1672 × 941 px puis mise à l'échelle
   (--s, --k, --astre-top, --sh : calculés par le petit script placé juste
   après la section, puis par assets/js/plink-ciel.js).
   ========================================================================== */

.ciel {
  --s: .8612; --k: .8612; --astre-top: 0px; --sh: 1115;
  --c-texte: #F5F7FA;
  --c-texte-2: #A3ADC2;
  --c-texte-3: #6E7890;
  --c-bleu: #0057FF;
  --c-bleu-clair: #4D8DFF;
  --c-verre: rgba(9, 13, 24, .78);
  --c-filet: rgba(255, 255, 255, .08);
  --e-sortie: cubic-bezier(.16, 1, .3, 1);
  /* Vidéo violette/magenta ramenée au bleu PLINK (#0057FF) */
  --filtre-bleu: hue-rotate(-55deg) saturate(1.45);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: -73px; /* passe sous l'en-tête (72 px + filet) */
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  background: #000;
  color: var(--c-texte);
  color-scheme: dark;
}
@media (max-width: 1199px) { .ciel { margin-top: -65px; } }

/* ---------- Ciel ---------- */
.ciel-etoiles { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.ciel-astre {
  /* sur téléphone le bord est plus bas que le haut de la scène : le calque part alors du haut de l'écran */
  position: absolute; left: 0; top: min(var(--astre-top), 0px); /* pas de z-index : la vidéo se fond directement avec le ciel */
  width: 100%; height: calc(717px * var(--k) + max(var(--astre-top), 0px));
  pointer-events: none;
}
.ciel-bord, .ciel-video {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  mix-blend-mode: screen;
}
.ciel-bord { transition: opacity .8s ease; }
.ciel-video { object-fit: cover; filter: var(--filtre-bleu); opacity: 0; transition: opacity .8s ease; }
.ciel.video-ok .ciel-video { opacity: 1; }
.ciel.video-ok .ciel-bord { opacity: 0; }

/* lueur au-dessus de l’aperçu (image fournie, ramenée au bleu) : hors de la scène mise à l’échelle pour que
   mix-blend-mode: screen rende son fond noir transparent ; --app-top est posé par plink-ciel.js */
.ciel-lueur {
  position: absolute; z-index: 2; left: 50%; top: calc(var(--app-top, -400px) - 58px * var(--s));
  width: calc(1040px * var(--s)); max-width: none; height: calc(112px * var(--s));
  transform: translateX(-50%); mix-blend-mode: screen; filter: var(--filtre-bleu) brightness(1.6);
  pointer-events: none; opacity: 0; transition: opacity 1.4s ease;
}
.ciel-lueur.est-chargee { opacity: .9; }

/* voile sombre très doux derrière le texte : les rayons de la vidéo passent derrière sans gêner la lecture */
.ciel::before {
  content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: calc(700px * var(--s)); pointer-events: none;
  background: radial-gradient(ellipse 38% 31% at 50% 60%, rgba(0, 0, 0, .86), rgba(0, 0, 0, .6) 50%, rgba(0, 0, 0, .2) 80%, rgba(0, 0, 0, 0) 100%);
}

/* fondu vers la suite de la page (blanc en thème clair, gris très sombre en thème sombre) */
.ciel::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 18%;
  max-height: 180px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg) 92%);
  /* dégradé adouci (courbe en S) : pas de bande grise en thème clair */
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 0%, transparent) 0%,
    color-mix(in srgb, var(--bg) 4%, transparent) 22%,
    color-mix(in srgb, var(--bg) 14%, transparent) 40%,
    color-mix(in srgb, var(--bg) 34%, transparent) 56%,
    color-mix(in srgb, var(--bg) 62%, transparent) 72%,
    color-mix(in srgb, var(--bg) 88%, transparent) 86%,
    var(--bg) 100%);
}

/* ---------- Scène mise à l'échelle ---------- */
.ciel-scene {
  position: absolute; z-index: 3; top: 0; left: 50%;
  width: 1672px; height: calc(var(--sh) * 1px);
  transform: translateX(-50%) scale(var(--s)); transform-origin: 50% 0;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 232px; text-align: center;
}

.ciel-titre {
  margin: 0; max-width: 1400px;
  font-size: 84px; line-height: 92px; font-weight: 700; letter-spacing: -0.035em;
  color: var(--c-texte); text-wrap: balance;
}
.ciel-ligne { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.ciel-ligne > span { display: inline-block; background: linear-gradient(180deg, #FFFFFF 30%, #C8D3EA 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ciel-ligne.l1 { display: block; }
.ciel-ligne > span .ciel-marque, .ciel-marque {
  background: linear-gradient(100deg, #7AA5FF 0%, #2E6BFF 45%, #0057FF 70%, #3F82FF 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .02em;
}

.ciel-chapo { margin: 22px auto 0; max-width: 720px; font-size: 20px; line-height: 31px; color: var(--c-texte-2); text-wrap: pretty; }

.ciel-actions { display: flex; justify-content: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.ciel-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 999px;
  font: 600 16px/20px var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), box-shadow .25s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.ciel-btn svg { width: 18px; height: 18px; flex: none; }
.ciel-btn:active { transform: scale(.98); }
.ciel-btn:focus-visible { outline: 3px solid #82AAFF; outline-offset: 3px; }
.ciel-btn-bleu {
  background: var(--c-bleu); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 1px rgba(77, 141, 255, .55), 0 8px 24px -10px rgba(0, 87, 255, .8);
}
.ciel-btn-bleu:hover {
  background: #1766FF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px #6FA0FF, 0 0 28px 2px rgba(0, 87, 255, .55), 0 10px 32px -8px rgba(0, 87, 255, .9);
}
.ciel-btn-sombre {
  background: rgba(255, 255, 255, .05); color: var(--c-texte);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ciel-btn-sombre svg { color: var(--c-bleu-clair); }
.ciel-btn-sombre:hover {
  background: rgba(0, 87, 255, .14); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(111, 160, 255, .6), 0 0 26px 0 rgba(0, 87, 255, .45);
}

/* ---------- Aperçu de l'espace PLINK ---------- */
.ciel-app {
  position: relative; flex: 1 1 auto; min-height: 0;
  width: 1320px; margin-top: 62px; margin-bottom: -40px;
  text-align: left;
}
.app-cadre {
  position: relative; z-index: 1; height: 100%;
  display: grid; grid-template-columns: 236px minmax(0, 1fr);
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 19, 36, .86) 0%, rgba(6, 9, 18, .94) 40%);
  box-shadow: inset 0 0 0 1px rgba(61, 123, 255, .42), 0 -20px 80px -30px rgba(0, 87, 255, .55), 0 40px 120px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  font-size: 13px; line-height: 18px; color: var(--c-texte);
}
.app-cadre::before {
  content: ""; position: absolute; z-index: 2; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, rgba(77, 141, 255, 0), #8DB4FF 30%, #FFFFFF 50%, #8DB4FF 70%, rgba(77, 141, 255, 0));
  box-shadow: 0 0 14px 1px rgba(0, 87, 255, .9), 0 0 40px 2px rgba(0, 87, 255, .45);
}

/* barre latérale */
.app-cote { display: flex; flex-direction: column; gap: 18px; padding: 22px 14px 20px; border-right: 1px solid var(--c-filet); background: rgba(255, 255, 255, .012); }
.app-logo { padding: 2px 10px 6px; color: #fff; }
.app-logo svg { display: block; height: 22px; width: auto; }
.app-nav { display: grid; gap: 2px; }
.app-nav-el { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--c-texte-2); font-weight: 500; white-space: nowrap; }
.app-nav-el svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.app-nav-el.est-actif { background: linear-gradient(90deg, rgba(0, 87, 255, .26), rgba(0, 87, 255, .08)); color: #fff; box-shadow: inset 0 0 0 1px rgba(77, 141, 255, .28); }
.app-nav-el.est-actif svg { color: #8DB4FF; opacity: 1; }
.app-nav-sep { height: 1px; margin: 8px 10px; background: var(--c-filet); }
.app-promo {
  display: grid; gap: 6px; justify-items: start; margin-top: 4px; padding: 14px;
  border-radius: 12px; background: radial-gradient(120% 120% at 0% 0%, rgba(0, 87, 255, .38), rgba(0, 87, 255, .06) 60%), rgba(255, 255, 255, .02);
  box-shadow: inset 0 0 0 1px rgba(77, 141, 255, .3);
}
.app-promo-titre { font-weight: 700; font-size: 14px; color: #fff; }
.app-promo-texte { color: var(--c-texte-2); font-size: 12px; line-height: 17px; }
.app-promo-pill { margin-top: 4px; padding: 5px 11px; border-radius: 999px; background: var(--c-bleu); color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 0 18px -2px rgba(0, 87, 255, .8); }

/* corps */
.app-corps { min-width: 0; display: flex; flex-direction: column; }
.app-barre { display: flex; align-items: center; gap: 10px; height: 66px; padding: 0 20px; border-bottom: 1px solid var(--c-filet); }
.app-champ { flex: 0 1 420px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border-radius: 10px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); color: var(--c-texte-2); }
.app-champ svg { width: 16px; height: 16px; flex: none; color: var(--c-bleu-clair); }
.app-lien { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #DCE3F2; }
.app-formats { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.app-formats > span { padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 12px; color: var(--c-texte-2); }
.app-formats > .est-actif { background: rgba(0, 87, 255, .9); color: #fff; }
.app-go { padding: 9px 16px; border-radius: 10px; background: var(--c-bleu); color: #fff; font-weight: 600; box-shadow: 0 0 20px -4px rgba(0, 87, 255, .8); }
.app-exemple { margin-left: auto; padding: 4px 10px; border-radius: 999px; border: 1px dashed rgba(255, 255, 255, .18); color: var(--c-texte-3); font-size: 11px; line-height: 16px; white-space: nowrap; }
.app-moi { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); white-space: nowrap; }
.app-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #3F82FF, #0047D6); color: #fff; font-weight: 700; }
.app-moi-txt { display: grid; line-height: 15px; }
.app-moi-nom { font-weight: 600; color: #fff; }
.app-moi-offre { font-size: 11px; color: #8DB4FF; }

.app-grille { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; padding: 18px 20px; align-items: start; }
.app-gauche { display: grid; gap: 16px; min-width: 0; }
.app-carte { border-radius: 12px; background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.app-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app-stat { display: grid; gap: 3px; padding: 15px 16px 16px; }
.app-stat-lib { color: var(--c-texte-2); font-size: 12px; }
.app-stat-val { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.app-stat-sous { color: var(--c-texte-3); font-size: 12px; line-height: 16px; }
.app-jauge { display: block; height: 4px; margin-top: 9px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.app-jauge > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0057FF, #6FA0FF); box-shadow: 0 0 10px rgba(0, 87, 255, .8); }

.app-carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }
.app-carte-titre { font-weight: 600; font-size: 14px; color: #fff; }
.app-pastille { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); color: var(--c-texte-2); font-size: 11px; white-space: nowrap; }
.app-graphe-zone { position: relative; height: 196px; margin: 10px 16px 16px 40px; }
.app-graduation { position: absolute; left: -32px; top: 14px; bottom: 0; width: 24px; color: var(--c-texte-3); font-size: 11px; line-height: 12px; text-align: right; }
.app-graduation > span { position: absolute; right: 0; transform: translateY(-50%); }
.app-graduation .g20 { top: 9.1%; } .app-graduation .g10 { top: 54.5%; } .app-graduation .g0 { top: 99.7%; }
.app-courbe { position: absolute; inset: 14px 0 0 0; width: 100%; height: calc(100% - 14px); overflow: visible; }
.app-trait { filter: drop-shadow(0 0 6px rgba(0, 87, 255, .9)); }
.app-point { position: absolute; right: -5px; top: calc(14px + (100% - 14px) * .182 - 5px); width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #0057FF, 0 0 16px 4px rgba(0, 87, 255, .8); }
.app-bulle { position: absolute; right: -6px; top: calc(14px + (100% - 14px) * .182 - 40px); padding: 4px 10px; border-radius: 8px; background: #fff; color: #0B1020; font-size: 11px; font-weight: 600; white-space: nowrap; }

.app-histo { padding-bottom: 6px; }
.app-lien-voir { color: #8DB4FF; font-size: 12px; font-weight: 500; }
.app-histo .app-carte-tete { padding-bottom: 6px; }
.app-ligne { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid rgba(255, 255, 255, .05); }
.app-histo .app-carte-tete + .app-ligne { border-top: 0; }
.app-vign { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; color: #fff; }
.app-vign svg { width: 16px; height: 16px; }
.v-audio { background: linear-gradient(135deg, #1E3A8A, #0057FF); }
.v-video { background: linear-gradient(135deg, #172554, #1D4ED8); }
.v-texte { background: rgba(255, 255, 255, .07); color: #CFE0FF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.v-clips { background: linear-gradient(135deg, #0057FF, #6FA0FF); box-shadow: 0 0 16px -2px rgba(0, 87, 255, .8); }
.app-ligne-txt { display: grid; min-width: 0; flex: 1 1 auto; }
.app-ligne-titre { color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-ligne-meta { color: var(--c-texte-3); font-size: 12px; line-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-puce { flex: none; padding: 3px 8px; border-radius: 6px; background: rgba(0, 87, 255, .16); box-shadow: inset 0 0 0 1px rgba(77, 141, 255, .3); color: #A9C6FF; font-size: 11px; font-weight: 600; white-space: nowrap; }
.app-etat { flex: none; display: inline-flex; align-items: center; gap: 6px; color: #86EFAC; font-size: 12px; font-weight: 500; white-space: nowrap; }
.app-etat > span { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 8px #4ADE80; }

/* ---------- En-tête posé sur le ciel ---------- */
.site-header.sur-ciel {
  --bg: #05070D; --surface: rgba(255, 255, 255, .07); --surface-raised: #121826;
  --text: #F5F7FA; --text-2: #AEB8CB; --line: rgba(255, 255, 255, .12); --field: rgba(255, 255, 255, .26);
  --select: #1B2A4A; --accent-text: #8DB4FF; --focus: #82AAFF; --logo-link: #FFFFFF;
  --err: #FCA5A5;
  color-scheme: dark;
  background: transparent; border-bottom-color: transparent; color: var(--text);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.sur-ciel:not(.defile) { -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header.sur-ciel.defile {
  background: rgba(3, 5, 11, .66); border-bottom-color: rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
}
.site-header.sur-ciel:has(.mobile-nav:not([hidden])) { background: #05070D; border-bottom-color: rgba(255, 255, 255, .08); }
@media (min-width: 1200px) {
  .sur-ciel .nav { padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
  .sur-ciel .nav a { padding: 8px 14px; border-radius: 999px; }
  .sur-ciel .nav a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
}
.sur-ciel .icon-btn { border-color: rgba(255, 255, 255, .14); border-radius: 999px; color: #fff; }
.sur-ciel .icon-btn:hover { background: rgba(255, 255, 255, .08); }
.sur-ciel .header-actions .btn-ghost { border-radius: 999px; color: #E6EBF5; }
.sur-ciel .header-actions .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.sur-ciel .btn-secondary {
  border-color: transparent; border-radius: 999px; background: var(--plink-blue); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 1px rgba(77, 141, 255, .5);
  transition: background-color .2s var(--ease), box-shadow .25s var(--ease);
}
.sur-ciel .btn-secondary:hover { background: #1766FF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 0 0 1px #6FA0FF, 0 0 24px rgba(0, 87, 255, .6); }
.sur-ciel .profil-btn { border-radius: 999px; background: rgba(255, 255, 255, .05); }
.sur-ciel .lang-switch a[aria-current="true"] { text-decoration-color: #4D8DFF; }

/* bandeau « page disponible en anglais » : posé sur le ciel, sous l'en-tête */
.accueil-ciel .lang-suggestion {
  position: absolute; left: 0; right: 0; top: 73px; z-index: 40;
  --surface: rgba(5, 8, 16, .72); --line: rgba(255, 255, 255, .08); --text: #F5F7FA; --text-2: #AEB8CB; --accent-text: #8DB4FF; --bg: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
@media (max-width: 1199px) { .accueil-ciel .lang-suggestion { top: 65px; } }

/* ---------- Convertisseur juste sous le premier écran ---------- */
.section-convertir { position: relative; padding-block: 24px 96px; scroll-margin-top: 72px; }
.section-convertir .hero-head h2 { font-size: 36px; line-height: 44px; }
@media (max-width: 639px) { .section-convertir { padding-block: 16px 72px; } .section-convertir .hero-head h2 { font-size: 28px; line-height: 36px; } }

/* ---------- Entrée (une seule fois) ---------- */
@keyframes ciel-haut { from { opacity: 0; transform: translateY(-14px); } }
@keyframes ciel-ligne { from { transform: translateY(108%); } }
@keyframes ciel-monte { from { opacity: 0; transform: translateY(16px); } }
@keyframes ciel-app { from { opacity: 0; transform: translateY(90px); } }
@keyframes ciel-pose { from { opacity: 0; transform: translateY(10px); } }
@keyframes ciel-gauche { from { opacity: 0; transform: translateX(-10px); } }
@keyframes ciel-trace { from { clip-path: inset(0 100% 0 0); } }
@keyframes ciel-fondu { from { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .accueil-ciel .site-header .header-row { animation: ciel-haut .7s var(--e-sortie, cubic-bezier(.16, 1, .3, 1)) .05s both; }
  .ciel-ligne > span { animation: ciel-ligne .95s cubic-bezier(.16, 1, .3, 1) both; }
  .ciel-ligne.l1 > span { animation-delay: .15s; }
  .ciel-ligne.l2 > span { animation-delay: .27s; }
  .ciel-ligne.l3 > span { animation-delay: .36s; }
  .ciel-chapo { animation: ciel-monte .8s var(--e-sortie) .55s both; }
  .ciel-actions { animation: ciel-monte .8s var(--e-sortie) .67s both; }
  .ciel-app { animation: ciel-app 1.25s var(--e-sortie) .82s both; }
  .app-nav-el, .app-nav-sep, .app-promo, .app-logo { animation: ciel-gauche .6s var(--e-sortie) both; }
  .app-logo { animation-delay: 1.12s; }
  .app-nav > :nth-child(1) { animation-delay: 1.16s; } .app-nav > :nth-child(2) { animation-delay: 1.2s; }
  .app-nav > :nth-child(3) { animation-delay: 1.24s; } .app-nav > :nth-child(4) { animation-delay: 1.28s; }
  .app-nav > :nth-child(5) { animation-delay: 1.32s; } .app-nav > :nth-child(6) { animation-delay: 1.36s; }
  .app-nav > :nth-child(7) { animation-delay: 1.4s; } .app-nav > :nth-child(8) { animation-delay: 1.44s; }
  .app-nav > :nth-child(9) { animation-delay: 1.48s; } .app-nav > :nth-child(10) { animation-delay: 1.52s; }
  .app-promo { animation-delay: 1.6s; }
  .app-barre > * { animation: ciel-pose .6s var(--e-sortie) 1.18s both; }
  .app-stat { animation: ciel-pose .7s var(--e-sortie) both; }
  .app-stat:nth-child(1) { animation-delay: 1.3s; } .app-stat:nth-child(2) { animation-delay: 1.38s; } .app-stat:nth-child(3) { animation-delay: 1.46s; }
  .app-jauge > span { animation: ciel-trace 1.1s var(--e-sortie) 1.6s both; }
  .app-graphe { animation: ciel-pose .7s var(--e-sortie) 1.5s both; }
  .app-aire, .app-trait { animation: ciel-trace 1.4s cubic-bezier(.65, 0, .35, 1) 1.7s both; }
  .app-point, .app-bulle { animation: ciel-monte .5s var(--e-sortie) 2.9s both; }
  .app-histo { animation: ciel-pose .7s var(--e-sortie) 1.42s both; }
  .app-ligne { animation: ciel-pose .55s var(--e-sortie) both; }
  .app-ligne:nth-child(2) { animation-delay: 1.56s; } .app-ligne:nth-child(3) { animation-delay: 1.62s; }
  .app-ligne:nth-child(4) { animation-delay: 1.68s; } .app-ligne:nth-child(5) { animation-delay: 1.74s; }
  .app-ligne:nth-child(6) { animation-delay: 1.8s; } .app-ligne:nth-child(7) { animation-delay: 1.86s; }
}

/* ==========================================================================
   Téléphone, tablette en portrait : mise en page empilée, pas de vidéo
   ========================================================================== */
@media (max-width: 899px), (orientation: portrait) {
  .ciel { height: auto; min-height: 0; padding-top: 168px; padding-bottom: 0; }
  .ciel::after { height: 140px; }
  .ciel-video { display: none; }
  .ciel::before { display: none; }
  .ciel-scene {
    position: relative; left: auto; top: auto; width: auto; height: auto; transform: none;
    padding: 0 max(16px, env(safe-area-inset-left, 0px)) 0;
  }
  .ciel-titre { font-size: clamp(34px, 10vw, 60px); line-height: 1.08; letter-spacing: -0.03em; }
  .ciel-ligne { display: block; }
  .ciel-chapo { margin-top: 18px; max-width: 36rem; font-size: 16px; line-height: 25px; }
  .ciel-actions { margin-top: 26px; gap: 10px; width: 100%; max-width: 420px; }
  .ciel-btn { flex: 1 1 180px; min-height: 52px; padding: 0 20px; font-size: 15px; }

  .ciel-app { width: 100%; max-width: 720px; margin: 56px 0 0; flex: none; }
  .ciel-lueur { width: min(92%, 680px); height: 96px; top: calc(var(--app-top, -400px) - 54px); }
  .app-cadre { display: block; height: auto; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .app-cote { display: block; padding: 14px 0 12px; border-right: 0; border-bottom: 1px solid var(--c-filet); }
  .app-logo, .app-promo { display: none; }
  .app-nav { display: flex; gap: 6px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .app-nav::-webkit-scrollbar { display: none; }
  .app-nav-el { flex: none; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
  .app-nav-el svg { width: 15px; height: 15px; }
  .app-nav-sep { display: none; }
  .app-barre { flex-wrap: wrap; height: auto; padding: 14px; gap: 8px; }
  .app-champ { flex: 1 1 100%; order: 3; }
  .app-formats { order: 4; }
  .app-go { order: 5; margin-left: auto; }
  .app-moi { order: 1; }
  .app-exemple { order: 2; }
  .app-grille { display: grid; grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 12px; }
  .app-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-stat:nth-child(3) { display: none; }
  .app-stat { padding: 12px 13px 13px; }
  .app-stat-val { font-size: 24px; line-height: 30px; }
  .app-graphe-zone { height: 150px; }
  .app-ligne:nth-child(n+6) { display: none; }
  .app-ligne { padding: 10px 14px; }
}
@media (orientation: portrait) and (min-width: 600px) {
  .app-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-stat:nth-child(3) { display: grid; }
  .ciel { padding-top: 200px; }
}
@media (max-width: 380px) {
  .app-exemple { display: none; }
}
@media (max-width: 899px) and (prefers-reduced-motion: no-preference), (orientation: portrait) and (prefers-reduced-motion: no-preference) {
  .ciel-app { animation-name: ciel-monte; animation-duration: 1s; }
}

/* ==========================================================================
   Thème clair : le même premier écran, en lumière
   - ciel très clair, poussière d'étoiles à peine visible (canvas repeint par plink-ciel.js) ;
   - vidéo inversée (fond noir → blanc) en mix-blend-mode: multiply, puis un voile #0057FF en
     mix-blend-mode: lighten : le blanc reste blanc, le bord et les rayons deviennent bleu PLINK ;
   - aperçu de l'espace PLINK en verre clair.
   ========================================================================== */
:root[data-theme="light"] .ciel {
  --c-texte: #111318; --c-texte-2: #4A5466; --c-texte-3: #5B6577;
  --c-filet: rgba(17, 19, 24, .07);
  --filtre-bleu-clair: hue-rotate(-55deg) saturate(1.45) invert(1) hue-rotate(180deg);
  background: radial-gradient(120% 75% at 50% 0%, #E9F0FF 0%, #F5F8FF 45%, #FFFFFF 100%);
  color-scheme: light;
}
:root[data-theme="light"] .ciel-video { filter: var(--filtre-bleu-clair); mix-blend-mode: multiply; }
.ciel-astre::after { content: ""; position: absolute; inset: -40% -20% -160% -20%; background: #0057FF; mix-blend-mode: lighten; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
:root[data-theme="light"] .ciel.video-ok .ciel-astre::after { opacity: 1; }
:root[data-theme="light"] .ciel-bord { mix-blend-mode: normal; }
:root[data-theme="light"] .ciel::before { background: radial-gradient(ellipse 38% 31% at 50% 60%, rgba(255, 255, 255, .92), rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, .25) 80%, rgba(255, 255, 255, 0) 100%); }
:root[data-theme="light"] .ciel-lueur { display: none; }
:root[data-theme="light"] .ciel-ligne > span { background-image: linear-gradient(180deg, #111318 40%, #2B3448 100%); }
:root[data-theme="light"] .ciel-ligne > span .ciel-marque, :root[data-theme="light"] .ciel-marque { background-image: linear-gradient(100deg, #3A76FF 0%, #0057FF 55%, #0047D6 100%); }
:root[data-theme="light"] .ciel-btn-sombre { background: #FFFFFF; color: #111318; box-shadow: inset 0 0 0 1px #CBD5E6, 0 6px 18px -12px rgba(0, 45, 140, .35); }
:root[data-theme="light"] .ciel-btn-sombre svg { color: #0057FF; }
:root[data-theme="light"] .ciel-btn-sombre:hover { background: #F3F7FF; box-shadow: inset 0 0 0 1px #6FA0FF, 0 0 0 4px rgba(0, 87, 255, .08), 0 10px 26px -12px rgba(0, 87, 255, .55); }
:root[data-theme="light"] .ciel-btn:focus-visible { outline-color: #0057FF; }

/* aperçu en verre clair */
:root[data-theme="light"] .app-cadre {
  background: linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(247, 250, 255, .96) 40%);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 255, .26), 0 -20px 80px -40px rgba(0, 87, 255, .45), 0 40px 100px -30px rgba(0, 35, 110, .25);
  color: #111318;
}
:root[data-theme="light"] .app-cadre::before { background: linear-gradient(90deg, rgba(0, 87, 255, 0), #6FA0FF 30%, #0057FF 50%, #6FA0FF 70%, rgba(0, 87, 255, 0)); box-shadow: 0 0 14px 1px rgba(0, 87, 255, .45); }
:root[data-theme="light"] .app-cote { background: rgba(0, 87, 255, .025); }
:root[data-theme="light"] .app-logo { color: #111318; }
:root[data-theme="light"] .app-nav-el.est-actif { background: linear-gradient(90deg, rgba(0, 87, 255, .12), rgba(0, 87, 255, .04)); color: #0B1020; box-shadow: inset 0 0 0 1px rgba(0, 87, 255, .22); }
:root[data-theme="light"] .app-nav-el.est-actif svg { color: #0057FF; }
:root[data-theme="light"] .app-promo { background: radial-gradient(120% 120% at 0% 0%, rgba(0, 87, 255, .14), rgba(0, 87, 255, .03) 60%), #FFFFFF; box-shadow: inset 0 0 0 1px rgba(0, 87, 255, .22); }
:root[data-theme="light"] .app-promo-titre, :root[data-theme="light"] .app-moi-nom, :root[data-theme="light"] .app-stat-val,
:root[data-theme="light"] .app-carte-titre, :root[data-theme="light"] .app-ligne-titre { color: #111318; }
:root[data-theme="light"] .app-champ, :root[data-theme="light"] .app-formats, :root[data-theme="light"] .app-moi, :root[data-theme="light"] .app-pastille { background: #FFFFFF; box-shadow: inset 0 0 0 1px #DCE4F2; }
:root[data-theme="light"] .app-champ svg { color: #0057FF; }
:root[data-theme="light"] .app-lien { color: #2B3448; }
:root[data-theme="light"] .app-formats > .est-actif { background: #0057FF; }
:root[data-theme="light"] .app-exemple { border-color: #C5D0E3; }
:root[data-theme="light"] .app-moi-offre, :root[data-theme="light"] .app-lien-voir { color: #0047D6; }
:root[data-theme="light"] .app-carte { background: #FFFFFF; box-shadow: inset 0 0 0 1px #E1E8F4, 0 8px 24px -18px rgba(0, 35, 110, .35); }
:root[data-theme="light"] .app-jauge { background: #E8EEF8; }
:root[data-theme="light"] .app-jauge > span { box-shadow: none; }
:root[data-theme="light"] .app-courbe > path:first-of-type { stroke: rgba(17, 19, 24, .08); }
:root[data-theme="light"] .app-trait { stroke: #0057FF; filter: drop-shadow(0 2px 4px rgba(0, 87, 255, .35)); }
:root[data-theme="light"] .app-bulle { background: #0B1020; color: #FFFFFF; }
:root[data-theme="light"] .app-point { background: #FFFFFF; box-shadow: 0 0 0 3px #0057FF, 0 0 12px 2px rgba(0, 87, 255, .45); }
:root[data-theme="light"] .app-ligne { border-top-color: #EEF2F8; }
:root[data-theme="light"] .v-texte { background: #EEF3FC; color: #0047D6; box-shadow: inset 0 0 0 1px #DCE4F2; }
:root[data-theme="light"] .app-puce { background: #EEF4FF; box-shadow: inset 0 0 0 1px #C9D9FB; color: #0047D6; }
:root[data-theme="light"] .app-etat { color: #15803D; }
:root[data-theme="light"] .app-etat > span { background: #16A34A; box-shadow: none; }

/* en-tête posé sur le ciel clair */
:root[data-theme="light"] .site-header.sur-ciel {
  --bg: #FFFFFF; --surface: rgba(17, 19, 24, .05); --surface-raised: #FFFFFF; --text: #111318; --text-2: #4A5466;
  --line: #E2E7EF; --field: #7B8494; --select: #EAF0FF; --accent-text: #0057FF; --focus: #0057FF; --logo-link: #111318; --err: #B91C1C;
  color-scheme: light;
}
:root[data-theme="light"] .site-header.sur-ciel.defile { background: rgba(255, 255, 255, .8); border-bottom-color: #E4EAF5; }
:root[data-theme="light"] .site-header.sur-ciel:has(.mobile-nav:not([hidden])) { background: #FFFFFF; border-bottom-color: #E4EAF5; }
@media (min-width: 1200px) {
  :root[data-theme="light"] .sur-ciel .nav { background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(17, 19, 24, .08); }
  :root[data-theme="light"] .sur-ciel .nav a:hover { background: rgba(17, 19, 24, .06); color: #111318; }
}
:root[data-theme="light"] .sur-ciel .icon-btn { border-color: rgba(17, 19, 24, .14); color: #111318; background: rgba(255, 255, 255, .6); }
:root[data-theme="light"] .sur-ciel .icon-btn:hover { background: #FFFFFF; }
:root[data-theme="light"] .sur-ciel .header-actions .btn-ghost { color: #111318; }
:root[data-theme="light"] .sur-ciel .header-actions .btn-ghost:hover { background: rgba(17, 19, 24, .06); }
:root[data-theme="light"] .sur-ciel .profil-btn { background: #FFFFFF; }
:root[data-theme="light"] .accueil-ciel .lang-suggestion { --surface: rgba(255, 255, 255, .8); --line: #E4EAF5; --text: #111318; --text-2: #4A5466; --accent-text: #0057FF; --bg: rgba(17, 19, 24, .06); }

/* ==========================================================================
   Défilement (plink-ciel.js) : planète qui se rapproche, étoiles en traînées, trait vers le convertisseur
   ========================================================================== */
.ciel-bord, .ciel-video { transform-origin: 50% 30%; }
.ciel-etoiles { transform-origin: 50% 50%; }
.ciel.ciel-entree-finie .ciel-chapo, .ciel.ciel-entree-finie .ciel-actions, .ciel.ciel-entree-finie .ciel-app { animation: none; }
.section-convertir { padding-top: 88px; }
.section-convertir::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 72px; margin-left: -1px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(to bottom, #8DB4FF, rgba(0, 87, 255, .9) 45%, rgba(0, 87, 255, 0));
  box-shadow: 0 0 14px 1px rgba(0, 87, 255, .55);
  transform-origin: 50% 0; transform: scaleY(var(--trait, 0)); opacity: var(--trait, 0);
}
@media (max-width: 639px) { .section-convertir { padding-top: 72px; } .section-convertir::before { height: 56px; } }
@media (prefers-reduced-motion: reduce) { .section-convertir::before { transform: none; opacity: .6; } }
