/* Espace client et « livres en cours » (mon-espace, my-account, panier, my-books).
   Mobile d'abord, gouttière de 16 px. Variables de la charte : iev.css / histoires.css. */
.esp{min-height:calc(100vh - 330px);max-width:760px;margin:0 auto;padding:28px 16px 64px}
.esp h1{font-size:clamp(30px,6vw,44px);margin:0 0 8px}
.esp .intro{color:var(--sub);margin:0 0 22px}
.esp-carte{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:22px 18px;
  box-shadow:0 10px 30px color-mix(in srgb,var(--brand) 8%,transparent)}
.esp label{display:block;font-weight:800;margin:0 0 6px}
.esp input[type=email],.esp input[type=text]{width:100%;font:inherit;font-size:17px;padding:14px 16px;
  border:2px solid var(--line);border-radius:14px;background:#fff;color:var(--ink)}
.esp input:focus{outline:none;border-color:var(--brand)}
.esp input.code{font-size:30px;letter-spacing:.4em;text-align:center;font-weight:800;font-family:"Baloo 2",system-ui,sans-serif}
.esp .btn{width:100%;margin-top:14px}
.esp .btn:disabled{opacity:.6;cursor:default;transform:none}
.esp .lien{background:none;border:0;padding:6px 0;font:inherit;font-weight:700;color:var(--brand);cursor:pointer;text-decoration:underline}
.esp .msg{margin:12px 0 0;font-size:15px;color:var(--sub)}
.esp .msg.erreur{color:#B3261E;font-weight:700}
.esp .rgpd{margin:18px 0 0;font-size:13px;color:var(--sub)}
.esp[hidden],.esp [hidden]{display:none!important}
.esp-entete{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.esp-entete .qui{color:var(--sub);font-size:14px;margin:0;overflow-wrap:anywhere}

/* --- cartes de commande --- */
.cmd{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:18px 16px;margin:0 0 18px;
  box-shadow:0 10px 30px color-mix(in srgb,var(--brand) 8%,transparent)}
.cmd-tete{display:flex;gap:14px;align-items:flex-start}
.cmd-couv{width:72px;height:72px;border-radius:12px;object-fit:cover;flex:none;background:var(--line)}
.cmd h2{font-size:21px;margin:0 0 2px}
.cmd .meta{margin:0;color:var(--sub);font-size:14px}
.cmd .puce{display:inline-block;margin-top:8px;padding:3px 12px;border-radius:99px;font-size:13px;font-weight:800;
  background:color-mix(in srgb,var(--brand) 12%,#fff);color:var(--brand)}
.cmd .puce.ok{background:#E6F6EC;color:#1E7A45}
.frise{list-style:none;margin:18px 0 6px;padding:0}
.frise li{position:relative;display:flex;gap:12px;padding:0 0 16px;font-size:15px;color:var(--sub)}
.frise li:last-child{padding-bottom:0}
.frise li::before{content:"";position:absolute;left:11px;top:24px;bottom:0;width:2px;background:var(--line)}
.frise li:last-child::before{display:none}
.frise li.fait::before{background:#2FA566}
.pastille{flex:none;width:24px;height:24px;border-radius:50%;border:2px solid var(--line);background:#fff;
  display:grid;place-items:center;font-size:13px;line-height:1;color:#fff;font-weight:800}
.frise li.fait .pastille{background:#2FA566;border-color:#2FA566}
.frise li.fait{color:var(--ink);font-weight:700}
.frise.seul li{flex-direction:row;text-align:left}.frise.seul{display:block}.frise.seul li::before{display:none}
.frise .quand{display:block;font-weight:400;font-size:13px;color:var(--sub)}
.frise .suivi{display:block;font-weight:400;font-size:13px;overflow-wrap:anywhere}
.cmd-actions{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.cmd-actions .btn{margin-top:0;font-size:16px;padding:14px 20px}
.cmd .prevue{margin:10px 0 0;font-size:14px;color:var(--sub)}
.vide{text-align:center;padding:30px 12px}
@media (min-width:720px){
  .esp{padding-top:44px}
  .esp-carte{padding:28px 28px}
  .cmd{padding:22px 24px}
  .cmd-couv{width:92px;height:92px}
  .frise{display:grid;grid-template-columns:repeat(var(--n,4),1fr);gap:6px}
  .frise li{flex-direction:column;align-items:center;text-align:center;padding:0;font-size:13.5px;gap:8px}
  .frise li::before{left:calc(50% + 14px);right:calc(-50% + 14px);top:11px;bottom:auto;width:auto;height:2px}
  .frise li:last-child::before{display:none}
  .cmd-actions{flex-direction:row;flex-wrap:wrap}
  .cmd-actions .btn{width:auto}
}

/* --- icônes de l'en-tête (injectées par js/entete-compte.js) --- */
.nav-compte{display:flex;align-items:center;gap:4px;margin-left:4px}
.nav-compte a{position:relative;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:var(--ink)}
.nav-compte a:hover{background:color-mix(in srgb,var(--brand) 10%,transparent)}
.nav-compte svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-compte .pastille-nb{position:absolute;top:3px;right:2px;min-width:18px;height:18px;padding:0 5px;border-radius:99px;
  background:var(--brand);color:#fff;font-size:11px;font-weight:800;line-height:18px;text-align:center}
@media(max-width:820px){header.site .nav{gap:8px}.nav-compte{margin-left:0}.nav-compte a{width:40px;height:40px}}
/* Petits écrans : le bouton ne se replie plus sur 3 lignes, les icônes restent à l'écran (gouttière 16 px). */
@media(max-width:520px){
  header.site .nav.wrap{padding:0 16px;gap:6px}
  header.site .logo{font-size:19px;gap:8px}
  header.site .logo .cube{width:34px;height:34px;font-size:13px;border-radius:10px}
  header.site .nav-liens .btn.petit{white-space:nowrap;padding:9px 14px;font-size:13.5px}
  header.site .nav-compte{gap:0}header.site .nav-compte a{width:36px;height:36px}header.site .nav-compte svg{width:22px;height:22px}
  .nav-compte .pastille-nb{top:1px;right:-1px}
}

/* --- bouton Menu + tiroir --- */
.nav-compte .nav-menu-btn{display:flex;align-items:center;gap:8px;height:44px;padding:0 14px 0 10px;border:0;border-radius:99px;
  background:none;color:var(--ink);font:inherit;font-weight:700;font-size:15px;cursor:pointer}
.nav-compte .nav-menu-btn:hover{background:color-mix(in srgb,var(--brand) 10%,transparent)}
.mt-fond{position:fixed;inset:0;z-index:90;background:rgba(30,20,50,.45);opacity:0;transition:opacity .2s}
.mt-fond.on{opacity:1}
.mt-tiroir{position:fixed;top:0;right:0;bottom:0;z-index:91;width:min(400px,88vw);display:flex;flex-direction:column;
  background:var(--surface);color:var(--ink);box-shadow:-12px 0 40px rgba(30,20,50,.18);transform:translateX(100%);transition:transform .22s ease}
.mt-tiroir.on{transform:none}
.mt-tete{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;border-bottom:1px solid var(--line);
  font-family:"Baloo 2",system-ui,sans-serif;font-size:20px}
.mt-x{width:44px;height:44px;border:0;border-radius:50%;background:none;font-size:30px;line-height:1;color:var(--ink);cursor:pointer}
.mt-x:hover{background:color-mix(in srgb,var(--brand) 10%,transparent)}
.mt-corps{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:6px 18px 18px}
.mt-sec{padding:14px 0 6px;border-bottom:1px solid var(--line)}
.mt-sec:last-child{border-bottom:0}
.mt-sec h3{margin:0 0 6px;font-family:"Baloo 2",system-ui,sans-serif;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--sub)}
.mt-sec h3 a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.mt-sec ul{list-style:none;margin:0;padding:0}
.mt-sec li a{display:block;padding:9px 0;font-weight:700;font-size:16px;color:var(--ink)}
.mt-sec li a:hover{color:var(--brand)}
.mt-pied{padding:14px 18px;border-top:1px solid var(--line)}
.mt-pied .btn{display:block;text-align:center}
.nav-compte .nav-menu-btn:focus-visible,.mt-tiroir a:focus-visible,.mt-x:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
@media(max-width:820px){.nav-compte .nav-menu-btn{width:40px;padding:0;justify-content:center}.nav-compte .nav-menu-btn span{display:none}}
@media(max-width:520px){header.site .nav-compte .nav-menu-btn{width:36px;height:36px}}
@media(prefers-reduced-motion:reduce){.mt-tiroir,.mt-fond{transition:none}}
@media(max-width:440px){
  header.site .nav.wrap{padding:0 10px;gap:4px}
  header.site .logo{font-size:17px;gap:6px}
  header.site .logo .cube{width:30px;height:30px;font-size:11px;border-radius:9px}
  header.site .nav-liens .btn.petit{padding:8px 11px;font-size:13px}
  header.site .nav-compte a,header.site .nav-compte .nav-menu-btn{width:34px;height:34px}
}
@media(max-width:440px){html[lang=en] header.site .nav-liens .btn.petit{display:none}}

/* Tiroir par univers et par âge */
.mt-ages{display:flex;flex-wrap:wrap;gap:8px;padding:14px 0 6px}
.mt-ages a{flex:1 1 auto;text-align:center;padding:10px 12px;border-radius:99px;font-weight:800;font-size:15px;color:var(--brand);
  background:color-mix(in srgb,var(--brand) 10%,#fff);border:1px solid color-mix(in srgb,var(--brand) 22%,#fff);white-space:nowrap}
.mt-ages a:hover{background:var(--brand);color:#fff}
.mt-uni{padding:14px 0 8px;border-bottom:1px solid var(--line)}
.mt-uni h3{margin:0 0 10px;font-family:"Baloo 2",system-ui,sans-serif;font-size:19px;line-height:1.2}
.mt-uni h3 a{color:var(--ink)}
.mt-uni h3 a::after{content:" \203A";color:var(--brand)}
.mt-rang{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mt-rang li{display:flex}
.mt-liv{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;color:var(--ink);min-width:0;width:100%;padding:4px 0;border-radius:12px}
.mt-liv .mt-badge{margin-top:auto}
.mt-nom{min-height:2.4em}
.mt-couv{display:block;width:64px;height:64px;border-radius:14px;overflow:hidden;background:var(--line);box-shadow:0 3px 10px rgba(30,20,50,.14)}
.mt-couv img{display:block;width:100%;height:100%;object-fit:cover}
.mt-nom{font-weight:700;font-size:13px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%}
.mt-badge{font-size:10.5px;font-weight:800;line-height:1;padding:3px 7px;border-radius:99px;white-space:nowrap}
.mt-badge.avec{background:color-mix(in srgb,var(--brand) 14%,#fff);color:var(--brand)}
.mt-badge.sans{background:#F1EEF6;color:var(--sub)}
.mt-liv:hover .mt-nom{color:var(--brand)}
.mt-tous{margin:0;padding:12px 0 4px}.mt-tous a{font-weight:800;color:var(--brand);text-decoration:underline;text-underline-offset:3px}
.mt-bas{display:grid;gap:2px;padding:12px 0 2px;border-top:1px solid var(--line);margin-top:10px}
.mt-bas a{display:flex;align-items:center;gap:12px;padding:10px 4px;font-weight:700;font-size:16px;color:var(--ink);border-radius:12px}
.mt-bas a:hover{color:var(--brand)}
.mt-bas svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--brand)}
@media(max-width:340px){.mt-rang{grid-template-columns:repeat(2,minmax(0,1fr))}}
