/* ============================================================
   L'app Mukbang (index.html), présentée comme YouTube (9 nov. 2026, demande de Sonny : « tout le monde connaît YouTube,
   ça leur parle »). Barre du haut (logo, recherche, cœurs de Tinson), filtres en pastilles, fil de grandes vignettes,
   étagères qui défilent, chaînes (les matières), playlists (Mes erreurs, Favoris), onglets en bas sur téléphone et menu
   à gauche sur ordinateur. Les couleurs restent celles de Mukbang : pastels, encre #2A2140, rose, Tinson.
   Pas d'ombres portées, pas de dégradés, une seule police pour l'interface (Outfit).
   Le document défile (pas de conteneur interne) : barre d'adresse de Safari et restauration du défilement naturelles.
   ============================================================ */

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../vendor/fonts/instrument-serif-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../vendor/fonts/instrument-serif-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../vendor/fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../vendor/fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --encre: #2A2140;
    --encre-2: #5B5374;      /* texte secondaire : 6,9:1 sur le fond */
    --fond: #FCFAFF;         /* le blanc de YouTube, teinté lilas */
    --fond-2: #F1ECF8;       /* pastilles, survol */
    --fond-3: #E4DCF1;       /* pastille survolée */
    --ligne: #E6E0EF;        /* filets */
    --surface: #FFFFFF;      /* feuilles et menus */
    --cadre: var(--ligne);
    --rose: #FF8FBF;
    --rose-bas: #E56A9E;
    --rose-fort: #E0428A;    /* barres de progression : le rouge de YouTube, en rose (3,8:1) */
    --rose-haut: #FFC4DC;
    --rose-pale: #FFE3EF;
    --bleu: #1D4ED8;
    --vert: #166534;
    --vert-pale: #DDF4E4;
    --vert-vif: #8FD6A4;
    --ambre: #854D0E;
    --ambre-pale: #FFF0C2;
    --ambre-vif: #F2C14E;
    --rouge: #A3154F;
    --rouge-pale: #FDE3EC;
    --barre: 56px;
    --onglets: 58px;
    --guide: 0px;
    --col: 1440px;
    --haut-sur: env(safe-area-inset-top, 0px);
    --bas-sur: env(safe-area-inset-bottom, 0px);
    /* Le mouvement (13 nov. 2026, contrôle : scripts/hub/controles/mouvement.mjs). Une entrée finit en douceur, un
       déplacement part et arrive en douceur, une sortie est 20 % plus courte que son entrée. Pas de ressort, sauf sur
       les personnages et les récompenses. */
    --t-appui: 110ms;
    --t-entree: 200ms;
    --t-sortie: 160ms;
    --e-entree: cubic-bezier(.22, 1, .36, 1);
    --e-bouge: cubic-bezier(.65, 0, .35, 1);
    --e-sortie: cubic-bezier(.4, 0, 1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--barre) + 60px); scroll-padding-bottom: calc(var(--onglets) + var(--bas-sur) + 16px); }
body {
    margin: 0;
    padding: calc(var(--barre) + var(--haut-sur)) 0 calc(var(--onglets) + var(--bas-sur) + 24px);
    min-height: 100dvh;
    background: var(--fond);
    color: var(--encre);
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
body.mk-bloque { overflow: hidden; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; }
sup { line-height: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; }
.mk-feuille:focus, .mk-feuille:focus-visible, #mk-main:focus { outline: 0; }

.mk-saut {
    position: fixed; left: 12px; top: -60px; z-index: 900;
    background: var(--encre); color: #fff; padding: 10px 14px; font-weight: 700; text-decoration: none; border-radius: 8px;
}
.mk-saut:focus { top: 12px; }
.mk-nouveau #main-header, .mk-nouveau #mk-onglets, .mk-nouveau #mk-main { visibility: hidden; }

/* ---------- Boutons : des pilules, comme « S'abonner » ---------- */
.mk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 0 18px; border-radius: 999px;
    background: var(--rose); color: var(--encre);
    font-weight: 700; font-size: 15px; line-height: 1.15; text-decoration: none; text-align: center;
    transition: background-color 120ms, transform var(--t-appui) var(--e-entree);
}
@media (hover: hover) { .mk-btn:hover { background: var(--rose-bas); } }
.mk-btn:active { transform: scale(.97); }
/* Une réussite se confirme par une petite pulsation (suivre une matière, la bonne réponse d'une question) */
.mk-btn.gagne { animation: mkPulse 380ms var(--e-bouge); }
@keyframes mkPulse { 40% { transform: scale(1.04); } }
.mk-btn[disabled] { opacity: .5; cursor: default; }
.mk-btn svg { width: 18px; height: 18px; flex: none; }
.mk-btn-doux { background: var(--fond-2); }
@media (hover: hover) { .mk-btn-doux:hover { background: var(--fond-3); } }
.mk-btn-noir { background: var(--encre); color: #fff; }
@media (hover: hover) { .mk-btn-noir:hover { background: #40355E; } }
.mk-btn-noir[aria-pressed="true"] { background: var(--fond-2); color: var(--encre); }
.mk-btn-plein { width: 100%; }
.mk-btn-petit { min-height: 36px; padding: 0 14px; font-size: 14px; }
.mk-cadre { background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px; }
.mk-lien { color: var(--encre); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; min-height: 32px; display: inline-flex; align-items: center; }
@media (hover: hover) { .mk-lien:hover { text-decoration-color: var(--rose-bas); } }
.mk-note { color: var(--encre-2); font-size: 13.5px; margin-top: 10px; }

/* ---------- Pastilles (les « chips » de YouTube) ---------- */
.mk-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.mk-chips::-webkit-scrollbar { display: none; }
.mk-chip {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px; border-radius: 8px;
    background: var(--fond-2); color: var(--encre);
    font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
@media (hover: hover) { .mk-chip:hover { background: var(--fond-3); } }
.mk-chip[aria-pressed="true"], .mk-chip[aria-current="true"] { background: var(--encre); color: #fff; }
.mk-chip small { font-size: 12px; font-weight: 500; opacity: .75; }
.mk-chip svg { width: 16px; height: 16px; flex: none; }
.mk-chip-ico { padding: 0 10px; }
.mk-chip-doux { background: none; border: 1px solid var(--ligne); }

/* ---------- Le retour à l'appui : ce qu'on touche se tasse un peu, puis revient ----------
   Un bouton ou une pastille : 0,97. Un rond d'icône, plus petit : 0,9, pour que ça se voie. Une carte, plus grande : 0,98,
   et elle attend 60 ms, pour ne pas frémir quand le doigt se pose pour faire défiler. Une ligne : son fond répond.
   Les survols (:hover) sont réservés aux souris : sur un écran tactile, ils restaient collés après le toucher. */
.mk-chip, .yt-tout, .yt-abo, .yt-short, .yt-pl-carte, .mk-avatar-haut, .mk-icone-btn, .yt-plus, .yt-rond, .mk-effacer, .mk-recherche-go {
    transition: background-color 120ms, transform var(--t-appui) var(--e-entree);
}
.mk-chip:active, .yt-tout:active, .yt-abo:active, .yt-short:active, .yt-pl-carte:active { transform: scale(.97); }
/* Sur un petit bouton, l'échelle seule se voit peu : la couleur répond aussi (ce que faisait le survol, sans rester collée) */
.mk-btn:active { background-color: var(--rose-bas); }
.mk-btn-doux:active, .mk-chip:not([aria-pressed="true"]):not([aria-current="true"]):active { background-color: var(--fond-3); }
.mk-btn-noir:not([aria-pressed="true"]):active { background-color: #40355E; }
.mk-chip-doux:active, .yt-tout:active { background-color: var(--fond-2); }
.mk-icone-btn:active, .yt-plus:active, .mk-effacer:active, .mk-avatar-haut:active { transform: scale(.9); background-color: var(--fond-2); }
.yt-rond:active { transform: scale(.9); background-color: #fff; }
.mk-onglet-ico { transition: transform var(--t-appui) var(--e-entree); }
.mk-onglet:active .mk-onglet-ico { transform: scale(.88); }
.yt-menu-ligne, .yt-chaine-item, .yt-progres a, .mk-ep-liste label { transition: background-color 120ms; }
.yt-menu-ligne:active, .yt-progres a:active, .mk-ep-liste label:active { background-color: var(--fond-2); }
/* (:has à part : un navigateur qui ne le connaît pas jetterait toute la règle où il figure) */
.yt-chaine-item:has(.yt-chaine-lien:active) { background-color: var(--fond-2); }
.yt-item { transition: transform 160ms var(--e-entree); }
.yt-item:has(.yt-lien:active) { transform: scale(.98); transition-delay: 60ms; }
a.yt-avatar { transition: transform var(--t-appui) var(--e-entree); }
a.yt-avatar:active { transform: scale(.9); }

/* ---------- La barre du haut ---------- */
#main-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 300;
    height: calc(var(--barre) + var(--haut-sur)); padding: var(--haut-sur) 6px 0 14px;
    display: flex; align-items: center; gap: 2px;
    background: var(--fond);
}
#main-header.a-defile { box-shadow: 0 1px 0 var(--ligne); }
.mk-logo { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; margin-right: auto; text-decoration: none; color: var(--encre); }
.mk-logo-ico {
    position: relative; width: 34px; height: 24px; border-radius: 7px; flex: none;
    background: var(--rose); overflow: hidden;
}
.mk-logo-chat {
    position: absolute; left: 50%; bottom: -3px; width: 26px; height: 26px; margin-left: -13px;
    background: url('../assets/cats/AllCatsPaid3/White-DifferentEyes/Sittingggg.png') 0 0 / auto 100% no-repeat;
    image-rendering: pixelated;
}
.mk-logo-mot { font-weight: 800; font-size: 21px; letter-spacing: -.045em; }
.mk-logo-pays { align-self: flex-start; margin: 7px 0 0 -2px; font-size: 10px; font-weight: 500; color: var(--encre-2); }
.mk-icone-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--encre); flex: none; }
@media (hover: hover) { .mk-icone-btn:hover { background: var(--fond-2); } }
.mk-icone-btn svg { width: 24px; height: 24px; }
.mk-loupe { order: 2; }
#tinson-vie { order: 3; border-radius: 999px; }
.mk-recherche, .mk-avatar-haut { display: none; }
.mk-avatar-haut {
    order: 4; width: 34px; height: 34px; margin: 0 6px 0 4px; border-radius: 50%;
    place-items: center; background: var(--rose-pale); color: var(--encre); flex: none;
}
.mk-avatar-haut svg { width: 20px; height: 20px; fill: currentColor; shape-rendering: crispEdges; }
#mk-horsligne { position: sticky; top: calc(var(--barre) + var(--haut-sur)); z-index: 250; margin: 0; padding: 8px 16px; background: var(--ambre-pale); color: var(--ambre); font-size: 14px; font-weight: 600; text-align: center; }

/* ---------- Les onglets : en bas (téléphone), le menu de gauche (ordinateur) ---------- */
#mk-onglets {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
    height: calc(var(--onglets) + var(--bas-sur)); padding-bottom: var(--bas-sur);
    display: flex; background: var(--fond); box-shadow: 0 -1px 0 var(--ligne);
}
#mk-bille { display: none; }
.mk-onglet {
    position: relative; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--encre); text-decoration: none; font-size: 11px; font-weight: 500;
    transition: background-color 120ms;
}
.mk-onglet-ico { position: relative; width: 24px; height: 24px; }
.mk-onglet svg { width: 24px; height: 24px; fill: currentColor; shape-rendering: crispEdges; }
/* L'icône creuse devient pleine en fondu, avec un peu d'échelle et de flou (les deux dessins sont l'un sur l'autre) */
.mk-onglet-ico svg { position: absolute; left: 0; top: 0; transition: opacity 180ms var(--e-entree), transform 180ms var(--e-entree), filter 180ms var(--e-entree); }
.mk-onglet .ico-plein, .mk-onglet[aria-current="page"] .ico-creux { opacity: 0; transform: scale(.6); filter: blur(2px); }
.mk-onglet[aria-current="page"] .ico-plein { opacity: 1; transform: none; filter: none; }
.mk-onglet[aria-current="page"] { font-weight: 700; }
.mk-onglet.mk-bump .mk-onglet-ico { animation: mkBump 320ms cubic-bezier(.3, 1.6, .5, 1); }
@keyframes mkBump { 40% { transform: scale(1.25); } }
.mk-onglet-badge {
    position: absolute; left: 15px; top: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--rose-fort); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--fond);
}
.mk-guide-plus { display: none; }

/* ---------- Mise en page ---------- */
#mk-main { display: block; min-height: 60vh; }
.mk-vue { animation: mkEntre 180ms ease-out; }
@keyframes mkEntre { from { opacity: 0; } }
.yt-page { max-width: var(--col); margin: 0 auto; }
.mk-col { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.yt-titre-page { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }

/* ---------- Le fil : une vignette, puis l'avatar de la matière, le titre et la ligne d'infos ---------- */
.yt-fil { padding-bottom: 8px; }
.yt-chips-barre {
    position: sticky; top: calc(var(--barre) + var(--haut-sur)); z-index: 200;
    padding: 6px 14px 12px; background: var(--fond);
}
.yt-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.yt-item { position: relative; display: flex; flex-direction: column; min-width: 0; }
.yt-vignette {
    position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
    background: var(--c1, var(--fond-2));
}
.yt-vignette img { width: 100%; height: 100%; object-fit: cover; }
.yt-vignette-ico { position: absolute; inset: 0; display: none; place-items: center; color: var(--ct, var(--encre)); }
.yt-vignette-ico svg { width: 30%; height: 50%; }
.yt-vignette.sans .yt-vignette-ico { display: grid; }
.yt-duree, .yt-badge {
    position: absolute; right: 8px; bottom: 8px; z-index: 1;
    padding: 2px 6px; border-radius: 6px;
    background: rgba(42, 33, 64, .86); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3;
    display: inline-flex; align-items: center; gap: 4px;
}
.yt-duree svg { width: 13px; height: 13px; }
.yt-badge { left: 8px; right: auto; top: 8px; bottom: auto; background: var(--rose); color: var(--encre); font-weight: 700; }
.yt-badge[data-ton="ambre"] { background: var(--ambre-vif); }
.yt-badge[data-ton="vert"] { background: var(--vert-vif); }
.yt-barre { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 4px; background: rgba(255, 255, 255, .7); }
.yt-barre i { display: block; height: 100%; background: var(--rose-fort); }
.yt-barre:has(+ .yt-duree), .yt-vignette:has(.yt-barre) .yt-duree { bottom: 12px; }
.yt-details { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px 0 14px; }
.yt-avatar {
    position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; background: var(--c2, var(--fond-2)); color: var(--ct, var(--encre));
}
.yt-avatar svg { width: 20px; height: 20px; }
.yt-txt { flex: 1; min-width: 0; }
.yt-titre { font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
.yt-titre .yt-lien, .yt-titre a { text-decoration: none; color: inherit; text-align: left; }
.yt-titre .yt-lien { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.yt-lien::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.yt-lien:focus-visible { outline: 0; }
.yt-lien:focus-visible::after { outline: 3px solid var(--encre); outline-offset: 2px; border-radius: 12px; }
.yt-meta { margin-top: 3px; color: var(--encre-2); font-size: 13px; line-height: 1.35; }
.yt-meta > span + span::before { content: ' · '; }
.yt-meta b { color: var(--encre); font-weight: 600; }
.yt-meta .yt-bon { color: var(--vert); font-weight: 600; }
.yt-meta .yt-mauvais { color: var(--rouge); font-weight: 600; }
.yt-desc { margin-top: 6px; color: var(--encre-2); font-size: 13px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.yt-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.yt-label { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 4px; background: var(--fond-2); color: var(--encre-2); font-size: 12px; font-weight: 600; }
.yt-label svg { width: 13px; height: 13px; }
.yt-plus {
    position: relative; z-index: 1; flex: none; width: 36px; height: 36px; margin: -6px -2px 0 0; border-radius: 50%;
    display: grid; place-items: center; color: var(--encre);
}
@media (hover: hover) { .yt-plus:hover { background: var(--fond-2); } }
.yt-plus svg { width: 20px; height: 20px; fill: currentColor; }
mark.mk-marque { background: var(--ambre-pale); color: inherit; border-radius: 3px; padding: 0 1px; }
.yt-sq { aspect-ratio: 16 / 11; background: var(--fond-2); animation: ytPulse 1.2s ease-in-out infinite alternate; }
@keyframes ytPulse { to { opacity: .5; } }

/* Les rangées (playlists, parcours, résultats sur ordinateur) : la vignette à gauche */
.yt-rangs { display: grid; gap: 4px; padding: 0 14px; }
.yt-rangs > li { list-style: none; }
.yt-rangs .yt-item { display: grid; grid-template-columns: auto minmax(120px, 42%) minmax(0, 1fr); align-items: start; gap: 0 12px; padding: 6px 0; }
.yt-rangs .yt-item:not(:has(.yt-num)) { grid-template-columns: minmax(120px, 42%) minmax(0, 1fr); }
.yt-rangs .yt-vignette { border-radius: 10px; }
.yt-rangs .yt-details { padding: 0; gap: 4px; }
.yt-rangs .yt-avatar { display: none; }
.yt-rangs .yt-titre { font-size: 14.5px; }
.yt-rangs .yt-titre .yt-lien { -webkit-line-clamp: 3; }
.yt-rangs .yt-meta { font-size: 12.5px; }
.yt-rangs .yt-plus { margin-top: -8px; }
.yt-num { align-self: center; width: 22px; color: var(--encre-2); font-size: 13px; font-weight: 600; text-align: center; }
.yt-num svg { width: 16px; height: 16px; margin: 0 auto; fill: currentColor; }
.yt-item[data-etat="fait"] .yt-num { color: var(--vert); }
.yt-item.yt-ici { background: var(--rose-pale); border-radius: 12px; padding-inline: 6px 0; margin-inline: -6px 0; }
.yt-item.yt-ici .yt-num { color: var(--rose-fort); }
.yt-sous-titre { padding: 18px 14px 6px; font-size: 18px; font-weight: 800; }

/* ---------- Les étagères qui défilent (Reprendre, À réviser, Historique, Playlists) ---------- */
.yt-etagere { margin: 18px 0 6px; }
.yt-etagere + .yt-etagere { margin-top: 10px; }
.yt-etagere-tete { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 36px; }
.yt-etagere-tete h2 { flex: 1; min-width: 0; font-size: 20px; font-weight: 800; letter-spacing: -.015em; display: flex; align-items: center; gap: 8px; }
.yt-etagere-tete h2 svg { width: 24px; height: 24px; flex: none; }
.yt-etagere-tete p { color: var(--encre-2); font-size: 13px; }
.yt-tout {
    flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--ligne); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--encre);
}
@media (hover: hover) { .yt-tout:hover { background: var(--fond-2); } }
.yt-defile { display: flex; gap: 12px; overflow-x: auto; padding: 10px 14px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 14px; scrollbar-width: none; }
.yt-defile::-webkit-scrollbar { display: none; }
.yt-defile > * { flex: none; scroll-snap-align: start; }
.yt-defile .yt-item { width: min(72vw, 300px); }
.yt-defile .yt-vignette { border-radius: 12px; }
.yt-defile .yt-details { padding: 10px 0 0; }
.yt-defile .yt-item .yt-avatar { display: none; }
.yt-defile .yt-titre { font-size: 14.5px; }
.yt-defile.yt-petit .yt-item { width: min(46vw, 210px); }
.yt-separe { height: 6px; margin: 18px 0; background: var(--fond-2); }

/* Les « Shorts » de Mukbang : les questions à refaire, en cartes verticales */
.yt-short {
    position: relative; display: flex; flex-direction: column; width: min(42vw, 180px); aspect-ratio: 9 / 16;
    border-radius: 12px; overflow: hidden; background: var(--c1, var(--rose-pale)); color: var(--encre); text-decoration: none;
}
.yt-short-img { display: block; aspect-ratio: 16 / 10; background: var(--c2); }
.yt-short-img img { width: 100%; height: 100%; object-fit: cover; }
.yt-short-q {
    flex: 1; margin: 10px 10px 0; font-size: 15px; font-weight: 700; line-height: 1.25;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden;
}
.yt-short-mat { margin: 6px 10px 10px; font-size: 12px; font-weight: 600; color: var(--encre-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.yt-short-tout { justify-content: center; align-items: center; gap: 12px; padding: 14px; background: var(--rose); text-align: center; font-weight: 800; font-size: 16px; line-height: 1.2; }
.yt-short-tout svg { width: 44px; height: 44px; }
.yt-short-tout small { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; }
.yt-eclair { color: var(--rose-fort); }

/* Les cartes du haut du fil : épreuve, profil à remplir, installer */
.yt-carte-info {
    display: flex; align-items: center; gap: 14px; margin: 4px 14px 14px; padding: 14px 16px;
    border-radius: 16px; background: var(--c1, var(--rose-pale));
}
.yt-carte-info .lumi { width: 54px; height: auto; flex: none; margin: -10px 0 -6px; }
/* La carte du piège du jour (js/hub.js, cartePiege) : Tinson assis, le pastel citron */
.mk-piege-carte { --c1: var(--ambre-pale); }
.mk-piege-mini { position: relative; width: 46px; height: 42px; flex: none; }
.mk-piege-mini .tinson-sprite { --t: 46px; }
.yt-carte-info > svg { width: 28px; height: 28px; flex: none; }
.yt-carte-info-txt { flex: 1; min-width: 0; }
.yt-carte-info-txt b { display: block; font-size: 16px; font-weight: 800; }
.yt-carte-info-txt span { display: block; color: var(--encre-2); font-size: 14px; }
.yt-carte-info .mk-btn { flex: none; }
.yt-ep { margin: 4px 14px 14px; padding: 16px; border-radius: 16px; background: var(--c1); }
.yt-ep-tete { display: flex; align-items: flex-start; gap: 10px; }
.yt-ep-tete > div { flex: 1; min-width: 0; }
.yt-ep h2 { font-size: 18px; font-weight: 800; line-height: 1.2; }
.yt-ep p { color: var(--encre-2); font-size: 14px; margin-top: 2px; }
.yt-ep-barre { display: flex; gap: 3px; margin: 12px 0; }
.yt-ep-barre i { flex: 1; height: 6px; border-radius: 3px; background: rgba(42, 33, 64, .14); }
.yt-ep-barre i[data-e="fait"] { background: var(--vert); }
.yt-ep-barre i[data-e="encours"] { background: var(--ambre-vif); }
.yt-ep-barre i[data-e="revoir"] { background: var(--rose-fort); }
.yt-ep-conseil { margin-bottom: 12px; font-weight: 600; }
.yt-fin { padding: 28px 16px 12px; text-align: center; color: var(--encre-2); }
.yt-fin .mk-btn { margin-top: 10px; }

/* ---------- Matières : la recherche (Tinson s'y assied) et les chaînes ---------- */
.mk-explorer-tete { position: relative; padding: 4px 14px 0; }
.mk-explorer-tete .yt-titre-page { padding: 8px 0 2px; }
#yt-search-wrap { position: relative; margin-top: 52px; }
.mk-saisie {
    display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 16px;
    border: 1px solid var(--fond-3); border-radius: 999px; background: var(--surface);
}
.mk-saisie:focus-within { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }
.mk-saisie > svg { width: 20px; height: 20px; flex: none; color: var(--encre-2); }
.mk-saisie input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: 16px; color: var(--encre); outline: 0; }
.mk-saisie input::placeholder { color: var(--encre-2); }
.mk-saisie input::-webkit-search-cancel-button { display: none; }
.mk-effacer { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--encre); }
@media (hover: hover) { .mk-effacer:hover { background: var(--fond-2); } }
#yt-search-wrap .tinson-bulle { right: 0; top: calc(100% + 8px); max-width: min(340px, calc(100vw - 32px)); }
#mk-niveaux { margin: 12px -14px 0; padding: 0 14px 4px; }
#mk-niveaux:empty { display: none; }
.mk-idees { margin: 10px 0 0; padding: 0 14px; }
#vue-explorer:not(.a-cherche):has(.yt-famille) #mk-idees, #vue-explorer:has(.yt-item) #mk-idees { display: none; }
.yt-nb { padding: 14px 14px 6px; color: var(--encre-2); font-size: 14px; font-weight: 600; }
.yt-nb:empty { display: none; }
@media (pointer: coarse) and (max-width: 899px) {
    body:has(.mk-saisie input:focus) #mk-onglets { transform: translateY(110%); }
    #mk-onglets { transition: transform 160ms ease-out; }
    body:has(.mk-saisie input:focus) #mk-chat-bar { opacity: 0; }
}
.yt-abos { padding-bottom: 4px; }
.yt-abo { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; text-decoration: none; font-size: 12px; font-weight: 600; text-align: center; }
.yt-abo .yt-avatar { width: 56px; height: 56px; }
.yt-abo .yt-avatar svg { width: 28px; height: 28px; }
.yt-abo span:last-child { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-famille { margin-top: 14px; }
.yt-famille h2 { padding: 8px 14px 4px; font-size: 18px; font-weight: 800; }
.yt-chaines { display: grid; gap: 2px; padding: 0 8px; }
.yt-chaine-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; }
@media (hover: hover) { .yt-chaine-item:hover { background: var(--fond-2); } }
.yt-chaine-lien { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-decoration: none; min-height: 52px; }
.yt-chaine-lien .yt-avatar { width: 48px; height: 48px; }
.yt-chaine-lien .yt-avatar svg { width: 26px; height: 26px; }
.yt-chaine-txt { min-width: 0; }
.yt-chaine-txt b { display: block; font-size: 16px; font-weight: 700; }
.yt-chaine-txt .yt-meta { margin-top: 1px; }
.yt-chaine-item .mk-btn { flex: none; }

/* ---------- La page d'une matière : une chaîne ---------- */
.yt-banniere {
    position: relative; height: 92px; margin: 0 14px; border-radius: 14px; overflow: hidden;
    background: var(--c1); color: var(--ct);
    display: flex; align-items: center; justify-content: flex-end; padding: 0 18px;
}
.yt-banniere svg { width: 120px; height: 120px; margin: -10px -14px -10px 0; opacity: .25; }
.yt-banniere em { position: absolute; left: 18px; bottom: 12px; font-family: 'Instrument Serif', Georgia, serif; font-size: 22px; line-height: 1.05; max-width: 70%; }
.yt-chaine-tete { display: flex; gap: 16px; align-items: flex-start; padding: 16px 14px 4px; }
.yt-chaine-tete .yt-avatar { width: 72px; height: 72px; }
.yt-chaine-tete .yt-avatar svg { width: 38px; height: 38px; }
.yt-chaine-infos { flex: 1; min-width: 0; }
.yt-chaine-infos h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.yt-chaine-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 0; }
.yt-chaine-actions .mk-btn { flex: 1 1 auto; }
.yt-avancee { padding: 14px 14px 0; }
.yt-avancee p { color: var(--encre-2); font-size: 13.5px; margin-bottom: 6px; }
.yt-avancee-barre { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--fond-2); }
.yt-avancee-barre i { height: 100%; }
.yt-avancee-barre .fait { background: var(--vert); }
.yt-avancee-barre .encours { background: var(--ambre-vif); }
.yt-avancee-barre .revoir { background: var(--rose-fort); }
.yt-onglets-chaine { margin-top: 16px; padding: 0 14px 4px; border-bottom: 1px solid var(--ligne); }
.yt-onglets-chaine .mk-chip { border-radius: 8px; }

/* ---------- Toi : l'onglet « Vous » de YouTube ---------- */
.yt-toi-tete { display: flex; align-items: center; gap: 16px; padding: 8px 14px 4px; }
.yt-toi-avatar { width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--rose-pale); color: var(--encre); }
.yt-toi-avatar svg { width: 40px; height: 40px; fill: currentColor; shape-rendering: crispEdges; }
.yt-toi-tete h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.yt-toi-tete .mk-lien { font-size: 14px; min-height: 28px; margin-top: 2px; }
.yt-pilules { padding: 14px 14px 2px; }
.yt-pilules .mk-chip { height: 36px; border-radius: 999px; padding: 0 14px; }
.yt-pl-carte { display: flex; flex-direction: column; width: min(46vw, 210px); text-decoration: none; padding-top: 10px; }
.yt-pl-img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--c2, var(--fond-2)); color: var(--ct, var(--encre)); }
.yt-pl-img::before, .yt-pl-img::after { content: ''; position: absolute; left: 10%; right: 10%; top: -5px; height: 5px; border-radius: 6px 6px 0 0; background: var(--c1, var(--fond-3)); }
.yt-pl-img::after { left: 18%; right: 18%; top: -9px; height: 4px; opacity: .7; }
.yt-pl-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.yt-pl-img > svg { position: absolute; inset: 0; margin: auto; width: 38%; height: 52%; }
.yt-pl-compte { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(42, 33, 64, .86); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.yt-pl-compte svg { width: 14px; height: 14px; fill: currentColor; }
.yt-pl-carte b { margin-top: 8px; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.yt-section { margin: 22px 0 0; padding: 0 14px; }
.yt-section h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.yt-progres { display: grid; gap: 2px; }
.yt-progres a { display: flex; align-items: center; gap: 12px; padding: 8px 6px; margin: 0 -6px; border-radius: 12px; text-decoration: none; }
@media (hover: hover) { .yt-progres a:hover { background: var(--fond-2); } }
.yt-progres .yt-avatar { width: 36px; height: 36px; }
.yt-progres-txt { flex: 1; min-width: 0; }
.yt-progres-txt b { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 700; }
.yt-progres-txt b small { color: var(--encre-2); font-weight: 600; font-size: 13px; }
.yt-progres .yt-avancee-barre { margin-top: 6px; }
.yt-menu-liste { margin: 18px 0 0; padding: 6px 0; border-top: 1px solid var(--ligne); }
.yt-menu-liste > li { list-style: none; }
.yt-menu-ligne {
    display: flex; align-items: center; gap: 18px; width: 100%; min-height: 52px; padding: 6px 16px;
    text-align: left; text-decoration: none; color: var(--encre); font-size: 16px; font-weight: 500;
}
@media (hover: hover) { .yt-menu-ligne:hover { background: var(--fond-2); } }
.yt-menu-ligne > svg:first-child { width: 24px; height: 24px; flex: none; }
.yt-menu-ligne span { flex: 1; min-width: 0; }
.yt-menu-ligne small { display: block; color: var(--encre-2); font-size: 13px; font-weight: 400; }
.yt-menu-ligne.danger { color: var(--rouge); }
.yt-menu-titre { padding: 14px 16px 4px; font-size: 13px; font-weight: 700; color: var(--encre-2); text-transform: uppercase; letter-spacing: .06em; }
.yt-toi .mk-note { padding: 0 16px; }
.yt-toi .mk-pied { padding: 10px 16px; }

/* ---------- Une playlist : Mes erreurs, Favoris, Historique ---------- */
.yt-pl-tete { margin: 0 14px; padding: 16px; border-radius: 18px; background: var(--c1, var(--rose-pale)); }
.yt-pl-cover { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--c2, var(--rose-haut)); color: var(--ct, var(--encre)); }
.yt-pl-cover img { width: 100%; height: 100%; object-fit: cover; }
.yt-pl-cover > svg { position: absolute; inset: 0; margin: auto; width: 34%; height: 50%; }
.yt-pl-cover .tinson-sprite { --t: 96px; position: absolute; left: 50%; bottom: 0; margin-left: -48px; }
.yt-pl-infos h1 { margin-top: 14px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.yt-pl-infos h1:focus { outline: 0; }
.yt-pl-infos .yt-meta { font-size: 13.5px; }
.yt-pl-desc { margin-top: 8px; font-size: 14px; color: var(--encre); }
.yt-pl-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 14px; }
.yt-pl-actions .mk-btn { background: var(--surface); }
@media (hover: hover) { .yt-pl-actions .mk-btn:hover { background: var(--fond-2); } }
.yt-pl-actions .mk-btn:active { background: var(--fond-2); }
.yt-pl-actions .mk-btn.yt-pl-go { background: var(--encre); color: #fff; }
.yt-pl-actions .mk-btn.yt-pl-go:active { background: #40355E; }
@media (hover: hover) { .yt-pl-actions .mk-btn.yt-pl-go:hover { background: #40355E; } }
.yt-pl-actions .mk-note { grid-column: 1 / -1; margin-top: 2px; }
.yt-pl-corps { min-width: 0; }
.yt-pl-corps > .mk-chips { padding: 16px 14px 6px; }
.yt-pl-vide { padding: 30px 16px; text-align: center; color: var(--encre-2); }
.yt-pl-vide .lumi { width: 90px; height: auto; margin: 0 auto 8px; }
.yt-pl-vide h2 { color: var(--encre); font-size: 18px; font-weight: 800; }
.yt-pl-vide .mk-btn { margin-top: 14px; }
.yt-retour { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 10px; min-height: 36px; font-weight: 700; font-size: 14px; text-decoration: none; }
.yt-retour svg { width: 18px; height: 18px; }

/* Les questions du carnet, en rangées : la vignette de la fiche et le jour où elle revient */
.yt-q .yt-vignette .yt-duree[data-ton="du"] { background: var(--ambre-vif); color: var(--encre); }
.yt-marches { display: flex; gap: 3px; margin-top: 7px; max-width: 120px; }
.yt-marches i { flex: 1; height: 4px; border-radius: 2px; background: var(--fond-3); }
.yt-marches i.on { background: var(--rose-fort); }
.yt-q .yt-titre .yt-lien { font-weight: 600; }

/* L'escalier du carnet : cinq marches, Tinson en haut avec les questions retenues */
.yt-escalier { margin: 18px 14px 4px; padding: 14px 14px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--ligne); }
.yt-escalier h2 { font-size: 16px; font-weight: 800; }
.mk-esc { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 4px; margin-top: 46px; }
.mk-marche { display: flex; flex-direction: column; min-width: 0; list-style: none; }
.mk-marche-bloc {
    position: relative; display: block; height: calc(14px + var(--k) * 12px);
    border-radius: 8px 8px 0 0; background: var(--fond-2);
}
.mk-marche:first-child .mk-marche-bloc { background: var(--rose-pale); }
.mk-marche:last-child .mk-marche-bloc { background: var(--vert-pale); }
.mk-marche-nom { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--encre-2); text-align: center; line-height: 1.15; }
.mk-jetons { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
.mk-marche:last-child .mk-jetons { position: static; padding-top: 6px; }
.mk-jeton {
    display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 999px;
    background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--fond-3); font-size: 12px; font-weight: 700; color: var(--encre);
}
.mk-jeton.du { background: var(--ambre-vif); box-shadow: none; }
.mk-jeton.ok { background: var(--vert-vif); box-shadow: none; }
.mk-esc-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--encre-2); font-size: 12.5px; }
.mk-esc-legende span { display: inline-flex; align-items: center; gap: 6px; }
.mk-esc-legende .mk-jeton { min-width: 14px; width: 14px; height: 14px; padding: 0; }
.mk-esc-chat { position: absolute; left: 50%; bottom: calc(100% - 4px); width: 48px; height: 48px; margin-left: -24px; pointer-events: none; }
.mk-esc-chat .tinson-sprite { --t: 48px; }
.mk-marche:last-child:has(.mk-jetons) .mk-esc-chat { bottom: calc(100% - 4px); }
.mk-esc-regle { margin-top: 8px; color: var(--encre-2); font-size: 13px; }

/* ---------- Une séance : plein écran, comme un Short ---------- */
.yt-short-page { padding: 0 0 12px; }
.yt-short-ecran {
    position: relative; min-height: calc(100dvh - var(--barre) - var(--haut-sur) - var(--onglets) - var(--bas-sur) - 24px);
    display: flex; flex-direction: column; padding: 10px 14px 16px; background: var(--c1, var(--rose-pale));
}
.yt-short-haut { display: flex; align-items: center; gap: 10px; }
.yt-short-n { flex: 1; font-size: 14px; font-weight: 700; color: var(--encre-2); }
.yt-rond { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .7); color: var(--encre); }
@media (hover: hover) { .yt-rond:hover { background: #fff; } }
.yt-rond svg { width: 20px; height: 20px; }
.yt-short-prog { display: flex; gap: 4px; margin: 10px 0 0; }
.yt-short-prog li { flex: 1; height: 4px; border-radius: 2px; background: rgba(42, 33, 64, .14); list-style: none; }
.yt-short-prog li[data-e="fait"] { background: var(--vert); }
.yt-short-prog li[data-e="revoir"] { background: var(--rose-fort); }
.yt-short-prog li[data-e="encours"] { background: var(--encre); }
.yt-short-corps { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px 0 8px; }
.yt-short-fiche { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; text-decoration: none; }
.yt-short-fiche .yt-avatar { width: 36px; height: 36px; }
.yt-short-fiche span { min-width: 0; font-size: 13px; font-weight: 600; color: var(--encre-2); line-height: 1.25; }
.yt-short-fiche b { display: block; color: var(--encre); font-size: 14px; }
.yt-short-corps h1 { font-size: clamp(21px, 5.6vw, 27px); font-weight: 800; line-height: 1.22; letter-spacing: -.015em; }
.yt-short-corps h1:focus { outline: 0; }
.mk-de-tete { margin-top: 18px; }
.mk-de-tete p { color: var(--encre-2); font-weight: 600; font-size: 14.5px; margin-bottom: 10px; }
.mk-de-tete-b { display: grid; gap: 8px; }
.mk-de-tete-b .mk-btn { min-height: 48px; font-size: 16px; }
.mk-de-tete-b .mk-btn-doux { background: rgba(255, 255, 255, .75); }
.mk-de-tete-b .mk-btn-doux:active { background: #fff; }
.mk-choix { display: grid; gap: 8px; margin-top: 18px; }
.mk-choix-b {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px 8px 10px;
    border-radius: 14px; background: var(--surface); text-align: left; font-size: 16px; font-weight: 600; line-height: 1.25;
    transition: background-color 160ms, box-shadow 160ms, opacity 160ms, transform var(--t-appui) var(--e-entree);
}
@media (hover: hover) { .mk-choix-b:hover:not([disabled]) { background: #fff8fc; box-shadow: inset 0 0 0 2px var(--rose); } }
.mk-choix-b:active:not([disabled]) { transform: scale(.975); }
.mk-choix-b[disabled] { cursor: default; }
.mk-choix-b[disabled]:not(.juste):not(.faux) { opacity: .55; }
.mk-choix-l { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fond-2); font-size: 14px; font-weight: 800; }
.mk-choix-l svg { width: 16px; height: 16px; }
.mk-choix-t { min-width: 0; }
.mk-choix-t mjx-container, .mk-bulle mjx-container { font-size: 112% !important; }
.mk-choix-b.juste { background: var(--vert-pale); box-shadow: inset 0 0 0 2px var(--vert); }
.mk-choix-b.juste .mk-choix-l { background: var(--vert); color: #fff; }
.mk-choix-b.faux { background: var(--rouge-pale); box-shadow: inset 0 0 0 2px var(--rouge); }
.mk-choix-b.faux .mk-choix-l { background: var(--rouge); color: #fff; }
.mk-esc-seance { margin-top: 14px; padding: 4px 4px 0; }
.mk-esc-seule { margin-top: 64px; gap: 3px; }
.mk-esc-seule .mk-marche-bloc { height: calc(10px + var(--k) * 7px); background: rgba(255, 255, 255, .6); }
.mk-esc-seule .mk-marche:first-child .mk-marche-bloc { background: rgba(255, 255, 255, .85); }
.mk-esc-seule .mk-marche:last-child .mk-marche-bloc { background: var(--vert-pale); }
.mk-esc-seule .mk-marche-nom { font-size: 11px; }
.mk-esc-enjeu { margin-top: 8px; color: var(--encre-2); font-size: 13.5px; font-weight: 600; text-align: center; }
.mk-ma-q {
    position: absolute; left: 50%; bottom: calc(100% + 4px); width: 26px; height: 26px; margin-left: -13px; border-radius: 50%;
    background: var(--ambre-vif); box-shadow: 0 0 0 3px #fff; display: block;
}
.mk-ma-q::before { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 14px; color: var(--encre); }
.mk-ma-q.pose { background: #fff; box-shadow: 0 0 0 3px var(--encre); }
.mk-ma-q.ok { background: var(--vert-vif); }
.mk-ma-q.ok::before { content: ''; inset: 7px 6px 9px 6px; border: solid var(--encre); border-width: 0 0 3px 3px; transform: rotate(-45deg); }
.mk-marche:last-child .mk-ma-q.ok { bottom: calc(100% + 44px); }
.mk-q-retour:empty { display: none; }
.mk-q-retour { margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--surface); }
.mk-q-retour .mk-btn { width: 100%; min-height: 48px; margin-top: 14px; font-size: 16px; }
.yt-retour-tete { display: flex; align-items: center; gap: 10px; }
.yt-retour-tete .lumi { width: 46px; height: auto; flex: none; margin: -8px 0 -4px; }
.mk-bulle { min-width: 0; }
.mk-bulle:focus { outline: 0; }
.mk-bulle:focus-visible { outline: 3px solid var(--encre); outline-offset: 4px; border-radius: 6px; }
.mk-bulle > p:first-child { font-size: 17px; font-weight: 800; line-height: 1.3; }
.mk-bulle-expl { margin-top: 8px; font-size: 15px; line-height: 1.4; }
.mk-bulle-mvt { padding: 8px 10px; border-radius: 10px; background: var(--fond-2); font-weight: 600; font-size: 14px; }

/* Le bilan : l'écran de fin */
.yt-bilan { padding: 8px 14px 0; }
.yt-bilan-carte { padding: 22px 16px 18px; border-radius: 18px; background: var(--rose-pale); text-align: center; }
.yt-bilan-carte .lumi { width: 84px; height: auto; margin: 0 auto 4px; }
.yt-bilan-carte h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.yt-bilan-carte h1 em { display: block; margin-top: 4px; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 26px; letter-spacing: 0; }
.yt-bilan-carte h1:focus { outline: 0; }
.yt-bilan-carte > p { margin-top: 10px; font-size: 14.5px; }
.mk-bilan-bouge { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.mk-bilan-bouge span { padding: 4px 10px; border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 700; }
.mk-bilan-actions { display: grid; gap: 8px; margin-top: 14px; }
.mk-bilan-actions .mk-note { margin-top: 0; text-align: center; }
.mk-rdv { display: grid; gap: 10px; margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--ligne); }
.mk-rdv p { font-size: 14.5px; }
.mk-rdv b { font-weight: 800; }

/* ---------- Feuille du bas (le menu ⋮ de YouTube), toast ---------- */
.mk-voile { position: fixed; inset: 0; z-index: 600; background: rgba(42, 33, 64, .42); display: flex; align-items: flex-end; justify-content: center; animation: mkEntre 140ms ease-out; }
.mk-feuille {
    width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto;
    padding: 10px 16px calc(18px + var(--bas-sur)); border-radius: 18px 18px 0 0; background: var(--surface);
    animation: mkMonte var(--t-entree) var(--e-entree);
}
.mk-feuille::before { content: ''; display: block; width: 36px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--fond-3); }
@keyframes mkMonte { from { transform: translateY(24px); opacity: .6; } }
/* La sortie (fermerFeuille pose .sort) : le voile s'efface et la feuille redescend, 20 % plus vite qu'elle n'est montée */
.mk-voile.sort { animation: mkSort var(--t-sortie) var(--e-sortie) forwards; pointer-events: none; }
.mk-voile.sort .mk-feuille { animation: mkDescend var(--t-sortie) var(--e-sortie) forwards; }
@keyframes mkSort { to { opacity: 0; } }
@keyframes mkDescend { to { transform: translateY(24px); } }
@keyframes mkEclot { from { transform: scale(.95); opacity: 0; } }
@keyframes mkReplie { to { transform: scale(.95); opacity: 0; } }
/* Les lignes d'un menu, les choix d'une question, le retour après une réponse : chacun arrive 30 ms après le précédent */
.mk-feuille .yt-menu-liste > li, .mk-choix > .mk-choix-b, .mk-q-retour > * { animation: mkLigne 220ms var(--e-entree) backwards; }
.mk-feuille .yt-menu-liste > li:nth-child(2), .mk-choix > .mk-choix-b:nth-child(2), .mk-q-retour > :nth-child(2) { animation-delay: 30ms; }
.mk-feuille .yt-menu-liste > li:nth-child(3), .mk-choix > .mk-choix-b:nth-child(3), .mk-q-retour > :nth-child(3) { animation-delay: 60ms; }
.mk-feuille .yt-menu-liste > li:nth-child(4), .mk-choix > .mk-choix-b:nth-child(4), .mk-q-retour > :nth-child(4) { animation-delay: 90ms; }
.mk-feuille .yt-menu-liste > li:nth-child(5), .mk-choix > .mk-choix-b:nth-child(5) { animation-delay: 120ms; }
.mk-feuille .yt-menu-liste > li:nth-child(n+6), .mk-choix > .mk-choix-b:nth-child(n+6) { animation-delay: 150ms; }
@keyframes mkLigne { from { opacity: 0; transform: translateY(6px); } }
.mk-choix > .mk-choix-b.gagne { animation: mkPulse 380ms var(--e-bouge); }
.mk-feuille h2 { font-size: 19px; font-weight: 800; line-height: 1.25; }
.mk-feuille > p { margin-top: 8px; color: var(--encre-2); font-size: 15px; }
.mk-feuille ol { margin: 12px 0 0; display: grid; gap: 10px; }
.mk-feuille li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.mk-feuille li i { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--fond-2); }
.mk-feuille li svg { width: 18px; height: 18px; }
.mk-feuille .yt-menu-liste { margin: 8px -16px 0; border: 0; padding: 0; }
.yt-feuille-fiche { display: flex; gap: 12px; align-items: center; }
.yt-feuille-fiche .yt-vignette { width: 112px; flex: none; border-radius: 8px; }
.yt-feuille-q { margin-top: 6px; font-size: 17px; font-weight: 700; }
.yt-feuille-rep { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--vert-pale); }
.yt-feuille-rep b { display: block; font-size: 13px; color: var(--vert); text-transform: uppercase; letter-spacing: .05em; }
.yt-feuille-rep p { margin-top: 2px; font-size: 16px; font-weight: 700; }
.yt-feuille-expl { margin-top: 10px; font-size: 15px; }
#mk-toast {
    position: fixed; left: 50%; bottom: calc(var(--onglets) + var(--bas-sur) + 14px); z-index: 700;
    max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px; background: var(--encre); color: #fff;
    font-weight: 600; font-size: 14.5px; opacity: 0; transform: translate(-50%, 10px); pointer-events: none;
    transition: opacity var(--t-sortie) var(--e-sortie), transform var(--t-sortie) var(--e-sortie);
}
#mk-toast.on { opacity: 1; transform: translate(-50%, 0); transition: opacity var(--t-entree) var(--e-entree), transform var(--t-entree) var(--e-entree); }

/* Formulaires des feuilles (épreuve) */
.mk-form { display: grid; gap: 12px; margin-top: 14px; }
.mk-form label { display: grid; gap: 6px; font-weight: 700; font-size: 14.5px; }
.mk-form input, .mk-form select { height: 46px; padding: 0 12px; border: 1px solid var(--fond-3); border-radius: 10px; background: var(--surface); font: inherit; color: var(--encre); }
.mk-ep-liste { margin: 14px 0 0; padding: 0; border: 0; display: grid; gap: 2px; max-height: 40dvh; overflow-y: auto; }
.mk-ep-liste legend { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.mk-ep-liste label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border-radius: 10px; }
@media (hover: hover) { .mk-ep-liste label:hover { background: var(--fond-2); } }
.mk-ep-liste input { width: 20px; height: 20px; accent-color: var(--encre); flex: none; }
.mk-ep-liste small { color: var(--encre-2); }
.mk-ep-erreur { margin: 10px 0 0; color: var(--rouge); font-weight: 700; }
.mk-feuille .mk-btn-plein { margin-top: 14px; }
.mk-ep-choix { display: grid; gap: 8px; }
.mk-ep-choix .mk-btn-plein { margin-top: 0; }

/* ---------- Pages de texte (À propos, Parents et profs) ---------- */
.mk-texte { padding: 8px 0 20px; }
.mk-texte h1 { font-size: 28px; font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.mk-texte h2 { margin-top: 24px; font-size: 19px; font-weight: 800; }
.mk-texte p { margin-top: 10px; font-size: 16px; line-height: 1.55; }
.mk-texte p b { font-weight: 700; }
.mk-texte a:not(.mk-btn) { font-weight: 700; text-underline-offset: 3px; }
.mk-concept { margin-top: 10px; padding: 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--ligne); }
.mk-concept summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; font-weight: 700; cursor: pointer; }
.mk-concept summary::-webkit-details-marker { display: none; }
.mk-concept summary::after {
    content: ''; flex: none; width: 14px; height: 14px; background: currentColor;
    clip-path: polygon(0 40%, 40% 40%, 40% 0, 60% 0, 60% 40%, 100% 40%, 100% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 60%);
}
.mk-concept[open] summary::after { clip-path: polygon(0 40%, 100% 40%, 100% 60%, 0 60%); }
.mk-concept p { margin: 0; padding: 0 16px 14px; font-size: 15px; }
.mk-pied { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 20px 16px 8px; font-size: 13px; color: var(--encre-2); }
.mk-pied a { color: inherit; text-decoration: none; font-weight: 600; }
@media (hover: hover) { .mk-pied a:hover { color: var(--encre); text-decoration: underline; } }

/* Les fiches n'ont pas pu se charger */
.mk-ko #mk-main { display: none; }
#mk-erreur { max-width: 520px; margin: 40px auto; padding: 0 20px; text-align: center; }
#mk-erreur .lumi { width: 96px; height: auto; margin: 0 auto 10px; }
#mk-erreur h1 { font-size: 22px; font-weight: 800; }
#mk-erreur p { margin: 8px 0 14px; color: var(--encre-2); }
.mk-vide { padding: 28px 16px; text-align: center; }

/* ---------- Lumi ---------- */
.lumi { overflow: visible; }
.lumi { animation: lumiVol 3.4s ease-in-out infinite; will-change: transform; }
@keyframes lumiVol { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.lumi .lumi-yeux { display: none; }
.lumi[data-expr="neutre"] [data-yeux="neutre"], .lumi[data-expr="contente"] [data-yeux="contente"],
.lumi[data-expr="clin"] [data-yeux="clin"], .lumi[data-expr="joie"] [data-yeux="joie"],
.lumi[data-expr="surprise"] [data-yeux="surprise"], .lumi[data-expr="coeurs"] [data-yeux="coeurs"],
.lumi[data-expr="etoiles"] [data-yeux="etoiles"], .lumi[data-expr="curieuse"] [data-yeux="curieuse"],
.lumi[data-expr="dort"] [data-yeux="dort"] { display: block; animation: lumiCligne 5.2s linear infinite; transform-box: fill-box; transform-origin: center; }
.lumi[data-expr="joie"] [data-yeux], .lumi[data-expr="dort"] [data-yeux], .lumi[data-expr="coeurs"] [data-yeux], .lumi[data-expr="etoiles"] [data-yeux] { animation: none; }
@keyframes lumiCligne { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }
.lumi .lumi-signe { display: none; }
.lumi[data-signe="coeur"] [data-s="coeur"], .lumi[data-signe="!"] [data-s="!"], .lumi[data-signe="?"] [data-s="?"] { display: block; animation: lumiSigne 320ms cubic-bezier(.34, 1.56, .64, 1); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes lumiSigne { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.lumi-vague .lumi-main-d { animation: lumiCoucou 1s ease-in-out 3; transform-box: fill-box; transform-origin: center; }
@keyframes lumiCoucou { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(6px, -26px); } 65% { transform: translate(-2px, -32px); } }

/* ---------- Tinson sur les onglets (js/mascottes.js) ---------- */
#mk-chat-bar {
    position: fixed; left: 0; bottom: calc(var(--onglets) + var(--bas-sur) + 1px); z-index: 205;
    width: 64px; height: 64px; pointer-events: none; will-change: transform;
}
#mk-chat-bar .tinson-sprite { --t: 64px; transition: translate 220ms steps(4) 900ms; }
@media (max-width: 899px) {
    #mk-chat-bar:not([data-pose="court"]):not([data-pose="saut"]) .tinson-sprite { translate: 0 30px; }
    #mk-chat-bar[data-pose="court"] .tinson-sprite, #mk-chat-bar[data-pose="saut"] .tinson-sprite { transition-delay: 0ms; }
}
body:has(#vue-moi:not([hidden])) #mk-chat-bar, body:has(#vue-erreurs:not([hidden])) #mk-chat-bar { display: none; }
.mk-coeur-vol { position: fixed; z-index: 450; width: 18px; height: 16px; pointer-events: none; }
.mk-coeur-px { display: block; width: 18px; height: 16px; }
.tinson-fermer { color: var(--encre-2); }

/* ---------- Changements d'écran (View Transitions) ---------- */
#main-header { view-transition-name: mk-barre; }
#mk-onglets { view-transition-name: mk-onglets; }
#mk-chat-bar { view-transition-name: mk-chat; }
::view-transition-old(root) { animation: 110ms ease-in both mkVtSort; }
::view-transition-new(root) { animation: 170ms cubic-bezier(.22, 1, .36, 1) both mkVtEntre; }
@keyframes mkVtSort { to { opacity: 0; } }
@keyframes mkVtEntre { from { opacity: 0; } }
::view-transition-group(mk-barre), ::view-transition-group(mk-onglets), ::view-transition-group(mk-chat) { z-index: 3; }
/* Les onglets ne fondent pas d'une image à l'autre : seule l'icône change, en direct (.mk-onglet-ico svg).
   L'ancienne image est rendue invisible, jamais retirée : avec « display: none » sur ce pseudo-élément, WebKit plante dès
   qu'un script lit document.getAnimations() pendant le fondu (mesuré le 13 nov. 2026 sur la rangée de pastilles). */
::view-transition-old(mk-onglets) { animation: none; opacity: 0; }
::view-transition-new(mk-onglets) { animation: none; }
/* Un filtre change (js/hub.js, enTransition pose data-vt) : la pastille choisie glisse jusqu'à la nouvelle, le texte ne se déforme pas */
[data-vt="pastille"] .mk-vue:not([hidden]) .mk-chip:is([data-chip], [data-niveau], [data-niv-mat], [data-filtre-carnet])[aria-pressed="true"] { view-transition-name: mk-pastille; }
::view-transition-old(mk-pastille), ::view-transition-new(mk-pastille) { width: 100%; height: 100%; object-fit: none; }
/* La rangée de pastilles, elle, ne fond pas (elle peut avoir défilé pour centrer la pastille choisie) : seule la pastille bouge */
[data-vt="pastille"] .mk-vue:not([hidden]) .mk-chips:has(> .mk-chip:is([data-chip], [data-niveau], [data-niv-mat], [data-filtre-carnet])) { view-transition-name: mk-pastilles; }
::view-transition-old(mk-pastilles) { animation: none; opacity: 0; }
::view-transition-new(mk-pastilles) { animation: none; }
/* Une matière s'ouvre : son rond devient celui de sa page (le même objet, js/hub.js pose mk-morph des deux côtés) */
::view-transition-group(mk-pastille), ::view-transition-group(mk-morph) { animation-duration: 240ms; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
/* À l'arrivée sur un écran ou au changement de filtre (data-entree, jamais quand l'écran se redessine tout seul) :
   les premières lignes d'une liste arrivent l'une après l'autre, à 30 ms d'écart */
[data-entree] .mk-vue:not([hidden]) :is(.yt-grille, .yt-rangs, .yt-chaines) > :nth-child(-n+6) { animation: mkLigne 240ms var(--e-entree) backwards; }
[data-entree] .mk-vue:not([hidden]) :is(.yt-grille, .yt-rangs, .yt-chaines) > :nth-child(2) { animation-delay: 30ms; }
[data-entree] .mk-vue:not([hidden]) :is(.yt-grille, .yt-rangs, .yt-chaines) > :nth-child(3) { animation-delay: 60ms; }
[data-entree] .mk-vue:not([hidden]) :is(.yt-grille, .yt-rangs, .yt-chaines) > :nth-child(4) { animation-delay: 90ms; }
[data-entree] .mk-vue:not([hidden]) :is(.yt-grille, .yt-rangs, .yt-chaines) > :nth-child(5) { animation-delay: 120ms; }
[data-entree] .mk-vue:not([hidden]) :is(.yt-grille, .yt-rangs, .yt-chaines) > :nth-child(6) { animation-delay: 150ms; }
/* On part vers une fiche (html.mk-part, js/hub.js) : un trait rose avance sous la barre, comme le chargement de YouTube */
html.mk-part #main-header::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--rose-fort);
    transform-origin: 0 50%; animation: mkPart 2.6s cubic-bezier(.1, .7, .3, 1) both;
}
@keyframes mkPart { from { transform: scaleX(0); } to { transform: scaleX(.92); } }

/* ---------- Tablette : le fil passe en grille ---------- */
@media (min-width: 600px) {
    .yt-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; padding: 0 16px; }
    .yt-grille .yt-vignette { border-radius: 12px; }
    .yt-grille .yt-details { padding: 12px 0 0; }
    .yt-carte-info, .yt-ep { margin-inline: 16px; }
    .yt-short { width: 180px; }
    .yt-defile .yt-item { width: 280px; }
    .yt-chaines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Ordinateur : la recherche au centre de la barre, le menu à gauche ---------- */
@media (min-width: 900px) {
    :root { --guide: 72px; --onglets: 0px; }
    body { padding: var(--barre) 0 48px var(--guide); }
    #main-header { padding: 0 20px 0 18px; gap: 12px; }
    .mk-logo { margin-right: 0; min-width: 150px; }
    .mk-recherche { display: flex; flex: 1 1 auto; max-width: 640px; height: 40px; margin: 0 auto; }
    .mk-recherche input {
        flex: 1; min-width: 0; height: 100%; padding: 0 16px; border: 1px solid var(--fond-3); border-right: 0;
        border-radius: 999px 0 0 999px; background: var(--surface); font: inherit; font-size: 16px; color: var(--encre); outline: 0;
    }
    .mk-recherche input:focus { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }
    .mk-recherche input::placeholder { color: var(--encre-2); }
    .mk-recherche input::-webkit-search-cancel-button { display: none; }
    .mk-recherche-go { width: 64px; flex: none; display: grid; place-items: center; border: 1px solid var(--fond-3); border-radius: 0 999px 999px 0; background: var(--fond-2); color: var(--encre); }
    @media (hover: hover) { .mk-recherche-go:hover { background: var(--fond-3); } }
    .mk-recherche-go svg { width: 22px; height: 22px; }
    .mk-loupe { display: none; }
    .mk-avatar-haut { display: grid; }
    #mk-onglets {
        top: var(--barre); bottom: 0; right: auto; width: var(--guide); height: auto; padding: 4px; overflow-y: auto;
        flex-direction: column; box-shadow: none; scrollbar-width: thin;
    }
    .mk-onglet { flex: none; height: 74px; gap: 6px; border-radius: 10px; font-size: 10.5px; }
    @media (hover: hover) { .mk-onglet:hover { background: var(--fond-2); } }
    .yt-chips-barre { top: var(--barre); padding: 12px 24px; }
    .yt-fil, .yt-page { padding-inline: 8px; }
    .yt-grille { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 40px 16px; padding: 0 16px; }
    .yt-titre { font-size: 16px; }
    .yt-meta { font-size: 14px; }
    .yt-etagere-tete, .yt-defile { padding-inline: 16px; }
    .yt-defile { scroll-padding-inline: 16px; }
    .yt-rangs { padding: 0 16px; }
    .yt-rangs .yt-item { grid-template-columns: auto 246px minmax(0, 1fr); gap: 0 16px; padding: 8px; border-radius: 12px; }
    .yt-rangs .yt-item:not(:has(.yt-num)) { grid-template-columns: 246px minmax(0, 1fr); }
    @media (hover: hover) { .yt-rangs .yt-item:hover { background: var(--fond-2); } }
    .yt-rangs .yt-titre { font-size: 16px; }
    .yt-rangs .yt-meta { font-size: 13px; }
    .yt-item.yt-ici { padding-inline: 8px; margin: 0; }
    /* Les résultats de recherche : la grande vignette à gauche, comme sur YouTube */
    .yt-resultats .yt-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 1100px; }
    .yt-resultats .yt-item { display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: 16px; }
    .yt-resultats .yt-details { padding: 0; flex-wrap: wrap; }
    .yt-resultats .yt-avatar { display: none; }
    .yt-resultats .yt-titre { font-size: 18px; font-weight: 600; }
    .yt-resultats .yt-desc { display: -webkit-box; }
    #vue-explorer #yt-search-wrap { display: none; }
    #vue-explorer .mk-explorer-tete { padding: 18px 16px 0; }
    #mk-niveaux { margin: 14px 0 0; padding: 0; flex-wrap: wrap; }
    .mk-idees, .yt-nb { padding-inline: 16px; }
    .yt-chaines { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0 16px; }
    .yt-chaine-item { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--ligne); }
    @media (hover: hover) { .yt-chaine-item:hover { background: var(--surface); border-color: var(--fond-3); } }
    .yt-chaine-lien { flex-direction: column; text-align: center; gap: 10px; }
    .yt-chaine-lien .yt-avatar { width: 96px; height: 96px; }
    .yt-chaine-lien .yt-avatar svg { width: 46px; height: 46px; }
    .yt-famille h2 { padding: 10px 16px 8px; }
    .yt-banniere { height: 170px; margin: 8px 16px 0; border-radius: 16px; }
    .yt-banniere em { font-size: 34px; left: 28px; bottom: 22px; }
    .yt-banniere svg { width: 210px; height: 210px; }
    .yt-chaine-tete { padding: 20px 16px 0; gap: 24px; align-items: center; }
    .yt-chaine-tete .yt-avatar { width: 128px; height: 128px; }
    .yt-chaine-tete .yt-avatar svg { width: 64px; height: 64px; }
    .yt-chaine-infos h1 { font-size: 36px; }
    .yt-chaine-actions { padding: 14px 0 0; }
    .yt-chaine-actions .mk-btn { flex: none; }
    .yt-avancee { padding-inline: 16px; max-width: 760px; }
    .yt-onglets-chaine { padding-inline: 16px; }
    .yt-sous-titre { padding-inline: 16px; }
    .yt-toi { max-width: 1100px; }
    .yt-toi-tete { padding: 18px 16px 4px; }
    .yt-toi-tete .yt-toi-avatar { width: 120px; height: 120px; }
    .yt-toi-tete .yt-toi-avatar svg { width: 64px; height: 64px; }
    .yt-toi-tete h1 { font-size: 36px; }
    .yt-pilules, .yt-section { padding-inline: 16px; }
    .yt-pl-carte { width: 240px; }
    .yt-progres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
    .yt-menu-liste { max-width: 640px; }
    .mk-voile { align-items: center; }
    .mk-feuille { border-radius: 18px; max-height: 80dvh; padding-bottom: 18px; }
    .mk-feuille::before { display: none; }
    /* La boîte naît du bouton qui l'ouvre et y retourne (ouvrirFeuille pose l'origine) : échelle 0,95, jamais depuis zéro */
    .mk-feuille { animation-name: mkEclot; }
    .mk-voile.sort .mk-feuille { animation-name: mkReplie; }
    #mk-toast { bottom: 28px; left: calc(50% + var(--guide) / 2); }
    .yt-short-page { padding: 12px 16px; }
    .yt-short-ecran { max-width: 480px; min-height: calc(100dvh - var(--barre) - 48px); margin: 0 auto; border-radius: 20px; padding: 14px 18px 18px; }
    .yt-bilan { max-width: 560px; margin: 0 auto; padding-top: 16px; }
    .mk-col { padding: 0 24px; }
    #mk-chat-bar { top: calc(var(--barre) - 62px); bottom: auto; }
    #mk-chat-bar .tinson-sprite { --t: 52px; }
    #mk-chat-bar { width: 52px; height: 52px; top: calc(var(--barre) - 50px); z-index: 310; }
    #mk-pied { max-width: var(--col); margin: 0 auto; padding-inline: 8px; }
}
/* Grand écran : le menu complet, avec tes matières comme des abonnements */
@media (min-width: 1280px) {
    :root { --guide: 236px; }
    #mk-onglets { padding: 12px; }
    .mk-onglet { flex-direction: row; justify-content: flex-start; gap: 22px; height: 42px; padding: 0 12px; font-size: 14.5px; }
    .mk-onglet[aria-current="page"] { background: var(--fond-2); }
    .mk-onglet-nom { flex: 1; }
    .mk-onglet-badge { left: auto; right: -132px; top: 3px; }
    .mk-guide-plus { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ligne); }
    .mk-guide-plus h2 { padding: 4px 12px 6px; font-size: 15px; font-weight: 800; }
    .mk-guide-plus a.yt-guide-mat { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 12px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 500; }
    @media (hover: hover) { .mk-guide-plus a.yt-guide-mat:hover { background: var(--fond-2); } }
    .mk-guide-plus .yt-avatar { width: 26px; height: 26px; }
    .mk-guide-plus .yt-avatar svg { width: 15px; height: 15px; }
    .mk-guide-plus .yt-guide-liens { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; padding: 12px 12px 4px; border-top: 1px solid var(--ligne); font-size: 12.5px; color: var(--encre-2); }
    .mk-guide-plus .yt-guide-liens a { color: inherit; text-decoration: none; font-weight: 600; }
    @media (hover: hover) { .mk-guide-plus .yt-guide-liens a:hover { color: var(--encre); text-decoration: underline; } }
    #mk-pied { display: none; }
    .yt-grille { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    .yt-pl { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; padding: 0 16px; }
    .yt-pl-tete { position: sticky; top: calc(var(--barre) + 12px); margin: 0; padding: 20px; }
    .yt-pl .yt-escalier { margin-inline: 0; }
    .yt-pl .yt-retour { margin-inline: 0; }
    .yt-pl .yt-rangs, .yt-pl-corps > .mk-chips { padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Compléments : étagères, carnet, séance ---------- */
.yt-etagere-sous { padding: 0 14px; color: var(--encre-2); font-size: 13.5px; }
.yt-suite { margin-top: 22px; }
.yt-retour-tete { display: flex; align-items: flex-start; gap: 10px; }
.yt-retour-tete .mk-bulle { flex: 1; }
button.yt-lien { display: block; width: 100%; font: inherit; color: inherit; text-align: left; }
.yt-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.yt-pl-chat { position: absolute; left: 50%; bottom: 0; width: 96px; height: 96px; margin-left: -48px; }
.yt-pl-chat .tinson-sprite { --t: 96px; }
.yt-pl-cover > svg { fill: currentColor; shape-rendering: crispEdges; }
.mk-btn-noir[data-suivie="1"] { background: var(--fond-2); color: var(--encre); }
@media (hover: hover) { .mk-btn-noir[data-suivie="1"]:hover { background: var(--fond-3); } }
.mk-btn-noir[data-suivie="1"]:active { background: var(--fond-3); }
.yt-menu-titre + .yt-menu-liste { margin-top: 0; border-top: 0; }
@media (min-width: 900px) {
    .yt-etagere-sous { padding-inline: 16px; }
    .yt-chaine-actions { padding-left: calc(16px + 128px + 24px); }
}

/* L'onboarding (js/onboarding.js) garde sa carte de première fiche */
.mk-img { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--c1, var(--fond-2)); }
.mk-img img { width: 100%; height: 100%; object-fit: cover; }
.mk-carte-mat { display: block; color: var(--encre-2); font-size: 13px; font-weight: 600; }
