/* Révise avec Qamar · prototype */
:root {
  --nuit: #0b1533;
  --nuit-2: #14234f;
  --nuit-3: #1d3170;
  --or: #f2c14e;
  --or-fonce: #b8963f;
  --sable: #ece3c6;
  --papier: #fffaf0;
  --papier-2: #f6eedb;
  --encre: #1d1d1b;
  --gris: #6b6a63;
  --vert: #2f9e5b;
  --vert-clair: #d8f3e2;
  --rouge: #e1251b;
  --rouge-clair: #fde3e1;
  --ombre: 0 10px 30px rgba(5, 10, 30, .35);
  --rayon: 24px;
  --titre: "Fredoka", "Nunito", system-ui, sans-serif;
  --texte: "Nunito", system-ui, sans-serif;
  --arabe: "Noto Sans Arabic", "Geeza Pro", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(120% 70% at 50% 0%, var(--nuit-3) 0%, var(--nuit-2) 38%, var(--nuit) 75%) fixed, var(--nuit);
  color: var(--papier);
  font-family: var(--texte);
  font-weight: 700;
  overscroll-behavior: none;
  user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
.ar { font-family: var(--arabe); direction: rtl; unicode-bidi: isolate; font-weight: 500; }

/* Ciel étoilé */
.ciel { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.etoiles { position: absolute; inset: -50%; background-repeat: repeat; }
.e1 { background-image:
  radial-gradient(1.4px 1.4px at 20px 30px, #fff8, transparent),
  radial-gradient(1.2px 1.2px at 140px 90px, #fff6, transparent),
  radial-gradient(1.6px 1.6px at 90px 160px, #ffe9a8aa, transparent),
  radial-gradient(1px 1px at 200px 210px, #fff5, transparent);
  background-size: 240px 240px; animation: scintille 6s ease-in-out infinite alternate; }
.e2 { background-image:
  radial-gradient(2px 2px at 60px 80px, #ffe08a, transparent),
  radial-gradient(1.3px 1.3px at 300px 40px, #fff9, transparent),
  radial-gradient(1.8px 1.8px at 230px 300px, #ffe9a8cc, transparent);
  background-size: 380px 380px; animation: scintille 9s ease-in-out -3s infinite alternate; }
@keyframes scintille { from { opacity: .35 } to { opacity: 1 } }

#app { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; min-height: 100dvh; padding: max(14px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.ecran { display: flex; flex-direction: column; flex: 1; animation: entre .45s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes entre { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1; transform: none } }

/* Barre du haut */
.barre { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.marque { font-family: var(--titre); font-weight: 600; letter-spacing: .22em; font-size: .72rem; color: var(--or); text-transform: uppercase; }
.barre .espace { flex: 1; }
.pastille { display: inline-flex; align-items: center; gap: 6px; background: #ffffff14; border: 1px solid #ffffff22; padding: 6px 12px; border-radius: 99px; font-family: var(--titre); font-weight: 600; font-size: .95rem; }
.pastille svg { width: 18px; height: 18px; }
.rond { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #ffffff14; border: 1px solid #ffffff22; }
.rond svg { width: 22px; height: 22px; }
.rond:active { transform: scale(.92); }

/* Qamar */
.qamar { position: relative; aspect-ratio: 760 / 808; width: 100%; transform-origin: 50% 90%; }
.qamar img { position: absolute; display: block; pointer-events: none; }
.qamar .base, .qamar .bravo { inset: 0; width: 100%; height: 100%; }
.qamar .bravo { opacity: 0; }
.qamar .bouche { left: 40.79%; top: 49.5%; width: 23.68%; height: 21.04%; opacity: 0; }
.qamar .yeux { left: 22.37%; top: 32.8%; width: 55.26%; height: 24.75%; opacity: 0; }
.qamar[data-bouche="parle"] .b-parle,
.qamar[data-bouche="content"] .b-content,
.qamar[data-bouche="oh"] .b-oh,
.qamar[data-cligne] .yeux { opacity: 1; }
.qamar[data-humeur="bravo"] .bravo { opacity: 1; }
.qamar[data-humeur="bravo"] .base, .qamar[data-humeur="bravo"] .bouche, .qamar[data-humeur="bravo"] .yeux { opacity: 0 !important; }
.qamar-corps { animation: respire 3.6s ease-in-out infinite; transform-origin: 50% 95%; }
@keyframes respire { 0%, 100% { transform: scale(1, 1) } 50% { transform: scale(1.012, .988) translateY(1px) } }
.qamar.saute { animation: saute .7s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes saute { 0% { transform: translateY(0) scale(1) } 25% { transform: translateY(4%) scale(1.06, .92) } 55% { transform: translateY(-14%) scale(.96, 1.06) } 80% { transform: translateY(1%) scale(1.03, .97) } 100% { transform: none } }
.qamar.secoue { animation: secoue .55s ease both; }
@keyframes secoue { 20% { transform: rotate(-5deg) } 45% { transform: rotate(4deg) } 70% { transform: rotate(-2deg) } 100% { transform: none } }
.halo { position: absolute; inset: 8% 10% 18%; border-radius: 50%; background: radial-gradient(closest-side, #ffd56a66, #ffd56a00); filter: blur(6px); animation: halo 4s ease-in-out infinite alternate; }
@keyframes halo { from { opacity: .6; transform: scale(.95) } to { opacity: 1; transform: scale(1.05) } }

.bulle { position: relative; background: var(--papier); color: var(--encre); border-radius: 22px; padding: 14px 18px; font-size: 1.08rem; line-height: 1.35; box-shadow: var(--ombre); font-weight: 800; }
.bulle::after { content: ""; position: absolute; width: 18px; height: 18px; background: var(--papier); transform: rotate(45deg); border-radius: 3px; }
.bulle.apparait { animation: bulle .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes bulle { from { opacity: 0; transform: scale(.85) } to { opacity: 1; transform: none } }

/* Accueil */
.accueil-scene { position: relative; display: grid; grid-template-columns: 42% 1fr; align-items: center; gap: 6px; margin: 6px 0 18px; }
.accueil-scene .bulle::after { left: -7px; top: 44%; }
.accueil-scene h1 { font-family: var(--titre); font-weight: 700; font-size: 1.3rem; margin: 0 0 4px; line-height: 1.1; }
.accueil-scene p { margin: 0; color: var(--gris); font-weight: 700; font-size: .98rem; }
.bouton-revision { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--rayon); background: linear-gradient(135deg, #ffd66b, #f2b53a); color: #3b2a05; box-shadow: 0 8px 0 #b98320, var(--ombre); margin-bottom: 26px; text-align: left; transition: transform .1s; }
.bouton-revision:active { transform: translateY(5px); box-shadow: 0 3px 0 #b98320, var(--ombre); }
.bouton-revision .icone { width: 52px; height: 52px; border-radius: 16px; background: #ffffff55; display: grid; place-items: center; flex: none; }
.bouton-revision .icone svg { width: 30px; height: 30px; }
.bouton-revision b { display: block; font-family: var(--titre); font-weight: 700; font-size: 1.25rem; }
.bouton-revision small { font-size: .9rem; opacity: .85; }
h2.section { font-family: var(--titre); font-weight: 600; font-size: 1.05rem; letter-spacing: .04em; color: var(--sable); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.lecons { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.lecon { position: relative; text-align: left; background: var(--papier); color: var(--encre); border-radius: 20px; padding: 14px 14px 12px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 6px 0 #d8ccaa, 0 12px 24px #0006; transition: transform .1s; }
.lecon:active { transform: translateY(4px); box-shadow: 0 2px 0 #d8ccaa, 0 6px 14px #0006; }
.lecon .num { font-family: var(--titre); font-weight: 700; font-size: .8rem; color: var(--or-fonce); letter-spacing: .08em; text-transform: uppercase; }
.lecon .titre { font-family: var(--titre); font-weight: 600; font-size: 1.08rem; line-height: 1.15; }
.lecon .haut { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.lecon .ar { font-size: 1.25rem; line-height: 1.2; color: var(--or-fonce); }
.lecon .bas { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--gris); }
.lecon.verrou { background: #ffffff10; color: #ffffff88; box-shadow: none; border: 1px dashed #ffffff26; }
.lecon.verrou .num { color: #ffffff66; }
.lecon.verrou .ar { color: #ffffff44; }
.lecon.verrou .bas { color: #ffffff66; }
.lune-svg { display: block; }

/* Page leçon */
.entete-lecon { display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: center; margin: 4px 0 18px; }
.entete-lecon h1 { font-family: var(--titre); font-weight: 700; font-size: 1.6rem; margin: 0; line-height: 1.1; }
.entete-lecon .num { font-family: var(--titre); color: var(--or); letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.maitrise { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--sable); font-size: .9rem; }
.jauge { flex: 1; height: 10px; border-radius: 9px; background: #ffffff1c; overflow: hidden; }
.jauge i { display: block; height: 100%; background: linear-gradient(90deg, var(--or-fonce), var(--or)); border-radius: 9px; transition: width .8s cubic-bezier(.2, .9, .3, 1); }
.activites { display: grid; gap: 12px; }
.activite { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 14px; padding: 14px; text-align: left; background: var(--papier); color: var(--encre); border-radius: 22px; box-shadow: 0 6px 0 #d8ccaa, 0 12px 24px #0006; transition: transform .1s; }
.activite:active { transform: translateY(4px); box-shadow: 0 2px 0 #d8ccaa; }
.activite .pict { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; background: var(--c, #f4e6b8); }
.activite .pict svg { width: 34px; height: 34px; }
.activite b { font-family: var(--titre); font-weight: 600; font-size: 1.15rem; display: block; }
.activite small { color: var(--gris); font-size: .9rem; display: block; line-height: 1.25; margin-top: 2px; }
.etoiles-mini { display: flex; gap: 2px; }
.etoiles-mini svg { width: 18px; height: 18px; }

/* Jeu */
.jeu-haut { display: flex; align-items: center; gap: 12px; }
.progression { flex: 1; height: 14px; background: #ffffff1c; border-radius: 9px; overflow: hidden; }
.progression i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7be0a0, #3fbf74); border-radius: 9px; transition: width .5s cubic-bezier(.2, .9, .3, 1.2); }
.jeu-qamar { display: grid; grid-template-columns: 104px 1fr; align-items: end; gap: 10px; margin: 12px 0 10px; min-height: 104px; }
.jeu-qamar .bulle { margin-bottom: 18px; font-size: 1.02rem; padding: 12px 16px; }
.jeu-qamar .bulle::after { left: -7px; bottom: 18px; }
.carte-jeu { background: var(--papier); color: var(--encre); border-radius: 28px; padding: 18px; box-shadow: var(--ombre); flex: 1; display: flex; flex-direction: column; gap: 16px; min-height: 0; position: relative; }
.consigne { font-family: var(--titre); font-weight: 600; font-size: 1.12rem; text-align: center; color: var(--encre); }
.gros-son { margin: 0 auto; width: 112px; height: 112px; border-radius: 50%; background: linear-gradient(145deg, #ffd66b, #f2b53a); box-shadow: 0 7px 0 #b98320, 0 14px 24px #b9832055; display: grid; place-items: center; color: #3b2a05; transition: transform .1s; }
.gros-son:active { transform: translateY(5px); box-shadow: 0 2px 0 #b98320; }
.gros-son svg { width: 52px; height: 52px; }
.gros-son.joue { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 7px 0 #b98320, 0 0 0 14px #f2c14e33 } }
.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choix button { min-height: 108px; border-radius: 22px; background: var(--papier-2); border: 3px solid #e6dcc0; box-shadow: 0 6px 0 #d8ccaa; color: var(--encre); display: grid; place-items: center; padding: 8px; transition: transform .1s, background .2s, border-color .2s; }
.choix button:active { transform: translateY(4px); box-shadow: 0 2px 0 #d8ccaa; }
.choix .ar { font-size: 3.3rem; line-height: 1.6; }
.choix .ar.long { font-size: 2.5rem; }
.choix .txt { font-family: var(--titre); font-weight: 600; font-size: 1.05rem; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.choix button.juste { background: var(--vert-clair); border-color: var(--vert); box-shadow: 0 6px 0 #1f7a44; animation: juste .5s ease; }
.choix button.faux { background: var(--rouge-clair); border-color: var(--rouge); box-shadow: 0 6px 0 #a3170f; animation: faux .45s ease; }
.choix button.eteint { opacity: .45; }
@keyframes juste { 40% { transform: scale(1.07) } }
@keyframes faux { 20%, 60% { transform: translateX(-7px) } 40%, 80% { transform: translateX(7px) } }
.vocal { position: relative; display: inline-block; }
.vocal .r { color: var(--rouge); }
.vocal .n { position: absolute; inset: 0; color: var(--encre); }
.grande-lettre { text-align: center; font-size: 7.5rem; line-height: 1.5; color: var(--encre); }
.grande-lettre.mot { font-size: 5rem; }
.boutons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { text-decoration: none; font-family: var(--titre); font-weight: 600; font-size: 1.08rem; padding: 14px 22px; border-radius: 18px; background: var(--nuit-2); color: var(--papier); box-shadow: 0 6px 0 #070d22; display: inline-flex; align-items: center; gap: 8px; transition: transform .1s; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #070d22; }
.btn svg { width: 22px; height: 22px; }
.btn.or { background: linear-gradient(145deg, #ffd66b, #f2b53a); color: #3b2a05; box-shadow: 0 6px 0 #b98320; }
.btn.vert { background: var(--vert); box-shadow: 0 6px 0 #1f7a44; }
.btn.rouge { background: #fff; color: var(--rouge); border: 2px solid #f3b7b3; box-shadow: 0 6px 0 #e9c9c6; }
.btn.clair { background: var(--papier-2); color: var(--encre); box-shadow: 0 6px 0 #d8ccaa; }
.btn[disabled] { opacity: .4; pointer-events: none; }

/* Points */
.points-ic { width: 64px; height: 40px; }

/* Traçage */
.trace-zone { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; border-radius: 22px; background:
  linear-gradient(#0000 calc(50% - 1px), #e8dcc0 calc(50% - 1px) calc(50% + 1px), #0000 0),
  repeating-linear-gradient(90deg, #f3ead4 0 1px, #0000 1px 42px),
  repeating-linear-gradient(0deg, #f3ead4 0 1px, #0000 1px 42px), #fffdf7;
  border: 3px solid #e6dcc0; touch-action: none; overflow: hidden; }
.trace-zone canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.trace-zone .depart { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 0 6px #2f9e5b33; animation: pulse-vert 1.2s ease-in-out infinite; pointer-events: none; }
@keyframes pulse-vert { 50% { box-shadow: 0 0 0 12px #2f9e5b11 } }

/* Dictée */
.cases { display: flex; direction: rtl; justify-content: center; gap: 10px; }
.cases button { width: 78px; height: 92px; border-radius: 18px; border: 3px dashed #d6c9a6; background: #fffdf7; display: grid; place-items: center; }
.cases button.pleine { border-style: solid; border-color: var(--or-fonce); background: #fff4d6; }
.cases button.juste { border-color: var(--vert); background: var(--vert-clair); }
.cases button.faux { border-color: var(--rouge); background: var(--rouge-clair); animation: faux .45s ease; }
.cases .ar, .tuiles .ar { font-size: 2.6rem; line-height: 1.5; }
.tuiles { display: flex; flex-wrap: wrap; direction: rtl; justify-content: center; gap: 10px; }
.tuiles button { width: 74px; height: 84px; border-radius: 18px; background: var(--papier-2); border: 3px solid #e6dcc0; box-shadow: 0 5px 0 #d8ccaa; display: grid; place-items: center; transition: transform .1s, opacity .2s; }
.tuiles button:active { transform: translateY(3px); box-shadow: 0 2px 0 #d8ccaa; }
.tuiles button.utilise { opacity: .2; pointer-events: none; }
.mot-final { text-align: center; font-size: 4rem; line-height: 1.5; color: var(--vert); animation: juste .6s ease; }

/* Paires */
.paires { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; perspective: 900px; }
.paires button { aspect-ratio: 1 / 1.12; position: relative; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
.paires button.ouverte, .paires button.trouvee { transform: rotateY(180deg); }
.paires .face { position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.paires .dos { background: radial-gradient(circle at 50% 40%, #2a417f, var(--nuit-2)); border: 3px solid #f2c14e66; box-shadow: 0 5px 0 #070d22; }
.paires .dos svg { width: 44%; opacity: .9; }
.paires .avant { transform: rotateY(180deg); background: var(--papier-2); border: 3px solid #e6dcc0; color: var(--encre); }
.paires .avant .ar { font-size: 2.6rem; }
.paires .avant svg { width: 42%; color: var(--or-fonce); }
.paires button.trouvee .avant { background: var(--vert-clair); border-color: var(--vert); }

/* Lis puis vérifie */
.etapes { display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* Résultat */
.resultat { text-align: center; align-items: center; justify-content: center; gap: 12px; }
.resultat .qamar-wrap { width: min(62vw, 280px); }
.resultat h1 { font-family: var(--titre); font-weight: 700; font-size: 2rem; margin: 0; }
.resultat p { margin: 0; color: var(--sable); font-size: 1.1rem; }
.grosses-etoiles { display: flex; gap: 10px; justify-content: center; margin: 6px 0 10px; }
.grosses-etoiles svg { width: 64px; height: 64px; filter: drop-shadow(0 4px 10px #f2c14e55); }
.grosses-etoiles svg.vide { opacity: .2; filter: none; }
.grosses-etoiles svg:nth-child(2) { transform: translateY(-14px) scale(1.15); }
.grosses-etoiles svg.pop { animation: pop .6s cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes pop { from { transform: scale(0) rotate(-40deg) } }
.grosses-etoiles svg.pop:nth-child(2) { animation-name: pop2; }
@keyframes pop2 { from { transform: translateY(-14px) scale(0) rotate(-40deg) } to { transform: translateY(-14px) scale(1.15) } }

/* Confettis d'étoiles */
.etincelle { position: fixed; width: 14px; height: 14px; pointer-events: none; z-index: 50; color: var(--or); animation: etincelle .9s ease-out forwards; }
@keyframes etincelle { to { transform: translate(var(--dx), var(--dy)) rotate(200deg) scale(.2); opacity: 0 } }

.demarrer { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: #0b1533e6; backdrop-filter: blur(4px); }
.note-proto { text-align: center; font-size: .78rem; color: #ffffff66; margin-top: 22px; font-weight: 600; }

@media (min-width: 700px) {
  .choix button { min-height: 132px; }
  .choix .ar { font-size: 4rem; }
  .jeu-qamar { grid-template-columns: 130px 1fr; }
}
@media (max-width: 360px) {
  .choix .ar { font-size: 2.7rem; }
  .cases button { width: 64px; height: 80px; }
  .tuiles button { width: 64px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Toutes les leçons */
.rouge { color: var(--rouge); }
.ar.tres-long { font-size: 1.9rem !important; }
.grande-lettre.long { font-size: 4.2rem; }
.grande-lettre.tres-long { font-size: 3.2rem !important; }
.paires .avant .ar.long { font-size: 1.7rem; }
.paires .avant .ar.tres-long { font-size: 1.15rem !important; }
.categories { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.categories.c3 { grid-template-columns: 1fr 1fr 1fr; }
.categories.rtl { direction: rtl; }
.categories button { min-height: 104px; border-radius: 22px; background: var(--papier-2); border: 3px solid #e6dcc0; box-shadow: 0 6px 0 #d8ccaa; color: var(--encre); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 8px; transition: transform .1s; direction: ltr; }
.categories button:active { transform: translateY(4px); box-shadow: 0 2px 0 #d8ccaa; }
.categories button svg { width: 34px; height: 34px; }
.categories b { font-family: var(--titre); font-weight: 600; font-size: 1.2rem; }
.categories small { font-size: .82rem; color: var(--gris); line-height: 1.2; text-align: center; }
.categories button.juste { background: var(--vert-clair); border-color: var(--vert); box-shadow: 0 6px 0 #1f7a44; animation: juste .5s ease; }
.categories button.faux { background: var(--rouge-clair); border-color: var(--rouge); animation: faux .45s ease; }
.categories button.eteint { opacity: .45; }
.note-mot { margin: 0; text-align: center; color: var(--gris); font-size: .98rem; line-height: 1.35; background: #f6eedb; border-radius: 14px; padding: 10px 14px; }
.compte-etoiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 320px; margin: 0 auto; min-height: 70px; align-items: center; }
.compte-etoiles svg { width: 46px; height: 46px; animation: pop .4s cubic-bezier(.3, 1.8, .5, 1) both; }
.compte-etoiles .zero { font-family: var(--titre); color: var(--gris); font-size: 1.2rem; border: 3px dashed #e6dcc0; border-radius: 16px; padding: 18px 22px; }
.bulle { cursor: pointer; }

/* Formation sur le site : offre, leçons fermées, onglets, vidéos, fiche */
a.marque { text-decoration: none; }
.lien-connexion { color: var(--papier); text-decoration: none; }
.gratuit { display: inline-block; background: var(--vert-clair); color: #1f7a44; font-family: var(--titre); font-weight: 600; font-size: .78rem; padding: 2px 9px; border-radius: 99px; letter-spacing: .02em; }
.lecon.ferme { background: #ffffff10; color: #ffffffb0; box-shadow: none; border: 1px dashed #ffffff30; }
.lecon.ferme .num { color: #ffffff80; }
.lecon.ferme .ar { color: #ffffff55; }
.lecon.ferme .bas { color: #ffffff80; }
.offre { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; background: linear-gradient(150deg, #fffaf0, #f3e7c9); color: var(--encre); border-radius: var(--rayon); padding: 18px; margin: 0 0 18px; box-shadow: var(--ombre); }
.offre .etiquette { display: inline-block; background: var(--nuit-2); color: var(--or); font-family: var(--titre); font-weight: 600; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }
.offre h2 { font-family: var(--titre); font-weight: 700; font-size: 1.3rem; margin: 8px 0 6px; line-height: 1.15; }
.offre ul { margin: 0; padding-left: 18px; color: #4b4a44; font-size: .95rem; line-height: 1.5; }
.offre-prix { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.offre-prix b { font-family: var(--titre); font-size: 2rem; color: var(--nuit-2); line-height: 1; }
.offre-prix .btn { padding: 12px 16px; font-size: 1rem; white-space: nowrap; }
.lien-clair { color: #5f5a4c; font-size: .9rem; font-weight: 700; }
.lien-clair.sombre { color: var(--sable); }
.deja { text-align: center; color: var(--sable); font-size: .92rem; margin: 22px 0 0; }
.deja a { color: var(--or); }
.onglets { display: flex; gap: 6px; background: #ffffff12; border-radius: 16px; padding: 5px; margin: 0 0 16px; }
.onglets a { flex: 1; text-align: center; padding: 11px 6px; border-radius: 12px; color: var(--sable); text-decoration: none; font-family: var(--titre); font-weight: 600; font-size: 1rem; }
.onglets a.actif { background: var(--papier); color: var(--encre); box-shadow: 0 3px 0 #d8ccaa; }
.onglets a span { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 99px; background: #ffffff22; font-size: .8rem; margin-left: 2px; }
.onglets a.actif span { background: var(--sable); }
.videos { display: grid; gap: 14px; }
.video { background: var(--papier); color: var(--encre); border-radius: 22px; overflow: hidden; box-shadow: var(--ombre); }
.video-titre { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.video-titre b { flex: 1; font-family: var(--titre); font-weight: 600; font-size: 1.08rem; }
.video-titre b .ar { font-size: 1.3rem; }
.video-titre small { color: var(--gris); font-size: .85rem; }
.num-video { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--nuit-2); color: var(--or); font-family: var(--titre); font-weight: 700; flex: none; }
.video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.astuce { color: var(--sable); text-align: center; font-size: .95rem; margin: 16px 0 0; }
.fiche { background: var(--papier); color: var(--encre); border-radius: var(--rayon); padding: 22px; display: grid; gap: 14px; justify-items: center; text-align: center; box-shadow: var(--ombre); }
.fiche > svg { width: 72px; height: 72px; }
.fiche h2 { font-family: var(--titre); font-weight: 700; margin: 0 0 4px; }
.fiche p { margin: 0; color: var(--gris); }
.verrou-lecon { background: var(--papier); color: var(--encre); border-radius: var(--rayon); padding: 24px 20px; display: grid; gap: 12px; justify-items: center; text-align: center; box-shadow: var(--ombre); }
.verrou-lecon > svg { width: 44px; height: 44px; color: var(--or-fonce); }
.verrou-lecon h2 { font-family: var(--titre); font-weight: 700; font-size: 1.3rem; margin: 0; }
.verrou-lecon p { margin: 0; color: var(--gris); }
.verrou-lecon .lien-clair.sombre { color: #5f5a4c; }
@media (max-width: 480px) {
  .offre { grid-template-columns: 1fr; }
  .offre-prix { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .offre-prix .lien-clair { width: 100%; }
}

/* Livret complet (20 fiches en un PDF) */
.livret { display: grid; grid-template-columns: 52px 1fr; gap: 12px 14px; align-items: center; background: var(--papier); color: var(--encre); border-radius: var(--rayon); padding: 16px; margin: 0 0 22px; box-shadow: var(--ombre); }
.livret > svg { width: 52px; height: 52px; }
.livret-texte b { display: block; font-family: var(--titre); font-weight: 700; font-size: 1.15rem; }
.livret-texte small { display: block; color: var(--gris); font-size: .92rem; line-height: 1.35; margin-top: 2px; }
.livret-boutons { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.livret-boutons .btn { flex: 1; justify-content: center; padding: 12px 14px; }
.livret.compact { margin: 16px 0 0; }

/* Lettres jumelles */
.choix.jumelles button { min-height: 132px; }
.choix.jumelles .ar { font-size: 4.2rem; }
.jumelle-reponse { display: flex; align-items: center; justify-content: center; gap: 14px; background: var(--vert-clair); border: 2px solid var(--vert); border-radius: 18px; padding: 8px 16px; animation: juste .5s ease; }
.jumelle-reponse .ar { font-size: 2.6rem; line-height: 1.4; }
.jumelle-reponse span { font-family: var(--titre); font-weight: 600; font-size: 1.15rem; color: #1f7a44; }

/* Apprends ta religion (test) */
.religion-livre { background: #ffffff12; border: 1px solid #ffffff22; border-radius: 18px; padding: 14px 16px; margin: 0 0 18px; display: grid; gap: 4px; }
.religion-livre .etiquette, .religion-carte .etiquette { justify-self: start; display: inline-block; background: var(--nuit-2); color: var(--or); font-family: var(--titre); font-weight: 600; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }
.religion-carte .etiquette.vert { background: var(--vert); color: #fff; }
.religion-livre b { font-family: var(--titre); font-weight: 600; font-size: 1.05rem; }
.religion-livre small { color: var(--sable); }
.religion-liste { display: grid; gap: 8px; }
.religion-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; background: var(--papier); color: var(--encre); border-radius: 16px; padding: 10px 12px; }
.religion-item b { display: block; font-family: var(--titre); font-weight: 600; font-size: .98rem; }
.religion-item .ar { font-size: 1.05rem; color: var(--gris); }
.religion-item svg { width: 22px; height: 22px; color: var(--vert); }
.religion-carte { overflow-y: auto; }
.religion-question { text-align: center; display: grid; gap: 6px; justify-items: center; }
.religion-question .q-ar { font-family: "Amiri", var(--arabe); font-size: 2rem; line-height: 1.6; font-weight: 700; }
.religion-question h2 { font-family: var(--titre); font-weight: 700; font-size: 1.35rem; margin: 0; }
.religion-choix { display: grid; gap: 10px; }
.religion-choix button { min-height: 64px; border-radius: 18px; background: var(--papier-2); border: 3px solid #e6dcc0; box-shadow: 0 5px 0 #d8ccaa; font-family: var(--titre); font-weight: 600; font-size: 1.08rem; color: var(--encre); padding: 10px 14px; transition: transform .1s; }
.religion-choix button:active { transform: translateY(3px); box-shadow: 0 2px 0 #d8ccaa; }
.religion-choix button.juste { background: var(--vert-clair); border-color: var(--vert); box-shadow: 0 5px 0 #1f7a44; animation: juste .5s ease; }
.religion-choix button.faux { background: var(--rouge-clair); border-color: var(--rouge); animation: faux .45s ease; }
.religion-choix button.eteint { opacity: .45; }
.religion-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.religion-tuiles button { border-radius: 14px; background: var(--papier-2); border: 3px solid #e6dcc0; box-shadow: 0 4px 0 #d8ccaa; padding: 8px; display: grid; gap: 2px; color: var(--encre); }
.religion-tuiles .ar { font-family: "Amiri", var(--arabe); font-size: 1.35rem; font-weight: 700; line-height: 1.5; }
.religion-tuiles small { font-family: var(--titre); font-weight: 600; font-size: .85rem; color: var(--gris); }
.religion-tuiles button.juste { background: var(--vert-clair); border-color: var(--vert); }
.religion-tuiles button.faux { background: var(--rouge-clair); border-color: var(--rouge); animation: faux .45s ease; }
.religion-tuiles button.utilise { opacity: .25; }
/* petit haut-parleur : réécouter une proposition sans la choisir (enfants qui ne lisent pas encore) */
.religion-choix button { display: flex; align-items: center; gap: 12px; text-align: left; }
.religion-choix button > span:last-child { flex: 1; }
.ecoute { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--nuit-2); color: var(--or); display: grid; place-items: center; }
.ecoute svg { width: 18px; height: 18px; }
.religion-tuiles button { position: relative; padding: 12px 30px 8px; }
.religion-tuiles .ecoute { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; }
.religion-tuiles .ecoute svg { width: 15px; height: 15px; }
.religion-choix button.lue, .religion-tuiles button.lue { border-color: var(--or); box-shadow: 0 0 0 3px var(--or), 0 5px 0 #d8ccaa; }
.piliers { display: grid; gap: 12px; }
.piliers-cases { display: grid; gap: 6px; }
.pilier-case { display: flex; align-items: center; gap: 10px; min-height: 42px; border: 2px dashed #d6c9a6; border-radius: 12px; padding: 6px 10px; }
.pilier-case span { width: 26px; height: 26px; border-radius: 50%; background: var(--nuit-2); color: var(--or); display: grid; place-items: center; font-family: var(--titre); font-weight: 700; }
.pilier-case.pleine { border-style: solid; border-color: var(--vert); background: var(--vert-clair); }
.pilier-case b { font-family: var(--titre); font-weight: 600; }
.religion-reponse { text-align: center; display: grid; gap: 6px; justify-items: center; background: #f1f9f3; border: 2px solid #bfe3cb; border-radius: 18px; padding: 14px; }
.religion-reponse .r-ar { font-family: "Amiri", var(--arabe); font-size: 1.9rem; line-height: 1.7; font-weight: 700; color: #1f7a44; }
.religion-reponse p { margin: 0; font-weight: 800; font-size: 1.05rem; }
.religion-preuves { display: grid; gap: 10px; }
.preuves-defile { display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.preuve { background: var(--papier-2); border-radius: 16px; padding: 12px 14px; display: grid; gap: 6px; }
.preuve.lue { box-shadow: 0 0 0 3px var(--or); transition: box-shadow .3s; }
.reecouter { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 7px 14px 7px 10px; border-radius: 99px; background: var(--nuit-2); color: var(--or); font-family: var(--titre); font-weight: 600; font-size: .85rem; }
.reecouter svg { width: 16px; height: 16px; }
.verset { font-family: "Amiri Quran", "Amiri", var(--arabe); font-size: 1.6rem; line-height: 2.1; margin: 0; text-align: center; color: #0f5132; }
.hadith-ar { font-family: "Amiri", var(--arabe); font-size: 1.35rem; line-height: 1.9; margin: 0; text-align: center; color: #0f5132; }
.hadith-intro { margin: 0; color: var(--gris); font-size: .95rem; }
.verset-fr { margin: 0; font-size: 1rem; line-height: 1.45; }
.verset-ref { color: var(--gris); font-size: .82rem; }
.preuve-condition { font-family: var(--titre); font-weight: 700; color: var(--or-fonce); }
.preuve-note { color: var(--gris); font-style: italic; }
.religion-fin { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 20px 0; }
.religion-fin > svg { width: 80px; height: 80px; }
.religion-fin h2 { font-family: var(--titre); margin: 0; font-size: 1.8rem; }
