/* ==========================================================================
   SECTION COMMUNAUTAIRE + BOUTIQUE : V2
   Même langage que l'accueil et le profil : panneaux très arrondis sans
   cadre, grands titres, tuiles bento, boutons tactiles.
   Chargé après da2026.css par communautaire.html et boutique.html.
   ========================================================================== */

/* ── Bandeau de page (partagé par toutes les pages « commu ») ── */
body .commu-banner {
    border: 0; border-radius: clamp(28px, 3vw, 40px);
    padding: clamp(1.8rem, 4.5vw, 3.8rem) clamp(1.4rem, 4vw, 3.8rem);
    margin-bottom: 1.2rem;
    background:
        radial-gradient(640px 320px at 100% 0%, rgba(76, 141, 255, 0.22), transparent 70%),
        var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-md);
}
body .commu-banner h1 {
    font-size: clamp(2.4rem, 5.6vw, 4.6rem); font-weight: 700;
    letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 0.7rem;
}
body .commu-banner .gradient-text { background: none; -webkit-text-fill-color: currentColor; color: var(--text-tertiary); }
body .commu-banner p { font-size: clamp(1rem, 1.4vw, 1.2rem); max-width: 56ch; color: var(--text-secondary); }

/* ==========================================================================
   COMMUNAUTAIRE
   ========================================================================== */
body .cm-stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
body .cm-stat {
    text-align: left; border: 0; border-radius: 28px;
    padding: clamp(1.1rem, 2vw, 1.6rem);
    background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}
body .cm-stat-val {
    font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 700; letter-spacing: -0.045em;
    line-height: 1; color: var(--text-primary); font-variant-numeric: tabular-nums;
}
body .cm-stat-lbl { margin-top: 0.55rem; font-size: 0.85rem; font-weight: 500; color: var(--text-tertiary); }

body .cm-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
body .cm-card {
    min-height: 210px;
    display: flex; flex-direction: column; justify-content: flex-end;
    border: 0; border-radius: 32px; padding: clamp(1.3rem, 2.2vw, 1.8rem);
    background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
    overflow: hidden; isolation: isolate;
    transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
body .cm-card:hover {
    transform: translateY(-6px); border: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 26px 60px -22px rgba(76, 141, 255, 0.5);
}
body .cm-card:active { transform: translateY(-2px) scale(0.99); transition-duration: 0.1s; }
/* Halo de la couleur de la tuile, qui monte au survol. */
body .cm-card::before {
    content: ''; position: absolute; inset: auto -20% -60% -20%; height: 90%; z-index: -1;
    background: radial-gradient(50% 60% at 50% 100%, var(--cm-teinte, rgba(76, 141, 255, 0.35)), transparent 70%);
    opacity: 0.55; transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
}
body .cm-card:hover::before { opacity: 1; transform: translateY(-8%); }
body .cm-card::after {
    content: 'arrow_outward'; font-family: 'Material Symbols Outlined';
    position: absolute; top: 1.2rem; right: 1.2rem; font-size: 1.4rem; color: var(--text-tertiary);
    transition: transform 0.4s var(--ease-out), color 0.3s ease;
}
body .cm-card:hover::after { transform: translate(3px, -3px); color: var(--text-primary); }
body .cm-card.soon::after { content: none; }
body .cm-card.soon:hover { transform: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow-sm); }

body .cm-icon {
    position: absolute; top: 1.2rem; left: 1.2rem; margin: 0;
    width: 60px; height: 60px; border-radius: 20px;
}
body .cm-icon .material-symbols-outlined { font-size: 1.8rem; }
body .cm-icon.or { --x: 241, 196, 15; }
body .cm-card h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); font-weight: 700; letter-spacing: -0.03em; }
body .cm-card p { font-size: 0.9rem; max-width: 34ch; color: var(--text-secondary); }
body .cm-badge { top: auto; bottom: 1.3rem; right: 1.3rem; border-radius: 999px; padding: 0.3rem 0.65rem; }

body .cm-bloc {
    border: 0; border-radius: 32px; padding: clamp(1.1rem, 2vw, 1.6rem);
    background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}
body .cm-bloc-titre { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
body .cm-bloc-lien { padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--background-card); color: var(--text-primary); }
body .cm-bloc-lien:hover { text-decoration: none; background: var(--background-card-hover); }
body .cm-ligne { border-radius: 18px; padding: 0.55rem 0.7rem; }
body .cm-av { width: 38px; height: 38px; border-radius: 13px; }

/* ==========================================================================
   BOUTIQUE
   ========================================================================== */
body .bt-solde {
    border: 0; border-radius: 24px; padding: 0.9rem 1.5rem;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-md);
}
body .bt-solde-lbl { letter-spacing: 0.14em; color: var(--text-tertiary); }
body .bt-solde-val { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.035em; color: var(--text-primary); font-variant-numeric: tabular-nums; }

body .bt-section { margin-bottom: clamp(2.2rem, 4vw, 3.6rem); }
body .bt-section-title {
    font-size: clamp(1.6rem, 2.8vw, 2.4rem); font-weight: 700; letter-spacing: -0.04em; margin-bottom: 1.2rem;
}
body .bt-section-title .material-symbols-outlined {
    width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px;
    background: rgba(76, 141, 255, 0.16); font-size: 1.5rem;
}

body .bt-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1rem; }
body .bt-item {
    border: 0; border-radius: 32px;
    background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
    transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
body .bt-item:hover {
    transform: translateY(-6px); border: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-lg);
}
body .bt-item.owned { box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.5), var(--shadow-sm); }
body .bt-apercu { height: 150px; }
body .bt-apercu-carte { left: 18px; right: 18px; bottom: 16px; height: 48px; border-radius: 14px; }
body .bt-body { padding: 1.3rem 1.4rem 1.4rem; gap: 0.55rem; }
body .bt-nom { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.025em; }
body .bt-desc { font-size: 0.9rem; }
body .bt-prix { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text-primary); }
body .bt-btn {
    border-radius: 14px; padding: 0.65rem 1.1rem; font-size: 0.88rem; font-weight: 600;
    background: var(--primary-color);
    box-shadow: 0 3px 0 #2557b8, 0 8px 16px rgba(30, 90, 220, 0.25);
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, filter 0.2s ease;
}
body .bt-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
body .bt-btn:active { transform: translateY(3px); box-shadow: none; }
body .bt-btn:disabled, body .bt-btn.possede, body .bt-btn.pauvre { box-shadow: none; transform: none; }
body .bt-btn.possede { background: rgba(48, 209, 88, 0.16); color: var(--success); }

body .bt-feature {
    border: 0; border-radius: 36px; padding: clamp(1.4rem, 3vw, 2.4rem);
    background:
        radial-gradient(560px 280px at 100% 0%, rgba(76, 141, 255, 0.28), transparent 70%),
        var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-md);
}
body .bt-feature-icon { width: 76px; height: 76px; border-radius: 26px; background: var(--primary-color); }
body .bt-feature-txt h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 700; letter-spacing: -0.035em; }
body .bt-feature-txt p { font-size: 0.95rem; }

/* Panier : bouton et tiroir plus doux. */
body .bt-panier-fab {
    width: 66px; height: 66px; border-radius: 24px; background: var(--primary-color);
    box-shadow: 0 4px 0 #2557b8, 0 16px 34px rgba(30, 90, 220, 0.4);
}
body .bt-panier-fab:active { transform: translateY(3px); box-shadow: none; }
body .bt-panier-fab-badge { border-radius: 999px; }
body .bt-panier-overlay { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); background: rgba(0, 0, 0, 0.5); transition-duration: 0.4s; }
body .bt-panier-drawer {
    right: 12px; top: 12px; bottom: 12px;
    border: 1px solid var(--border-strong); border-radius: 32px;
    background: var(--background-elevated);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
body .bt-panier-overlay.ouvert .bt-panier-drawer { transform: none; }
body .bt-panier-drawer { transform: translateX(calc(100% + 24px)); }
body .bt-panier-drawer-tete { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
body .bt-panier-code input { border-radius: 14px; border: 0; background: var(--background-card); }
body .bt-mode-paiement { border: 0; border-radius: 18px; }
body .bt-mode-indicateur { border-radius: 14px; background: var(--primary-color); }
body .bt-mode-opt { border-radius: 14px; }
body .bt-panier-erreur { border-radius: 16px; }
body .bt-msg { border-radius: 18px; }
@media (max-width: 520px) { body .bt-panier-drawer { left: 8px; right: 8px; width: auto; } }

/* Tuiles : le badge d'état prend la place de la flèche, en haut à droite. */
body .cm-card::after { content: none; }
body .cm-badge { top: 1.3rem; bottom: auto; right: 1.3rem; }


/* ==========================================================================
   V3 : on change la FORME des deux pages.
   - Communautaire : plus de grille de cartes. Des bandes verticales pleine
     hauteur qui s'ouvrent au survol, comme un volet d'exposition.
   - Boutique : plus de grille. Des rayons horizontaux (un par catégorie)
     qu'on fait défiler, avec des affiches hautes.
   ========================================================================== */

/* ── Communautaire : bandeau court, puis le volet ── */
body[data-commu="accueil"] .commu-banner { padding: clamp(1.2rem, 2.4vw, 2rem) clamp(1.4rem, 3vw, 2.6rem); }
body[data-commu="accueil"] .commu-banner h1 { font-size: clamp(2rem, 3.8vw, 3.2rem); margin-bottom: 0.3rem; }
body[data-commu="accueil"] .commu-banner p { font-size: 1rem; }

/* Chiffres : une bande compacte au lieu de grosses tuiles. */
body .cm-stats {
    display: flex; flex-wrap: wrap; gap: 0.5rem 2.4rem; margin: 0 0 1rem; padding: 0 0.4rem;
}
body .cm-stat { background: none; box-shadow: none; padding: 0; display: flex; align-items: baseline; gap: 0.6rem; }
body .cm-stat-val { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
body .cm-stat-lbl { margin: 0; }

/* Le volet : bandes qui se partagent la hauteur, celle survolée s'ouvre. */
body .cm-grid {
    display: flex; gap: 0.6rem;
    height: clamp(460px, 64vh, 700px);
    margin-bottom: 1rem;
}
body .cm-card {
    flex: 1 1 0; min-width: 0; min-height: 0;
    justify-content: flex-end;
    transition: flex-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease, transform 0.5s var(--ease-out);
    cursor: pointer;
}
body .cm-card:hover { transform: none; }
/* Bande ouverte : celle survolée, sinon la première au repos. */
body .cm-grid:hover .cm-card:hover,
body .cm-grid:not(:hover) .cm-card:first-child,
body .cm-card:focus-visible { flex-grow: 5; }

body .cm-card h3 {
    font-size: clamp(1.15rem, 1.7vw, 1.5rem);
    white-space: nowrap;
    writing-mode: vertical-rl; transform: rotate(180deg);
    align-self: flex-start;
    transition: opacity 0.3s ease;
}
body .cm-card p {
    opacity: 0; max-height: 0; overflow: hidden; margin: 0;
    transition: opacity 0.4s ease 0.1s, max-height 0.6s ease;
}
body .cm-grid:hover .cm-card:hover h3,
body .cm-grid:not(:hover) .cm-card:first-child h3 { writing-mode: horizontal-tb; transform: none; white-space: normal; align-self: auto; }
body .cm-grid:hover .cm-card:hover p,
body .cm-grid:not(:hover) .cm-card:first-child p { opacity: 1; max-height: 8em; margin-top: 0.4rem; }

/* L'icône grossit quand la bande s'ouvre. */
body .cm-icon { transition: transform 0.6s var(--ease-out); }
body .cm-grid:hover .cm-card:hover .cm-icon,
body .cm-grid:not(:hover) .cm-card:first-child .cm-icon { transform: scale(1.25); transform-origin: top left; }
body .cm-badge { opacity: 0; transition: opacity 0.35s ease; }
body .cm-grid:hover .cm-card:hover .cm-badge,
body .cm-grid:not(:hover) .cm-card:first-child .cm-badge { opacity: 1; }
body .cm-card::before { opacity: 0.35; }
body .cm-grid:hover .cm-card:hover::before,
body .cm-grid:not(:hover) .cm-card:first-child::before { opacity: 1; }

@media (max-width: 860px) {
    body .cm-grid { flex-direction: column; height: auto; }
    body .cm-card { flex: none; min-height: 150px; }
    body .cm-card h3 { writing-mode: horizontal-tb; transform: none; white-space: normal; align-self: auto; }
    body .cm-card p { opacity: 1; max-height: none; margin-top: 0.3rem; }
    body .cm-badge { opacity: 1; }
    body .cm-icon { transform: none !important; }
}

/* ── Boutique : des rayons horizontaux ── */
body .bt-section-title { justify-content: flex-start; }
body .bt-rayon-fleches { margin-left: auto; display: flex; gap: 0.4rem; }
body .bt-rayon-fleches button {
    width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center;
    background: var(--background-secondary); color: var(--text-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-sm);
    transition: transform 0.25s var(--ease-out), background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}
body .bt-rayon-fleches button:hover { background: var(--primary-color); color: #fff; transform: scale(1.06); }
body .bt-rayon-fleches button:disabled { opacity: 0.35; pointer-events: none; }

body .bt-grid {
    display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--rayon-bord, 0px) * -1); padding: 0.6rem var(--rayon-bord, 0px) 1.6rem;
    scrollbar-width: none; scroll-padding-inline: var(--rayon-bord, 0px);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 48px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 48px), transparent 100%);
}
body .bt-grid::-webkit-scrollbar { display: none; }
body .bt-item {
    flex: 0 0 clamp(250px, 24vw, 340px); scroll-snap-align: start;
    min-height: 380px;
}
/* Affiche haute : l'aperçu occupe le haut de la carte. */
body .bt-apercu { height: 220px; }
body .bt-body { flex: 1; }
body .bt-feature { margin-bottom: 0.4rem; }

/* Le volet prend toute la largeur ; les deux blocs d'activité passent dessous. */
@media (min-width: 1500px) {
    body .cm-wide { display: block; }
    body .cm-duo { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

/* Les rayons ne doivent pas élargir la page : on borne la colonne de contenu. */
body main[data-commu-content], body #btContenu, body .bt-section { min-width: 0; max-width: 100%; }
body .bt-grid { width: 100%; }

/* ==========================================================================
   V4 : plus de bannière en boîte, et un sommaire plus calme.
   ========================================================================== */

/* ── En-tête de page : du texte posé sur la page, une ligne fine dessous ── */
body .commu-banner,
body[data-commu="accueil"] .commu-banner {
    background: none; box-shadow: none; border-radius: 0;
    padding: clamp(0.4rem, 1.5vw, 1rem) 0 clamp(1.1rem, 2vw, 1.7rem);
    margin: 0 0 clamp(1.2rem, 2.4vw, 2rem);
    border-bottom: 1px solid var(--border-color);
}
body .commu-banner h1,
body[data-commu="accueil"] .commu-banner h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1;
    margin: 0 0 0.5rem;
}
body .commu-banner .gradient-text { color: var(--text-tertiary); }
body .commu-banner p,
body[data-commu="accueil"] .commu-banner p { font-size: 1rem; max-width: 60ch; margin: 0; }
body .commu-banner-inner { align-items: flex-end !important; }

/* Solde : une ligne de texte, plus de boîte. */
body .bt-solde {
    background: none; box-shadow: none; padding: 0; border-radius: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    flex-direction: row-reverse; gap: 0.7rem; align-items: baseline;
}
body .bt-solde > .material-symbols-outlined { display: none; }
body .bt-solde > div { text-align: right; }
body .bt-solde-lbl { font-size: 0.75rem; margin-bottom: 0.1rem; }
body .bt-solde-val { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }

/* ── Sommaire : une liste de lignes, calme et lisible ── */
body .cm-grid,
body .cm-grid:hover {
    display: block; height: auto; margin: 0 0 clamp(1.4rem, 3vw, 2.4rem);
    border-bottom: 1px solid var(--border-color);
}
body .cm-grid .cm-card,
body .cm-grid:hover .cm-card:hover,
body .cm-grid:not(:hover) .cm-card:first-child {
    display: grid; flex: none;
    grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.5fr) auto auto;
    align-items: center; gap: clamp(0.8rem, 2vw, 1.8rem);
    min-height: 0; padding: clamp(1rem, 1.8vw, 1.5rem) clamp(0.6rem, 1.4vw, 1.2rem);
    border: 0; border-top: 1px solid var(--border-color); border-radius: 0;
    background: none; box-shadow: none; overflow: visible; isolation: auto;
    transform: none; justify-content: stretch;
    transition: background-color 0.4s ease, padding-left 0.5s var(--ease-out), border-radius 0.4s ease;
}
body .cm-grid .cm-card:first-child { border-top: 0; }
body .cm-grid .cm-card:hover {
    background: var(--background-secondary);
    border-radius: 26px; padding-left: clamp(1.2rem, 2.4vw, 2rem);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
body .cm-grid .cm-card::before { display: none; }

body .cm-grid .cm-icon,
body .cm-grid:hover .cm-card:hover .cm-icon,
body .cm-grid:not(:hover) .cm-card:first-child .cm-icon {
    position: static; width: 52px; height: 52px; border-radius: 17px; margin: 0; transform: none;
}
body .cm-grid .cm-icon .material-symbols-outlined { font-size: 1.5rem; }

body .cm-grid .cm-card h3,
body .cm-grid:hover .cm-card:hover h3,
body .cm-grid:not(:hover) .cm-card:first-child h3 {
    writing-mode: horizontal-tb; transform: none; white-space: normal; align-self: auto;
    font-size: clamp(1.2rem, 1.9vw, 1.6rem); font-weight: 600; letter-spacing: -0.03em; margin: 0;
}
body .cm-grid .cm-card p,
body .cm-grid:hover .cm-card:hover p,
body .cm-grid:not(:hover) .cm-card:first-child p {
    opacity: 1; max-height: none; margin: 0; max-width: none;
    font-size: 0.92rem; color: var(--text-tertiary);
}
body .cm-grid .cm-badge,
body .cm-grid:hover .cm-card:hover .cm-badge,
body .cm-grid:not(:hover) .cm-card:first-child .cm-badge {
    position: static; opacity: 1; justify-self: end;
}
body .cm-grid .cm-card::after {
    content: 'arrow_outward'; font-family: 'Material Symbols Outlined';
    position: static; font-size: 1.4rem; color: var(--text-tertiary);
    transition: transform 0.4s var(--ease-out), color 0.3s ease;
}
body .cm-grid .cm-card:hover::after { transform: translate(3px, -3px); color: var(--text-primary); }
body .cm-grid .cm-card.soon::after { content: ''; }

@media (max-width: 760px) {
    body .cm-grid .cm-card,
    body .cm-grid:hover .cm-card:hover,
    body .cm-grid:not(:hover) .cm-card:first-child {
        grid-template-columns: 48px minmax(0, 1fr) auto;
    }
    body .cm-grid .cm-card p { grid-column: 2 / 3; grid-row: 2; }
    body .cm-grid .cm-badge { display: none; }
}

/* Placement explicite des colonnes (le badge précède l'icône dans le HTML). */
body .commu-banner::before, body .commu-banner::after { display: none; }
body .cm-grid .cm-icon { grid-column: 1; grid-row: 1; }
body .cm-grid .cm-card h3 { grid-column: 2; grid-row: 1; }
body .cm-grid .cm-card p { grid-column: 3; grid-row: 1; }
body .cm-grid .cm-badge { grid-column: 4; grid-row: 1; }
body .cm-grid .cm-card::after { grid-column: 5; grid-row: 1; }
@media (max-width: 760px) {
    body .cm-grid .cm-card h3 { grid-column: 2; grid-row: 1; }
    body .cm-grid .cm-card p { grid-column: 2; grid-row: 2; }
    body .cm-grid .cm-card::after { grid-column: 3; grid-row: 1; }
}

/* ── Sommaire : numérotation discrète et trait de couleur au survol ── */
body .cm-grid { counter-reset: cm; }
body .cm-grid .cm-card { counter-increment: cm; position: relative; grid-template-columns: 2.2rem 56px minmax(0, 1fr) minmax(0, 1.5fr) auto auto; }
body .cm-grid .cm-card > .cm-icon { grid-column: 2; }
body .cm-grid .cm-card h3 { grid-column: 3; }
body .cm-grid .cm-card p { grid-column: 4; }
body .cm-grid .cm-badge { grid-column: 5; }
body .cm-grid .cm-card::after { grid-column: 6; }
body .cm-grid .cm-card::before {
    display: block; content: counter(cm, decimal-leading-zero); position: static; grid-column: 1; grid-row: 1;
    inset: auto; height: auto; background: none; opacity: 1; z-index: auto;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; color: var(--text-tertiary);
    font-variant-numeric: tabular-nums; transition: color 0.3s ease;
}
body .cm-grid .cm-card:hover::before { color: var(--primary-color); transform: none; opacity: 1; }
body .cm-grid .cm-card:hover h3 { color: var(--text-primary); }
body .cm-grid .cm-card p { transition: color 0.3s ease; }
body .cm-grid .cm-card:hover p { color: var(--text-secondary); }
@media (max-width: 760px) {
    body .cm-grid .cm-card { grid-template-columns: 1.6rem 48px minmax(0, 1fr) auto; }
    body .cm-grid .cm-card h3 { grid-column: 3; }
    body .cm-grid .cm-card p { grid-column: 3; grid-row: 2; }
    body .cm-grid .cm-card::after { grid-column: 4; }
}

/* ── Sommaire : le survol ne doit jamais changer la grille ── */
body .cm-grid:hover .cm-card:hover,
body .cm-grid:not(:hover) .cm-card:first-child {
    grid-template-columns: 2.2rem 56px minmax(0, 1fr) minmax(0, 1.5fr) auto auto;
}
body .cm-grid .cm-card:hover h3 { grid-column: 3; }
body .cm-grid .cm-card:hover p { grid-column: 4; }

/* ── Boutique : pas de soulignement sur les boutons-liens ── */
body a.bt-btn, body a.bt-btn:hover, body .bt-feature a, body .bt-feature a:hover, body a[class*="bt-"] { text-decoration: none; }

/* ── Boutique : les rayons ne rognent plus le bord des cartes ── */
body .bt-grid {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent 100%);
    padding: 1.4rem 1rem 2.4rem; margin: -1rem -1rem -1.2rem;
    scroll-padding-inline: 1rem;
}

/* ==========================================================================
   BOUTIQUE : la salle d'essayage
   ========================================================================== */
body .bt-salle {
    display: grid; grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.25fr);
    gap: clamp(1rem, 2.6vw, 2.6rem); align-items: start;
}

/* Scène : sticky, elle reste à l'écran pendant qu'on parcourt le catalogue. */
body .bt-scene { position: sticky; top: calc(var(--nav-height) + 1rem); display: flex; flex-direction: column; gap: 1rem; }
body .bt-sp {
    --sc-bg: #15151b; --sc-surface: #141418; --sc-border: rgba(255, 255, 255, 0.09);
    --sc-texte: #f5f5f7; --sc-doux: #a1a1ab; --sc-accent: #4c8dff; --sc-accent2: #5ac8fa;
    position: relative; overflow: hidden; border-radius: 40px;
    background: var(--sc-bg); color: var(--sc-texte);
    border: 1px solid var(--sc-border);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
    transition: background 0.7s ease, color 0.7s ease, border-color 0.7s ease;
}
body .bt-sp-banniere {
    height: 130px;
    background: linear-gradient(120deg, var(--sc-accent), var(--sc-accent2));
    opacity: 0.85; transition: background 0.7s ease;
}
body .bt-sp-corps { position: relative; padding: 0 1.5rem 1.5rem; margin-top: -42px; }
body .bt-sp-avatar {
    width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center;
    background: var(--sc-surface); border: 5px solid var(--sc-bg); color: var(--sc-doux);
    box-shadow: 0 0 0 3px var(--sc-accent);
    transition: background 0.7s ease, border-color 0.7s ease, box-shadow 0.7s ease;
}
body .bt-sp-avatar .material-symbols-outlined { font-size: 2.2rem; }
body .bt-sp-nom { margin-top: 0.8rem; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.04em; }
body .bt-sp-handle { color: var(--sc-doux); font-size: 0.9rem; }
body .bt-sp-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
body .bt-sp-chip {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border-radius: 999px;
    background: color-mix(in srgb, var(--sc-accent) 20%, transparent); font-weight: 600; font-size: 0.8rem;
    transition: background 0.7s ease;
}
body .bt-sp-chip .material-symbols-outlined { font-size: 1rem; }
body .bt-sp-tag { animation: btTagIn 0.55s var(--ease-out) both; color: var(--sc-texte); }
@keyframes btTagIn { from { opacity: 0; transform: scale(0.6) translateX(-10px); } to { opacity: 1; transform: none; } }
body .bt-sp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1.1rem; }
body .bt-sp-stats > div {
    padding: 0.8rem; border-radius: 20px; background: var(--sc-surface); border: 1px solid var(--sc-border);
    transition: background 0.7s ease, border-color 0.7s ease;
}
body .bt-sp-stats b { display: block; font-size: 1.15rem; letter-spacing: -0.03em; }
body .bt-sp-stats span { font-size: 0.7rem; color: var(--sc-doux); }
body .bt-sp-feature {
    display: none; padding: 1.6rem; text-align: center; background: var(--sc-surface);
}
body .bt-sp-feature .material-symbols-outlined { font-size: 3rem; color: var(--sc-accent); }
body .bt-sp-feature p { margin-top: 0.4rem; color: var(--sc-doux); }
body .bt-sp.bt-sp-est-feature .bt-sp-feature { display: block; }

body .bt-scene-info {
    padding: 1.2rem 1.3rem; border-radius: 32px; background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}
body .bt-scene-titre { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 700; letter-spacing: -0.04em; }
body .bt-scene-desc { color: var(--text-secondary); margin-top: 0.3rem; line-height: 1.55; }
body .bt-scene-pied { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }
body .bt-scene-prix { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
body .bt-scene-achat { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
body .bt-btn.secondaire { background: var(--background-card); color: var(--text-primary); box-shadow: none; }

/* Catalogue */
body .bt-cats {
    position: relative; display: inline-flex; gap: 0.2rem; padding: 0.3rem; margin-bottom: 1rem;
    border-radius: 999px; background: var(--background-card); max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
body .bt-cats::-webkit-scrollbar { display: none; }
body .bt-cat-ind {
    position: absolute; top: 0.3rem; bottom: 0.3rem; left: 0; width: 0; border-radius: 999px;
    background: var(--background-secondary); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 12px rgba(0,0,0,.3);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
body .bt-cat {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1.05rem; border: 0; border-radius: 999px; background: none; cursor: pointer;
    font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--text-tertiary); white-space: nowrap;
    transition: color 0.3s ease;
}
body .bt-cat .material-symbols-outlined { font-size: 1.15rem; }
body .bt-cat:hover, body .bt-cat.actif { color: var(--text-primary); }

body .bt-lignes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0.6rem; }
body .bt-ligne {
    display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 1rem 0.7rem 0.7rem;
    border: 0; border-radius: 26px; cursor: pointer; text-align: left; font: inherit; color: var(--text-primary);
    background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.45s var(--ease-out), background-color 0.3s ease, box-shadow 0.35s ease;
}
body .bt-ligne:hover { transform: translateY(-3px); background: var(--background-card-hover); }
body .bt-ligne.actif { box-shadow: 0 0 0 2px var(--primary-color), 0 14px 30px -14px rgba(76, 141, 255, 0.6); background: rgba(76, 141, 255, 0.1); }
body .bt-ligne[hidden] { display: none; }
body .bt-mini {
    position: relative; width: 58px; height: 58px; flex: none; border-radius: 19px; overflow: hidden;
    display: grid; place-items: center;
}
body .bt-mini i { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 12px; border-radius: 6px; }
body .bt-mini-tag { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
body .bt-mini-feat { background: rgba(76, 141, 255, 0.16); color: var(--primary-color); }
body .bt-ligne-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
body .bt-ligne-nom { font-weight: 600; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .bt-ligne-sous { font-size: 0.78rem; color: var(--text-tertiary); }
body .bt-ligne-prix { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
body .bt-ligne.possede .bt-ligne-prix { color: var(--success); }
body .bt-ligne-prix .material-symbols-outlined { font-size: 1.1rem; }

@media (max-width: 980px) {
    body .bt-salle { grid-template-columns: 1fr; }
    body .bt-scene { position: static; }
}
@media (prefers-reduced-motion: reduce) { body .bt-sp-tag { animation: none; } }

/* Boutique : la marge négative laisse la place à l'anneau de sélection, que
   l'animation de hauteur (overflow:hidden) rognait sur les bords. */
body .bt-lignes { padding: 6px; margin: -6px; }
