.soon { margin-top: 18px; text-align: center; color: var(--muted); border: 2px dashed var(--card-hi); border-radius: 18px; padding: 18px; }

.player-chip {
  display: flex; align-items: center; gap: 12px; width: 100%; background: var(--card); padding: 12px 16px;
  border-radius: 18px; margin: 12px 0 4px; text-align: left; font-weight: 800; font-size: 1.05rem;
}
.player-chip .av { font-size: 1.6rem; }
.player-chip .sub { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
.player-chip .chev { margin-left: auto; color: var(--accent-text); }

.stack { display: grid; gap: 10px; }
.stack[hidden], #p-login[hidden], #p-account[hidden], #p-msg[hidden], #import-row[hidden] { display: none; }
input[type="text"], input[type="email"] {
  width: 100%; font: inherit; font-size: 1.1rem; font-weight: 700; padding: 14px; border-radius: 14px;
  border: 3px solid var(--card-hi); background: var(--bg); color: var(--text); user-select: text; -webkit-user-select: text;
}
.players { display: grid; gap: 8px; margin-bottom: 10px; }
.pl { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 8px 8px 8px 14px; border: 3px solid transparent; }
.pl.sel { border-color: var(--accent); background: var(--card-hi); }
.pl .av { font-size: 1.7rem; }
.pl .nm { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pl .nm small { display: block; font-weight: 600; color: var(--muted); }
.pl button { min-height: 44px; padding: 0 14px; font-weight: 800; background: var(--bg); }
.pl .del { background: transparent; color: var(--muted); padding: 0 10px; }
.avatars { display: flex; flex-wrap: wrap; gap: 8px; }
.avatars button { width: 48px; height: 48px; font-size: 1.5rem; background: var(--card); border: 3px solid transparent; border-radius: 14px; }
.avatars button.on { border-color: var(--accent); background: var(--card-hi); }
.check { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .92rem; }
.check input { width: 22px; height: 22px; }
.danger { margin-top: 22px; color: var(--ko); }
.msg { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--card); }
.msg.err { box-shadow: inset 0 0 0 2px var(--ko); }
.msg.ok { box-shadow: inset 0 0 0 2px var(--ok); }

.lvl-card { background: var(--card); border-radius: 18px; padding: 16px; margin-bottom: 8px; }
.lvl-n { font-size: 1.5rem; font-weight: 900; color: var(--accent-text); }
.lvl-xp { font-size: .85rem; color: var(--muted); margin: 2px 0 10px; }
.bar { height: 12px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.branch { font-weight: 800; margin: 12px 0 6px; }
.topic { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 10px 14px; margin-bottom: 6px; }
.topic .tn { flex: 1; min-width: 0; font-weight: 700; }
.topic .tn small { display: block; font-weight: 600; color: var(--muted); }
.topic .stars { color: var(--accent-text); font-size: 1.2rem; letter-spacing: 2px; }

.count-pill { background: var(--ko); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: .8rem; margin-left: 6px; }
.count-pill[hidden], #btn-rewards[hidden], #rewards-msg[hidden], #parent-msg[hidden], #pin-msg[hidden], #in-pin2[hidden], #btn-r-cancel[hidden] { display: none; }
input.pin { text-align: center; letter-spacing: 12px; font-size: 1.6rem; }
.row2 { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.row2 input:first-child { text-align: center; font-size: 1.4rem; padding: 10px 0; }
#form-reward { margin: 10px 0 16px; background: var(--card); padding: 14px; border-radius: 18px; }
#form-reward input[type="text"] { background: var(--bg); }
.rw { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; }
.rw.off { opacity: .55; }
.rw .ic { font-size: 1.8rem; }
.rw .tx { flex: 1; min-width: 0; font-weight: 800; }
.rw .tx small { display: block; font-weight: 600; color: var(--muted); }
.rw button { min-height: 44px; padding: 0 14px; font-weight: 800; border-radius: 12px; background: var(--bg); }
.rw button.ok { background: var(--ok); color: #06240f; }
.rw button.no { background: transparent; color: var(--ko); }
.rw button.buy { background: var(--accent); color: var(--accent-ink); }
.rw button:disabled { opacity: .4; }
.rw .st { font-size: .8rem; font-weight: 800; }
.rw .st.pending { color: var(--accent-text); }
.rw .st.approved { color: var(--ok); }
.rw .st.refused { color: var(--muted); }

.hero { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--card); padding: 16px; border-radius: calc(var(--radius) + 6px); margin: 12px 0 4px; text-align: left; }
.hero .av { font-size: 2.4rem; width: 60px; height: 60px; display: grid; place-items: center; background: var(--card-hi); border-radius: 50%; flex: none; }
.hero .hx { flex: 1; min-width: 0; display: grid; gap: 3px; }
.hero .nm { font-weight: 900; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero .lv { font-size: .8rem; color: var(--muted); font-weight: 700; }
.hero .bar { margin-top: 4px; }
.hero .chev { color: var(--accent-text); font-size: 1.4rem; }
.cycles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.cycles button { background: var(--card); border: 3px solid transparent; padding: 10px 4px; font-weight: 800; font-size: .85rem; display: grid; gap: 2px; place-items: center; }
.cycles button small { font-weight: 600; color: var(--muted); font-size: .7rem; }
.cycles button .ci { font-size: 1.4rem; }
.cycles button.on { border-color: var(--accent); background: var(--card-hi); }
.hero .gh { font-size: .75rem; color: var(--muted); }
.hero .gh:empty { display: none; }

.goal { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--card); padding: 12px 16px; border-radius: calc(var(--radius) + 2px); margin: 10px 0 0; text-align: left; border: 3px solid transparent; }
.goal[hidden] { display: none; }
.goal .gi { font-size: 1.9rem; }
.goal .gx { flex: 1; min-width: 0; display: grid; gap: 4px; }
.goal .gt { font-weight: 800; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal .gs { font-size: .78rem; color: var(--muted); font-weight: 700; }
.goal .chev { color: var(--accent-text); font-size: 1.3rem; }
.goal.ready { border-color: var(--ok); }
.goal.ready .bar i { background: var(--ok); }
.goal.ready .gs { color: var(--ok); }
.rw .goalbtn { background: var(--bg); }
.rw .goalbtn.on { background: var(--card-hi); color: var(--accent-text); }
.goal.daily { text-decoration: none; color: inherit; }

/* Genre et classe du joueur */
.genders { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.genders button { background: var(--card); min-height: 48px; font-weight: 800; border: 3px solid transparent; border-radius: 14px; }
.genders button.on { border-color: var(--accent); background: var(--card-hi); }
.field { display: grid; gap: 6px; color: var(--muted); font-size: .85rem; font-weight: 700; }
select {
  width: 100%; font: inherit; font-size: 1.1rem; font-weight: 700; padding: 14px; border-radius: 14px;
  border: 3px solid var(--card-hi); background: var(--bg); color: var(--text);
}
.pl .edit { background: transparent; color: var(--muted); padding: 0 10px; }
.pl .todo { color: var(--accent-text); }
#btn-player-cancel[hidden] { display: none; }

.parcours { margin-bottom: 8px; }
.pc-game { background: var(--card); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.pc-head { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 8px; }
.pc-n { color: var(--muted); font-size: .9rem; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pc-chip { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 3px 10px; }
.pc-chip.on { color: var(--ok); }

/* ===== Accueil Alpage : mobile, tablette (rail), bureau (barre latérale + colonne de suivi) ===== */
/* L'accueil prend toute la largeur ; les autres écrans gardent la colonne étroite (theme.css, #app). */
#app:has(> #screen-home.active) { max-width: none; padding: 0; }
#screen-home.active { display: grid; animation: none; }
.app__nav button { border: 0; background: none; cursor: pointer; }
.app__nav button[hidden] { display: none; }
.app__logo, .app__nav .app__nav-parent { display: none; }

.home-head { display: flex; align-items: center; gap: var(--sp-2); }
.home-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-3); background: none; padding: 0; text-align: left; color: inherit; min-height: var(--hit); }
.home-user__av { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--action-tint); border: 2px solid var(--action); display: grid; place-items: center; font: 600 22px var(--font-display); box-sizing: border-box; }
.home-user__tx { display: flex; flex-direction: column; min-width: 0; }
.home-user__nm { font: 600 19px/1.2 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-user__lv { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-head .btn--icon { flex: none; }

.home-mascot { display: flex; gap: var(--sp-3); align-items: flex-end; }
.home-mascot[hidden] { display: none; }
.home-greet { font-weight: 600; }

.daily-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ico tx" "seg seg" "btn btn"; align-items: center; gap: var(--sp-3); color: inherit; text-decoration: none; padding: var(--sp-4); }
.daily-card[hidden] { display: none; }
.daily-card__ico { grid-area: ico; width: 44px; height: 44px; border-radius: 14px; background: var(--streak-tint); color: var(--streak); display: grid; place-items: center; font-size: 24px; flex: none; }
.daily-card__tx { grid-area: tx; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daily-card__top { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.daily-card__title { font: 600 19px var(--font-title); }
.daily-card__sub { font-size: var(--fs-small); color: var(--ink-2); }
.daily-card .segments { grid-area: seg; width: 100%; }
.daily-card__btn { grid-area: btn; width: 100%; }
.daily-card.is-done .daily-card__btn { background: var(--good); color: var(--good-btn-ink); box-shadow: 0 var(--step) 0 var(--good-edge); }
.daily-card:focus-visible { outline: 3px solid var(--xp); outline-offset: 3px; }

.section-title { margin: var(--sp-1) 0 0; font: 600 var(--fs-h2) var(--font-title); letter-spacing: 0; text-transform: none; color: var(--ink); }
.subjects-grid { margin-bottom: var(--sp-2); }
.subject-card { min-height: 140px; box-sizing: border-box; }
.subject-card .mascot--head { width: 48px; height: 48px; border-color: #fff; }
.subject-card__kicker { opacity: .9; }
.subject-card__desc { display: none; font-size: var(--fs-small); line-height: 1.35; opacity: .92; }
.subject-card:focus-visible { outline: 3px solid var(--xp); outline-offset: 3px; }
.soon { margin-top: var(--sp-2); }

/* Colonne de suivi : bureau seulement */
.aside-counters { display: flex; gap: var(--sp-2); }
.aside-counters .counter { flex: 1; justify-content: center; height: 44px; font-size: 18px; }
.aside-card { display: flex; flex-direction: column; gap: 10px; padding: var(--sp-4) 18px; text-align: left; color: inherit; width: 100%; box-sizing: border-box; }
.aside-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.aside-title { font: 600 19px var(--font-display); }
.aside-small { font-size: var(--fs-small); color: var(--ink-2); font-weight: 400; }
.aside-goal[hidden] { display: none; }
.aside-goal { cursor: pointer; }
.aside-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.aside-badges .badge { width: 56px; height: 56px; font-size: 26px; }
.progress--xp > i { background: var(--action); }

/* Tablette : rail d'icônes 88 px */
@media (min-width: 640px) {
  .app__main { max-width: 760px; margin: 0 auto; }
  .subject-card__desc { display: block; }
}
/* Bureau : barre latérale 248, contenu, colonne de suivi 336 */
@media (min-width: 1024px) {
  .app__logo { display: flex; align-items: center; gap: 8px; font: 700 26px var(--font-display); padding: 0 12px 24px; }
  .app__logo-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--action); box-shadow: 0 3px 0 var(--action-edge); display: grid; place-items: center; font-size: 18px; color: var(--action-ink); }
  .app__nav button { color: var(--ink-2); }
  .app__nav .app__nav-parent { display: flex; margin-top: auto; flex: none; height: 48px; min-height: 48px; font-weight: 500; font-size: 15px; border-top: 2px solid var(--surface-2); border-radius: 0; }
  .app__main { max-width: none; margin: 0; }
  .home-user, .home-head .counter { display: none; }
  .home-head { justify-content: flex-end; }
  .home-mascot { align-items: center; gap: var(--sp-4); }
  .home-mascot .mascot--head { width: 72px; height: 72px; }
  .home-mascot .bubble { background: none; padding: 0; border-radius: 0; display: flex; flex-direction: column; gap: 2px; font-size: 16px; color: var(--ink-2); }
  .home-greet { font: 600 34px var(--font-display); color: var(--ink); }
  .daily-card { display: grid; grid-template-columns: 56px 1fr 240px; grid-template-areas: "ico tx btn" "ico seg btn"; gap: 8px 18px; align-items: center; padding: 20px 24px; }
  .daily-card__ico { width: 56px; height: 56px; grid-area: ico; font-size: 30px; border-radius: 16px; }
  .daily-card__tx { grid-area: tx; }
  .daily-card .segments { grid-area: seg; }
  .daily-card__btn { grid-area: btn; }
  .daily-card__title { font-size: 21px; }
  .subjects-grid { gap: 16px; }
  .subject-card { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; padding: 18px; align-content: start; }
  .subject-card .mascot--head { grid-row: 1 / span 4; width: 56px; height: 56px; }
  .subject-card__title { font-size: 21px; }
  .subject-card__bar { margin-top: 6px; grid-column: 2; }
  #goal-card, #goal-card[hidden] { display: none; }
  .app__aside { position: sticky; top: 0; align-self: start; }
}
#theme-pick { margin-bottom: var(--sp-2); }

/* Accueil visiteur */
.ghost.sm { min-height: 40px; padding: 8px 14px; }
.l-hero { text-align: center; padding: 22px 4px 8px; }
.l-kicker { color: var(--accent-text); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 6px; }
.l-title { font-size: 1.7rem; line-height: 1.2; margin: 0 0 12px; color: var(--text); text-transform: none; letter-spacing: 0; }
.l-lead { color: var(--muted); line-height: 1.45; margin: 0 0 8px; }
.l-cards { display: grid; gap: 10px; }
.l-card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.l-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.l-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
#land-games .game { cursor: default; }
.l-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; color: var(--muted); line-height: 1.4; }
.l-steps b { color: var(--text); }
.plans { display: grid; gap: 14px; }
.plan { background: var(--card); border-radius: calc(var(--radius) + 4px); padding: 18px; border: 3px solid transparent; }
.plan.best { border-color: var(--accent); }
.plan h3 { margin: 0; font-size: 1.2rem; }
.plan .pp { font-size: 1.6rem; font-weight: 900; color: var(--accent-text); margin: 6px 0 2px; }
.plan .pd { margin: 0 0 10px; color: var(--muted); font-weight: 700; }
.pl-list { margin: 0 0 6px; padding-left: 20px; color: var(--muted); font-size: .9rem; display: grid; gap: 4px; }
#screen-landing { padding-bottom: 24px; }
#land-msg[hidden] { display: none; }
#home-msg[hidden]{display:none}

.interval { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px; background: var(--card); padding: 5px; border-radius: 999px; }
.interval button { background: transparent; min-height: 44px; font-weight: 800; font-size: .85rem; border-radius: 999px; color: var(--muted); }
.interval button.on { background: var(--accent); color: var(--accent-ink); }
.plan .ps { margin: -4px 0 10px; color: var(--ok); font-size: .85rem; font-weight: 700; }
#btn-sub-plans[hidden]{display:none}
