/* ============================================================
   shop.css — Boutique (onglet de /arcade).
   Catalogue d'articles groupés par provider + modales de
   confirmation et de code de réclamation. Calqué sur la DA des
   caisses (cases.css) : variables --luv-*, accent orange.
   ============================================================ */

@keyframes shopOverlayIn {
    0%   { opacity: 0; backdrop-filter: blur(0px); }
    100% { opacity: 1; backdrop-filter: blur(14px); }
}

@keyframes shopModalIn {
    0%   { opacity: 0; transform: translateY(16px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shopBadgePop {
    0%   { transform: scale(0.4); opacity: 0; }
    60%  { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); }
}

/* ── En-tête ──────────────────────────────────────────────── */

body.theme-luv .shop-header {
    text-align: center;
    margin-bottom: 28px;
}

body.theme-luv .shop-header__icon {
    color: var(--luv-orange);
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 10px rgba(255, 138, 31, 0.35));
}

body.theme-luv .shop-header__title {
    font-family: var(--luv-font-heading);
    font-weight: 800;
    font-size: 32px;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--luv-text);
}

body.theme-luv .shop-header__subtitle {
    color: var(--luv-text-dim);
    font-size: 14.5px;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}

body.theme-luv .shop-loading {
    text-align: center;
    color: var(--luv-text-mute);
    font-size: 14px;
    padding: 40px 0;
}

/* ── Sections par provider ────────────────────────────────── */

body.theme-luv .shop-providers {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

body.theme-luv .shop-provider__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

body.theme-luv .shop-provider__title {
    font-family: var(--luv-font-heading);
    font-weight: 700;
    font-size: 20px;
    color: var(--luv-text);
    margin: 0;
    position: relative;
    padding-left: 14px;
}

body.theme-luv .shop-provider__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--luv-orange-2), var(--luv-orange-deep));
}

/* ── Cartes « Case » par provider (format caisses wallpaper) ─── */

body.theme-luv .shop-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

body.theme-luv .shop-case {
    --prov-accent: #ff8a1f;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, var(--luv-card) 0%, rgba(12, 18, 32, 0.92) 100%);
    border: 1px solid var(--luv-line);
    border-radius: var(--luv-r-md);
    padding: 22px 18px 18px;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1),
                border-color 0.22s ease,
                box-shadow 0.22s ease;
}

body.theme-luv .shop-case__bg {
    position: absolute;
    inset: -18px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(2.5px) brightness(0.62) saturate(1.3) contrast(1.05);
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.32s ease, filter 0.32s ease, transform 0.32s ease;
}
body.theme-luv .shop-case__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(7, 12, 22, 0.08) 0%,
            rgba(7, 12, 22, 0.28) 40%,
            rgba(7, 12, 22, 0.72) 78%,
            rgba(7, 12, 22, 0.94) 100%),
        radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(7, 12, 22, 0.22) 80%);
}
body.theme-luv .shop-case:hover .shop-case__bg {
    filter: blur(1.5px) brightness(0.72) saturate(1.4) contrast(1.08);
    transform: scale(1.04);
}

/* halo accent au hover */
body.theme-luv .shop-case::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, var(--prov-accent) 0%, transparent 65%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
    z-index: 0;
}
body.theme-luv .shop-case:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--prov-accent) 60%, var(--luv-line));
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6),
                0 0 0 1px color-mix(in srgb, var(--prov-accent) 30%, transparent);
}
body.theme-luv .shop-case:hover::after { opacity: 0.22; }

body.theme-luv .shop-case__img-wrap {
    position: relative;
    width: 100%;
    height: 150px;
    margin-bottom: 14px;
    z-index: 1;
}
body.theme-luv .shop-case__img-wrap::before {
    content: "";
    position: absolute;
    inset: 18% 22%;
    background: radial-gradient(circle, var(--prov-accent) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(22px);
    z-index: 0;
}
/* Tickets (chips) empilés en éventail comme héros de la carte.
   Centrés via top/left 50% ; max-width:none neutralise le reset global img. */
body.theme-luv .shop-case__chip {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 134px;
    max-width: none;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
    z-index: 1;
    transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
body.theme-luv .shop-case__chip--solo {
    transform: translate(-50%, -50%);
}
body.theme-luv .shop-case__chip--back {
    transform: translate(calc(-50% + 16px), calc(-50% + 8px)) rotate(9deg);
    z-index: 1;
}
body.theme-luv .shop-case__chip--front {
    transform: translate(calc(-50% - 16px), calc(-50% - 6px)) rotate(-8deg);
    z-index: 2;
}
body.theme-luv .shop-case:hover .shop-case__chip--back {
    transform: translate(calc(-50% + 26px), calc(-50% + 6px)) rotate(13deg);
}
body.theme-luv .shop-case:hover .shop-case__chip--front {
    transform: translate(calc(-50% - 26px), calc(-50% - 10px)) rotate(-12deg);
}

body.theme-luv .shop-case__name {
    font-family: var(--luv-font-heading);
    font-weight: 800;
    font-size: 19px;
    margin: 0 0 4px;
    color: var(--luv-text);
    position: relative;
    z-index: 1;
}
body.theme-luv .shop-case__desc {
    font-size: 12.5px;
    color: var(--luv-text-mute);
    margin: 0 0 16px;
    min-height: 32px;
    position: relative;
    z-index: 1;
}

body.theme-luv .shop-case__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    position: relative;
    z-index: 1;
}
body.theme-luv .shop-case__buy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 8px;
    background: rgba(255, 138, 31, 0.10);
    border: 1px solid rgba(255, 138, 31, 0.32);
    border-radius: var(--luv-r-sm);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
body.theme-luv .shop-case__buy:hover {
    background: rgba(255, 138, 31, 0.18);
    border-color: rgba(255, 138, 31, 0.55);
}
body.theme-luv .shop-case__buy:active { transform: scale(0.97); }
body.theme-luv .shop-case__buy-euro {
    font-family: var(--luv-font-heading);
    font-weight: 800;
    font-size: 20px;
    color: var(--luv-orange);
    line-height: 1;
}
body.theme-luv .shop-case__buy-cost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--luv-font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--luv-text-dim);
}
body.theme-luv .shop-case__buy-cost .luvcoin-icon { height: 13px; width: auto; }

/* ── Grille + cartes (ancien rendu, conservé pour compat) ─── */

body.theme-luv .shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

body.theme-luv .shop-item {
    --shop-accent: var(--luv-orange);
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, var(--luv-card) 0%, rgba(12, 18, 32, 0.92) 100%);
    border: 1px solid var(--luv-line);
    border-radius: var(--luv-r-lg);
    padding: 20px 16px 16px;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1),
                border-color 0.22s ease,
                box-shadow 0.22s ease;
}

body.theme-luv .shop-item::after {
    /* halo accent au hover */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, var(--shop-accent) 0%, transparent 65%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
    z-index: 0;
}

body.theme-luv .shop-item:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--shop-accent) 55%, var(--luv-line));
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6),
                0 0 0 1px color-mix(in srgb, var(--shop-accent) 28%, transparent);
}

body.theme-luv .shop-item:hover::after {
    opacity: 0.18;
}

body.theme-luv .shop-item__chip-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px;
    margin-bottom: 12px;
    z-index: 1;
}

body.theme-luv .shop-item__chip-wrap::before {
    /* halo derrière le chip */
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 138, 31, 0.22) 0%, transparent 68%);
    z-index: -1;
}

body.theme-luv .shop-item__chip {
    max-width: 100%;
    max-height: 96px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
    transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.theme-luv .shop-item:hover .shop-item__chip {
    transform: scale(1.06) rotate(-2deg);
}

body.theme-luv .shop-item__label {
    position: relative;
    z-index: 1;
    font-family: var(--luv-font-heading);
    font-weight: 600;
    font-size: 15px;
    color: var(--luv-text);
    margin-bottom: 6px;
}

body.theme-luv .shop-item__cost {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--luv-font-mono);
    font-weight: 700;
    font-size: 16px;
    color: var(--luv-orange-2);
    margin-bottom: 14px;
}

body.theme-luv .shop-item__cost .luvcoin-icon {
    height: 18px;
    width: 18px;
}

body.theme-luv .shop-item__buy {
    position: relative;
    z-index: 1;
    margin-top: auto;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: var(--luv-r-pill);
    background: linear-gradient(180deg, var(--luv-orange-2) 0%, var(--luv-orange) 55%, var(--luv-orange-deep) 100%);
    color: #1a1004;
    font-family: var(--luv-font-heading);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 6px 16px -6px rgba(255, 138, 31, 0.55);
}

body.theme-luv .shop-item__buy:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -8px rgba(255, 138, 31, 0.7);
}

body.theme-luv .shop-item__buy:active {
    transform: translateY(0);
}

/* ── Modales (overlay partagé) ────────────────────────────── */

body.theme-luv .shop-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 16, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9000;
    display: none;             /* basculé en flex par le JS */
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.theme-luv .shop-modal-overlay.is-open {
    opacity: 1;
    animation: shopOverlayIn 0.3s ease-out;
}

body.theme-luv .shop-confirm,
body.theme-luv .shop-result {
    position: relative;
    width: 100%;
    max-width: 420px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 138, 31, 0.18) 0%, transparent 55%),
        linear-gradient(180deg, #1a253b 0%, #0a1224 100%);
    border: 1px solid color-mix(in srgb, var(--luv-orange) 45%, var(--luv-line));
    border-radius: 18px;
    padding: 30px 26px 24px;
    text-align: center;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.8),
        0 0 0 1px color-mix(in srgb, var(--luv-orange) 26%, transparent),
        0 0 60px -10px color-mix(in srgb, var(--luv-orange) 55%, transparent);
    animation: shopModalIn 0.32s cubic-bezier(0.2, 0.7, 0.2, 1.2);
    overflow: hidden;
}

body.theme-luv .shop-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--luv-text-mute);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

body.theme-luv .shop-modal__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--luv-text);
}

/* Confirmation */

body.theme-luv .shop-confirm__chip {
    height: 92px;
    width: auto;
    max-width: 80%;
    object-fit: contain;
    margin: 4px auto 12px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

body.theme-luv .shop-confirm__eyebrow {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--luv-orange-2);
    margin-bottom: 4px;
}

body.theme-luv .shop-confirm__title {
    font-family: var(--luv-font-heading);
    font-weight: 700;
    font-size: 22px;
    color: var(--luv-text);
    margin: 0 0 12px;
}

body.theme-luv .shop-confirm__text {
    color: var(--luv-text-dim);
    font-size: 14.5px;
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

body.theme-luv .shop-confirm__text strong {
    color: var(--luv-text);
    font-family: var(--luv-font-mono);
    font-size: 17px;
}

body.theme-luv .shop-confirm__text .luvcoin-icon {
    height: 16px;
    width: 16px;
    vertical-align: middle;
}

body.theme-luv .shop-confirm__actions {
    display: flex;
    gap: 10px;
}

body.theme-luv .shop-confirm__cancel,
body.theme-luv .shop-confirm__buy {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--luv-r-pill);
    font-family: var(--luv-font-heading);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

body.theme-luv .shop-confirm__cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--luv-text-dim);
}

body.theme-luv .shop-confirm__cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--luv-text);
}

body.theme-luv .shop-confirm__buy {
    border: none;
    background: linear-gradient(180deg, var(--luv-orange-2) 0%, var(--luv-orange) 55%, var(--luv-orange-deep) 100%);
    color: #1a1004;
    box-shadow: 0 6px 16px -6px rgba(255, 138, 31, 0.55);
}

body.theme-luv .shop-confirm__buy:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

body.theme-luv .shop-confirm__buy.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Résultat */

body.theme-luv .shop-result__badge {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a1224;
    background: linear-gradient(180deg, #2ee27a 0%, #14c46a 100%);
    box-shadow: 0 0 24px -4px rgba(20, 196, 106, 0.7);
    animation: shopBadgePop 0.45s cubic-bezier(0.2, 0.7, 0.2, 1.4);
}

body.theme-luv .shop-result__eyebrow {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2ee27a;
    margin-bottom: 4px;
}

body.theme-luv .shop-result__title {
    font-family: var(--luv-font-heading);
    font-weight: 700;
    font-size: 21px;
    color: var(--luv-text);
    margin: 0 0 6px;
}

body.theme-luv .shop-result__code-wrap {
    position: relative;
    margin-top: 16px;
    padding: 14px 14px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed color-mix(in srgb, var(--luv-orange) 50%, var(--luv-line));
    border-radius: 12px;
}

body.theme-luv .shop-result__code-label {
    display: block;
    font-size: 11px;
    color: var(--luv-text-mute);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

body.theme-luv .shop-result__code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

body.theme-luv .shop-result__code {
    font-family: var(--luv-font-mono);
    font-size: 19px;
    font-weight: 700;
    color: var(--luv-orange-2);
    background: rgba(0, 0, 0, 0.45);
    padding: 8px 14px;
    border-radius: 8px;
    letter-spacing: 0.05em;
    user-select: all;
}

body.theme-luv .shop-result__copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--luv-text);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

body.theme-luv .shop-result__copy:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--luv-orange);
    color: var(--luv-orange-2);
}

body.theme-luv .shop-result__copy.is-copied {
    color: #14c46a;
    border-color: #14c46a;
}

body.theme-luv .shop-result__claim-info {
    font-size: 12px;
    color: var(--luv-text-dim);
    margin: 10px 0 0;
    line-height: 1.45;
}

body.theme-luv .shop-result__claim-info strong {
    color: var(--luv-text);
}

body.theme-luv .shop-result__done {
    margin-top: 20px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: var(--luv-r-pill);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--luv-text);
    font-family: var(--luv-font-heading);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.18s ease;
}

body.theme-luv .shop-result__done:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* ── Toast ────────────────────────────────────────────────── */

body.theme-luv .shop-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #c2233a;
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: 0 12px 24px -6px rgba(194, 35, 58, 0.6);
    z-index: 9500;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1.2);
    pointer-events: none;
}

body.theme-luv .shop-toast.is-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
    body.theme-luv .shop-header__title {
        font-size: 26px;
    }
    body.theme-luv .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    body.theme-luv .shop-item {
        padding: 16px 12px 14px;
    }
    body.theme-luv .shop-item__chip-wrap {
        height: 78px;
    }
    body.theme-luv .shop-item__chip {
        max-height: 78px;
    }
}
