/* Le ciel d'abord : l'interface est une fine couche de verre sombre, à gros boutons, tenue par le pouce. */
:root { --fond: rgba(12, 16, 26, .84); --fond2: rgba(255, 255, 255, .07); --trait: rgba(255, 255, 255, .1); --texte: #eef2f8; --doux: #9eabbf; --ambre: #ffd678; --bleu: #a5d4ff;
  --bas: env(safe-area-inset-bottom, 0px); --tete: env(safe-area-inset-top, 0px); --barre: 66px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05070d; color: var(--texte); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
#ciel { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
#ui > * { transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1); }
body:not(.pret) #ui > *:not(#rouge) { opacity: 0; pointer-events: none; }
.verre, .pilule, .rond, .puce, .barre, .face, .feuille, .fab, .astuce, .toast, .accueil { background: var(--fond); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); border: 1px solid var(--trait); }

/* en haut : chercher, calques, puis les pastilles */
.haut { position: fixed; top: calc(var(--tete) + 12px); left: 12px; right: 12px; display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.pilule { flex: 1; height: 48px; border-radius: 24px; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--doux); text-align: left; min-width: 0; }
.pilule span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rond { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.rond.petit { width: 42px; height: 42px; } .rond:active, .pilule:active, .puce:active { transform: scale(.96); }
.puces { position: fixed; top: calc(var(--tete) + 70px); left: 12px; right: 12px; display: flex; gap: 8px; flex-wrap: wrap; max-width: 560px; margin: 0 auto; pointer-events: none; }
.puce { pointer-events: auto; height: 36px; border-radius: 18px; padding: 0 13px 0 10px; display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 550; max-width: 100%; }
.puce svg { width: 17px; height: 17px; } .puce span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.puce.accent { background: var(--ambre); color: #1a1403; border-color: transparent; }
#b-jour { padding: 0 10px 0 14px; }

/* en bas : trois boutons */
.barre { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bas) + 12px); height: var(--barre); border-radius: 24px; display: flex; max-width: 560px; margin: 0 auto; }
.barre button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12.5px; font-weight: 550; color: var(--doux); border-radius: 22px; min-width: 0; }
.barre button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 4px; }
.barre button:active { background: var(--fond2); } .barre #b-temps { color: var(--texte); } .barre #b-temps.ailleurs { color: var(--ambre); }

/* viser : le bouton principal */
.fab { position: fixed; right: 16px; bottom: calc(var(--bas) + var(--barre) + 28px); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #f2f5fa; color: #0b1020; border: 0; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.fab svg { width: 28px; height: 28px; } .fab:active { transform: scale(.94); }
.fab.actif { background: var(--ambre); box-shadow: 0 0 0 6px rgba(255, 214, 120, .22), 0 8px 28px rgba(0, 0, 0, .5); }
@media (min-width: 620px) { .fab { right: calc(50% - 280px); } }

/* en face de toi */
.face { position: fixed; left: 16px; right: 96px; bottom: calc(var(--bas) + var(--barre) + 28px); min-height: 64px; border-radius: 22px; padding: 9px 18px; display: flex; flex-direction: column; justify-content: center; text-align: left; max-width: 448px; }
@media (min-width: 620px) { .face { left: calc(50% - 280px); right: auto; width: 448px; } }
.face small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--bleu); opacity: .9; }
.face b { font-size: 20px; line-height: 1.15; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face span { font-size: 13px; color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face.simple { pointer-events: none; } .face.simple b { font-size: 16px; font-weight: 550; } .face.simple small, .face.simple span { display: none; }
.face:not(.simple):active { transform: scale(.98); }

/* la flèche qui mène à l'astre choisi */
.fleche { position: fixed; left: 0; top: 0; pointer-events: none; transition: none !important; }
.fleche i { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; background: var(--ambre); color: #1a1403; display: grid; place-items: center; box-shadow: 0 0 0 7px rgba(255, 214, 120, .2); }
.fleche i svg { width: 28px; height: 28px; stroke-width: 2.4; }
.fleche span { position: absolute; top: 32px; left: 0; transform: translateX(-50%); white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ambre); text-shadow: 0 1px 6px #000, 0 0 2px #000; }

/* la feuille */
.feuille { position: fixed; left: 0; right: 0; bottom: 0; max-width: 584px; margin: 0 auto; border-radius: 26px 26px 0 0; border-bottom: 0; padding-bottom: var(--bas); transform: translateY(105%); transition: transform .34s cubic-bezier(.2, .85, .25, 1) !important; max-height: min(72vh, 620px); display: flex; flex-direction: column; box-shadow: 0 -12px 40px rgba(0, 0, 0, .45); }
.feuille.ouverte { transform: none; } .feuille.haute { height: min(72vh, 620px); }
.poignee { padding: 9px 0 3px; display: grid; place-items: center; touch-action: none; cursor: grab; flex: none; } .poignee i { width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .26); }
.contenu { overflow-y: auto; padding: 4px 18px 18px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tete { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; } .tete > div { flex: 1; min-width: 0; }
.tete h2 { margin: 0; font-size: 23px; line-height: 1.15; font-weight: 680; letter-spacing: -.01em; } .tete p { margin: 2px 0 0; color: var(--doux); font-size: 14px; }
.tete .x { width: 40px; height: 40px; background: var(--fond2); border: 0; } .x svg { width: 18px; height: 18px; }
.pastille { width: 26px; height: 26px; border-radius: 50%; flex: none; display: block; background: #dfe6f2; }
.pastille.etoile { width: 14px; height: 14px; margin: 6px; box-shadow: 0 0 12px rgba(255, 255, 255, .8); }
.pastille.messier { background: none; border: 2px dashed #96ebcd; } .pastille.pluie { background: none; border: 2px solid var(--ambre); border-radius: 3px 50% 50% 50%; } .pastille.lieu { background: var(--fond2); }
.mini { width: 44px; height: 44px; flex: none; }
.ou { margin: 6px 0 14px; font-size: 16.5px; line-height: 1.4; } .ou span { display: block; color: var(--doux); font-size: 14px; margin-top: 2px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.principal, .second { height: 50px; border-radius: 25px; padding: 0 22px; font-weight: 620; font-size: 15.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1; min-width: 0; white-space: nowrap; }
.principal { background: #f2f5fa; color: #0b1020; } .second { background: var(--fond2); border: 1px solid var(--trait); } .second.actif { color: var(--ambre); }
.principal:active, .second:active { transform: scale(.97); } .principal.large { width: 100%; flex: none; }
.faits { margin: 16px 0 0; display: grid; gap: 1px; background: var(--trait); border-radius: 16px; overflow: hidden; }
.faits div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 14px; background: rgba(22, 27, 40, .96); } .faits dt { color: var(--doux); flex: none; } .faits dd { margin: 0; text-align: right; }
.note { margin: 14px 2px 2px; color: #cfd8e6; font-size: 15px; line-height: 1.5; }
.liste h3 { margin: 18px 2px 6px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--doux); font-weight: 650; }
.conseil { margin: 4px 2px 8px; color: var(--doux); font-size: 14px; }
.ligne { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 6px 10px 8px; border-radius: 16px; text-align: left; min-height: 60px; }
.ligne:active { background: var(--fond2); } .ligne > span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ligne b { font-size: 16.5px; font-weight: 600; } .ligne small { color: var(--doux); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne > svg { color: rgba(255, 255, 255, .3); width: 18px; height: 18px; } .ligne .pastille { margin: 0 9px; } .ligne .pastille.etoile { margin: 0 15px; }
.ligne.maintenant small { color: #9be7b4; } .ligne .coche { width: 28px; height: 28px; border-radius: 50%; background: #9be7b4; color: #06210f; display: grid; place-items: center; } .coche svg { width: 17px; height: 17px; stroke-width: 2.6; }
.progres { height: 6px; border-radius: 3px; background: var(--fond2); overflow: hidden; margin: 2px 2px 8px; } .progres i { display: block; height: 100%; background: #9be7b4; border-radius: 3px; }
.champ { display: flex; align-items: center; gap: 10px; height: 50px; border-radius: 25px; background: var(--fond2); padding: 0 6px 0 16px; color: var(--doux); margin: 4px 0 8px; }
.champ input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--texte); font: inherit; font-size: 16px; -webkit-user-select: text; user-select: text; } .champ .x { width: 38px; height: 38px; border: 0; background: none; }
input[type=search]::-webkit-search-cancel-button { display: none; }
.inter { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 2px; font-size: 16px; border-bottom: 1px solid var(--trait); }
.inter input { position: absolute; opacity: 0; } .inter i { width: 50px; height: 30px; border-radius: 15px; background: rgba(255, 255, 255, .16); position: relative; transition: background .2s; flex: none; }
.inter i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; } .inter input:checked + i { background: #5fa8ee; } .inter input:checked + i::after { transform: translateX(20px); }
.choix { display: flex; gap: 8px; } .choix button { height: 42px; padding: 0 18px; border-radius: 21px; background: var(--fond2); border: 1px solid var(--trait); } .choix button.actif { background: #f2f5fa; color: #0b1020; }
.credits { color: var(--doux); font-size: 12.5px; line-height: 1.5; -webkit-user-select: text; user-select: text; } .credits a { color: var(--bleu); }

/* le temps */
.tps-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0 12px; } .retourne { display: grid; transform: scaleX(-1); }
.tps-date { position: relative; text-align: center; flex: 1; cursor: pointer; } .tps-date b { display: block; font-size: 34px; line-height: 1.05; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.01em; } .tps-date span { color: var(--doux); font-size: 14.5px; text-decoration: underline dotted; text-underline-offset: 4px; }
.tps-date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ruban { position: relative; height: 54px; margin: 0 0 26px; touch-action: none; cursor: ew-resize; } .ruban canvas { width: 100%; height: 54px; border-radius: 16px; display: block; }
.curseur { position: absolute; top: -5px; bottom: -5px; width: 0; pointer-events: none; } .curseur i { position: absolute; left: -3px; top: 0; bottom: 0; width: 6px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 3px rgba(0, 0, 0, .35), 0 0 14px rgba(255, 255, 255, .7); }
.reperes { position: absolute; left: 0; right: 0; top: 58px; height: 18px; font-size: 11.5px; color: var(--doux); pointer-events: none; } .reperes span, .reperes em { position: absolute; transform: translateX(-50%); font-style: normal; }
.reperes span:first-child { transform: none; } .reperes span:nth-child(9) { transform: translateX(-100%); } .reperes em { top: -58px; height: 54px; border-left: 1px dashed rgba(255, 255, 255, .55); padding: 3px 0 0 5px; transform: none; color: #fff; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.aide { margin: 0 0 12px; text-align: center; color: var(--doux); font-size: 13px; }
.temps .actions .x { background: var(--fond2); border: 0; flex: none; }

/* les leçons : comme des « stories » */
.lecon { position: fixed; inset: 0; pointer-events: none; } .lecon > * { pointer-events: auto; }
.lecon-barres { position: absolute; top: calc(var(--tete) + 12px); left: 14px; right: 74px; display: flex; gap: 5px; pointer-events: none; }
.lecon-barres i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); overflow: hidden; position: relative; } .lecon-barres i.fait { background: #fff; } .lecon-barres i.ici { background: var(--bleu); }
.lecon .x { position: absolute; top: calc(var(--tete) + 0px); right: 12px; z-index: 2; }
.lecon-zones { position: absolute; inset: 0; display: flex; } .lecon-zones div:first-child { width: 30%; } .lecon-zones div:last-child { flex: 1; }
.lecon-texte { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 24px calc(var(--bas) + 26px); background: linear-gradient(transparent, rgba(5, 7, 13, .92) 34%); pointer-events: none; max-width: 600px; margin: 0 auto; }
.lecon-texte > * { pointer-events: none; } .lecon-texte .principal { pointer-events: auto; width: 100%; margin-top: 16px; }
.lecon-texte small { color: var(--bleu); letter-spacing: .08em; text-transform: uppercase; font-size: 12px; font-weight: 600; } .lecon-texte h3 { margin: 4px 0 8px; font-size: 27px; line-height: 1.12; font-weight: 700; letter-spacing: -.015em; }
.lecon-texte p { margin: 0; font-size: 17.5px; line-height: 1.48; color: #dfe6f2; } .lecon-texte em { display: block; margin-top: 14px; font-style: normal; font-size: 13px; color: var(--doux); }
.lecon-texte.entre > * { animation: monte .45s cubic-bezier(.2, .8, .2, 1) both; } .lecon-texte.entre p { animation-delay: .06s; } .lecon-texte.entre em, .lecon-texte.entre button { animation-delay: .14s; }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } }
body.en-lecon .haut, body.en-lecon .puces, body.en-lecon .barre, body.en-lecon .fab, body.en-lecon .face, body.en-lecon .fleche { opacity: 0; pointer-events: none; }
body.feuille-ouverte .barre, body.feuille-ouverte .fab, body.feuille-ouverte .face { opacity: 0; pointer-events: none; transform: translateY(20px); }
body.feuille-ouverte[data-feuille=chercher] .haut, body.feuille-ouverte[data-feuille=lieu] .haut { opacity: 0; pointer-events: none; }

/* l'accueil, la première fois */
.accueil { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bas) + 12px); max-width: 560px; margin: 0 auto; border-radius: 28px; padding: 26px 22px 20px; display: flex; flex-direction: column; gap: 10px; animation: monte .6s cubic-bezier(.2, .8, .2, 1) both; }
.accueil h1 { margin: 0; font-size: 29px; line-height: 1.1; font-weight: 720; letter-spacing: -.02em; } .accueil p { margin: 0 0 8px; color: #cfd8e6; font-size: 16.5px; line-height: 1.45; }
.accueil .principal { height: 58px; border-radius: 29px; font-size: 17px; flex: none; } .accueil .second { flex: none; background: none; border: 0; color: var(--doux); height: 44px; }
.accueil.ordi .principal svg, .accueil.ordi p { display: none; }
body.sans-capteurs .fab { display: none; } body.sans-capteurs .face { right: 16px; max-width: 560px; }
@media (min-width: 620px) { body.sans-capteurs .face { width: 560px; } }
body.accueille .barre, body.accueille .fab, body.accueille .face, body.accueille .puces { opacity: 0; pointer-events: none; }

.astuce { position: fixed; left: 16px; right: 16px; top: calc(var(--tete) + 116px); max-width: 420px; margin: 0 auto; border-radius: 20px; padding: 14px 16px; display: grid; gap: 4px; } .astuce b { font-size: 15.5px; } .astuce span { color: #cfd8e6; font-size: 14px; } .astuce button { justify-self: end; color: var(--ambre); font-weight: 650; padding: 6px 4px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--bas) + var(--barre) + 110px); max-width: 420px; margin: 0 auto; border-radius: 16px; padding: 12px 16px; text-align: center; font-size: 14.5px; }
/* vision de nuit : tout l'écran passe au rouge, qui n'éblouit pas */
#rouge { position: fixed; inset: 0; pointer-events: none; background: #ff2a12; mix-blend-mode: multiply; opacity: 0; transition: opacity .4s; z-index: 50; } body.rouge #rouge { opacity: 1; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
