/* 🧪 (20/11/2026) Créateur de stuff en onglets : version de test seulement (stuff/essai.js, html.sf-essai). */

/* ---------- en-tête d'une ligne (piste 3) ---------- */
html.sf-essai .or-tete { flex-direction: row !important; flex-wrap: wrap; align-items: center !important; justify-content: flex-start !important; text-align: left;
    gap: 8px 12px; max-width: none !important; margin: 0 0 10px !important; }
html.sf-essai .or-tete::after, html.sf-essai .or-tete > .or-lead { display: none !important; }
html.sf-essai .or-tete > h1 { flex: 0 1 auto !important; max-width: none !important; justify-content: flex-start !important; font-size: clamp(1.25rem, 2.4vw, 1.6rem) !important; margin: 0; }
html.sf-essai .or-tete > .tk-ov, html.sf-essai .or-tete > a, html.sf-essai .or-tete > button { margin: 0 !important; height: 34px; }
html.sf-essai .or-tete > .sf-jeux { margin: 0 0 0 auto; }
html.sf-essai .or-tete > .sf-jeux .pill { padding: 6px 12px; }

/* ---------- barre d'onglets (piste 1) ---------- */
.sf-essai-onglets { display: flex; gap: 6px; padding: 6px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--border);
    position: sticky; top: 64px; z-index: 20; backdrop-filter: none; background-color: color-mix(in srgb, var(--bg-base) 88%, transparent); }
.sf-essai-onglets button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 12px;
    border: 0; border-radius: 10px; background: transparent; color: var(--fg-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; position: relative; }
.sf-essai-onglets button:hover { color: var(--fg); background: var(--surface-hover); }
.sf-essai-onglets button[aria-current="page"] { color: var(--fg); background: var(--accent-glow); box-shadow: inset 0 0 0 1px var(--border-accent); }
.sf-essai-nb { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; }
.sf-essai-alerte::after { content: ""; position: absolute; top: 8px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.sf-essai-etroit { display: none !important; }
@media (max-width: 1100px) { .sf-essai-etroit { display: inline-flex !important; } }

/* ---------- panneaux ---------- */
html.sf-essai #cartes { display: none !important; }
.sf-essai-panneau { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); align-items: start; }
.sf-essai-panneau > .sf-carte { margin: 0; }
html.sf-essai:not([data-sf-onglet="equip"]):not([data-sf-onglet="stats"]) .sf-grille,
html.sf-essai:not([data-sf-onglet="combat"]) #essai-combat,
html.sf-essai:not([data-sf-onglet="panos"]) #essai-panos { display: none; }
@media (max-width: 1100px) {
    html.sf-essai[data-sf-onglet="equip"] #colD, html.sf-essai[data-sf-onglet="stats"] #colG { display: none; }
}
/* panneau vide : une phrase plutôt qu'un trou */
.sf-essai-panneau:not(:has(.sf-carte:not(:empty)))::before { content: attr(data-vide); grid-column: 1 / -1; padding: 28px; text-align: center; color: var(--fg-muted);
    border: 1px dashed var(--border-hover); border-radius: 16px; }

/* ---------- « ⋯ » du téléphone ---------- */
.sf-essai-lib { display: none; }
.sf-essai-plus { position: relative; }
.sf-essai-plus > summary { list-style: none; display: grid; place-items: center; height: 34px; }
.sf-essai-plus > summary::-webkit-details-marker { display: none; }
.sf-essai-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; gap: 4px; min-width: 230px; padding: 6px; border-radius: 12px;
    background: var(--bg-base); border: 1px solid var(--border-hover); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.sf-essai-menu .sf-btn { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; }
.sf-essai-menu .sf-essai-lib { display: inline; }

/* ---------- téléphone : barre fixe en bas (piste 2) ---------- */
@media (max-width: 700px) {
    html.sf-essai .or-tete > .sf-jeux { margin-left: 0; }
    .sf-essai-onglets { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; border-radius: 0; border-width: 1px 0 0; gap: 0;
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background-color: var(--bg-base); box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); }
    .sf-essai-onglets button { flex-direction: column; gap: 3px; min-height: 54px; padding: 4px 2px; font-size: 11px; border-radius: 10px; }
    .sf-essai-onglets button i { font-size: 18px; }
    .sf-essai-nb { position: absolute; top: 4px; right: calc(50% - 26px); min-width: 17px; height: 17px; font-size: 10px; }
    .sf-essai-alerte::after { top: 6px; right: calc(50% - 20px); }
    html.sf-essai body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
    html.sf-essai .ux2-haut { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
    html.sf-essai .sf-haut { flex-wrap: wrap; }
    /* bannière de pub du bas (inc/ads.php, .tk-ad 50 px + marges) affichée : la barre d'onglets se pose juste au-dessus, sans la cacher */
    html.sf-essai body:has(> .tk-ad:not([hidden])) .sf-essai-onglets { bottom: 63px; padding-bottom: 4px; }
    html.sf-essai #stuffs { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    html.sf-essai #stuffs > * { flex: none; }
    html.sf-essai #etat { display: none; }
    /* équipement plus haut : en-tête et niveaux sur une ligne, sans le texte « Tes stuffs restent… » */
    html.sf-essai .or-tete > h1 { flex: 1 1 100% !important; font-size: 1.2rem !important; }
    html.sf-essai .or-tete > a, html.sf-essai .or-tete > .sf-jeux { font-size: 13px; }
    html.sf-essai .or-tete > a { height: 32px; padding: 0 12px; }
    html.sf-essai #niveaux { display: flex; gap: 8px; min-height: 0; }
    html.sf-essai #niveaux .sf-niv { flex: 1 1 0; min-width: 0; font-size: 12px; }
    html.sf-essai #nivHaut small { display: none; }
    html.sf-essai #t-equip { flex-wrap: wrap; gap: 6px; }
}
