/* ══════════════════════════════════════════════════════════════════════════
   L'HABILLAGE                                                    (03/10/2026)
   Un espace sombre et réaliste ; par-dessus, des commandes rondes, grosses,
   colorées. Deux polices : Fredoka pour les titres et les boutons (ronde,
   amicale), Nunito pour ce qui se lit. Une seule couleur d'action : le jaune
   du Soleil. Tout tient au pouce : rien sous 48 px.
   ══════════════════════════════════════════════════════════════════════════ */
@import url(polices/polices.css?v=7d7ba92);

:root {
  --nuit: #05070d; --verre: rgba(13, 19, 33, .82); --verre-plein: #0d1321; --trait: rgba(255, 255, 255, .12);
  --texte: #f4f7ff; --doux: #a9b6d3; --soleil: #ffd166; --soleil-fonce: #2a1e00; --ciel: #6fb2ff;
  --bas: env(safe-area-inset-bottom, 0px); --haut: env(safe-area-inset-top, 0px);
  --titre: Fredoka, Nunito, system-ui, sans-serif;
}
/* Là où Fredoka n'a pas toutes les lettres de la langue, les titres prennent la police du texte : jamais deux polices dans un mot. */
[data-titre="texte"] { --titre: Nunito, system-ui, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--nuit); color: var(--texte); overflow: hidden; overscroll-behavior: none; }
body { font: 500 16px/1.45 Nunito, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--soleil); outline-offset: 3px; }
[hidden] { display: none !important; }

.app { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
.app canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ── Les noms sur l'image ───────────────────────────────────────────────── */
.noms { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.nom { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 13px/1.2 var(--titre); letter-spacing: .02em; color: #fff;
  text-shadow: 0 1px 3px #000, 0 0 10px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .25s; will-change: transform; padding: 2px 0; }
.nom--vu { opacity: .94; }
.nom--ciel { font-weight: 500; font-size: 12px; color: #9fc4ff; letter-spacing: .08em; text-transform: uppercase; }
.nom--ciel.nom--vu { opacity: .8; }

/* Le viseur : un cercle qui bat autour du monde où l'on va, pendant le recul. */
.viseur { position: absolute; left: 0; top: 0; border-radius: 50%; border: 2px solid var(--soleil); box-shadow: 0 0 14px rgba(255, 209, 102, .55), inset 0 0 10px rgba(255, 209, 102, .25);
  pointer-events: none; will-change: transform; animation: bat 1.1s ease-in-out infinite; }
@keyframes bat { 50% { opacity: .45; } }

/* ── Le haut : où l'on est, et les couches ──────────────────────────────── */
.haut { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 10px; padding: calc(var(--haut) + 12px) 12px 0; pointer-events: none; }
.haut > * { pointer-events: auto; }
.titre { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: start; padding-block: 9px; padding-inline: 16px 12px; min-height: 56px;
  background: var(--verre); border: 1px solid var(--trait); border-radius: 20px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.titre__texte { flex: 1 1 auto; min-width: 0; display: block; }
.titre__nom { display: block; font: 600 21px/1.15 var(--titre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* L'accroche passe sur deux lignes s'il le faut : dans bien des langues elle est plus longue que la pastille. */
.titre__accroche { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 13.5px; line-height: 1.25; color: var(--doux); overflow: hidden; }
.titre__i { flex: none; width: 30px; height: 30px; color: var(--soleil); }
.titre__i svg { width: 100%; height: 100%; display: block; }

.rond { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--verre); border: 1px solid var(--trait);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .12s, background .2s; }
.rond:active { transform: scale(.92); }
.rond svg { width: 26px; height: 26px; }
.rond--petit { width: 48px; height: 48px; }
.rond--petit svg { width: 22px; height: 22px; }
.rond:disabled { opacity: .35; }
.rond.jouer { background: var(--soleil); color: var(--soleil-fonce); border-color: transparent; }
.lent svg { transform: scaleX(-1); }
[dir="rtl"] .temps .rond svg { transform: scaleX(-1); }
[dir="rtl"] .temps .lent svg { transform: none; }

/* ── Le bas : le temps, puis le ruban des mondes ────────────────────────── */
.bas { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: calc(var(--bas) + 8px);
  background: linear-gradient(to top, rgba(5, 7, 13, .94) 62%, rgba(5, 7, 13, 0)); }
.temps { display: flex; align-items: center; gap: 8px; padding: 18px 12px 8px; }
.temps__texte { flex: 1 1 auto; min-width: 0; padding-inline-start: 4px; }
.temps__texte b { display: block; font: 600 16px/1.2 var(--titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.temps__texte span { display: block; font-size: 13px; color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pilule { flex: none; min-height: 48px; padding: 0 18px; border-radius: 24px; font: 600 15px var(--titre); background: var(--verre); border: 1px solid var(--trait); }

.ruban { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; padding: 4px 8px 4px; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ruban::-webkit-scrollbar { display: none; }
.monde { flex: none; min-width: 70px; padding-inline: 4px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 0 4px; border-radius: 18px; scroll-snap-align: center; transition: background .2s; }
.monde__pastille { position: relative; width: 46px; height: 46px; border-radius: 50%; transition: transform .2s, box-shadow .2s;
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--teinte) 55%, #fff) 0, var(--teinte) 42%, color-mix(in srgb, var(--teinte) 45%, #000) 100%); }
.monde__pastille--dessin { background: none; }
.monde__pastille--dessin svg { width: 100%; height: 100%; display: block; }
.monde__pastille--sun { box-shadow: 0 0 14px rgba(255, 198, 74, .65); }
.monde__pastille--earth { background: radial-gradient(circle at 62% 66%, #5fae6b 0 16%, transparent 17%), radial-gradient(circle at 36% 40%, #6dba74 0 20%, transparent 21%),
  radial-gradient(circle at 34% 30%, #8cc4ff 0, #3f82d6 46%, #17386d 100%); }
.monde__pastille--jupiter { background: linear-gradient(180deg, transparent 0 28%, rgba(150, 96, 60, .5) 28% 38%, transparent 38% 54%, rgba(150, 96, 60, .42) 54% 62%, transparent 62%),
  radial-gradient(circle at 34% 30%, #f6e2c8 0, #d9b38c 46%, #7d5c3f 100%); }
.monde__pastille--anneaux { width: 34px; height: 34px; margin: 6px; }
.monde__pastille--anneaux::after { content: ''; position: absolute; left: -11px; right: -11px; top: 12px; height: 10px; border-radius: 50%; border: 3px solid rgba(240, 225, 185, .85);
  border-top-color: rgba(240, 225, 185, .3); transform: rotate(-16deg); }
.monde__nom { font: 500 12.5px/1.1 var(--titre); color: var(--doux); white-space: nowrap; }
.monde--ici { background: rgba(255, 255, 255, .09); }
.monde--ici .monde__pastille { transform: scale(1.1); }
.monde--ici .monde__nom { color: #fff; font-weight: 600; }
.monde:active .monde__pastille { transform: scale(.9); }

/* ── La visite guidée ───────────────────────────────────────────────────── */
.visite { position: absolute; left: 12px; right: 12px; top: calc(var(--haut) + 80px); padding: 14px 16px 12px; border-radius: 20px;
  background: rgba(255, 209, 102, .96); color: var(--soleil-fonce); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.visite__texte { margin: 0 0 10px; font: 600 18px/1.3 var(--titre); }
.visite__pas { display: flex; gap: 4px; margin-bottom: 10px; }
.visite__pas i { flex: 1; height: 4px; border-radius: 2px; background: rgba(42, 30, 0, .22); }
.visite__pas i.fait { background: var(--soleil-fonce); }
.visite__boutons { display: flex; align-items: center; gap: 8px; }
.visite__stop { flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 0 14px; border-radius: 26px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--soleil-fonce); color: #fff; font: 600 16px/1.15 var(--titre); box-shadow: 0 3px 0 rgba(0, 0, 0, .28); transition: transform .12s; }
.visite__stop:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }
.visite__stop span { min-width: 0; overflow-wrap: anywhere; }
.visite__carre { flex: none; width: 15px; height: 15px; border-radius: 4px; background: #ff6b5e; }
.visite__fleche { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--soleil-fonce); color: var(--soleil); transition: transform .12s, opacity .2s; }
.visite__fleche:active { transform: scale(.9); }
.visite__fleche:disabled { opacity: .25; }
.visite__fleche svg { width: 28px; height: 28px; }
/* Le chevron pointe vers le bas : tourné vers la suite (à droite) ou vers l'arrière (à gauche) ; l'inverse de droite à gauche. */
.visite__fleche--apres svg { transform: rotate(-90deg); }
.visite__fleche--avant svg { transform: rotate(90deg); }
[dir="rtl"] .visite__fleche--apres svg { transform: rotate(90deg); }
[dir="rtl"] .visite__fleche--avant svg { transform: rotate(-90deg); }
.app--visite .haut { opacity: 0; pointer-events: none; }
.app--visite .haut > * { pointer-events: none; }

/* ── Les feuilles qui montent du bas ────────────────────────────────────── */
.fond { position: absolute; inset: 0; background: rgba(0, 0, 0, .28); }
.feuille { position: absolute; left: 0; right: 0; bottom: 0; max-height: min(60%, 620px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(var(--bas) + 18px);
  background: var(--verre-plein); border-top: 1px solid var(--trait); border-radius: 26px 26px 0 0; box-shadow: 0 -18px 50px rgba(0, 0, 0, .55); animation: monte .28s cubic-bezier(.2, .8, .2, 1); user-select: text; -webkit-user-select: text; }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } }
.feuille__tete { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-block: 18px 10px; padding-inline: 20px 14px; background: var(--verre-plein); }
.feuille__tete h2 { margin: 0; font: 600 25px/1.15 var(--titre); }
.feuille__sous { margin: 2px 0 0; color: var(--soleil); font: 500 15px var(--titre); }
.feuille__corps { padding: 2px 20px 0; max-width: 620px; }
.feuille h3 { margin: 22px 0 8px; font: 600 14px var(--titre); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.faits { margin: 0; padding: 0; list-style: none; }
.faits li { position: relative; padding-block: 0 12px; padding-inline: 22px 0; font-size: 17px; line-height: 1.42; }
.faits li::before { content: ''; position: absolute; inset-inline-start: 2px; top: .52em; width: 9px; height: 9px; border-radius: 50%; background: var(--soleil); }
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.tuile { padding: 11px 10px; border-radius: 16px; background: rgba(255, 255, 255, .06); min-width: 0; }
.tuile span { display: block; font-size: 12.5px; color: var(--doux); line-height: 1.2; }
.tuile b { display: block; margin-top: 4px; font: 600 15.5px/1.2 var(--titre); overflow-wrap: anywhere; }
/* Le schéma se lit toujours de gauche à droite : la Terre à gauche, le monde à droite, leurs noms dessous. */
.taille { direction: ltr; }
.taille svg { display: block; width: 100%; max-width: 300px; height: auto; }
.taille__noms { display: flex; max-width: 300px; font: 500 13px var(--titre); color: var(--doux); }
.taille__noms span { flex: 1; text-align: center; }
.trajets { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; margin: 18px 0 0; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .06); }
.trajets dt { color: var(--doux); font-size: 15px; }
.trajets dd { margin: 0; font: 600 16px var(--titre); text-align: end; }
.note { margin: 16px 0 0; font-size: 14px; color: var(--doux); }
.actions { display: grid; gap: 10px; margin-top: 20px; }
.bouton { min-height: 54px; padding: 0 22px; border-radius: 27px; font: 600 17px var(--titre); background: rgba(255, 255, 255, .1); border: 1px solid var(--trait); transition: transform .12s; }
.bouton:active { transform: scale(.97); }
.bouton--plein { background: var(--soleil); color: var(--soleil-fonce); border-color: transparent; }
.bouton:disabled { opacity: .45; }
.lien { margin-top: 18px; min-height: 44px; color: var(--doux); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.credits p { margin: 0 0 12px; font-size: 14.5px; color: #d6def0; }
.credits a { color: var(--ciel); }

.grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.couche { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 12px; text-align: start; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 2px solid transparent; color: var(--doux); transition: background .2s, border-color .2s, color .2s; }
.couche__i { flex: none; width: 34px; height: 34px; }
.couche__i svg { width: 100%; height: 100%; display: block; }
.couche__t { min-width: 0; }
.couche__t b { display: block; font: 600 16px/1.15 var(--titre); }
.couche__t span { display: block; font-size: 12.5px; line-height: 1.2; margin-top: 2px; opacity: .85; }
.couche--oui { background: rgba(255, 209, 102, .14); border-color: var(--soleil); color: #fff; }
.couche--oui .couche__i { color: var(--soleil); }

/* ── La langue : un drapeau dans la barre, une pastille à l'accueil, une feuille de tuiles ───────────────────── */
.drapeau { display: block; flex: none; width: 36px; height: 26px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 2px 6px rgba(0, 0, 0, .4); object-fit: cover; }
.drapeau--lettre { display: grid; place-items: center; overflow: hidden; background: linear-gradient(#ff9933 0 20%, #fff 20% 80%, #138808 80%); color: #0b1f66; font: 700 15px/1 system-ui, sans-serif; }
.rond--langue .drapeau { width: 28px; height: 20px; border-radius: 4px; }
.rond--langue .drapeau--lettre, .pilule--langue .drapeau--lettre { font-size: 11.5px; }
.pilule--langue { justify-self: center; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding-inline: 14px 10px; margin-top: 4px; font: 500 15px var(--titre); background: rgba(255, 255, 255, .08); }
.pilule--langue .drapeau { width: 28px; height: 20px; border-radius: 4px; }
.pilule__fleche { width: 20px; height: 20px; color: var(--doux); }
.pilule__fleche svg { width: 100%; height: 100%; display: block; }
.feuille--langues { max-height: min(82%, 760px); z-index: 2; }
.feuille--langues h3 { margin-top: 6px; }
.feuille--langues h3 + .langues { margin-bottom: 18px; }
.langues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.langue { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; min-height: 84px; padding: 13px 4px 9px; border-radius: 18px; background: rgba(255, 255, 255, .05);
  border: 2px solid transparent; font: 500 13.5px/1.2 Nunito, system-ui, sans-serif; color: #dfe6f7; text-align: center; transition: transform .12s, background .2s; }
.langue:active { transform: scale(.95); }
.langue__nom { max-width: 100%; overflow-wrap: anywhere; }
.langue[aria-current="true"] { background: rgba(255, 209, 102, .14); border-color: var(--soleil); color: #fff; font-weight: 700; }
.langue__coche { position: absolute; top: -7px; inset-inline-end: -7px; width: 22px; height: 22px; }
.langue__coche svg { width: 100%; height: 100%; display: block; }
.langues--proposees .langue { background: rgba(111, 178, 255, .1); }
.langues--proposees .langue[aria-current="true"] { background: rgba(255, 209, 102, .14); }

/* Les écritures à lettres empilées (arabe, écritures de l'Inde, thaï, vietnamien) : des lignes plus hautes, sinon les accents sont rognés. */
[data-haute] .titre__nom { line-height: 1.45; }
[data-haute] .titre__accroche, [data-haute] .temps__texte span, [data-haute] .monde__nom, [data-haute] .tuile span, [data-haute] .couche__t span { line-height: 1.5; }
[data-haute] .temps__texte b, [data-haute] .tuile b, [data-haute] .couche__t b, [data-haute] .feuille__tete h2, [data-haute] .nom, [data-haute] .visite__texte { line-height: 1.5; }
[data-haute] .faits li { line-height: 1.65; }
[data-haute] .nom--ciel { letter-spacing: 0; }

/* ── L'accueil ──────────────────────────────────────────────────────────── */
.accueil { position: absolute; inset: 0; display: grid; place-items: end center; padding: 24px 18px calc(var(--bas) + 34px); background: linear-gradient(to top, rgba(5, 7, 13, .96) 30%, rgba(5, 7, 13, .35) 70%, rgba(5, 7, 13, .1)); transition: opacity .45s; }
.accueil--parti { opacity: 0; pointer-events: none; }
.haut, .bas { transition: opacity .45s; }
.app--accueil .haut, .app--accueil .bas { opacity: 0; pointer-events: none; }
.app--accueil .haut > * { pointer-events: none; }
.accueil__carte { width: 100%; max-width: 420px; display: grid; gap: 12px; text-align: center; }
.accueil__titre { margin: 0; font: 700 44px/1 var(--titre); letter-spacing: -.01em; }
.accueil__texte { margin: 0 0 10px; font-size: 18px; color: #d6def0; }
.accueil__charge { margin: 0; font-size: 14px; color: var(--doux); }

/* ── La galaxie ─────────────────────────────────────────────────────────── */
.voile { position: absolute; inset: 0; background: var(--nuit); opacity: 0; pointer-events: none; }
.voile--passe { animation: passe .9s ease-out; }
@keyframes passe { from { opacity: 1; } to { opacity: 0; } }
.app--galaxie .temps, .app--galaxie .rond--couches { visibility: hidden; }
.ici { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.ici i { position: absolute; transform: translate(-50%, -50%); border: 2px solid var(--soleil); border-radius: 50%; box-shadow: 0 0 12px rgba(255, 209, 102, .7); }
.ici__texte { position: absolute; left: 16px; top: -12px; width: 190px; text-shadow: 0 1px 4px #000, 0 0 12px #000; }
.ici--gauche .ici__texte { left: auto; right: 16px; text-align: right; }
.ici__texte b { display: block; font: 600 16px var(--titre); color: var(--soleil); }
.ici__texte span { display: block; font-size: 12.5px; line-height: 1.25; color: #dfe6f7; }

.erreur { position: absolute; left: 12px; right: 12px; top: 40%; padding: 16px; border-radius: 16px; background: #3a1420; color: #ffd9df; font-size: 14px; text-align: center; z-index: 9; }

/* ── Écrans larges : tout reste au centre, à largeur de téléphone ───────── */
@media (min-width: 760px) {
  .haut { left: 50%; right: auto; width: 460px; transform: translateX(-50%); }
  .visite { left: 50%; right: auto; width: 460px; transform: translateX(-50%); }
  .temps { max-width: 460px; margin: 0 auto; }
  .ruban { justify-content: center; }
  .feuille { left: 50%; right: auto; width: 520px; transform: translateX(-50%); border-radius: 26px 26px 0 0; animation: none; }
  .feuille--langues { width: 680px; }
  .langues { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}
@media (max-height: 520px) { .monde__nom { display: none; } .temps { padding-top: 8px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
