/* ==========================================================
   FAMILYZOOM — JEUNESSE (3.80) : charte de l'appli (dégradé bleu → violet, Poppins),
   en plus rond, plus coloré et plus joyeux pour les enfants.
   ========================================================== */

/* ---------- Accueil : le rond « Jeunesse » au bas de la carte ---------- */
.acc-jeunesse { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px auto 2px; width: max-content; color: var(--violet-fonce); font: 700 13px 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }
.acc-jeunesse .rond { position: relative; width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, #58B4EE, #8E7CF0 55%, #E0457B); box-shadow: 0 8px 20px -10px rgba(91,79,208,.7); transition: transform .2s ease; }
.acc-jeunesse .rond span { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #FFFFFF, #EEF1FF 70%); border: 2px solid #fff; }
.acc-jeunesse .rond img { width: 118%; height: 118%; margin: 2% 0 0 -9%; object-fit: cover; object-position: 50% 0; animation: jnSalut 5s ease-in-out infinite; transform-origin: 50% 90%; }
.acc-jeunesse:active .rond { transform: scale(.94); }
@keyframes jnSalut { 0%, 78%, 100% { transform: rotate(0); } 84% { transform: rotate(-5deg); } 90% { transform: rotate(4deg); } 95% { transform: rotate(-2deg); } }

/* ---------- Écran Jeunesse ---------- */
#jeunesse { background: #F6F4FF; min-height: 100vh; }
.jn-tete { position: relative; display: flex; align-items: center; gap: 12px; padding: calc(16px + var(--haut)) 18px 34px; background: var(--degrade); color: #fff; overflow: hidden; border-radius: 0 0 30px 30px; }
.jn-tete::after { content: ""; position: absolute; width: 260px; height: 260px; right: -60px; top: -40px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.35), rgba(255,255,255,0) 70%); pointer-events: none; }
.jn-tete-t { flex: 1; min-width: 0; position: relative; z-index: 1; }
.jn-tete h1 { margin: 0; font: 800 26px/1.1 'Poppins', sans-serif; letter-spacing: -.01em; }
.jn-tete p { margin: 4px 0 0; font-size: 13.5px; opacity: .92; }
.jn-tete .btn-verre { position: relative; z-index: 1; align-self: flex-start; }
.jn-mascotte { position: relative; z-index: 1; width: 112px; height: auto; margin: -10px -6px -40px 0; filter: drop-shadow(0 10px 14px rgba(30,20,90,.3)); animation: jnFlotte 4s ease-in-out infinite; }
.jn-tete.petite .jn-mascotte { width: 84px; margin-bottom: -30px; }
@keyframes jnFlotte { 50% { transform: translateY(-5px); } }
.jn-corps { padding: 16px 16px calc(28px + var(--bas)); display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin: 0 auto; }
.jn-ages { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.jn-ages::-webkit-scrollbar { display: none; }
.jn-ages button { flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 99px; background: #fff; color: var(--encre-2); font: 600 13px 'Poppins', sans-serif; box-shadow: 0 2px 8px -4px rgba(60,50,150,.25); }
.jn-ages button.actif { background: var(--violet-fonce); color: #fff; }
.jn-jeu { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 22px; background: linear-gradient(135deg, #FFE7A8, #FFC6D9); color: #3A2A55; box-shadow: 0 10px 24px -16px rgba(200,80,120,.6); }
.jn-jeu > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.jn-jeu b { font-size: 15px; }
.jn-jeu small { font-size: 12px; line-height: 1.4; opacity: .85; }
.jn-jeu-ico, .jn-jeu-go { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: #fff; color: #E0457B; }
.jn-jeu-go { border-radius: 50%; background: #E0457B; color: #fff; width: 40px; height: 40px; }
.jn-jeu svg { width: 22px; height: 22px; }
.jn-jeu-go svg { width: 18px; height: 18px; fill: currentColor; }
.jn-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jn-tuile { position: relative; min-height: 130px; border-radius: 22px; overflow: hidden; background: #ddd center / cover no-repeat; display: flex; align-items: flex-end; box-shadow: 0 10px 22px -16px rgba(40,30,120,.55); transition: transform .15s ease; }
.jn-tuile.grande { grid-column: 1 / -1; min-height: 170px; background-position: center 30%; }
.jn-tuile:active { transform: scale(.97); }
.jn-tuile-voile { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,60,0) 35%, rgba(36,26,110,.78)); }
.jn-tuile-t { position: relative; padding: 12px 14px; color: #fff; display: flex; flex-direction: column; }
.jn-tuile-t b { font: 700 15px/1.2 'Poppins', sans-serif; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.jn-tuile.grande .jn-tuile-t b { font-size: 19px; }
.jn-tuile-t small { font-size: 11.5px; opacity: .9; }
.jn-titre { margin: 6px 2px -4px; font: 700 16px 'Poppins', sans-serif; color: var(--encre); }
.jn-defile { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.jn-defile::-webkit-scrollbar { display: none; }
.jn-defile .jn-carte { width: 160px; flex-shrink: 0; scroll-snap-align: start; }
.jn-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.jn-carte { display: flex; flex-direction: column; gap: 8px; text-align: left; border-radius: 18px; background: #fff; padding: 6px 6px 10px; box-shadow: 0 8px 20px -16px rgba(40,30,120,.5); }
.jn-carte-img { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #ECEAF8; }
.jn-carte-img img { width: 100%; height: 100%; object-fit: cover; }
.jn-genre { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--violet-fonce); font: 700 10.5px 'Poppins', sans-serif; }
.jn-genre svg { width: 12px; height: 12px; }
.jn-lecture { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); color: #E0457B; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.jn-lecture svg { width: 15px; height: 15px; fill: currentColor; margin-left: 2px; }
.jn-carte-t { padding: 0 4px; display: flex; flex-direction: column; gap: 2px; }
.jn-carte-t b { font: 600 13.5px/1.3 'Poppins', sans-serif; color: var(--encre); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jn-carte-t small { font-size: 11.5px; color: var(--gris); }
.jn-banniere { position: relative; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; padding: calc(16px + var(--haut)) 18px 18px; background: #ccc center 30% / cover no-repeat; color: #fff; border-radius: 0 0 30px 30px; overflow: hidden; }
.jn-banniere .btn-verre, .jn-banniere-t { position: relative; z-index: 1; }
.jn-banniere h1 { margin: 0; font: 800 24px/1.15 'Poppins', sans-serif; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.jn-banniere p { margin: 4px 0 0; font-size: 13px; opacity: .95; }
.jn-vide { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px; color: var(--gris); font-size: 13px; }
.jn-vide img { width: 110px; margin-bottom: 4px; }
.jn-vide b { color: var(--encre); font-size: 15px; }
.jn-vide-txt { margin: 4px 0; text-align: center; font-size: 13px; color: var(--gris); }

/* ---------- Lecteur (vidéo, PDF) ---------- */
.jn-voile { position: fixed; inset: 0; z-index: 9500; background: rgba(14,12,40,.92); display: flex; align-items: center; justify-content: center; padding: calc(10px + var(--haut)) 0 calc(10px + var(--bas)); }
.jn-voile[hidden] { display: none; }
html.jn-ouvert, html.jn-ouvert body { overflow: hidden; }
.jn-lect { width: min(900px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; color: #fff; overflow-y: auto; }
.jn-lect.lire { height: 100%; }
.jn-lect-haut { display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.jn-lect-haut b { flex: 1; font: 600 15px 'Poppins', sans-serif; }
.jn-lect-haut .btn-rond { background: rgba(255,255,255,.15); color: #fff; }
.jn-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.jn-video iframe, .jn-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.jn-pdf-drive { flex: 1; min-height: 70vh; background: #fff; }
.jn-pdf-drive iframe { width: 100%; height: 100%; min-height: 70vh; border: 0; }
.jn-pages { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 8px 20px; }
.jn-page { width: 100%; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.jn-attente { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; }
.jn-lect-desc { margin: 0 16px; font-size: 13.5px; line-height: 1.5; opacity: .85; }

/* ---------- Quiz en famille ---------- */
.jn-joueurs { display: flex; flex-direction: column; gap: 8px; }
.jn-joueur { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 16px; background: #fff; border: 2px solid color-mix(in srgb, var(--c) 35%, #fff); }
.jn-pastille { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font: 800 14px 'Poppins', sans-serif; }
.jn-joueur input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 15px 'Poppins', sans-serif; color: var(--encre); }
.jn-joueur button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--gris); }
.jn-joueur button svg { width: 16px; height: 16px; }
.jn-ajout { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 14px; border: 2px dashed #CFC8F2; color: var(--violet-fonce); font: 600 13.5px 'Poppins', sans-serif; }
.jn-ajout svg { width: 18px; height: 18px; }
.jn-niveaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jn-niveaux button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; background: #fff; border: 2px solid transparent; font-family: 'Poppins', sans-serif; color: var(--encre); }
.jn-niveaux button b { font-size: 14px; }
.jn-niveaux button small { font-size: 11.5px; color: var(--gris); }
.jn-niveaux button.actif { border-color: #8E7CF0; background: #F1EEFD; color: var(--violet-fonce); }
.jn-go { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; }
.jn-go svg { width: 18px; height: 18px; fill: currentColor; }
.jn-astuce { margin: 0; text-align: center; font-size: 12px; color: var(--gris); line-height: 1.5; }
.jn-quiz { min-height: 100vh; padding: calc(14px + var(--haut)) 16px calc(24px + var(--bas)); display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin: 0 auto;
  background: radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--c) 22%, #fff), #F6F4FF 55%); }
.jn-quiz-haut { display: flex; align-items: center; justify-content: space-between; }
.jn-quiz-num { font: 700 13px 'Poppins', sans-serif; color: var(--gris); }
.jn-scores { display: flex; gap: 6px; flex-wrap: wrap; }
.jn-scores span { flex: 1; min-width: 70px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 14px; background: #fff; border: 2px solid transparent; font-family: 'Poppins', sans-serif; transition: transform .2s; }
.jn-scores span b { font-size: 12.5px; color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-scores span i { font-style: normal; font-weight: 800; font-size: 16px; color: var(--c); }
.jn-scores span.actif { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 8px 16px -10px var(--c); }
.jn-a-toi { margin: 4px 0 0; text-align: center; font: 600 15px 'Poppins', sans-serif; color: var(--encre-2); }
.jn-a-toi b { color: var(--c); }
.jn-question { padding: 20px 18px; border-radius: 22px; background: #fff; text-align: center; font: 700 19px/1.4 'Poppins', sans-serif; color: var(--encre); box-shadow: 0 12px 26px -18px rgba(40,30,120,.6); }
.jn-reponses { display: flex; flex-direction: column; gap: 8px; }
.jn-reponses button { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 12px; border-radius: 16px; background: #fff; border: 2px solid #E6E2F7; text-align: left; font: 600 15px/1.3 'Poppins', sans-serif; color: var(--encre); transition: transform .12s, background .2s, border-color .2s; }
.jn-reponses button:active { transform: scale(.98); }
.jn-reponses button span { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: #F1EEFD; color: var(--violet-fonce); font-weight: 800; }
.jn-reponses button.bon { background: #E3F6EC; border-color: #2BA56A; }
.jn-reponses button.bon span { background: #2BA56A; color: #fff; }
.jn-reponses button.faux { background: #FDE8EE; border-color: #E0457B; animation: jnNon .35s; }
.jn-reponses button.faux span { background: #E0457B; color: #fff; }
.jn-reponses button:disabled { cursor: default; }
@keyframes jnNon { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.jn-suite { display: flex; flex-direction: column; gap: 10px; }
.jn-verdict { padding: 12px 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.5; animation: jnMonte .3s ease; }
.jn-verdict.bon { background: #E3F6EC; color: #1E6B44; }
.jn-verdict.faux { background: #FFF1DC; color: #8A5200; }
.jn-verdict b { font-size: 15px; }
.jn-verdict svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }
@keyframes jnMonte { from { transform: translateY(8px); opacity: 0; } }
.jn-fin { position: relative; min-height: 100vh; padding: calc(30px + var(--haut)) 20px calc(30px + var(--bas)); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; overflow: hidden; background: radial-gradient(circle at 50% 10%, #FFF4C9, #F6F4FF 60%); }
.jn-fin h1 { margin: 0; font: 800 26px 'Poppins', sans-serif; color: var(--violet-fonce); }
.jn-fin > p { margin: 0; color: var(--encre-2); }
.jn-mascotte.grande { width: 150px; margin: 0; }
.jn-podium { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.jn-podium div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: #fff; border-left: 6px solid var(--c); font-family: 'Poppins', sans-serif; }
.jn-podium span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; font-size: 13px; }
.jn-podium b { flex: 1; text-align: left; }
.jn-podium i { font-style: normal; font-weight: 800; color: var(--c); }
.jn-verset { max-width: 420px; margin: 6px 0; font: italic 500 14px/1.6 'Lora', serif; color: var(--encre-2); }
.jn-verset small { display: block; margin-top: 4px; font: 700 12px 'Poppins', sans-serif; font-style: normal; color: var(--gris); }
.jn-fin .btn-principal { width: 100%; max-width: 420px; }
.jn-lien-retour { font: 600 13.5px 'Poppins', sans-serif; color: var(--violet-fonce); }
.jn-confettis { position: absolute; inset: 0; pointer-events: none; }
.jn-confettis i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; background: var(--c); animation: jnTombe 2.6s ease-in var(--d) forwards; opacity: 0; }
@keyframes jnTombe { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(90vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .jn-mascotte, .acc-jeunesse .rond img, .jn-confettis i { animation: none; } .jn-confettis { display: none; } }
@media (min-width: 640px) { .jn-grille { grid-template-columns: repeat(4, 1fr); } .jn-tuile.grande { grid-column: span 2; grid-row: span 2; } }
