/* =====================================================================
   CHEST 2.0 — shell (app.html) : menu + barre du haut.
   Bloc 1 : copie EXACTE du <style> de CHEST-DESIGN-2.0/maquettes/Main.dc.html (aucune valeur changée).
   Bloc 2 : raccords au site (cadenas d'offre, barre de progression, grain unique, repli par .is-collapsed).
   ===================================================================== */

/* ---------- Bloc 1 : maquette ---------- */
body{margin:0;background:var(--bg-0, #050506)}
a{color:var(--ink, #f6f6f7);text-decoration:none}a:hover{color:#ffffff}
.tile{transition:border-color .2s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}
.tile:hover{border-color:rgba(var(--a2-rgb, 249, 164, 94),.32)}
.row-h:hover{background:rgba(var(--fg-rgb, 255, 255, 255),.025)}
.btn2{transition:box-shadow .2s cubic-bezier(.16,1,.3,1)}
.btn2:hover{background:linear-gradient(var(--bg-1, #0b0b0e),var(--bg-1, #0b0b0e)) padding-box,linear-gradient(135deg,var(--a1, #fc1283),var(--a2, #f9a45e)) border-box!important;box-shadow:0 8px 26px rgba(var(--a1-rgb, 252, 18, 131),.18)}
.sbT{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.sb{position:relative;z-index:3;flex:0 0 248px;max-width:248px;min-height:100vh;box-sizing:border-box;display:flex;flex-direction:column;background:rgba(var(--dk-rgb, 8, 8, 10),.86);transition:flex-basis .28s cubic-bezier(.16,1,.3,1),max-width .28s cubic-bezier(.16,1,.3,1)}
.sb::before{content:'';position:absolute;left:0;right:0;top:0;height:220px;pointer-events:none;background:radial-gradient(ellipse 90% 70% at 20% 0%,rgba(var(--a1-rgb, 252, 18, 131),.09),transparent 75%)}
.sb::after{content:'';position:absolute;top:0;bottom:0;right:0;width:1px;background:linear-gradient(180deg,transparent,rgba(var(--fg-rgb, 255, 255, 255),.1) 12%,rgba(var(--fg-rgb, 255, 255, 255),.1) 88%,transparent)}
.sb-tog{position:absolute;top:50%;right:-22px;z-index:4;width:22px;height:112px;margin-top:-56px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--ink-2, #9b9ba1)}
.sb-tog:hover{color:var(--ink, #f6f6f7)}
.sb-tog__bg{position:absolute;inset:0 0 0 -1px;width:calc(100% + 1px);height:100%;overflow:visible}
.sb-tog__bg path{fill:var(--bg-1, #070709);stroke:rgba(var(--fg-rgb, 255, 255, 255),.12);stroke-width:1px;vector-effect:non-scaling-stroke;transition:stroke .2s}
.sb-tog:hover .sb-tog__bg path{stroke:rgba(var(--fg-rgb, 255, 255, 255),.28)}
.sb-tog .chev{position:relative;margin-left:-5px;transform:rotate(180deg);transition:transform .28s cubic-bezier(.16,1,.3,1)}
.sb-brand{position:relative;display:flex;align-items:center;gap:10px;padding:20px 22px 4px;color:var(--ink, #f6f6f7);text-decoration:none;font-size:16px;font-weight:700;letter-spacing:-.02em;white-space:nowrap}
.sb-brand img{width:26px;height:26px;object-fit:contain;filter:drop-shadow(0 0 7px rgba(var(--a1-rgb, 252, 18, 131),.55))}
.sb-label{position:relative;padding:22px 26px 10px;font-size:10px;letter-spacing:.24em;text-transform:uppercase;color:var(--ink-3, #7a7a82);white-space:nowrap;overflow:hidden}
.sb-nav{position:relative;display:flex;flex-direction:column;gap:3px;padding:0 12px;flex:1}
.nav-i{position:relative;display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:12px;font-size:13.5px;font-weight:600;color:var(--ink-2, #9b9ba1);text-decoration:none;white-space:nowrap;transition:color .18s,background-color .18s,transform .16s}
.nav-i:active{transform:scale(.98)}
.nav-i .ic{flex:0 0 18px;stroke:rgba(var(--fg-rgb, 255, 255, 255),.34);transition:stroke .18s}
.nav-i:hover{background:rgba(var(--fg-rgb, 255, 255, 255),.04);color:var(--ink, #f6f6f7)}
.nav-i:hover .ic{stroke:rgba(var(--fg-rgb, 255, 255, 255),.7)}
.nav-i.on{color:var(--ink, #f6f6f7);font-weight:700;background:linear-gradient(90deg,rgba(var(--a1-rgb, 252, 18, 131),.16),rgba(var(--a2-rgb, 249, 164, 94),.05) 60%,transparent)}
.nav-i.on .ic{stroke:url(#sbg);filter:drop-shadow(0 0 6px rgba(var(--a1-rgb, 252, 18, 131),.55))}
.nav-i.on::before{content:'';position:absolute;left:-12px;top:50%;width:3px;height:18px;margin-top:-9px;border-radius:0 3px 3px 0;background:linear-gradient(180deg,var(--a1, #fc1283),var(--a2, #f9a45e));box-shadow:0 0 14px rgba(var(--a1-rgb, 252, 18, 131),.8)}
.nav-i.adm .ic{stroke:url(#sba)}
.nav-i.adm .sb-txt{background:linear-gradient(90deg,#ff8a1f,#ffd23f);-webkit-background-clip:text;background-clip:text;color:transparent}
.sb-sep{height:1px;margin:10px 6px 6px;background:linear-gradient(90deg,rgba(255,138,31,.55),rgba(255,210,63,0))}
.sb-acc{position:relative;padding:16px 18px 20px;border-top:1px solid rgba(var(--fg-rgb, 255, 255, 255),.07)}
.sb-acc__label{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-3, #7a7a82);margin-bottom:9px;white-space:nowrap}
.sb-acc__row{display:flex;align-items:center;gap:10px;margin-bottom:14px;min-width:0;color:var(--ink, #f6f6f7);text-decoration:none;border-radius:10px}
.sb-acc.on .sb-acc__row{box-shadow:0 0 0 1px rgba(var(--a2-rgb, 249, 164, 94),.45);background:rgba(var(--a1-rgb, 252, 18, 131),.08);padding:6px;margin:-6px -6px 8px}
.sb-acc__av{width:28px;height:28px;flex:0 0 28px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--a1, #fc1283),var(--a2, #f9a45e))}
.sb-acc__id{display:flex;flex-direction:column;min-width:0}
.sb-acc__id b{font-size:12.5px;line-height:1.25}
.sb-acc__id span{font-size:11px;color:var(--ink-3, #7a7a82);overflow:hidden;text-overflow:ellipsis}
.sb-out{width:100%;height:38px;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:999px;background:rgba(var(--fg-rgb, 255, 255, 255),.07);color:var(--ink-2, #9b9ba1);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;transition:background .18s,color .18s}
.sb-out:hover{background:rgba(var(--fg-rgb, 255, 255, 255),.11);color:var(--ink, #f6f6f7)}
.sbT:checked ~ .sb{flex-basis:76px;max-width:76px}
.sbT:checked ~ .sb .sb-txt{display:none}
.sbT:checked ~ .sb .sb-tog .chev{transform:none}
.sbT:checked ~ .sb .sb-brand{justify-content:center;padding:20px 0 4px}
.sbT:checked ~ .sb .sb-label{height:22px;padding:0}
.sbT:checked ~ .sb .sb-nav{padding:0 11px}
.sbT:checked ~ .sb .nav-i{justify-content:center;padding:11px 0;gap:0}
.sbT:checked ~ .sb .nav-i.on::before{left:-11px}
.sbT:checked ~ .sb .sb-acc{padding:16px 0 20px;display:flex;flex-direction:column;align-items:center;gap:12px}
.sbT:checked ~ .sb .sb-acc__row{margin:0;justify-content:center}
.sbT:checked ~ .sb .sb-out{width:38px;padding:0}
.calc-fab{position:fixed;right:28px;bottom:28px;z-index:20;width:54px;height:54px;border-radius:999px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--a1, #fc1283),var(--a2, #f9a45e));box-shadow:0 14px 40px rgba(var(--a1-rgb, 252, 18, 131),.4),inset 0 1px 0 rgba(255, 255, 255, .3);transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s}
.calc-fab:hover{transform:translateY(-2px);box-shadow:0 18px 50px rgba(var(--a1-rgb, 252, 18, 131),.55),inset 0 1px 0 rgba(255, 255, 255, .3);color:#fff}
@media (max-width:900px){.sb{flex-basis:100%!important;max-width:none!important;min-height:0!important}.sb-nav{flex-direction:row!important;flex-wrap:wrap}.hide-sm{display:none!important}.span2{grid-column:auto!important}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- Bloc 2 : raccords au site ---------- */
/* le grain de la maquette est dans le shell : on retire l'ancien grain fixe de chest-da.css */
#chestShell.c2-shell::after{ display:none !important; }
#chestShell.c2-shell > .chest-main{ height:100vh; height:100dvh; min-height:0; overflow:hidden; }
.c2-topbar{ position:relative; }
.c2-topbar a, .c2-topbar a:hover{ text-decoration:none; }
.sb-acc__row:hover{ background:rgba(var(--fg-rgb, 255, 255, 255),.03); }
.sb-out:focus-visible, .nav-i:focus-visible, .sb-tog:focus-visible, .sb-acc__row:focus-visible{ outline:2px solid rgba(var(--a1-rgb, 252, 18, 131),.6); outline-offset:2px; }
#c2Bell:hover, #c2Bell[aria-expanded="true"]{ color:var(--ink, #f6f6f7); border-color:rgba(var(--fg-rgb, 255, 255, 255),.16) !important; }
#c2Bell:focus-visible, #c2SearchInput:focus-visible{ outline:2px solid rgba(var(--a1-rgb, 252, 18, 131),.6); outline-offset:2px; }
.c2-search label:focus-within{ border-color:rgba(var(--a1-rgb, 252, 18, 131),.55) !important; box-shadow:0 0 0 3px rgba(var(--a1-rgb, 252, 18, 131),.15); }
/* cadenas School / BERICH hors Premium (même règle que l'ancien menu) */
html.plan-no-school .nav-i[data-page="school"]::after,
html.plan-no-berich .nav-i[data-page="berich"]::after{
  content:''; flex-shrink:0; width:12px; height:12px; margin-left:auto; background:currentColor; opacity:.5;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat;
}
.sbT:checked ~ .sb .nav-i::after{ display:none; }
/* le menu mobile de l'ancien shell n'existe plus : la maquette pose le menu en haut sous 900 px */
#chestShell.c2-shell .chest-sidebar-overlay{ display:none; }
@media (max-width:900px){ #chestShell.c2-shell > .chest-main{ height:auto; min-height:100vh; overflow:visible; } #chestShell.c2-shell .chest-view{ height:100vh; } }
/* la maquette garde l'interligne par défaut du navigateur (normal) : l'ancien CSS du site en imposait un plus grand */
#chestShell.c2-shell{ line-height:normal; }
/* un élément réservé (Admin, HQ, Espace éducateur) reste caché malgré son display en ligne */
#chestShell.c2-shell [hidden]{ display:none !important; }
/* l'ancienne règle « label » du site (marge basse) agrandissait la barre : neutralisée */
#chestShell.c2-shell .c2-search label{ margin:0; }
#chestShell.c2-shell .c2-topbar .chest-progress{ position:absolute; left:0; bottom:-1px; }
#chestShell.c2-shell .c2-search label{ font-weight:400; font-size:inherit; }

/* ===== Téléphone : l'app comme une application (2026-11-03) =====
   Barre du haut compacte (logo, page en cours, actions), contenu sur toute la hauteur,
   et le menu devient une barre d'onglets fixe en bas (icône + nom court), comme une app native. */
.c2-mbrand{ display:none; }
@media (max-width:900px){
  #chestShell.c2-shell{ display:block !important; min-height:0 !important; }
  #chestShell.c2-shell > .sb{ position:fixed !important; left:0; right:0; bottom:0; top:auto; z-index:60; flex:none !important; max-width:none !important; min-height:0 !important;
    height:calc(64px + env(safe-area-inset-bottom)); padding:0 6px env(safe-area-inset-bottom); flex-direction:row; align-items:stretch;
    background:rgba(var(--dk-rgb, 8, 8, 10),.94); -webkit-backdrop-filter:blur(20px) saturate(1.2); backdrop-filter:blur(20px) saturate(1.2); border-top:1px solid rgba(var(--fg-rgb, 255, 255, 255),.08); box-shadow:0 -12px 40px rgba(0, 0, 0, calc(.45 * var(--sh-k, 1))); }
  #chestShell.c2-shell > .sb > :not(.sb-nav){ display:none !important; }
  #chestShell.c2-shell .sb-nav{ flex:1; flex-direction:row !important; flex-wrap:nowrap !important; align-items:stretch; justify-content:space-between; gap:2px; margin:0 !important; padding:6px 0 !important;
    overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  #chestShell.c2-shell .sb-nav::-webkit-scrollbar{ display:none; }
  #chestShell.c2-shell .sb-nav .sb-sep{ display:none !important; }
  #chestShell.c2-shell .sb-nav .nav-i{ flex:1 0 50px; flex-direction:column; justify-content:center; gap:4px; padding:6px 2px !important; border-radius:12px; font-size:10px; font-weight:600; letter-spacing:-.01em;
    -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
  #chestShell.c2-shell .sb-nav .nav-i .sb-txt{ display:block !important; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
  #chestShell.c2-shell .sb-nav .nav-i .ic{ flex:none; width:20px; height:20px; }
  #chestShell.c2-shell .sb-nav .nav-i.on{ background:linear-gradient(180deg, rgba(var(--a1-rgb, 252, 18, 131),.16), rgba(var(--a2-rgb, 249, 164, 94),.04)); }
  #chestShell.c2-shell .sb-nav .nav-i.on::before{ left:50%; top:-6px; width:22px; height:3px; margin:0 0 0 -11px; border-radius:0 0 3px 3px; }
  #chestShell.c2-shell .sb-nav .nav-i:active{ transform:scale(.95); }
  .chest-sidebar-overlay{ display:none !important; }

  #chestShell.c2-shell > .chest-main{ height:100vh !important; height:100dvh !important; overflow:hidden !important; padding-bottom:calc(64px + env(safe-area-inset-bottom)); box-sizing:border-box; }
  #chestShell.c2-shell .chest-view{ flex:1 1 auto; height:auto !important; min-height:0; }
  #chestShell.c2-shell .c2-topbar{ min-height:54px !important; padding:6px 14px !important; padding-top:max(6px, env(safe-area-inset-top)) !important; gap:10px !important; flex-wrap:nowrap !important; }
  .c2-mbrand{ display:grid; place-items:center; flex:none; width:32px; height:32px; border-radius:10px; }
  .c2-mbrand img{ width:24px; height:24px; filter:drop-shadow(0 0 7px rgba(var(--a1-rgb, 252, 18, 131),.5)); }
  #chestShell.c2-shell #crumbCat, #chestShell.c2-shell #crumb > span:nth-child(2){ display:none; }
  #chestShell.c2-shell #crumbPage{ font-size:15px; font-weight:700; letter-spacing:-.02em; white-space:nowrap; }
  #chestShell.c2-shell .c2-search{ display:none !important; }
  #chestShell.c2-shell .c2-topbar > div:last-of-type{ flex-wrap:nowrap !important; min-width:0; }
  #chestShell.c2-shell #c2PageActions{ flex-wrap:nowrap !important; overflow-x:auto; max-width:calc(100vw - 170px); scrollbar-width:none; }
  #chestShell.c2-shell #c2PageActions::-webkit-scrollbar{ display:none; }
  #chestShell.c2-shell #c2PageActions > *{ flex:none; }
  #chestShell.c2-shell .c2-topbar a[data-page="account"], #chestShell.c2-shell #chestHq{ width:34px !important; height:34px !important; }
  #chestShell.c2-shell .c2-topbar a[data-educator-only]{ height:34px !important; padding:0 10px !important; font-size:0 !important; gap:0 !important; }
  #chestShell.c2-shell .c2-topbar a[data-educator-only] svg{ width:16px; height:16px; }
}
@media (max-width:900px) and (prefers-reduced-motion:reduce){ #chestShell.c2-shell .sb-nav .nav-i:active{ transform:none; } }
@media (max-width:900px){
  #chestShell.c2-shell .c2-topbar > div[style*="margin-left: auto"]{ flex-wrap:nowrap !important; min-width:0; gap:8px !important; }
  #chestShell.c2-shell #c2PageActions{ max-width:calc(100vw - 190px); }
  #chestShell.c2-shell #crumb{ min-width:0; flex:0 1 auto; overflow:hidden; }
  #chestShell.c2-shell #crumbPage{ overflow:hidden; text-overflow:ellipsis; }
}
@media (max-width:900px){ #chestShell.c2-shell > .chest-main{ width:100% !important; max-width:100vw !important; min-width:0 !important; } #chestShell.c2-shell .c2-topbar{ max-width:100vw; overflow:hidden; } }
/* Corrections iPhone (2026-11-03) */
@media (max-width:900px){
  /* le bloc des dégradés d'icônes doit rester rendu (sinon l'icône active est vide) */
  #chestShell.c2-shell > .sb > svg{ display:block !important; position:absolute; width:0; height:0; }
  /* barre d'onglets : plus de défilement horizontal (un tap ne passe plus pour un glissement), cibles plus grandes */
  #chestShell.c2-shell .sb-nav{ overflow:hidden !important; gap:0 !important; padding:4px 0 !important; }
  #chestShell.c2-shell .sb-nav .nav-i{ flex:1 1 0 !important; min-width:0; height:56px; padding:6px 0 !important; font-size:9.5px; transition:background-color .15s, color .15s; }
  #chestShell.c2-shell .sb-nav .nav-i .ic{ width:22px; height:22px; }
  #chestShell.c2-shell .sb-nav .nav-i.on .ic{ stroke:#fc5c8f !important; filter:drop-shadow(0 0 6px rgba(var(--a1-rgb, 252, 18, 131),.6)); }
  #chestShell.c2-shell .sb-nav .nav-i:hover{ background:none; color:var(--ink-2, #9b9ba1); }
  #chestShell.c2-shell .sb-nav .nav-i.on, #chestShell.c2-shell .sb-nav .nav-i.on:hover{ color:var(--ink, #f6f6f7); background:linear-gradient(180deg, rgba(var(--a1-rgb, 252, 18, 131),.16), rgba(var(--a2-rgb, 249, 164, 94),.04)); }
  /* défilement : si iPhone agrandit le cadre à toute la page, c'est le conteneur qui défile */
  /* HQ ouvre l'application du bureau : inutile sur téléphone */
  #chestShell.c2-shell #chestHq{ display:none !important; }
}
@media (max-width:900px){ #chestShell.c2-shell .sb-nav .nav-i{ font-size:9px; letter-spacing:-.02em; } #chestShell.c2-shell .sb-nav .nav-i .sb-txt{ padding:0 1px; } }
@media (max-width:430px){ #chestShell.c2-shell .sb-nav .nav-i{ font-size:8.5px; letter-spacing:-.035em; } #chestShell.c2-shell .sb-nav .nav-i .sb-txt{ padding:0; } }
/* iPhone : la barre d'onglets passe au-dessus de la barre blanche (indicateur d'accueil) — viewport-fit=cover dans app.html */
@media (max-width:900px){
  #chestShell.c2-shell > .sb{ height:calc(64px + max(env(safe-area-inset-bottom), 14px)) !important; padding-bottom:max(env(safe-area-inset-bottom), 14px) !important; }
  #chestShell.c2-shell > .chest-main{ padding-bottom:calc(64px + max(env(safe-area-inset-bottom), 14px)) !important; }
  #chestShell.c2-shell .c2-topbar{ padding-left:max(14px, env(safe-area-inset-left)) !important; padding-right:max(14px, env(safe-area-inset-right)) !important; }
}
/* Téléphone : affichage natif à 100 % plein écran, centré, sans zoom ni bande blanche (Safari iOS & Android). */
@media (max-width:900px){
  html.is-shell, html.is-shell body{ background:var(--bg-0, #050505); color-scheme:dark; overflow-x:hidden !important; width:100% !important; max-width:100vw !important; zoom:1 !important; }
  html.is-shell[data-mode="light"], html.is-shell[data-mode="light"] body{ color-scheme:light; }
  html.is-embedded, html.is-embedded body{ overflow-x:hidden; width:100%; max-width:100%; scrollbar-width:none; zoom:1 !important; }
  html.is-embedded::-webkit-scrollbar, html.is-embedded body::-webkit-scrollbar{ display:none; width:0; height:0; }
  #chestShell.c2-shell .chest-view{ overflow:hidden; background:transparent; width:100% !important; }
  #chestShell.c2-shell .chest-view iframe{ position:absolute; inset:0 !important; left:0; top:0; width:100% !important; height:100% !important; transform:none !important; background:transparent !important; color-scheme:inherit; }
  #chestShell.c2-shell.is-navigating .chest-view iframe, .chest-shell.is-navigating .chest-view iframe{ transform:translateY(6px) !important; }
}
/* Admin (2026-11-04) : onglets dans la barre du haut ; sur un écran étroit, « en ligne » ne garde que le chiffre */
@media (max-width:1380px){ #c2PageActions .am2t-lbl{ display:none; } #c2PageActions [data-am2-view]{ padding:0 8px !important; } }

/* Écran de chargement (2026-11-08) : toute la zone de la page (barre du haut et menu restent visibles), mini-jeu de course. Un petit personnage en pixels court sur la
   ligne du marché et saute par-dessus des bougies, le logo CHEST en grand derrière. Tout en CSS (aucune boucle JS),
   n'apparaît qu'après 0,32 s : une page rapide ne le montre jamais. Cycle des bougies 1,6 s (deux bougies décalées de
   0,8 s) ; le saut (0,8 s) culmine quand une bougie passe sous le coureur. */
.chest-loader{ position:absolute; inset:0; z-index:30; display:grid; place-items:center; pointer-events:none; overflow:hidden;
  background:radial-gradient(60% 50% at 50% 46%, rgba(var(--a1-rgb, 252, 18, 131),.10), transparent 70%), var(--bg-0, #050505);
  opacity:0; visibility:hidden; transition:opacity .18s ease, visibility 0s linear .18s; }
.chest-shell.is-navigating .chest-loader{ opacity:1; visibility:visible; transition:opacity .3s cubic-bezier(.16,1,.3,1) .32s, visibility 0s linear .32s; }
.chest-loader .cl{ position:absolute; left:50%; top:50%; transform:translate(-50%, -50%) scale(var(--cl-s, 1)); width:620px; display:flex; flex-direction:column; align-items:center; gap:28px; }
.chest-loader .cl-logo{ position:absolute; left:50%; top:50%; width:min(380px, 70vw); aspect-ratio:1; transform:translate(-50%, -58%); pointer-events:none;
  background:url("../assets/icon-512.png") center/contain no-repeat; opacity:.13; filter:blur(1px) saturate(1.2);
  -webkit-mask-image:radial-gradient(closest-side, #000 55%, transparent); mask-image:radial-gradient(closest-side, #000 55%, transparent);
  animation:clFloat 3.2s ease-in-out infinite; }
.chest-loader .cl-logo::after{ content:""; position:absolute; inset:-20%; background:radial-gradient(closest-side, rgba(var(--a1-rgb, 252, 18, 131),.5), rgba(var(--a2-rgb, 249, 164, 94),.18) 55%, transparent 75%); filter:blur(30px); z-index:-1; }
.chest-loader .cl-stage{ position:relative; width:100%; height:150px; overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image:linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.chest-loader .cl-ground{ position:absolute; left:0; right:0; bottom:22px; height:2px;
  background:repeating-linear-gradient(90deg, rgba(var(--fg-rgb, 255, 255, 255),.38) 0 14px, transparent 14px 22px); animation:clGround .4s linear infinite; }
.chest-loader .cl-ground::after{ content:""; position:absolute; left:0; right:0; top:8px; height:1px;
  background:repeating-linear-gradient(90deg, rgba(var(--fg-rgb, 255, 255, 255),.12) 0 3px, transparent 3px 41px); animation:clGround .8s linear infinite; }
.chest-loader .cl-run{ position:absolute; left:16%; bottom:24px; width:36px; height:42px; animation:clJump .8s infinite; }
.chest-loader .cl-run svg{ display:block; width:100%; height:100%; shape-rendering:crispEdges; filter:drop-shadow(0 0 10px rgba(var(--a1-rgb, 252, 18, 131),.55)); }
.chest-loader .cl-run .f2{ animation:clStep .2s steps(1) infinite; }
.chest-loader .cl-run .f1{ animation:clStep .2s steps(1) infinite reverse; }
.chest-loader .cl-shadow{ position:absolute; left:calc(16% + 3px); bottom:19px; width:30px; height:5px; border-radius:50%; background:rgba(0, 0, 0, calc(.6 * var(--sh-k, 1))); animation:clShadow .8s infinite; }
.chest-loader .cl-candle{ position:absolute; bottom:24px; left:100%; width:12px; animation:clCandle 1.6s linear infinite; }
.chest-loader .cl-candle i{ position:absolute; left:5px; width:2px; top:-8px; bottom:-6px; border-radius:1px; background:currentColor; opacity:.7; }
.chest-loader .cl-candle b{ position:relative; display:block; width:12px; border-radius:2px; background:currentColor; box-shadow:0 0 14px currentColor; }
.chest-loader .cl-candle.c1{ color:var(--green, #33e6a6); } .chest-loader .cl-candle.c1 b{ height:30px; }
.chest-loader .cl-candle.c2{ color:var(--red, #ff4d5e); animation-delay:-.8s; } .chest-loader .cl-candle.c2 b{ height:22px; }
.chest-loader .cl-score{ position:absolute; right:10%; top:10px; font-size:12px; font-weight:600; letter-spacing:.08em; color:var(--ink-4, #5c5c63); font-variant-numeric:tabular-nums; }
.chest-loader .cl-score::before{ content:"HI "; color:#3a3a40; }
.chest-loader .cl-txt{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.chest-loader .cl-name{ font-size:26px; font-weight:650; letter-spacing:-.03em; line-height:1;
  background:linear-gradient(100deg, var(--ink-2, #9b9ba1) 0%, var(--ink-2, #9b9ba1) 38%, #ffffff 50%, var(--ink-2, #9b9ba1) 62%, var(--ink-2, #9b9ba1) 100%); background-size:240% 100%;
  -webkit-background-clip:text; background-clip:text; color:transparent; animation:clShine 1.6s ease-in-out infinite; }
.chest-loader .cl-sub{ font-size:12px; color:var(--ink-4, #5c5c63); }
.chest-loader .cl-bar{ width:120px; height:2px; border-radius:2px; overflow:hidden; background:rgba(var(--fg-rgb, 255, 255, 255),.08); }
.chest-loader .cl-bar::after{ content:""; display:block; width:40%; height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--a1, #fc1283), var(--a2, #f9a45e)); animation:clBar 1s cubic-bezier(.65,0,.35,1) infinite; }
@keyframes clFloat{ 0%,100%{ transform:translate(-50%, -58%) scale(1); } 50%{ transform:translate(-50%, -61%) scale(1.02); } }
@keyframes clGround{ to{ background-position:-22px 0; } }
@keyframes clCandle{ from{ transform:translateX(0); } to{ transform:translateX(-660px); } }
@media (max-width:700px){ .chest-loader .cl{ --cl-s:.56; } }
@keyframes clJump{ 0%,32%,76%,100%{ transform:translateY(0); animation-timing-function:cubic-bezier(.2,.7,.3,1); }
  54%{ transform:translateY(-58px); animation-timing-function:cubic-bezier(.6,0,.8,.4); } }
@keyframes clShadow{ 0%,32%,76%,100%{ transform:scale(1); opacity:1; } 54%{ transform:scale(.45); opacity:.35; } }
@keyframes clStep{ 0%{ opacity:1; } 50%{ opacity:0; } }
@keyframes clShine{ 0%{ background-position:100% 0; } 100%{ background-position:0 0; } }
@keyframes clBar{ 0%{ transform:translateX(-110%); } 100%{ transform:translateX(260%); } }
@media (prefers-reduced-motion: reduce){
  .chest-loader *, .chest-loader *::before, .chest-loader *::after{ animation:none !important; }
  .chest-loader .cl-name{ color:var(--ink, #f6f6f7); background:none; }
  .chest-loader .cl-candle{ display:none; }
}
/* Pastille « +N » des nouvelles IDEA sur School (js/idea-badge.js) */
.nav-i .idea-badge{ margin-left:auto; min-width:24px; height:18px; padding:0 6px; border-radius:999px; display:inline-grid; place-items:center; font-style:normal; font-size:10.5px; font-weight:700; color:var(--bg-0, #050505);
  background:linear-gradient(135deg,var(--a1, #fc1283),var(--a2, #f9a45e)); box-shadow:0 0 14px rgba(var(--a1-rgb, 252, 18, 131),.45); font-variant-numeric:tabular-nums; }
.sbT:checked ~ .sb .nav-i .idea-badge{ position:absolute; top:3px; right:6px; margin:0; min-width:18px; height:15px; padding:0 4px; font-size:9px; }
@media (max-width:900px){ #chestShell.c2-shell .sb-nav .nav-i .idea-badge{ position:absolute; top:3px; right:6px; margin:0; min-width:18px; height:15px; padding:0 4px; font-size:9px; } }
.sb-acc__av.has-photo{ background-size:cover !important; background-position:center !important; color:transparent !important; font-size:0; }

/* Graphique agrandi dans une page (2026-11-10, js/chart-tools.js) : la coque laisse tout l'écran au cadre */
html.is-immersive, html.is-immersive body{ overflow:hidden !important; }
html.is-immersive #chestShell > .sb, html.is-immersive #chestShell .c2-topbar, html.is-immersive #chestShell .chest-topbar{ display:none !important; }
html.is-immersive #chestShell .chest-view{ position:fixed !important; inset:0 !important; z-index:2147483000; height:auto !important; }
html.is-immersive #chestShell .chest-view iframe{ position:absolute; inset:0; width:100% !important; height:100% !important; transform:none !important; }
