/* ==========================================================================
   AM Kids — maquette de la refonte (19/11/2026)
   « Mosaïque » : le fond se tait, la couleur vit dans les facettes du logo.
   Jetons : AM Phone DESIGN.md (encre, rayons 16/26/34, ombres teintées,
   une seule courbe --aisance) + les six couleurs du logo AM Kids.
   ========================================================================== */

:root {
  --encre: #1A1538;
  --encre-2: #46405F;
  --encre-3: #5F5A77;           /* le plus clair autorisé pour du texte : 6,0:1 */
  --papier: #F6F5FA;
  --surface: #FFFFFF;
  --surface-2: #EEECF5;
  --filet: #E4E1EE;
  --primaire: #4630B2;          /* le violet AM Kids, assombri : 9,0:1 */
  --primaire-50: #EEEBFA;
  --primaire-100: #DED8F6;
  --rouge: #C62828;

  /* Parents = le monde AM Phone (DESIGN.md §2) */
  --teal-700: #12595E;
  --teal-500: #17727A;
  --teal-100: #DDECED;
  --teal-50: #F1F7F7;
  --ink-900: #14262A;
  --ink-700: #3D5459;
  --ink-500: #5B6F74;
  --ink-200: #D8E0E1;
  --ink-50: #F5F8F8;

  /* La signature du logo : seulement sur un élément de marque. */
  --spectre: linear-gradient(90deg, #E5177E 0%, #F27A1A 22%, #F2C014 40%, #2FAE4E 58%, #1C93DE 76%, #6B3FD3 100%);

  --aisance: cubic-bezier(0.16, 1, 0.3, 1);
  --sortie: cubic-bezier(0.4, 0, 1, 1);
  --ressort: cubic-bezier(0.34, 1.56, 0.64, 1); /* réservé aux moments de fête */

  --r-champ: 16px;
  --r-carte: 26px;
  --r-bloc: 34px;
  --ombre-carte: 0 1px 2px rgba(26, 21, 56, .05), 0 12px 32px -16px rgba(26, 21, 56, .20);
  --ombre-haute: 0 2px 4px rgba(26, 21, 56, .06), 0 22px 48px -18px rgba(26, 21, 56, .30);
  --ombre-barre: 0 8px 30px -8px rgba(26, 21, 56, .28), 0 1px 0 rgba(255, 255, 255, .6) inset;

  --f-titre: "Rubik", "Assistant", system-ui, sans-serif;
  --f-texte: "Assistant", system-ui, sans-serif;
  --f-sacre: "Noto Serif Hebrew", "Frank Ruhl Libre", serif;

  --haut-statut: 0px;
  --bas-sur: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: #0F0C22;
  color: var(--encre);
  font: 400 16px/1.5 var(--f-texte);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--primaire); outline-offset: 2px; }
::selection { background: var(--primaire-100); }
.lucide { width: 22px; height: 22px; stroke-width: 2; flex: none; }

/* ---------- Le cadre : plein écran sur téléphone, appareil sur bureau ---------- */
.scene { position: fixed; inset: 0; display: grid; place-items: center; }
.appareil {
  position: relative; width: 100%; height: 100%;
  background: var(--papier); overflow: hidden; isolation: isolate;
}
@media (min-width: 520px) {
  .scene { background: radial-gradient(120% 90% at 50% 0%, #2A2160 0%, #0F0C22 60%); }
  .appareil {
    width: 390px; height: min(844px, calc(100dvh - 40px));
    border-radius: 54px;
    box-shadow: 0 0 0 11px #0B0918, 0 0 0 12px #2C2748, 0 40px 120px -20px rgba(0, 0, 0, .7);
  }
}
.avec-statut { --haut-statut: 34px; }
.statut {
  position: absolute; z-index: 90; inset: 0 0 auto 0; height: var(--haut-statut);
  display: none; align-items: center; justify-content: space-between;
  padding: 6px 26px 0; font: 600 14px/1 var(--f-titre); color: var(--encre);
  pointer-events: none; transition: color .25s var(--aisance);
}
.avec-statut .statut { display: flex; }
.statut .icones { display: flex; gap: 6px; align-items: center; }
.statut .lucide { width: 16px; height: 16px; }
.statut.clair { color: #fff; }

/* ---------- Écrans ---------- */
.pile { position: absolute; inset: 0; }
.ecran {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; background: var(--papier);
  padding-top: var(--haut-statut);
  padding-bottom: calc(132px + var(--bas-sur));
  scrollbar-width: none;
}
.ecran::-webkit-scrollbar { display: none; }
.ecran.sans-barre { padding-bottom: calc(40px + var(--bas-sur)); }
.gouttiere { padding-inline: 20px; }

/* ---------- Typographie ---------- */
.t-affiche { font: 700 30px/1.12 var(--f-titre); letter-spacing: -0.01em; margin: 0; }
.t-titre { font: 700 22px/1.2 var(--f-titre); margin: 0; }
.t-section { font: 700 19px/1.25 var(--f-titre); margin: 0; }
.t-carte { font: 600 17px/1.3 var(--f-titre); margin: 0; }
.t-meta { font: 500 14px/1.4 var(--f-texte); color: var(--encre-3); margin: 0; }
.chiffre { font-family: var(--f-titre); font-variant-numeric: tabular-nums; }

.tete-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 20px 14px; }
.tete-section .lien { font: 600 15px/1 var(--f-titre); color: var(--primaire); padding: 12px 0; margin: -12px 0; }

/* ---------- La mosaïque : facettes du logo, en texture ---------- */
.facette { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.facette > .mosaique {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  pointer-events: none; transition: opacity .3s var(--aisance);
}
.facette > .mosaique path { transition: opacity .5s var(--aisance); }
.mosaique.vit path { animation: miroiter 5s ease-in-out infinite alternate; }
@keyframes miroiter { from { opacity: 1; } to { opacity: .35; } }

/* ---------- Pression : un seul retour, partout ---------- */
.touche { transition: transform .15s var(--aisance), box-shadow .25s var(--aisance); }
.touche:active { transform: scale(.97); }
@media (hover: hover) {
  .carte-levee:hover { transform: translateY(-3px); box-shadow: var(--ombre-haute); }
}

/* ---------- En-tête de l'accueil ---------- */
.accueil-tete { display: flex; align-items: center; gap: 14px; padding: 14px 20px 6px; }
.avatar {
  position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font: 700 22px/1 var(--f-titre); color: #fff;
}
.avatar .anneau { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); transform: rotate(-90deg); }
.avatar .anneau circle { fill: none; stroke-width: 3; }
.accueil-tete .textes { flex: 1; min-width: 0; }
.salut { display: flex; align-items: center; gap: 6px; font: 600 14px/1.2 var(--f-titre); color: var(--encre-3); margin: 0 0 3px; }
.salut .lucide { width: 16px; height: 16px; color: var(--f-ambre, #8F5310); }
.bouton-rond {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--ombre-carte); color: var(--encre-2); flex: none;
}

/* ---------- Carte du jour + semaine ---------- */
.jour { margin: 16px 20px 0; padding: 18px 18px 16px; background: var(--surface); border-radius: var(--r-carte); box-shadow: var(--ombre-carte); }
.jour-haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.jour-date { font: 700 20px/1.2 var(--f-titre); margin: 0; }
.jour-greg { font: 500 14px/1.3 var(--f-texte); color: var(--encre-3); margin: 2px 0 0; }
.serie { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #FBEFE2; color: #8F5310; font: 700 15px/1 var(--f-titre); }
.serie .lucide { width: 18px; height: 18px; }
.serie.zero { background: var(--surface-2); color: var(--encre-3); }
.semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 16px; }
.semaine .j { display: grid; justify-items: center; gap: 6px; font: 600 13px/1 var(--f-titre); color: var(--encre-3); }
.semaine .pastille { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: transparent; transition: background .4s var(--aisance), color .4s var(--aisance), transform .4s var(--ressort); }
.semaine .pastille .lucide { width: 18px; height: 18px; stroke-width: 3; }
.semaine .fait .pastille { background: #8F5310; color: #fff; }
.semaine .auj { color: var(--encre); }
.semaine .auj .pastille { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #8F5310; }
.semaine .venir .pastille { background: transparent; border: 1.5px dashed var(--filet); }
.jour-infos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.info { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--papier); font: 600 14px/1 var(--f-titre); color: var(--encre-2); }
.info .lucide { width: 16px; height: 16px; }
.info b { color: var(--encre); font-weight: 700; }

/* ---------- Rails (défilement horizontal, aperçu de la suivante) ---------- */
.rail { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 18px; scroll-padding-inline: 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }

/* ---------- Reprendre ---------- */
.reprendre { width: 300px; min-height: 168px; border-radius: var(--r-carte); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; text-align: start; }
.reprendre .surtitre { font: 600 14px/1.2 var(--f-titre); opacity: .88; margin: 0 0 6px; }
.reprendre .titre { font: 700 22px/1.2 var(--f-titre); margin: 0; }
.reprendre .bas { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.barre { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.barre i { display: block; height: 100%; border-radius: inherit; background: #fff; transform-origin: right; transition: transform .9s var(--aisance); }
.lire { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--encre); display: grid; place-items: center; flex: none; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); }
.lire .lucide { width: 22px; height: 22px; fill: currentColor; }
.reprendre .detail { font: 500 14px/1.3 var(--f-texte); opacity: .9; white-space: nowrap; }

/* ---------- Le lanceur : 9 mondes ---------- */
.lanceur { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; padding: 0 20px; }
.monde { display: grid; justify-items: center; gap: 9px; text-align: center; }
.monde .tuile { width: 100%; aspect-ratio: 1; border-radius: 30px; display: grid; place-items: center; box-shadow: 0 10px 24px -14px var(--ombre-c, rgba(26,21,56,.5)); }
.monde .tuile .lucide { width: 38px; height: 38px; stroke-width: 1.75; }
.monde .nom { font: 600 15px/1.2 var(--f-titre); color: var(--encre); }
.monde .badge { position: absolute; top: 10px; inset-inline-start: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #fff; color: var(--encre); font: 700 12px/22px var(--f-titre); }

/* ---------- Ce soir (moment du jour) ---------- */
.ce-soir { margin: 0 20px; border-radius: var(--r-carte); padding: 20px; display: flex; align-items: center; gap: 16px; background: #221C55; color: #fff; text-align: start; width: calc(100% - 40px); }
.ce-soir .astre { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); flex: none; }
.ce-soir .astre .lucide { width: 32px; height: 32px; color: #F6D36B; }
.ce-soir .t-carte { font-size: 19px; }
.ce-soir p { margin: 4px 0 0; font: 500 14px/1.35 var(--f-texte); color: #D9D5F2; }
.ce-soir .lucide.fleche { margin-inline-start: auto; opacity: .8; }

/* ---------- Pochettes (histoires, livres, sons) ---------- */
.pochette { width: 148px; text-align: start; }
.pochette .art { aspect-ratio: 1; border-radius: 22px; display: grid; place-items: center; box-shadow: 0 12px 24px -16px rgba(26,21,56,.55); }
.pochette .art .lucide { width: 44px; height: 44px; stroke-width: 1.6; }
.pochette .t-carte { font-size: 15.5px; margin-top: 10px; }
.pochette .t-meta { font-size: 13.5px; margin-top: 2px; }
.pochette .jouer-mini { position: absolute; bottom: 10px; inset-inline-end: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--encre); display: grid; place-items: center; }
.pochette .jouer-mini .lucide { width: 16px; height: 16px; fill: currentColor; }

.livre { width: 128px; text-align: start; }
.livre .couv { position: relative; aspect-ratio: 5 / 7; border-radius: 6px 16px 16px 6px; padding: 14px 12px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--ombre-carte); }
.livre .couv::after { /* le dos : à droite, comme un livre hébreu */
  content: ""; position: absolute; inset: 0 0 0 auto; width: 10px; border-radius: 0 16px 16px 0;
  background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(255,255,255,.12) 40%, rgba(0,0,0,.08));
}
.livre .couv .lucide { width: 28px; height: 28px; stroke-width: 1.75; }
.livre .couv .t-carte { font-size: 16px; line-height: 1.2; }
.livre .t-meta { margin-top: 8px; font-size: 13.5px; }

/* ---------- Hanoucca ---------- */
.hanouka { margin: 0 20px; border-radius: var(--r-carte); background: var(--surface); box-shadow: var(--ombre-carte); padding: 18px 18px 14px; display: block; width: calc(100% - 40px); text-align: start; }
.hanouka .haut { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hanouka .compte { font: 700 15px/1 var(--f-titre); color: #1C5CBD; background: #E5EEFB; padding: 8px 12px; border-radius: 99px; white-space: nowrap; }
.menora { width: 100%; height: 118px; margin-top: 10px; }
.menora .flamme { transform-box: fill-box; transform-origin: 50% 100%; opacity: 0; transform: scale(.2); transition: opacity .4s var(--aisance), transform .5s var(--ressort); }
.menora.allumee .flamme { opacity: 1; transform: scale(1); }
.menora.allumee .flamme.vacille { animation: vaciller 2.4s ease-in-out infinite; }
@keyframes vaciller { 0%,100% { transform: scale(1) rotate(0deg); } 30% { transform: scale(1.06, .94) rotate(-3deg); } 60% { transform: scale(.95, 1.05) rotate(2deg); } }

/* ---------- La barre d'onglets flottante ---------- */
.onglets {
  position: absolute; z-index: 60; left: 12px; right: 12px; bottom: calc(14px + var(--bas-sur));
  height: 72px; border-radius: 28px; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: var(--ombre-barre); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 6px; transition: transform .35s var(--aisance), opacity .25s var(--aisance);
}
.onglets.cache { transform: translateY(130%); opacity: 0; pointer-events: none; }
.onglets .indic {
  position: absolute; top: 12px; height: 32px; width: 56px; border-radius: 16px; z-index: 0;
  background: var(--indic, var(--primaire-50)); transition: transform .42s var(--aisance), background .3s var(--aisance);
}
.onglet { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 4px; height: 100%; color: var(--encre-3); font: 600 12px/1 var(--f-titre); }
.onglet .ico { position: relative; height: 32px; width: 56px; display: grid; place-items: center; }
.onglet .lucide { width: 22px; height: 22px; transition: transform .3s var(--aisance); }
.onglet[aria-selected="true"] { color: var(--c-actif, var(--primaire)); }
.onglet[aria-selected="true"] .lucide { stroke-width: 2.3; }
.onglet .pastille-n { position: absolute; top: 0; inset-inline-start: 6px; min-width: 18px; height: 18px; border-radius: 9px; background: #B5195B; color: #fff; font: 700 11px/18px var(--f-titre); padding: 0 5px; box-shadow: 0 0 0 2px #fff; }
.saut { animation: saut .5s var(--ressort); }
@keyframes saut { 0% { transform: scale(1); } 40% { transform: scale(1.22) translateY(-2px); } 100% { transform: scale(1); } }

/* ---------- Mini-lecteur ---------- */
.mini {
  position: absolute; z-index: 59; left: 20px; right: 20px; bottom: calc(96px + var(--bas-sur));
  height: 60px; border-radius: 20px; background: var(--encre); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; overflow: hidden;
  box-shadow: 0 14px 30px -14px rgba(26,21,56,.7);
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: transform .4s var(--aisance), opacity .3s var(--aisance), bottom .35s var(--aisance);
}
.mini.visible { transform: none; opacity: 1; pointer-events: auto; }
.mini.sans-onglets { bottom: calc(18px + var(--bas-sur)); }
.mini .art { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.mini .art .lucide { width: 22px; height: 22px; }
.mini .txt { flex: 1; min-width: 0; text-align: start; }
.mini .txt b { display: block; font: 600 15px/1.2 var(--f-titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .txt span { font: 500 13px/1.2 var(--f-texte); color: #C9C5E3; }
.mini .ctrl { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.mini .ctrl .lucide { fill: currentColor; }
.mini .prog { position: absolute; inset: auto 0 0 0; height: 3px; background: rgba(255,255,255,.15); }
.mini .prog i { display: block; height: 100%; background: var(--spectre); transform-origin: left; transform: scaleX(0); }
.egaliseur { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.egaliseur i { width: 3px; background: currentColor; border-radius: 2px; height: 30%; }
.joue .egaliseur i { animation: egal .9s ease-in-out infinite; }
.joue .egaliseur i:nth-child(2) { animation-delay: -.3s; }
.joue .egaliseur i:nth-child(3) { animation-delay: -.6s; }
@keyframes egal { 0%,100% { height: 25%; } 50% { height: 100%; } }

/* ---------- En-tête des écrans poussés (grand titre qui se replie) ---------- */
.bandeau { position: relative; padding: calc(var(--haut-statut) + 64px) 20px 26px; margin-top: calc(-1 * var(--haut-statut)); border-radius: 0 0 var(--r-bloc) var(--r-bloc); }
.bandeau .t-affiche { color: #fff; }
.bandeau .sous { font: 500 16px/1.4 var(--f-texte); color: rgba(255,255,255,.88); margin: 6px 0 0; }
.barre-nav {
  position: absolute; z-index: 50; top: 0; left: 0; right: 0; height: calc(var(--haut-statut) + 60px);
  padding: var(--haut-statut) 12px 0; display: flex; align-items: center; gap: 8px;
  color: #fff; pointer-events: none;
}
.barre-nav > * { pointer-events: auto; }
.barre-nav .fond { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .2s linear; box-shadow: 0 6px 20px -12px rgba(0,0,0,.35); }
.barre-nav .titre-court { font: 700 18px/1 var(--f-titre); opacity: 0; transform: translateY(6px); transition: opacity .2s var(--aisance), transform .25s var(--aisance); flex: 1; text-align: center; }
.barre-nav.repliee .fond { opacity: 1; }
.barre-nav.repliee .titre-court { opacity: 1; transform: none; }
.nav-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); color: inherit; }
.nav-btn .lucide { width: 22px; height: 22px; }
.barre-nav.sombre { color: var(--encre); }
.barre-nav.sombre .nav-btn { background: var(--surface); box-shadow: var(--ombre-carte); }

/* ---------- Segments (onglets internes) ---------- */
.segments { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface-2); border-radius: 16px; padding: 4px; margin: 0 20px; }
.segments .curseur { position: absolute; left: 0; width: 0; top: 4px; bottom: 4px; border-radius: 12px; background: var(--surface); box-shadow: 0 2px 8px -2px rgba(26,21,56,.2); transition: transform .38s var(--aisance), width .38s var(--aisance); }
.segments button { position: relative; z-index: 1; min-height: 44px; font: 600 15px/1 var(--f-titre); color: var(--encre-3); border-radius: 12px; transition: color .2s; }
.segments button[aria-selected="true"] { color: var(--encre); }
.segments.sur-couleur { background: rgba(255,255,255,.16); }
.segments.sur-couleur button { color: rgba(255,255,255,.85); }
.segments.sur-couleur .curseur { background: #fff; }
.segments.sur-couleur button[aria-selected="true"] { color: var(--c, var(--encre)); }

/* ---------- Puces de filtre ---------- */
.puces { display: flex; gap: 8px; overflow-x: auto; padding: 4px 20px 6px; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce { flex: none; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--filet); background: var(--surface); font: 600 15px/1 var(--f-titre); color: var(--encre-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .2s var(--aisance), color .2s, border-color .2s; }
.puce[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.puce .lucide { width: 16px; height: 16px; }

/* ---------- Listes ---------- */
.liste { margin: 0 20px; background: var(--surface); border-radius: var(--r-carte); box-shadow: var(--ombre-carte); overflow: hidden; }
.ligne { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 18px; text-align: start; }
.ligne + .ligne { border-top: 1px solid var(--filet); }
.ligne .lucide.sig { color: var(--encre-3); }
.ligne .txt { flex: 1; min-width: 0; }
.ligne .txt b { display: block; font: 600 16.5px/1.3 var(--f-titre); }
.ligne .txt span { display: block; font: 500 14px/1.35 var(--f-texte); color: var(--encre-3); margin-top: 2px; }
.ligne .chevron { color: var(--encre-3); width: 20px; height: 20px; }
.carre { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.carre .lucide { width: 22px; height: 22px; }

/* ---------- Boutons ---------- */
.btn { min-height: 52px; padding: 0 22px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 700 17px/1 var(--f-titre); transition: transform .15s var(--aisance), background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn-plein { background: var(--primaire); color: #fff; box-shadow: 0 10px 22px -12px var(--primaire); }
.btn-clair { background: var(--surface); color: var(--encre); box-shadow: var(--ombre-carte); }
.btn-contour { border: 1.5px solid currentColor; }
.btn-large { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .lucide { width: 20px; height: 20px; }

.etiquette-exemple { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; background: #FFF4D6; color: #7A5300; font: 700 11.5px/1.2 var(--f-titre); vertical-align: middle; }

/* ---------- Tehilim ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: -34px 20px 0; position: relative; z-index: 2; }
.stat { background: var(--surface); border-radius: 22px; box-shadow: var(--ombre-carte); padding: 14px 10px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.stat .val { font: 700 24px/1.1 var(--f-titre); font-variant-numeric: tabular-nums; }
.stat .lib { font: 500 13px/1.2 var(--f-texte); color: var(--encre-3); }
.stat .lucide { width: 22px; height: 22px; }
.anneau-prog { width: 44px; height: 44px; transform: rotate(-90deg); }
.anneau-prog circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.prochaine { margin: 14px 20px 0; background: var(--surface); border-radius: 20px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--ombre-carte); }
.prochaine .barre { background: #F3E6D3; height: 8px; }
.prochaine .barre i { background: #8F5310; }
.prochaine .t-meta { white-space: nowrap; color: var(--encre-2); font-weight: 600; }
.actions-duo { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; margin: 16px 20px 0; }
.actions-duo .btn { padding: 0 12px; font-size: 16px; white-space: nowrap; gap: 8px; }
.recherche { margin: 12px 20px 0; position: relative; }
.recherche input { width: 100%; height: 52px; border-radius: var(--r-champ); border: 1.5px solid var(--filet); background: var(--surface); padding: 0 48px 0 16px; font-size: 16px; }
.recherche input:focus { outline: none; border-color: var(--primaire); box-shadow: 0 0 0 4px var(--primaire-50); }
.recherche .lucide { position: absolute; top: 15px; inset-inline-start: 16px; color: var(--encre-3); }
.livre-t { margin: 22px 20px 0; }
.livre-t summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; }
.livre-t summary::-webkit-details-marker { display: none; }
.livre-t summary .t-section { flex: 1; }
.livre-t summary .chevron { transition: transform .3s var(--aisance); color: var(--encre-3); }
.livre-t[open] summary .chevron { transform: rotate(180deg); }
.perakim { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
.perek { position: relative; aspect-ratio: 1; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 0 var(--filet) inset, 0 0 0 1px var(--filet) inset; font: 600 16px/1 var(--f-titre); color: var(--encre-2); display: grid; place-items: center; transition: background .3s var(--aisance), color .3s, transform .15s var(--aisance); }
.perek:active { transform: scale(.94); }
.perek.fait { background: #8F5310; color: #fff; box-shadow: none; }
.perek.fait::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 8px; height: 8px; border-radius: 50%; background: #F6D36B; }
.perek.courant { box-shadow: 0 0 0 2px #8F5310 inset; color: #8F5310; }
.perek.trouve { animation: trouve 1s var(--aisance); }
@keyframes trouve { 0% { transform: scale(1); } 30% { transform: scale(1.18); background: #F6D36B; } 100% { transform: scale(1); } }

/* ---------- Lecteur de texte (Tehilim) ---------- */
.lecteur { --taille: 24px; --fond-lecteur: #FBF8F1; background: var(--fond-lecteur); }
.lecteur.nuit { --fond-lecteur: #14112B; color: #ECE9FA; }
.lecteur.nuit .barre-nav .nav-btn { background: rgba(255,255,255,.12); box-shadow: none; }
.lecteur.sepia { --fond-lecteur: #F3E7CF; color: #3B2A12; }
.lecteur .barre-nav { color: var(--encre); }
.lecteur.nuit .barre-nav { color: #fff; }
.lecteur .barre-nav .fond { background: inherit; }
.texte-sacre { padding: 76px 24px 140px; font: 400 var(--taille)/1.95 var(--f-sacre); }
.texte-sacre h1 { font: 700 26px/1.2 var(--f-titre); text-align: center; color: #8F5310; margin: 0 0 22px; }
.lecteur.nuit .texte-sacre h1 { color: #F6D36B; }
.pasuk { display: inline; padding: 2px 0; border-radius: 6px; transition: background .4s var(--aisance), color .4s; }
.pasuk .num { font: 700 .55em/1 var(--f-titre); color: #8F5310; margin-inline: 2px 6px; vertical-align: .35em; }
.lecteur.nuit .pasuk .num { color: #F6D36B; }
.pasuk.lu { background: rgba(246, 211, 107, .45); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lecteur.nuit .pasuk.lu { background: rgba(246, 211, 107, .22); }
.pied-lecteur { position: absolute; z-index: 40; left: 12px; right: 12px; bottom: calc(14px + var(--bas-sur)); display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: var(--ombre-barre); backdrop-filter: blur(14px); color: var(--encre); }
.pied-lecteur .nav-btn { background: var(--surface-2); }
.pied-lecteur .btn { flex: 1; min-height: 48px; font-size: 16px; }
.btn-fini { background: #8F5310; color: #fff; }
.btn-fini.ok { background: #18763F; }
.note-demo { margin: 26px 24px 0; padding: 14px 16px; border-radius: 16px; background: rgba(143, 83, 16, .08); font: 500 15px/1.5 var(--f-texte); }

/* ---------- Feuilles (bottom sheets) ---------- */
.voile { position: absolute; inset: 0; z-index: 70; background: rgba(15, 12, 34, .5); opacity: 0; transition: opacity .3s var(--aisance); }
.voile.ouvert { opacity: 1; }
.feuille {
  position: absolute; z-index: 71; left: 0; right: 0; bottom: 0; max-height: 92%;
  background: var(--surface); border-radius: 34px 34px 0 0; padding: 10px 20px calc(24px + var(--bas-sur));
  transform: translateY(105%); transition: transform .42s var(--aisance); overflow-y: auto; touch-action: pan-y;
}
.feuille.ouverte { transform: translateY(0); }
.feuille.parents { background: #fff; color: var(--ink-900); }
.avec-mini .ecran { padding-bottom: calc(206px + var(--bas-sur)); }
.plein-coeur { fill: currentColor; }
.mini-grille .lucide { width: 14px; height: 14px; }
.jeu .vignette > .lucide { width: 46px; height: 46px; stroke-width: 1.6; }
.jeu > .lucide { width: 30px; height: 30px; }
.feuille.glisse { transition: none; }
.poignee { width: 44px; height: 5px; border-radius: 3px; background: var(--filet); margin: 0 auto 14px; }
.feuille h2 { font: 700 21px/1.25 var(--f-titre); margin: 6px 0 4px; }
.feuille .t-meta { margin-bottom: 16px; }

/* ---------- Superpositions plein écran ---------- */
.plein { position: absolute; inset: 0; z-index: 80; overflow-y: auto; }

/* ---------- Lecteur audio plein ---------- */
.lecteur-audio { background: var(--fond, #3A3A9A); color: #fff; display: flex; flex-direction: column; padding: calc(var(--haut-statut) + 10px) 24px calc(28px + var(--bas-sur)); }
.lecteur-audio .haut { display: flex; justify-content: space-between; align-items: center; }
.lecteur-audio .grand-art { position: relative; margin: 26px auto 0; width: min(100%, 320px); aspect-ratio: 1; border-radius: 36px; display: grid; place-items: center; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); transition: transform .6s var(--aisance); }
.lecteur-audio:not(.joue) .grand-art { transform: scale(.9); }
.lecteur-audio .grand-art .lucide { width: 96px; height: 96px; stroke-width: 1.4; }
.lecteur-audio h2 { font: 700 26px/1.2 var(--f-titre); margin: 28px 0 4px; }
.lecteur-audio .t-meta { color: rgba(255,255,255,.8); }
.piste { margin-top: 24px; direction: ltr; } /* le temps d'un média ne se retourne pas (HIG) */
.piste input[type=range] { width: 100%; accent-color: #fff; height: 28px; }
.temps { display: flex; justify-content: space-between; font: 500 13px/1 var(--f-titre); color: rgba(255,255,255,.75); direction: ltr; font-variant-numeric: tabular-nums; }
.commandes { direction: ltr; display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 16px; }
.commandes .petit { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.commandes .gros { width: 84px; height: 84px; border-radius: 50%; background: #fff; color: var(--fond, #3A3A9A); display: grid; place-items: center; box-shadow: 0 16px 30px -14px rgba(0,0,0,.5); }
.commandes .gros .lucide { width: 34px; height: 34px; fill: currentColor; }
.options-audio { display: flex; justify-content: center; gap: 10px; margin-top: auto; padding-top: 22px; }
.options-audio .puce { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
.options-audio .puce[aria-pressed="true"] { background: #fff; color: var(--fond); }

/* ---------- Jeux ---------- */
.vedette { margin: 0 20px; border-radius: var(--r-bloc); padding: 22px; min-height: 236px; display: flex; flex-direction: column; justify-content: flex-end; text-align: start; width: calc(100% - 40px); }
.vedette .cartes { position: absolute; top: 22px; inset-inline-end: 22px; display: grid; grid-template-columns: repeat(3, 44px); gap: 8px; perspective: 600px; }
.vedette .carte-m { width: 44px; height: 56px; border-radius: 10px; position: relative; transform-style: preserve-3d; transition: transform .6s var(--aisance); }
.vedette .carte-m > i { position: absolute; inset: 0; border-radius: inherit; backface-visibility: hidden; display: grid; place-items: center; }
.vedette .carte-m .dos { background: rgba(255,255,255,.22); box-shadow: 0 0 0 1.5px rgba(255,255,255,.35) inset; }
.vedette .carte-m .face { background: #fff; color: #BD3E0B; transform: rotateY(180deg); }
.vedette .carte-m .face .lucide { width: 22px; height: 22px; }
.vedette .carte-m.retournee { transform: rotateY(180deg); }
.grille-jeux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px; }
.jeu { border-radius: var(--r-carte); padding: 16px; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; text-align: start; }
.jeu .t-carte { font-size: 17px; }
.jeu .vignette { height: 64px; display: flex; align-items: center; }
.mini-grille { display: grid; gap: 4px; }
.mini-grille i { display: grid; place-items: center; border-radius: 6px; background: rgba(255,255,255,.22); font: 700 12px/1 var(--f-titre); font-style: normal; transition: transform .3s var(--aisance), background .3s; }
.jeu:hover .mini-grille i:nth-child(odd), .jeu:active .mini-grille i:nth-child(odd) { transform: translateY(-3px); }

/* Morpion jouable */
.xo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px auto 0; max-width: 300px; }
.xo button { aspect-ratio: 1; border-radius: 20px; background: var(--papier); box-shadow: 0 0 0 1.5px var(--filet) inset; display: grid; place-items: center; }
.xo svg { width: 58%; height: 58%; }
.xo .trait { stroke-dasharray: 100; stroke-dashoffset: 100; animation: tracer .35s var(--aisance) forwards; }
@keyframes tracer { to { stroke-dashoffset: 0; } }
.xo button.gagne { background: #FBF0DD; }

/* ---------- Messages ---------- */
.signature { height: 4px; background: var(--spectre); border-radius: 2px; margin: 10px 20px 0; }
.conv { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 20px; text-align: start; }
.conv .av { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 700 20px/1 var(--f-titre); color: #fff; flex: none; }
.conv .txt { flex: 1; min-width: 0; }
.conv .txt b { font: 600 17px/1.2 var(--f-titre); }
.conv .txt span { display: block; font: 500 15px/1.35 var(--f-texte); color: var(--encre-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.conv .txt span .lucide { display: inline-block; vertical-align: -3px; width: 16px; height: 16px; margin-inline-end: 2px; }
.conv .cote { display: grid; justify-items: end; gap: 6px; font: 500 13px/1 var(--f-titre); color: var(--encre-3); }
.conv .nl { min-width: 22px; height: 22px; border-radius: 11px; background: #B5195B; color: #fff; font: 700 12px/22px var(--f-titre); text-align: center; padding: 0 6px; }
.vide { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 60px 40px; color: var(--encre-3); }
.vide .rond { width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--encre-2); }
.vide .rond .lucide { width: 34px; height: 34px; }
.vide b { font: 700 18px/1.3 var(--f-titre); color: var(--encre); }
.fil { padding: 76px 16px 110px; display: flex; flex-direction: column; gap: 8px; }
.bulle { max-width: 78%; padding: 10px 14px; border-radius: 22px; font: 500 16px/1.4 var(--f-texte); background: var(--surface); box-shadow: 0 1px 2px rgba(26,21,56,.06); align-self: flex-end; border-end-start-radius: 8px; }
.bulle.moi { align-self: flex-start; background: var(--primaire); color: #fff; border-end-start-radius: 22px; border-end-end-radius: 8px; }
.bulle .h { display: block; font: 500 11.5px/1 var(--f-titre); opacity: .7; margin-top: 4px; }
.bulle.nouvelle { animation: bulle .45s var(--ressort); transform-origin: left bottom; }
@keyframes bulle { from { transform: scale(.6) translateY(10px); opacity: 0; } }
.saisie { position: absolute; z-index: 40; left: 12px; right: 12px; bottom: calc(14px + var(--bas-sur)); display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 26px; background: var(--surface); box-shadow: var(--ombre-barre); }
.saisie input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; padding: 0 12px; font-size: 16px; }
.saisie input:focus { outline: none; }
.saisie .envoyer { width: 46px; height: 46px; border-radius: 50%; background: var(--primaire); color: #fff; display: grid; place-items: center; }
.saisie .envoyer .lucide { transform: scaleX(-1); }

/* ---------- Monde parents (AM Phone) ---------- */
.parents { background: var(--ink-50); color: var(--ink-900); }
.parents .bandeau { background: var(--teal-700); }
.parents .liste { box-shadow: 0 1px 2px rgba(12,25,27,.04), 0 12px 32px -16px rgba(12,25,27,.16); }
.parents .ligne .lucide.sig { color: var(--teal-700); }
.parents .ligne .txt span, .parents .t-meta { color: var(--ink-500); }
.parents .ligne + .ligne { border-color: var(--ink-200); }
.parents .tete-section .t-section { color: var(--ink-900); font-size: 16px; }
.carte-appareil { margin: -30px 20px 0; position: relative; z-index: 2; background: #fff; border-radius: var(--r-carte); padding: 18px; box-shadow: 0 2px 4px rgba(12,25,27,.05), 0 22px 48px -20px rgba(12,25,27,.24); }
.carte-appareil .rangee { display: flex; justify-content: space-between; align-items: center; font: 500 15px/1.4 var(--f-texte); color: var(--ink-500); padding: 6px 0; }
.carte-appareil .rangee b { color: var(--ink-900); font: 600 15px/1 var(--f-titre); }
.statut-actif { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #E3F1E7; color: #1F6B3A; font: 700 14px/1 var(--f-titre); }
.statut-actif .lucide { width: 16px; height: 16px; }
.graph { margin: 0 20px; background: #fff; border-radius: var(--r-carte); padding: 18px; box-shadow: 0 1px 2px rgba(12,25,27,.04), 0 12px 32px -16px rgba(12,25,27,.16); }
.graph .total { display: flex; align-items: baseline; gap: 8px; }
.graph .total b { font: 700 34px/1 var(--f-titre); color: var(--ink-900); }
.barres { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 130px; margin-top: 18px; }
.barres .b { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.barres .b i { width: 100%; max-width: 30px; border-radius: 8px; background: var(--teal-100); transform-origin: bottom; transform: scaleY(0); transition: transform .8s var(--aisance); }
.barres .b.auj i { background: var(--teal-700); }
.barres .b span { font: 500 11.5px/1 var(--f-titre); color: var(--ink-500); }
.interrupteur { position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--ink-200); flex: none; transition: background .25s var(--aisance); }
.interrupteur::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .3s var(--ressort); }
.interrupteur[aria-checked="true"] { background: var(--teal-700); }
.interrupteur[aria-checked="true"]::after { transform: translateX(-20px); }
.parents .btn-plein { background: var(--teal-700); box-shadow: 0 10px 22px -12px var(--teal-700); }

/* Code parent */
.code-points { display: flex; justify-content: center; gap: 16px; margin: 18px 0 22px; direction: ltr; }
.code-points i { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink-200) inset; transition: background .2s, transform .3s var(--ressort), box-shadow .2s; }
.code-points i.plein { background: var(--teal-700); box-shadow: none; transform: scale(1.12); }
.code-points.erreur { animation: secouer .4s; }
@keyframes secouer { 20%,60% { transform: translateX(-10px); } 40%,80% { transform: translateX(10px); } }
.pave { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; direction: ltr; }
.pave button { height: 62px; border-radius: 18px; background: var(--ink-50); font: 600 24px/1 var(--f-titre); color: var(--ink-900); }
.pave button:active { background: var(--teal-100); }
.cadenas .anse { transition: transform .5s var(--ressort); transform-origin: 75% 100%; }
.cadenas.ouvert .anse { transform: translateY(-3px) rotate(-28deg); }

/* ---------- Écrans de verrou (temps fini, nuit, urgence) ---------- */
.verrou { display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(var(--haut-statut) + 40px) 28px calc(32px + var(--bas-sur)); color: #fff; min-height: 100%; }
.verrou h1 { font: 700 28px/1.2 var(--f-titre); margin: 26px 0 8px; }
.verrou p { font: 500 17px/1.5 var(--f-texte); margin: 0; color: rgba(255,255,255,.85); }
.verrou .actions { margin-top: auto; display: grid; gap: 12px; width: 100%; }
.verrou .btn-clair { background: rgba(255,255,255,.12); color: #fff; box-shadow: 0 0 0 1.5px rgba(255,255,255,.3) inset; }
.verrou .btn-urgence { background: transparent; color: #FFB4B4; box-shadow: 0 0 0 1.5px #FF8A8A inset; }
.temps-fini { background: #2B1E5E; }
.sablier { width: 140px; height: 190px; margin-top: 30px; }
.sablier .sable-haut { transform-box: fill-box; transform-origin: 50% 100%; animation: vider 3.2s var(--aisance) forwards; }
.sablier .sable-bas { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); animation: remplir 3.2s var(--aisance) forwards; }
.sablier .filet-sable { animation: couler 3.2s linear forwards; }
@keyframes vider { 90% { opacity: 1; } to { transform: scaleY(0); opacity: 0; } }
@keyframes remplir { to { transform: scaleY(1); } }
@keyframes couler { 0%, 92% { opacity: 1; } 100% { opacity: 0; } }
.nuit { background: radial-gradient(130% 70% at 50% 0%, #2A2470 0%, #120E2A 70%); }
.ciel { position: relative; width: 220px; height: 200px; margin-top: 20px; }
.ciel .lune { position: absolute; inset: 20px 40px; animation: lever 1.6s var(--aisance) both; }
@keyframes lever { from { transform: translateY(40px); opacity: 0; } }
.ciel .etoile { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #FFF1B8; box-shadow: 0 0 10px #FFF1B8; animation: scintiller 3s ease-in-out infinite; }
@keyframes scintiller { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }
.urgence { background: #16141F; }
.urgence .appel { width: 100%; min-height: 76px; border-radius: 24px; display: flex; align-items: center; justify-content: center; gap: 14px; font: 700 26px/1 var(--f-titre); color: #fff; }
.urgence .appel .num { font-variant-numeric: tabular-nums; }
.urgence .appel .lucide { width: 30px; height: 30px; }

/* ---------- Ouverture (splash) ---------- */
.ouverture { position: absolute; inset: 0; z-index: 95; background: #110D24; display: grid; place-items: center; align-content: center; gap: 26px; }
.ouverture .logo { position: relative; width: 250px; }
.ouverture .logo img { width: 100%; height: auto; }
.ouverture .logo svg { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); }
.ouverture .logo svg path { transform-box: fill-box; transform-origin: center; animation: decouvrir .55s var(--aisance) forwards; animation-delay: var(--d); }
@keyframes decouvrir { to { transform: scale(0) rotate(30deg); opacity: 0; } }
.ouverture p { margin: 0; color: #CFCAF0; font: 500 16px/1.4 var(--f-texte); opacity: 0; animation: apparaitre .6s var(--aisance) 1.05s forwards; }
@keyframes apparaitre { from { transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Accueil d'onboarding ---------- */
.onb { background: var(--papier); display: flex; flex-direction: column; padding: calc(var(--haut-statut) + 14px) 24px calc(24px + var(--bas-sur)); min-height: 100%; }
.onb .progression { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.onb .progression .barre { background: var(--surface-2); height: 8px; }
.onb .progression .barre i { background: var(--primaire); transform-origin: right; }
.onb h1 { font: 700 28px/1.2 var(--f-titre); margin: 22px 0 8px; }
.onb .intro { font: 500 17px/1.55 var(--f-texte); color: var(--encre-2); margin: 0; }
.onb .bas { margin-top: auto; padding-top: 20px; display: grid; gap: 10px; }
.onb .logo-carte { width: 170px; margin: 30px auto 0; padding: 26px; border-radius: 40px; background: #fff; box-shadow: var(--ombre-haute); }
.onb .logo-carte img { width: 100%; height: auto; }
.champ { display: grid; gap: 6px; margin-top: 14px; }
.champ label { font: 600 15px/1.2 var(--f-titre); color: var(--encre-2); }
.champ label .req { color: var(--rouge); }
.champ input { height: 54px; border-radius: var(--r-champ); border: 1.5px solid var(--filet); background: #fff; padding: 0 16px; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.champ input:focus { outline: none; border-color: var(--primaire); box-shadow: 0 0 0 4px var(--primaire-50); }
.champ.erreur input { border-color: var(--rouge); }
.champ .msg { font: 500 13.5px/1.3 var(--f-texte); color: var(--rouge); min-height: 0; }
.case { display: flex; align-items: center; gap: 12px; margin-top: 18px; font: 500 15px/1.4 var(--f-texte); min-height: 44px; }
.case input { width: 22px; height: 22px; accent-color: var(--primaire); }
.case a { color: var(--primaire); font-weight: 700; text-underline-offset: 3px; }
.couleurs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.couleurs button { aspect-ratio: 1; border-radius: 50%; position: relative; transition: transform .3s var(--ressort); }
.couleurs button[aria-pressed="true"] { transform: scale(1.08); box-shadow: 0 0 0 3px var(--papier), 0 0 0 6px currentColor; }
.couleurs button .lucide { position: absolute; inset: 0; margin: auto; color: #fff; opacity: 0; transition: opacity .2s; stroke-width: 3; }
.couleurs button[aria-pressed="true"] .lucide { opacity: 1; }
.apercu-avatar { margin: 30px auto 0; width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; font: 700 52px/1 var(--f-titre); color: #fff; transition: background .4s var(--aisance); position: relative; }

/* ---------- Lettres ---------- */
.lettres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 20px; }
.lettre { aspect-ratio: 1; border-radius: 22px; background: var(--surface); box-shadow: var(--ombre-carte); display: grid; place-items: center; align-content: center; gap: 2px; }
.lettre b { font: 600 38px/1 var(--f-sacre); color: #0B6A80; }
.lettre span { font: 500 13px/1 var(--f-texte); color: var(--encre-3); }
.grande-lettre { width: 100%; height: 220px; }
.grande-lettre text { font: 700 190px/1 var(--f-sacre); }
.grande-lettre .contour { fill: none; stroke: #0B6A80; stroke-width: 2.5; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: dessiner 1.6s var(--aisance) forwards; }
.grande-lettre .plein-l { fill: #0B6A80; opacity: 0; animation: remplir-l .6s var(--aisance) 1.2s forwards; }
@keyframes dessiner { to { stroke-dashoffset: 0; } }
@keyframes remplir-l { to { opacity: 1; } }

/* ---------- Calendrier ---------- */
.mois { margin: 0 20px; background: var(--surface); border-radius: var(--r-carte); box-shadow: var(--ombre-carte); padding: 14px; }
.mois .entete, .mois .jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.mois .entete span { font: 600 13px/1 var(--f-titre); color: var(--encre-3); padding: 6px 0 10px; }
.mois .entete span:last-child { color: #1C5CBD; }
.mois .jour-c { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; align-content: center; gap: 2px; position: relative; }
.mois .jour-c b { font: 600 16px/1 var(--f-titre); }
.mois .jour-c small { font: 500 10.5px/1 var(--f-titre); color: var(--encre-3); }
.mois .jour-c.chabbat { background: #F0F4FC; }
.mois .jour-c.auj { background: #1C5CBD; color: #fff; }
.mois .jour-c.auj small { color: #DCE7FA; }
.mois .jour-c .point { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: #BD3E0B; }
.mois .jour-c.hanouka .point { background: #F2C014; }

/* ---------- Taamim ---------- */
.taam { display: flex; align-items: center; gap: 14px; }
.taam .signe { width: 56px; height: 56px; border-radius: 16px; background: #F2E6F8; color: #7A2BA0; display: grid; place-items: center; font: 400 34px/1 var(--f-sacre); flex: none; }

/* ---------- Mouvement réduit : le sens reste, le mouvement part ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .ouverture .logo svg { display: none; }
  .ouverture p { opacity: 1; }
}
