/* Le Carnet des Curieux — un cahier d'écolier : papier Seyès, marge rouge, surligneur. */
@font-face { font-family: 'Baloo 2'; src: url('/fonts/baloo-2-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Baloo 2'; src: url('/fonts/baloo-2-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Lexend'; src: url('/fonts/lexend-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lexend'; src: url('/fonts/lexend-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --papier: #fbf8f0; --feuille: #fffdf8; --encre: #1b2553; --encre-douce: #515a85; --ligne: #c9d6f2; --marge: #e4564b;
  --surligneur: #ffd94a; --vert: #1f8a5b; --vert-pale: #dff3e8; --rouge-pale: #fde6e3; --bleu: #2f5fd6; --bleu-pale: var(--bleu-pale); --violet: #7a3fc9;
  --carte: #fff; --jaune-pale: #fff3a8; --orange-pale: #ffe9c2; --violet-pale: #efe3ff; --gris-pale: #eef0f6; --vert-moyen: #9fe0c0; --surligne: var(--surligneur);
  --bureau: #e7e3d6; --barre: #f3efe3; --barre-menu: #fbf8f0; --titre-fenetre: var(--encre);
  --ombre: 0 2px 0 rgba(27, 37, 83, .12), 0 10px 24px rgba(27, 37, 83, .08);
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; font-family: 'Lexend', system-ui, sans-serif; color: var(--encre); background: var(--papier);
  background-image: linear-gradient(var(--ligne) 1px, transparent 1px); background-size: 100% 32px; min-height: 100vh; line-height: 1.5; }
h1, h2, h3, .titre { font-family: 'Baloo 2', 'Lexend', sans-serif; font-weight: 800; line-height: 1.15; margin: 0; }
h1 { font-size: 2rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: .4rem 0; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.page { max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }
.entete { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.entete .avatar { width: 72px; height: 72px; flex: none; }
.entete .qui { flex: 1; }
.surligne { background: linear-gradient(transparent 55%, var(--surligne) 55%); padding: 0 .15em; }
.pastille { display: inline-flex; align-items: center; gap: .35em; background: var(--feuille); border: 2px solid var(--encre); border-radius: 999px; padding: .15em .8em; font-weight: 700; font-size: .9rem; }

.feuille { background: var(--feuille); border: 2px solid var(--encre); border-radius: 14px; box-shadow: var(--ombre); padding: 18px 20px 18px 34px; position: relative; margin-bottom: 18px; }
.feuille::before { content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: var(--marge); opacity: .7; }
.grille2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.postit { background: var(--jaune-pale); border: 0; border-radius: 4px; box-shadow: 3px 5px 0 rgba(27, 37, 83, .15); padding: 14px 18px; transform: rotate(-1.2deg); margin-bottom: 18px; }
.postit p { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 1.1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 2px solid var(--encre); border-radius: 12px; background: var(--feuille); padding: .55em 1.1em; font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 var(--encre); transition: transform .08s, box-shadow .08s; text-decoration: none; color: var(--encre); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--encre); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--encre); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, .choix:focus-visible, select:focus-visible { outline: 4px solid var(--bleu); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.principal { background: var(--surligneur); font-size: 1.15rem; padding: .7em 1.4em; }
.btn.vert { background: var(--vert); color: #fff; }
.btn.lecon { background: var(--bleu-pale); } .btn.video { background: var(--violet-pale); }
.btn.petit { font-size: .85rem; padding: .3em .7em; box-shadow: 0 2px 0 var(--encre); }
.btn.danger { background: var(--rouge-pale); }
.rangee { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

input[type=text], input[type=password], input[type=time], input[type=number], input[type=date], textarea, select { border: 2px solid var(--encre); border-radius: 10px; padding: .5em .7em; background: var(--carte); width: 100%; }
.reponse { font-size: 1.5rem; font-weight: 700; text-align: center; max-width: 340px; }
textarea { min-height: 96px; resize: vertical; }
label { font-weight: 700; display: block; margin: .6rem 0 .2rem; }
.aide { color: var(--encre-douce); font-size: .88rem; }

/* Séance */
.points { display: flex; gap: 6px; margin: 4px 0 14px; }
.points i { flex: 1; height: 10px; border-radius: 6px; border: 2px solid var(--encre); background: var(--carte); }
.points i.fait { background: var(--vert); } .points i.ici { background: var(--surligneur); }
.etiquette { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-douce); }
.enonce { font-size: 1.35rem; font-weight: 700; white-space: pre-line; margin: 12px 0; }
.passage { background: var(--bleu-pale); border-radius: 10px; padding: 12px 16px; margin: 10px 0; }
.passage h3 { margin-bottom: 4px; }
.liste-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.choix { border: 2px solid var(--encre); border-radius: 12px; background: var(--carte); padding: .7em .9em; font-weight: 700; font-size: 1.1rem; cursor: pointer; text-align: left; }
.choix[aria-pressed=true] { background: var(--surligneur); box-shadow: inset 0 0 0 2px var(--encre); }
.retour { border-radius: 12px; padding: 12px 16px; margin: 12px 0; font-weight: 700; }
.retour.ok { background: var(--vert-pale); border: 2px solid var(--vert); }
.retour.ko { background: var(--rouge-pale); border: 2px solid var(--marge); }
.retour.info { background: var(--jaune-pale); border: 2px solid #c9a400; }
.retour p { font-weight: 400; }
.brouillon { font-family: ui-monospace, monospace; font-size: 1.5rem; line-height: 1.3; display: inline-grid; background: var(--carte); border: 2px dashed var(--ligne); border-radius: 8px; padding: 8px 14px; margin: 6px 0; }
.brouillon span { text-align: right; white-space: pre; } .brouillon .trait { border-top: 3px solid var(--encre); height: 0; margin-top: 2px; }
.dictee-outils { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; background: var(--bleu-pale); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
.dictee-outils label { margin: 0; display: flex; align-items: center; gap: 8px; }
input[type=range] { width: 160px; accent-color: var(--encre); }

/* Progression, badges, avatars */
.barre { height: 14px; border: 2px solid var(--encre); border-radius: 8px; background: var(--carte); overflow: hidden; }
.barre b { display: block; height: 100%; background: var(--vert); }
.ligne-prog { display: grid; grid-template-columns: 170px 1fr 48px; gap: 10px; align-items: center; margin: 6px 0; font-size: .92rem; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.badge { text-align: center; padding: 8px; border-radius: 12px; border: 2px dashed var(--ligne); }
.badge > span { display: block; } .badge svg { width: 78px; height: 78px; } .badge.verrou svg { filter: grayscale(1); opacity: .35; }
.badge.gagne { border: 2px solid var(--encre); background: var(--carte); } .badge strong { display: block; font-family: 'Baloo 2', sans-serif; }
.badge small { color: var(--encre-douce); display: block; line-height: 1.25; } .badge .rare { color: var(--violet); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.avatars { display: flex; flex-wrap: wrap; gap: 10px; }
.avatars button { width: 76px; height: 76px; padding: 4px; border: 2px solid var(--ligne); border-radius: 14px; background: var(--carte); cursor: pointer; }
.avatars button[aria-pressed=true] { border-color: var(--encre); background: var(--surligneur); }

/* Fenêtres (leçon, vidéo) */
dialog { border: 2px solid var(--encre); border-radius: 16px; padding: 0; max-width: min(760px, 94vw); width: 100%; box-shadow: 0 20px 60px rgba(27, 37, 83, .35); color: var(--encre); background: var(--feuille); }
dialog::backdrop { background: rgba(27, 37, 83, .55); }
.fen-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 2px solid var(--encre); background: var(--bleu-pale); border-radius: 14px 14px 0 0; }
.fen-corps { padding: 16px 20px 20px; max-height: 72vh; overflow: auto; }
.regle { background: var(--jaune-pale); border-left: 6px solid #c9a400; padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.fen-corps ol { padding-left: 1.3em; } .fen-corps li { margin: .3em 0; }
.exemple { background: var(--vert-pale); border-radius: 10px; padding: 10px 14px; }
.scene { min-height: 230px; display: flex; align-items: center; justify-content: center; background: var(--carte); border: 2px solid var(--ligne); border-radius: 12px; padding: 14px; overflow: hidden; }
.soustitre { font-size: 1.15rem; font-weight: 700; min-height: 3.4em; margin: 12px 0; }
.lecteur { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lecteur progress { flex: 1; min-width: 120px; height: 12px; accent-color: var(--vert); }
.apparait { animation: apparait .45s ease both; }
@keyframes apparait { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .apparait { animation: none; } .btn { transition: none; } }

/* Visuels pédagogiques */
.v-grand { text-align: center; } .v-grand .g { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 2.6rem; letter-spacing: .02em; }
.v-grand mark, .v-phrase mark { background: var(--surligneur); border-radius: 6px; padding: 0 .12em; color: inherit; }
.v-grand .s { color: var(--encre-douce); font-weight: 700; margin-top: 6px; }
.v-bande { width: 100%; max-width: 520px; } .v-bande .b { display: flex; border: 3px solid var(--encre); border-radius: 6px; overflow: hidden; height: 54px; margin-top: 10px; }
.v-bande .b i { flex: 1; border-right: 2px solid var(--encre); background: var(--carte); transition: background .4s; } .v-bande .b i:last-child { border-right: 0; } .v-bande .b i.p { background: #ff9d5c; }
.v-bande .e { font-weight: 700; text-align: center; margin-top: 4px; font-size: 1.15rem; min-height: 1.4em; }
.v-col { font-family: ui-monospace, monospace; font-size: 2.1rem; font-weight: 700; display: inline-grid; gap: 0 2px; }
.v-col span { width: 1.1em; text-align: center; } .v-col .r { font-size: 1.1rem; color: var(--marge); height: 1.3em; } .v-col .t { grid-column: 1 / -1; border-top: 4px solid var(--encre); height: 0; width: auto; margin: 4px 0; }
.v-col .res { color: var(--vert); } .v-col .cache { color: transparent; }
.v-phrase { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 1.5rem; font-weight: 700; } .v-phrase span { padding: .1em .3em; border-radius: 8px; }
.v-phrase .l { flex-basis: 100%; text-align: center; font-size: 1rem; color: var(--violet); min-height: 1.5em; }
.v-svg { width: 100%; max-width: 520px; height: auto; }

/* Tuteur */
.fil { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.bulle { max-width: 85%; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--encre); }
.bulle.tuteur { background: var(--bleu-pale); align-self: flex-start; border-bottom-left-radius: 2px; } .bulle.enfant { background: var(--carte); align-self: flex-end; border-bottom-right-radius: 2px; }
.apercu { max-width: 100%; max-height: 260px; border: 2px solid var(--encre); border-radius: 10px; display: block; margin: 8px 0; }

/* Espace parent */
.onglets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.onglets button[aria-selected=true] { background: var(--surligneur); }
table { border-collapse: collapse; width: 100%; font-size: .85rem; } th, td { border-bottom: 1px solid var(--ligne); padding: 6px 8px; text-align: left; vertical-align: top; } th { font-family: 'Baloo 2', sans-serif; white-space: nowrap; }
td.n { text-align: center; font-weight: 700; } .tab-scroll { overflow-x: auto; }
.code-pc { font-family: ui-monospace, monospace; font-size: 2.2rem; font-weight: 700; letter-spacing: .08em; background: var(--surligneur); border: 2px solid var(--encre); border-radius: 12px; padding: .2em .6em; display: inline-block; margin: 8px 0; }
.tag { display: inline-block; background: var(--rouge-pale); border-radius: 6px; padding: 0 .4em; margin: 1px 2px 1px 0; font-size: .8rem; }
details { margin: .4rem 0; } summary { cursor: pointer; font-weight: 700; }
.message { padding: 8px 12px; border-radius: 8px; margin: 8px 0; } .message.ok { background: var(--vert-pale); } .message.ko { background: var(--rouge-pale); }
@media (max-width: 560px) { html { font-size: 16px; } .ligne-prog { grid-template-columns: 110px 1fr 40px; } .feuille { padding-left: 30px; } }

/* Lot 1 : collections, étoiles, accessoires, fête */
.serie { margin: 10px 0 18px; } .serie-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.serie-tete h3 { font-size: 1.15rem; } .pastille.complete { background: var(--vert); color: #fff; border-color: var(--vert); }
.pastille.etoiles { background: var(--jaune-pale); }
.palier { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-radius: 6px; padding: 0 .4em; margin-bottom: 2px; }
.palier.bronze { background: var(--orange-pale); } .palier.argent { background: var(--gris-pale); } .palier.or { background: var(--jaune-pale); }
.mini-barre { height: 8px; border: 1.5px solid var(--encre); border-radius: 6px; background: var(--carte); overflow: hidden; margin: 6px 8px 2px; } .mini-barre b { display: block; height: 100%; background: var(--vert); }
.badge .compte { font-weight: 700; color: var(--encre); }
.cadeau { display: block; margin-top: 6px; background: var(--jaune-pale); border-radius: 6px; padding: 2px 6px; color: var(--encre) !important; font-weight: 700; }
.cadeau.pret { background: var(--vert); color: #fff !important; }
#accessoires button { position: relative; } #accessoires button[disabled] { opacity: .55; cursor: not-allowed; }
#accessoires .sans { font-size: 1.6rem; font-weight: 700; } .verrou-acc { position: absolute; bottom: 2px; left: 0; right: 0; font-size: .62rem; font-weight: 700; background: rgba(255, 255, 255, .85); line-height: 1.2; }
.gain { font-weight: 800; color: #9a6b00; }
.entete .avatar svg { overflow: visible; }
dialog.fete { max-width: min(440px, 92vw); text-align: center; padding: 22px 24px 18px; z-index: 2; }
.fete-titre { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--violet); margin: 0; }
.fete-image svg { width: 170px; height: 170px; animation: rebond .8s cubic-bezier(.2, 1.6, .4, 1) both; }
dialog.fete h2 { font-size: 1.7rem; margin: 4px 0; } .fete-sous { color: var(--encre-douce); }
canvas.confettis { position: fixed; inset: 0; pointer-events: none; z-index: 2147483647; }
@keyframes rebond { from { transform: scale(.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fete-image svg { animation: none; } }

.serie .badges { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.serie .badge svg { width: 64px; height: 64px; } .serie .badge small { font-size: .78rem; }
#accessoires button { width: 82px; height: 82px; }

/* Lot 2 : atelier informatique */
.grille-atelier { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 12px; }
.carte-atelier { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: var(--carte); border: 2px solid var(--encre); border-radius: 14px; padding: 14px 16px; cursor: pointer; box-shadow: 0 3px 0 var(--encre); font: inherit; color: var(--encre); }
.carte-atelier:hover { transform: translateY(-1px); } .carte-atelier[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.carte-atelier .icone { font-size: 2.2rem; line-height: 1; } .carte-atelier strong { font-family: 'Baloo 2', sans-serif; font-size: 1.2rem; } .carte-atelier small { color: var(--encre-douce); }
.grille-niveaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.niveau { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 2px solid var(--encre); border-radius: 12px; background: var(--carte); cursor: pointer; font: inherit; color: var(--encre); text-align: left; }
.niveau.reussi { background: var(--vert-pale); } .niveau[disabled] { opacity: .45; cursor: not-allowed; } .etoiles-niveau { font-size: 1.05rem; letter-spacing: 2px; }
.robot-jeu { display: grid; grid-template-columns: minmax(240px, 420px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .robot-jeu, .pixel-jeu { grid-template-columns: 1fr; } }
.plateau { position: relative; display: grid; border: 3px solid var(--encre); border-radius: 10px; background: var(--carte); overflow: hidden; }
.case { border: 1px solid var(--ligne); display: flex; align-items: center; justify-content: center; font-size: clamp(1rem, 4vw, 1.8rem); }
.case.mur { background: repeating-linear-gradient(45deg, #6e8499 0 6px, #8a9db0 6px 12px); } .case.trace { background: var(--jaune-pale); }
.bot { position: absolute; transition: left .3s ease, top .3s ease; padding: 3px; z-index: 1; box-sizing: border-box; } .bot svg { width: 100%; height: 100%; } .bot.choc { animation: choc .4s ease 2; }
@keyframes choc { 50% { transform: translateX(8%) rotate(8deg); } }
.palette { margin: 6px 0; } .btn.fleche { font-size: 1.5rem; width: 3.2rem; padding: .3em; }
.programme { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 8px; margin: 6px 0; min-height: 56px; border: 2px dashed var(--ligne); border-radius: 10px; background: var(--carte); }
.bloc { display: inline-flex; align-items: center; gap: 4px; background: var(--bleu-pale); border: 2px solid var(--encre); border-radius: 8px; padding: 2px 6px; font-size: 1.3rem; font-weight: 700; }
.bloc.boucle { background: var(--violet-pale); font-size: 1rem; flex-wrap: wrap; } .bloc.boucle.ouverte { outline: 3px solid var(--violet); } .bloc select { width: auto; padding: 0 .3em; }
.bloc .mini { display: inline-flex; align-items: center; background: var(--carte); border-radius: 6px; padding: 0 4px; font-size: 1.2rem; }
.suppr { border: 0; background: transparent; color: var(--marge); font-weight: 800; cursor: pointer; font-size: 1rem; }
.pixel-jeu { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 20px; align-items: start; }
.code-lignes { list-style: none; padding: 0; margin: 0; } .code-lignes li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid var(--ligne); }
.code-lignes .num { font-weight: 700; width: 2.2em; color: var(--encre-douce); }
.code-pixel { display: inline-flex; align-items: center; gap: 2px; } .code-pixel b { font-size: 1rem; } .code-pixel i { width: 16px; height: 16px; border: 1.5px solid var(--encre); border-radius: 3px; display: inline-block; }
.pixels { display: grid; grid-template-columns: repeat(8, 1fr); width: min(100%, 360px); aspect-ratio: 1; border: 3px solid var(--encre); border-radius: 6px; overflow: hidden; }
.pixel { border: 1px solid #dfe5f1; cursor: pointer; padding: 0; } .pixel:focus-visible { outline: 3px solid var(--violet); outline-offset: -3px; }
.couleur { width: 38px; height: 38px; border: 2px solid var(--encre); border-radius: 8px; cursor: pointer; } .couleur[aria-checked=true] { outline: 4px solid var(--violet); outline-offset: 2px; }
.message-secret { font-family: ui-monospace, monospace; font-size: 1.8rem; font-weight: 700; letter-spacing: .15em; background: #1b2553; color: #ffd94a; border-radius: 10px; padding: 10px 16px; word-break: break-word; }
.reglette { background: var(--carte); border: 2px solid var(--ligne); border-radius: 10px; padding: 10px; margin: 10px 0; overflow-x: auto; }
.alphabet { display: grid; grid-template-columns: repeat(26, minmax(22px, 1fr)); font-family: ui-monospace, monospace; font-weight: 700; text-align: center; font-size: 1.05rem; }
.alphabet span { border: 1px solid var(--ligne); padding: 2px 0; } .alphabet.decale span { background: var(--jaune-pale); }
.texte-frappe { font-family: ui-monospace, monospace; font-size: 1.8rem; letter-spacing: .06em; background: var(--carte); border: 2px solid var(--encre); border-radius: 10px; padding: 12px 16px; word-break: break-word; }
.texte-frappe span.tape { color: var(--vert); } .texte-frappe span.courant { background: var(--surligneur); border-radius: 4px; } .texte-frappe span.erreur { color: var(--marge); }
.clavier { display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 12px 0; }
.rangee-clavier { display: flex; gap: 6px; } .rangee-clavier:nth-child(2) { margin-left: 18px; } .rangee-clavier:nth-child(3) { margin-left: -30px; }
.touche { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--encre); border-radius: 8px; font-weight: 700; background: var(--carte); }
.touche.espace { width: 260px; } .touche.repere { text-decoration: underline; text-underline-offset: 4px; }
.touche.d1, .touche.d8 { background: var(--rouge-pale); } .touche.d2, .touche.d7 { background: var(--bleu-pale); } .touche.d3, .touche.d6 { background: #dff3e8; } .touche.d4, .touche.d5 { background: var(--jaune-pale); }
.touche.suivante { outline: 4px solid var(--violet); transform: translateY(-2px); } .touche.maj::after { content: '⇧'; font-size: .7rem; margin-left: 2px; }
.question-secu { border: 2px solid var(--ligne); border-radius: 12px; margin: 10px 0; padding: 8px 14px; } .question-secu legend { font-weight: 700; padding: 0 6px; }
.liste-missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mission { border: 2px solid var(--encre); border-radius: 12px; padding: 12px 14px; background: var(--carte); } .mission.validee { background: var(--vert-pale); } .mission p { font-size: .92rem; }

/* Lot 3 : jeux */
.compte-a-rebours { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 2.6rem; width: 90px; height: 90px; border: 4px solid var(--encre); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surligneur); margin: 6px auto; }
.calcul { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 3rem; text-align: center; margin: 10px 0; } .calcul.faux { color: var(--marge); }
#jeu-course form { display: flex; gap: 10px; justify-content: center; } .score-course { text-align: center; font-weight: 800; font-size: 1.3rem; }
.grille-memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 640px; margin: 10px auto; }
.carte-memory { aspect-ratio: 4/3; border: 3px solid var(--encre); border-radius: 12px; background: var(--violet); color: #fff; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; }
.carte-memory.visible { background: var(--carte); color: var(--encre); } .carte-memory.trouvee { background: var(--vert-pale); border-color: var(--vert); cursor: default; }
.carte-memory .mot-carte { font-size: 1.1rem; line-height: 1.15; } .carte-memory .v-bande { width: 100%; } .carte-memory .v-bande .b { height: 26px; margin-top: 4px; } .carte-memory .v-bande .e { display: none; }
.mot-mystere { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 2.4rem; letter-spacing: .05em; }
.mot-mystere span { min-width: 1em; text-align: center; border-bottom: 4px solid var(--encre); } .mot-mystere span.espace { border: 0; width: .6em; }
.carburant { display: flex; gap: 4px; max-width: 320px; } .carburant i { flex: 1; height: 18px; border: 2px solid var(--encre); border-radius: 4px; background: var(--carte); } .carburant i.plein { background: var(--vert); }
.lettres { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; margin: 12px 0; } .btn.lettre { padding: .4em 0; font-size: 1.15rem; }
.btn.lettre.juste { background: var(--vert-pale); } .btn.lettre.rate { background: var(--rouge-pale); }
.boss { display: flex; align-items: center; gap: 14px; background: var(--violet-pale); border: 2px solid var(--violet); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.boss-image svg { width: 86px; height: 86px; } .boss.frappe .boss-image { animation: coup .5s ease; }
.coeurs-boss { font-size: 1.6rem; color: var(--marge); letter-spacing: 4px; } .coeurs-boss .vide { color: #b9a4d8; }
@keyframes coup { 25% { transform: translateX(-10px) rotate(-8deg); filter: brightness(1.6); } 60% { transform: translateX(8px) rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .boss.frappe .boss-image { animation: none; } }

/* Correction : le blanc du pixel art doit se voir */
.code-pixel i { width: 20px; height: 20px; } .code-pixel b { font-size: 1.1rem; }
.code-pixel i.blanc, .legende-blanc i.blanc, .couleur.blanc { background: repeating-conic-gradient(#cfd8ea 0 25%, #fff 0 50%) 50% / 8px 8px; border-style: dashed; }
.legende-blanc { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--encre-douce); } .legende-blanc i { width: 20px; height: 20px; border: 1.5px dashed var(--encre); border-radius: 3px; display: inline-block; }

/* Copains */
.liste-messages { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.liste-messages li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 2px solid var(--encre, #1b2550); border-radius: 12px; background: var(--carte); }
.liste-messages li.nouveau { background: var(--jaune-pale); }
.liste-messages .emoji { font-size: 1.5rem; }
.messages-prets { display: flex; flex-wrap: wrap; gap: 8px; }
.messages-prets .btn { font-size: 0.95rem; padding: 8px 12px; }
.pastille.nouveau { background: #e4564b; color: #fff; margin-left: 6px; }

/* Compétences (espace parent) */
.resume-notions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.n-jamais { background: var(--gris-pale); } .n-decouverte { background: var(--orange-pale); } .n-cours { background: var(--jaune-pale); } .n-acquise { background: var(--vert-pale); } .n-maitrisee { background: var(--vert-moyen); }
.attention { border: 2px dashed var(--marge); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; background: var(--rouge-pale); }
.attention h3 { margin: 0 0 6px; } .attention ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.attention li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.filtres { margin-bottom: 8px; } .filtres .btn[aria-pressed=true] { background: var(--surligneur); }
.domaine { border-top: 2px solid var(--ligne); padding: 6px 0; } .domaine > summary { display: flex; justify-content: space-between; gap: 10px; font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 700; font-size: 1.15rem; cursor: pointer; padding: 4px 0; }
.notion { display: grid; grid-template-columns: minmax(180px, 1.1fr) 2fr auto; gap: 6px 14px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.notion.alerte { background: linear-gradient(90deg, var(--rouge-pale), transparent 60%); }
.notion-titre { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.notion-detail { font-size: .95rem; } .notion-detail details { margin-top: 4px; } .notion-detail summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.niveau { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--encre); }
.boites { display: inline-flex; gap: 3px; } .boites i { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--encre); background: var(--carte); } .boites i.plein { background: var(--vert); }
.btn.revoir.actif { background: var(--surligneur); }
@media (max-width: 720px) { .notion { grid-template-columns: 1fr; } .notion-action { justify-self: start; } }
.objectif-atteint { background: var(--vert-pale); }
/* Petits écrans : les tableaux de l'espace parent passent en lignes empilées */
@media (max-width: 720px) {
  #app .feuille table, #app .feuille tbody, #app .feuille tr, #app .feuille td { display: block; width: auto; }
  #app .feuille tr { border-bottom: 1px solid var(--ligne); padding: 6px 0; }
  #app .feuille td { border: 0; padding: 2px 0; }
}

/* Espace parent : blocs repliables et sommaire collant */
details.pli > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.pli > summary::-webkit-details-marker { display: none; }
details.pli > summary h2 { margin: 0; }
details.pli > summary::after { content: '▾'; font-size: 1.3rem; transition: transform .15s; }
details.pli:not([open]) > summary::after { transform: rotate(-90deg); }
details.pli[open] > summary { margin-bottom: 10px; }
details.pli:not([open]) { padding-top: 12px; padding-bottom: 12px; }
.sommaire { position: sticky; top: var(--haut-menu, 0px); z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; margin-bottom: 10px; background: var(--papier); border-bottom: 2px solid var(--ligne); }
.notion { padding: 6px 0; } .notion-titre { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }

/* =====================================================================
   Thèmes : couleurs (clair / sombre), style des fenêtres, fond d'écran, animations.
   Les attributs data-* sont posés sur <html> par /theme-init.js.
   ===================================================================== */
:root { --haut-menu: 36px; }
html { scroll-padding-top: calc(var(--haut-menu) + 12px); }
body { padding-top: var(--haut-menu); }

/* --- Mode sombre */
[data-mode=sombre] {
  color-scheme: dark;
  --papier: #151824; --feuille: #1f2333; --carte: #282d40; --encre: #e9ecfa; --encre-douce: #a8afd2; --ligne: #353c58; --marge: #ff7f72;
  --surligneur: #f2c230; --surligne: #6f5700; --vert: #36b47c; --vert-pale: #17392b; --vert-moyen: #22694a; --rouge-pale: #44211f; --bleu: #86a6ff; --bleu-pale: #1f2a4b;
  --violet: #b896ff; --violet-pale: #2e2350; --jaune-pale: #403719; --orange-pale: #47301a; --gris-pale: #2b3043;
  --bureau: #10131c; --barre: #2a2f44; --barre-menu: #1a1e2c;
  --ombre: 0 2px 0 rgba(0, 0, 0, .4), 0 10px 24px rgba(0, 0, 0, .35);
}
[data-mode=sombre] :is(.btn.principal, .code-pc, .filtres .btn[aria-pressed=true], .btn.revoir.actif, .choix[aria-pressed=true], .onglets button[aria-selected=true], .v-grand mark, .v-phrase mark, .texte-frappe span.courant, .compte-a-rebours, .choix-affichage .btn[aria-pressed=true]) { color: #1b2553; }
[data-mode=sombre] input[type=number] { background: var(--carte); color: var(--encre); }
.sommaire { background: color-mix(in srgb, var(--papier) 82%, transparent); backdrop-filter: blur(6px); border-radius: 0 0 10px 10px; padding-left: 6px; padding-right: 6px; }
[data-mode=sombre] .postit { color: #1b2553; background: #f6e58a; }
[data-mode=sombre] a { color: #9fb8ff; }
[data-mode=sombre] img, [data-mode=sombre] .scene svg { filter: none; }

/* --- Barre de menus (en haut, comme un bureau d'ordinateur) */
.barre-menus { position: fixed; top: 0; left: 0; right: 0; height: var(--haut-menu); z-index: 50; display: flex; align-items: center; gap: 14px; padding: 0 12px;
  background: var(--barre-menu); border-bottom: 2px solid var(--encre); font-size: .85rem; font-weight: 700; }
.menu-logo { color: var(--encre); text-decoration: none; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1rem; }
.menu-lieu { color: var(--encre-douce); } .menu-espace { flex: 1; } .menu-heure { color: var(--encre-douce); text-transform: capitalize; }
.menu-bouton { border: 2px solid var(--encre); border-radius: 8px; background: var(--carte); padding: 2px 10px; font-weight: 700; cursor: pointer; font-size: .85rem; }
.menu-bouton[aria-expanded=true] { background: var(--surligneur); color: #1b2553; }
@media (max-width: 560px) { .menu-lieu, .menu-heure { display: none; } }
.panneau-affichage { position: fixed; top: calc(var(--haut-menu) + 8px); right: 10px; z-index: 60; width: min(360px, 94vw); max-height: calc(100vh - 60px); overflow: auto; margin: 0; }
.choix-affichage { border: 0; padding: 0; margin: 10px 0; } .choix-affichage legend { font-weight: 700; margin-bottom: 4px; }
.choix-affichage .options { display: flex; flex-wrap: wrap; gap: 6px; }
.choix-affichage .btn[aria-pressed=true] { background: var(--surligneur); color: #1b2553; }
.options.fonds .vignette { width: 98px; height: 58px; align-items: flex-end; justify-content: flex-start; padding: 4px 6px; font-size: .72rem; text-shadow: 0 0 3px var(--carte), 0 0 3px var(--carte); }

/* --- Fonds d'écran (dessinés en CSS, originaux) */
html[data-fond] body { background-attachment: fixed; }
[data-fond=uni] body, .vignette.fond-uni { background: var(--bureau); }
[data-fond=cahier] body, .vignette.fond-cahier { background: var(--papier) linear-gradient(var(--ligne) 1px, transparent 1px) 0 0 / 100% 32px; }
[data-fond=quadrillage] body, .vignette.fond-quadrillage { background: var(--bureau) linear-gradient(var(--ligne) 1px, transparent 1px) 0 0 / 24px 24px, var(--bureau); background-image: linear-gradient(var(--ligne) 1px, transparent 1px), linear-gradient(90deg, var(--ligne) 1px, transparent 1px); background-size: 24px 24px; }
[data-fond=pois] body, .vignette.fond-pois { background: var(--bureau) radial-gradient(var(--encre-douce) 1.4px, transparent 1.6px) 0 0 / 22px 22px; }
[data-fond=collines] body, .vignette.fond-collines {
  background:
    radial-gradient(120% 60% at 15% 108%, #4f9a5f 0 40%, transparent 41%),
    radial-gradient(110% 55% at 85% 112%, #6db36a 0 42%, transparent 43%),
    radial-gradient(140% 70% at 50% 125%, #8fc77a 0 45%, transparent 46%),
    radial-gradient(circle 46px at 84% 16%, #ffe27a 0 98%, transparent 100%),
    linear-gradient(#bfe3f2, #eaf4e6 70%);
}
[data-mode=sombre][data-fond=collines] body, [data-mode=sombre] .vignette.fond-collines {
  background:
    radial-gradient(120% 60% at 15% 108%, #1d3b2a 0 40%, transparent 41%),
    radial-gradient(110% 55% at 85% 112%, #24472f 0 42%, transparent 43%),
    radial-gradient(140% 70% at 50% 125%, #2d5536 0 45%, transparent 46%),
    radial-gradient(circle 30px at 84% 14%, #f3f0d0 0 98%, transparent 100%),
    linear-gradient(#0d1430, #1b2540 70%);
}
[data-fond=nuit] body, .vignette.fond-nuit {
  background:
    radial-gradient(1.5px 1.5px at 12% 20%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 33% 72%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 58% 30%, #ffe9a6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 76% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 14%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 45% 90%, #cfe0ff 50%, transparent 51%),
    radial-gradient(60% 40% at 75% 0%, #3b2d7a 0, transparent 70%), linear-gradient(#0b1026, #1a1f4a);
  background-size: 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 100% 100%, 100% 100%;
}
.vignette { background-attachment: scroll !important; background-size: auto; border-color: var(--encre); color: var(--encre); }
.vignette.fond-nuit { color: #fff; text-shadow: none; }

/* --- Style « Moderne » : chaque bloc est une fenêtre avec une barre de titre */
[data-style=moderne] .feuille, [data-style=moderne] dialog.fete { border: 2px solid var(--encre); border-radius: 12px; box-shadow: 0 2px 0 var(--encre), 0 14px 30px rgba(10, 15, 40, .16); padding: 46px 20px 18px; }
[data-style=moderne] dialog { border-radius: 12px; }
[data-style=moderne] .feuille::before, [data-style=moderne] dialog.fete::before { content: ''; position: absolute; left: 0; right: 0; top: 0; width: auto; height: 28px; opacity: 1; border-bottom: 2px solid var(--encre); border-radius: 10px 10px 0 0;
  background: radial-gradient(circle at 16px 13px, #ff6b5e 5px, transparent 5.5px), radial-gradient(circle at 34px 13px, #ffc23d 5px, transparent 5.5px), radial-gradient(circle at 52px 13px, #3fc77f 5px, transparent 5.5px), var(--barre); }
[data-style=moderne] .feuille > h2:first-child, [data-style=moderne] details.pli > summary { margin-top: 0; }
[data-style=moderne] details.pli:not([open]) { padding-top: 40px; padding-bottom: 10px; }
[data-style=moderne] .panneau-affichage { padding-top: 40px; }
[data-style=moderne] dialog .fen-tete { background: var(--barre); }
[data-style=moderne] .btn { border-radius: 8px; }

/* --- Style « Classique » : fenêtres en relief, barre de titre bleue, comme les ordinateurs des années 90 */
[data-style=classique] { --gris-os: #c9c6bd; --clair-os: #fff; --sombre-os: #6f6c64; }
[data-style=classique][data-mode=sombre] { --gris-os: #3a3d4c; --clair-os: #5c6176; --sombre-os: #0b0d14; }
[data-style=classique] body { font-family: Verdana, Tahoma, 'Lexend', sans-serif; }
[data-style=classique] h1, [data-style=classique] h2, [data-style=classique] h3 { font-family: Verdana, Tahoma, sans-serif; font-weight: 700; }
[data-style=classique] .feuille { background: var(--gris-os); border: 2px solid; border-color: var(--clair-os) var(--sombre-os) var(--sombre-os) var(--clair-os); border-radius: 0; box-shadow: 1px 1px 0 #000; padding: 40px 16px 16px; }
[data-style=classique] dialog { background: var(--gris-os); border: 2px solid; border-color: var(--clair-os) var(--sombre-os) var(--sombre-os) var(--clair-os); border-radius: 0; }
[data-style=classique] dialog .fen-tete { background: linear-gradient(90deg, #0a246a, #3a6ea5); color: #fff; } [data-style=classique] dialog .fen-tete h2 { font-size: 1rem; }
[data-style=classique] .feuille::before { content: ''; position: absolute; left: 3px; right: 3px; top: 3px; width: auto; height: 26px; opacity: 1; background: linear-gradient(90deg, #0a246a, #3a6ea5); }
[data-style=classique] .feuille > h2:first-child, [data-style=classique] details.pli > summary { position: absolute; top: 3px; left: 10px; right: 12px; height: 26px; display: flex; align-items: center; color: #fff; font-size: .95rem; margin: 0; z-index: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
[data-style=classique] details.pli > summary h2 { font-size: .95rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-style=classique] details.pli > summary::after { color: #fff; }
[data-style=classique] details.pli:not([open]) { padding: 30px 0 0; }
[data-style=classique] .btn, [data-style=classique] .menu-bouton, [data-style=classique] .pastille, [data-style=classique] .choix { border-radius: 0; box-shadow: none; border: 2px solid; border-color: var(--clair-os) var(--sombre-os) var(--sombre-os) var(--clair-os); }
[data-style=classique] .btn { background: var(--gris-os); }
[data-style=classique] .btn:active, [data-style=classique] .btn[aria-pressed=true] { border-color: var(--sombre-os) var(--clair-os) var(--clair-os) var(--sombre-os); transform: none; }
[data-style=classique] .btn.principal { background: var(--surligneur); } [data-style=classique] .btn.vert { background: var(--vert); }
[data-style=classique] input[type=text], [data-style=classique] input[type=password], [data-style=classique] input[type=time], [data-style=classique] input[type=number], [data-style=classique] textarea, [data-style=classique] select { border-radius: 0; border: 2px solid; border-color: var(--sombre-os) var(--clair-os) var(--clair-os) var(--sombre-os); background: var(--carte); }
[data-style=classique] .barre-menus { background: var(--gris-os); border-bottom: 2px solid var(--sombre-os); box-shadow: inset 0 -1px 0 var(--clair-os); }
[data-style=classique] .postit { transform: none; }

/* --- Style « Cahier » : l'apparence d'origine (papier ligné, marge rouge) */

/* --- Animations coupées */
[data-anim="0"] *, [data-anim="0"] *::before, [data-anim="0"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html:has(.sommaire) { scroll-padding-top: calc(var(--haut-menu) + 120px); }

/* Créateur de héros */
.createur-heros { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.colonne-apercu { position: sticky; top: 0; text-align: center; }
.apercu-heros svg { width: 220px; height: 220px; }
.option-heros { border: 0; padding: 0; margin: 0 0 10px; } .option-heros legend { font-weight: 700; margin-bottom: 4px; }
.option-heros .rangee { gap: 6px; }
.option-heros .btn[aria-pressed=true] { background: var(--surligneur); color: #1b2553; }
.btn.pastille-couleur { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.btn.pastille-couleur[aria-pressed=true] { outline: 3px solid var(--encre); outline-offset: 2px; }
@media (max-width: 640px) { .createur-heros { grid-template-columns: 1fr; } .colonne-apercu { position: static; } .apercu-heros svg { width: 160px; height: 160px; } }
.colonne-apercu .btn { white-space: nowrap; font-size: 1rem; }
.bilan { margin: 6px 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.choix-controle { margin-bottom: 6px; }

/* Mes aventures : tuiles, histoire, boutique, calcul mental, carte */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tuile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 2px solid var(--encre); border-radius: 14px; background: var(--carte); padding: 12px 14px; cursor: pointer; box-shadow: 0 3px 0 var(--encre); color: var(--encre); }
.tuile:hover { transform: translateY(-2px); } .tuile-icone { font-size: 2rem; } .tuile small { color: var(--encre-douce); font-weight: 700; }
.entete .avatar { position: relative; }
.avatar.avec-cadre { padding: 5px; border-radius: 50%; } .avatar .avatar-dessin, .avatar .avatar-dessin svg { display: block; width: 100%; height: 100%; }
.compagnon { position: absolute; right: -14px; bottom: -8px; width: 38px; height: 38px; background: var(--carte); border: 2px solid var(--encre); border-radius: 50%; padding: 2px; }
.compagnon svg { width: 100%; height: 100%; display: block; }
.episode { border: 2px solid var(--encre); border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: var(--carte); }
.episode summary { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 1.05rem; }
.episode.nouveau { background: var(--jaune-pale); } .episode.verrou { display: flex; gap: 10px; align-items: center; opacity: .7; border-style: dashed; }
.episode-image { font-size: 2rem; } .episode-texte { font-size: 1.12rem; line-height: 1.7; margin-top: 8px; }
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.article { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px solid var(--ligne); border-radius: 14px; padding: 12px; background: var(--carte); text-align: center; }
.article.equipe { border-color: var(--vert); box-shadow: 0 0 0 3px var(--vert-pale); }
.article-dessin svg { width: 70px; height: 70px; } .article-cadre { width: 70px; height: 70px; border-radius: 50%; border: 2px solid var(--encre); }
.article-titre { font-family: 'Baloo 2', sans-serif; font-weight: 800; background: var(--jaune-pale); border-radius: 999px; padding: 4px 10px; border: 2px solid var(--encre); }
.chrono-question { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 3.4rem; text-align: center; margin: 20px 0 10px; }
.chrono-champ { font-size: 2rem !important; max-width: 180px; text-align: center; }
.chrono-flash { text-align: center; font-weight: 800; min-height: 1.5em; } .chrono-flash.ok { color: var(--vert); } .chrono-flash.ko { color: var(--marge); }
.chrono-barre b { background: var(--surligneur); transition: none; }
.carte-monde svg { width: 100%; height: auto; display: block; border-radius: 18px; }
.legende-carte .pastille i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--encre); }
.village { cursor: help; }
#chrono-score { white-space: nowrap; } #chrono .ligne-prog { grid-template-columns: 30px 1fr auto; }

/* Lot C : vidéos Les fondamentaux et compétences numériques */
.plus-loin { border-top: 2px dashed var(--ligne); margin-top: 14px; padding-top: 10px; } .plus-loin ul { margin: 4px 0; } .plus-loin a { font-weight: 700; }
.tag.crcn { background: var(--bleu-pale); }
.liste-atelier { display: grid; gap: 6px; margin: 8px 0; } .ligne-atelier { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crcn-bloc { margin: 10px 0; } .crcn-bloc summary { cursor: pointer; font-weight: 700; }
.demandes { border: 2px solid var(--vert); border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: var(--vert-pale); } .demande { border-top: 1px solid var(--ligne); padding: 6px 0; } .demande:first-of-type { border-top: 0; }

/* Liens : bleus partout (même déjà visités), et liens du bas en pastilles */
a { color: var(--bleu); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 600; }
a:visited { color: var(--bleu); }
a:hover { text-decoration-thickness: 3px; }
.liens-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.liens-bas a { display: inline-flex; align-items: center; gap: .35em; padding: .35em .9em; border: 2px solid var(--bleu); border-radius: 999px; background: var(--bleu-pale); color: var(--bleu); text-decoration: none; font-weight: 700; font-size: .9rem; box-shadow: 0 2px 0 var(--bleu); transition: transform .08s, box-shadow .08s; }
.liens-bas a:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--bleu); background: var(--carte); }
.liens-bas a:active { transform: translateY(2px); box-shadow: 0 0 0 var(--bleu); }
.liens-bas a:focus-visible { outline: 4px solid var(--bleu); outline-offset: 2px; }
.btn, .btn:visited, a.btn { color: var(--encre); text-decoration: none; }
[data-style=classique] .liens-bas a { border-radius: 0; }
