/* Studio Social · Atelier de Marshall (js/studio-atelier.js)
   Ordinateur seulement : toutes les règles sont sous html:not([data-device="mobile"]) et le script ne démarre pas au-dessous de 760 px. */
html:not([data-device="mobile"]) {
  --at-or:#F3852B; --at-orf:#af560c; --at-pale:#fff3e6; --at-creme:#fffaf4; --at-trait:#f0dcc6;
  --at-encre:#3b2a1c; --at-doux:#7f6b5a; --at-bleu:#6EC1F0; --at-vert:#1f7a43; --at-rouge:#c12f2f;
}

/* ---------- Barre d'outils sous la légende ---------- */
html:not([data-device="mobile"]) .at-barre{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0 4px}
html:not([data-device="mobile"]) .at-barre .at-lbl{font:700 11.5px 'Fredoka',system-ui,sans-serif;color:var(--at-doux);text-transform:uppercase;letter-spacing:.06em;margin-right:2px}
html:not([data-device="mobile"]) .at-chip{border:1px solid var(--at-trait);background:#fff;color:var(--at-orf);border-radius:999px;padding:4px 10px;font:600 12.5px 'Fredoka',system-ui,sans-serif;cursor:pointer;white-space:nowrap;line-height:1.2}
html:not([data-device="mobile"]) .at-chip:hover{background:var(--at-pale)}
html:not([data-device="mobile"]) .at-chip:focus-visible,html:not([data-device="mobile"]) .at-btn:focus-visible{outline:2px solid var(--at-or);outline-offset:2px}
html:not([data-device="mobile"]) .at-infos{display:flex;flex-wrap:wrap;gap:4px 14px;font:600 12px 'Nunito',system-ui,sans-serif;color:var(--at-doux);margin:2px 0 4px}
html:not([data-device="mobile"]) .at-infos b{color:var(--at-encre)}
html:not([data-device="mobile"]) .at-infos .at-alerte{color:var(--at-rouge)}
html:not([data-device="mobile"]) .at-accroche{margin:4px 0;padding:8px 10px;border-radius:10px;background:#f6f9fb;border:1px solid #e3ebf0;font:500 13px 'Nunito',system-ui,sans-serif;color:#3a4249;white-space:pre-wrap}
html:not([data-device="mobile"]) .at-accroche small{display:block;font-weight:800;font-size:11px;color:#7a8a96;text-transform:uppercase;letter-spacing:.05em;margin-bottom:3px}
html:not([data-device="mobile"]) .at-accroche i{color:#9aa7b1;font-style:normal}
html:not([data-device="mobile"]) .at-emojis{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
html:not([data-device="mobile"]) .at-emojis button{border:1px solid var(--at-trait);background:#fff;border-radius:8px;padding:2px 6px;font-size:16px;cursor:pointer}
html:not([data-device="mobile"]) .at-pop{position:absolute;z-index:9000;background:#fff;border:1px solid var(--at-trait);border-radius:14px;box-shadow:0 14px 40px rgba(60,30,0,.18);padding:10px;min-width:220px;max-width:340px;font:600 13px 'Nunito',system-ui,sans-serif;color:var(--at-encre)}
html:not([data-device="mobile"]) .at-pop button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:7px 9px;border-radius:9px;font:inherit;color:inherit;cursor:pointer}
html:not([data-device="mobile"]) .at-pop button:hover{background:var(--at-pale)}
html:not([data-device="mobile"]) .at-pop h4{margin:2px 4px 6px;font:700 12px 'Fredoka',system-ui,sans-serif;color:var(--at-doux);text-transform:uppercase;letter-spacing:.05em}
html:not([data-device="mobile"]) .at-pop small{display:block;color:var(--at-doux);font-weight:600}

/* ---------- Bouton flottant + panneau ---------- */
html:not([data-device="mobile"]) .at-lanceur{position:fixed;right:22px;bottom:122px;z-index:8000;display:flex;align-items:center;gap:8px;border:0;border-radius:999px;padding:10px 16px 10px 10px;background:linear-gradient(180deg,#ff9c46,#f3852b);color:#fff;font:700 15px 'Fredoka',system-ui,sans-serif;box-shadow:0 10px 26px rgba(199,98,14,.4);cursor:pointer}
html:not([data-device="mobile"]) .at-lanceur img{width:30px;height:30px;border-radius:50%;background:#fff;object-fit:cover;object-position:50% 12%}
html:not([data-device="mobile"]) .at-lanceur .at-pastille{background:#fff;color:var(--at-orf);border-radius:999px;font-size:11px;padding:1px 7px}
html:not([data-device="mobile"]) .at-panneau{position:fixed;top:0;right:0;bottom:0;z-index:8500;width:min(460px,92vw);background:var(--at-creme);box-shadow:-14px 0 40px rgba(60,30,0,.2);display:flex;flex-direction:column;font:500 14px 'Nunito',system-ui,sans-serif;color:var(--at-encre);transform:translateX(105%);transition:transform .25s ease}
html:not([data-device="mobile"]) .at-panneau.on{transform:none}
html:not([data-device="mobile"]) .at-tete{display:flex;align-items:center;gap:10px;padding:16px 18px 10px;background:linear-gradient(180deg,#ff9c46,#f3852b);color:#fff}
html:not([data-device="mobile"]) .at-tete img{width:40px;height:40px;border-radius:50%;background:#fff;object-fit:cover;object-position:50% 12%}
html:not([data-device="mobile"]) .at-tete h2{margin:0;font:700 20px 'Fredoka',system-ui,sans-serif}
html:not([data-device="mobile"]) .at-tete p{margin:0;font-size:12.5px;opacity:.95}
html:not([data-device="mobile"]) .at-fermer{margin-left:auto;border:0;background:rgba(255,255,255,.25);color:#fff;width:34px;height:34px;border-radius:50%;font-size:20px;cursor:pointer}
html:not([data-device="mobile"]) .at-onglets{display:flex;gap:4px;padding:0 12px;background:linear-gradient(180deg,#f3852b,#f3852b)}
html:not([data-device="mobile"]) .at-onglets button{flex:1;border:0;background:transparent;color:#fff;font:600 14px 'Fredoka',system-ui,sans-serif;padding:9px 6px 10px;border-radius:12px 12px 0 0;cursor:pointer}
html:not([data-device="mobile"]) .at-onglets button.on{background:var(--at-creme);color:var(--at-orf)}
html:not([data-device="mobile"]) .at-corps{flex:1;overflow-y:auto;padding:14px 16px 30px;display:grid;gap:14px;align-content:start}
html:not([data-device="mobile"]) .at-carte{background:#fff;border:1px solid var(--at-trait);border-radius:16px;padding:12px 14px;display:grid;gap:8px;min-width:0}
html:not([data-device="mobile"]) .at-carte h3{margin:0;font:700 15.5px 'Fredoka',system-ui,sans-serif;display:flex;align-items:center;gap:8px}
html:not([data-device="mobile"]) .at-carte h3 small{margin-left:auto;font:700 11px 'Nunito',system-ui,sans-serif;color:var(--at-doux)}
html:not([data-device="mobile"]) .at-carte p{margin:0;color:var(--at-doux);font-size:13px}
html:not([data-device="mobile"]) .at-liste{display:grid;gap:6px}
html:not([data-device="mobile"]) .at-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;align-items:center;padding:8px 10px;border-radius:12px;background:var(--at-creme);border:1px solid #f6e7d6}
html:not([data-device="mobile"]) .at-item b{font:600 14px 'Fredoka',system-ui,sans-serif}
html:not([data-device="mobile"]) .at-item small{grid-column:1;color:var(--at-doux);font-weight:600;font-size:12.5px;overflow-wrap:anywhere;white-space:pre-wrap}
html:not([data-device="mobile"]) .at-item .at-actions{grid-row:1/span 2;grid-column:2;display:flex;flex-direction:column;gap:4px}
html:not([data-device="mobile"]) .at-btn{border:0;background:var(--at-or);color:#fff;border-radius:999px;padding:5px 11px;font:600 12.5px 'Fredoka',system-ui,sans-serif;cursor:pointer;white-space:nowrap}
html:not([data-device="mobile"]) .at-btn.clair{background:var(--at-pale);color:var(--at-orf)}
html:not([data-device="mobile"]) .at-btn:disabled{opacity:.5;cursor:default}
html:not([data-device="mobile"]) .at-ligne{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
html:not([data-device="mobile"]) .at-carte input,html:not([data-device="mobile"]) .at-carte select,html:not([data-device="mobile"]) .at-carte textarea{border:1.5px solid var(--at-trait);border-radius:10px;padding:7px 9px;font:600 13.5px 'Nunito',system-ui,sans-serif;color:var(--at-encre);background:#fff;min-width:0;flex:1}
html:not([data-device="mobile"]) .at-carte textarea{width:100%;min-height:70px;resize:vertical}
html:not([data-device="mobile"]) .at-carte input:focus,html:not([data-device="mobile"]) .at-carte select:focus,html:not([data-device="mobile"]) .at-carte textarea:focus{outline:none;border-color:var(--at-or)}
html:not([data-device="mobile"]) .at-tag{display:inline-block;border-radius:999px;padding:1px 8px;font:800 11px 'Nunito',system-ui,sans-serif;background:#e3f1fb;color:#1f6f9c}
html:not([data-device="mobile"]) .at-tag.or{background:#fde3cc;color:#a24d06}.at-tag.vert{background:#e1f4e8;color:var(--at-vert)}
html:not([data-device="mobile"]) .at-jauge{height:10px;border-radius:5px;background:#f1e5d8;overflow:hidden}
html:not([data-device="mobile"]) .at-jauge i{display:block;height:100%;background:linear-gradient(90deg,#ff9c46,#f3852b)}
html:not([data-device="mobile"]) .at-carre{display:grid;grid-template-columns:repeat(12,1fr);gap:3px}
html:not([data-device="mobile"]) .at-carre span{aspect-ratio:1;border-radius:3px;background:#f1e5d8}
html:not([data-device="mobile"]) .at-carre span.n1{background:#ffd3a8}.at-carre span.n2{background:#ffad66}.at-carre span.n3{background:#f3852b}
html:not([data-device="mobile"]) .at-table{width:100%;border-collapse:collapse;font-size:12.5px}
html:not([data-device="mobile"]) .at-table th{text-align:left;color:var(--at-doux);font-size:11px;text-transform:uppercase;letter-spacing:.05em;padding:0 6px 4px}
html:not([data-device="mobile"]) .at-table td{border-top:1px solid #f3e6d8;padding:6px}
html:not([data-device="mobile"]) .at-note{font:700 12.5px 'Nunito',system-ui,sans-serif;color:var(--at-vert);min-height:1em}
html:not([data-device="mobile"]) .at-sous{font:700 12px 'Fredoka',system-ui,sans-serif;color:var(--at-doux);text-transform:uppercase;letter-spacing:.05em;margin-top:4px}

/* ---------- Palette de commandes (Ctrl+J) ---------- */
html:not([data-device="mobile"]) .at-palette-fond{position:fixed;inset:0;z-index:9500;background:rgba(40,25,10,.35);display:grid;justify-items:center;align-items:start;padding-top:12vh}
html:not([data-device="mobile"]) .at-palette{width:min(560px,92vw);background:#fff;border-radius:18px;box-shadow:0 30px 70px rgba(0,0,0,.3);overflow:hidden;font:600 14px 'Nunito',system-ui,sans-serif;color:var(--at-encre)}
html:not([data-device="mobile"]) .at-palette input{width:100%;border:0;border-bottom:1px solid var(--at-trait);padding:16px 18px;font:600 17px 'Fredoka',system-ui,sans-serif;outline:none}
html:not([data-device="mobile"]) .at-palette ul{list-style:none;margin:0;padding:6px;max-height:50vh;overflow-y:auto}
html:not([data-device="mobile"]) .at-palette li{padding:9px 12px;border-radius:10px;cursor:pointer;display:flex;justify-content:space-between;gap:10px}
html:not([data-device="mobile"]) .at-palette li.on{background:var(--at-pale);color:var(--at-orf)}
html:not([data-device="mobile"]) .at-palette li small{color:var(--at-doux)}

/* ---------- Mode concentration ---------- */
html:not([data-device="mobile"]) .at-zen{position:fixed;inset:0;z-index:9400;background:#fffaf4;display:grid;grid-template-rows:auto 1fr auto;padding:28px max(28px,12vw);gap:14px}
html:not([data-device="mobile"]) .at-zen header{display:flex;align-items:center;gap:12px;font:700 18px 'Fredoka',system-ui,sans-serif;color:var(--at-orf)}
html:not([data-device="mobile"]) .at-zen header button{margin-left:auto}
html:not([data-device="mobile"]) .at-zen textarea{width:100%;height:100%;border:0;background:transparent;font:500 20px/1.7 'Nunito',system-ui,sans-serif;color:var(--at-encre);resize:none;outline:none}
html:not([data-device="mobile"]) .at-zen footer{font:600 13px 'Nunito',system-ui,sans-serif;color:var(--at-doux)}

/* ---------- Bandeau de rappel ---------- */
html:not([data-device="mobile"]) .at-rappel{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:7900;display:flex;align-items:center;gap:10px;background:#3b2a1c;color:#fff;border-radius:999px;padding:8px 10px 8px 16px;font:600 13.5px 'Nunito',system-ui,sans-serif;box-shadow:0 10px 30px rgba(0,0,0,.25)}
html:not([data-device="mobile"]) .at-rappel button{border:0;border-radius:999px;padding:5px 11px;font:700 12.5px 'Fredoka',system-ui,sans-serif;cursor:pointer}
html:not([data-device="mobile"]) .at-rappel .go{background:var(--at-or);color:#fff}
html:not([data-device="mobile"]) .at-rappel .x{background:transparent;color:#fff;opacity:.8}

@media (prefers-reduced-motion:reduce){html:not([data-device="mobile"]) .at-panneau{transition:none}}
html:not([data-device="mobile"]) .at-lanceur[hidden]{display:none}

/* ---------- Suite du 23/10 ---------- */
html:not([data-device="mobile"]) .at-lanceur .at-obj{background:rgba(255,255,255,.25);border-radius:999px;font-size:12px;padding:1px 8px}
html:not([data-device="mobile"]) .at-lanceur .at-obj.ok{background:#fff;color:var(--at-vert)}
html:not([data-device="mobile"]) .at-lanceur .at-obj[hidden]{display:none}
html:not([data-device="mobile"]) .at-alertes{display:grid;gap:6px;margin:4px 0 6px}
html:not([data-device="mobile"]) .at-alertes[hidden]{display:none}
html:not([data-device="mobile"]) .at-alerte-l{display:flex;flex-wrap:wrap;align-items:center;gap:8px;background:#fff7e8;border:1px solid #f6d9a8;border-radius:12px;padding:7px 10px;font:600 12.5px 'Nunito',system-ui,sans-serif;color:var(--at-encre)}
html:not([data-device="mobile"]) .at-alerte-l span{flex:1 1 220px}
html:not([data-device="mobile"]) .at-alerte-l .at-btn{padding:4px 10px;font-size:12px}
html:not([data-device="mobile"]) .at-pop.at-pop-large{max-width:440px;width:440px;max-height:70vh;overflow:auto}
html:not([data-device="mobile"]) .at-version{border-top:1px solid var(--at-trait);padding:8px 4px;display:grid;gap:5px}
html:not([data-device="mobile"]) .at-version:first-of-type{border-top:0}
html:not([data-device="mobile"]) .at-version b{font:700 13px 'Fredoka',system-ui,sans-serif;display:flex;justify-content:space-between}
html:not([data-device="mobile"]) .at-version b small{color:var(--at-doux);font-weight:600}
html:not([data-device="mobile"]) .at-version div{white-space:pre-wrap;background:#f6f9fb;border-radius:9px;padding:6px 8px;max-height:110px;overflow:auto;font-weight:500;font-size:12.5px}
html:not([data-device="mobile"]) .at-version .at-btn{justify-self:start}
html:not([data-device="mobile"]) .at-lanceur .at-nom-l{max-width:0;overflow:hidden;white-space:nowrap;transition:max-width .2s ease}
html:not([data-device="mobile"]) .at-lanceur:hover .at-nom-l,html:not([data-device="mobile"]) .at-lanceur:focus-visible .at-nom-l{max-width:80px}
html:not([data-device="mobile"]) .at-lanceur{gap:6px}

/* ---------- Grande passe du 23/10 ---------- */
html:not([data-device="mobile"]) .at-chip-plus{background:var(--at-pale);border-style:dashed}
html:not([data-device="mobile"]) .at-champ{width:100%;box-sizing:border-box;border:1.5px solid var(--at-trait);border-radius:9px;padding:7px 9px;font:500 13px 'Nunito',system-ui,sans-serif;color:var(--at-encre);background:#fff;resize:vertical}
html:not([data-device="mobile"]) .at-pop button small{float:right;color:var(--at-doux);font-weight:600}
html:not([data-device="mobile"]) .at-dictee{position:fixed;left:50%;top:18px;transform:translateX(-50%);z-index:9500;border:0;border-radius:999px;padding:10px 18px;background:#d14343;color:#fff;font:700 14px 'Fredoka',system-ui,sans-serif;box-shadow:0 10px 26px rgba(160,30,30,.35);cursor:pointer;animation:at-pulse 1.4s ease-in-out infinite}
@keyframes at-pulse{50%{box-shadow:0 0 0 10px rgba(209,67,67,.15)}}
html:not([data-device="mobile"]) .at-rappel.at-rappel-haut{bottom:auto;top:18px}
html:not([data-device="mobile"]) .at-item.at-prio{border-color:#f2c26b;background:#fffaf0}
html:not([data-device="mobile"]) .at-hasard{font-weight:700;color:var(--at-encre);min-height:2.6em}
html:not([data-device="mobile"]) .at-jours{gap:6px}
html:not([data-device="mobile"]) .at-etoile{border:0;background:none;color:#e0a21b;font-size:16px;line-height:1;padding:0 2px;cursor:pointer;vertical-align:-1px}
html:not([data-device="mobile"]) .at-etoile:hover{transform:scale(1.2)}
html:not([data-device="mobile"]) .at-tag.rouge{background:#fbe3e3;color:var(--at-rouge)}
/* Contraste (WCAG AA ≥ 4,5:1 pour le petit texte) : la puce orange est posée sur blanc (4,05:1 avec l'ancien orange) */
html:not([data-device="mobile"]) .at-chip{color:var(--at-orf)}
