/* ============================================================
   PARTENAIRES.CSS — Cartes partenaires (templates/utils/partenaires.html)
   Accueil : cartes compactes (carrousel sous 720 px) · /bonus : cartes
   détaillées (sélecteur de paliers). Base = cartes du site (verre sombre) ;
   la couleur de la marque n'apparaît qu'en halo, liseré et bouton.
   Responsive par la largeur de la CARTE (container queries) : la même carte
   se range seule dans une grille à 2 colonnes, une colonne ou le carrousel.
   ============================================================ */

body.theme-luv .pa {
    --brand: #7b3cff;
    --brand-2: #a77bff;
    --brand-ink: #fff;
    container: pa / inline-size;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--luv-line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), var(--luv-card);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: var(--luv-text);
    font-family: var(--luv-font-body);
}
body.theme-luv .pa--dbot { --brand: #f5a524; --brand-2: #ffc861; --brand-ink: #1a0f00; }
/* Halo de la marque, discret, et liseré en haut */
body.theme-luv .pa::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto;
    height: 120%;
    background: radial-gradient(50% 45% at 50% 30%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 70%);
    pointer-events: none;
}
body.theme-luv .pa::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    pointer-events: none;
}
body.theme-luv .pa-in { position: relative; display: flex; flex-direction: column; height: 100%; }

/* ── En-tête : badge, logo, illustration ─────────────────────── */
body.theme-luv .pa-top {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(150px, 34cqi, 182px);
    padding: 56px clamp(18px, 5cqi, 30px) 6px;
}
body.theme-luv .pa-badge {
    position: absolute;
    left: clamp(18px, 5cqi, 30px);
    top: 18px;
    padding: 5px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 22%, rgba(0, 0, 0, 0.35));
    border: 1px solid color-mix(in srgb, var(--brand) 55%, transparent);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}
body.theme-luv .pa-logo {
    position: relative;
    width: min(300px, 48cqi);
    height: auto;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}
body.theme-luv .pa-art {
    position: absolute;
    right: clamp(6px, 3cqi, 18px);
    bottom: -14px;
    width: auto;
    height: clamp(112px, 33cqi, 176px);
    transform: rotate(-4deg);
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55));
    pointer-events: none;
}
body.theme-luv .pa-brand { display: flex; align-items: center; gap: clamp(12px, 4cqi, 20px); }
body.theme-luv .pa-logo--rond {
    width: clamp(60px, 17cqi, 92px);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04), 0 0 40px color-mix(in srgb, var(--brand) 45%, transparent);
    filter: none;
}
body.theme-luv .pa-name { font-family: var(--luv-font-display); font-size: clamp(24px, 7cqi, 36px); line-height: 1; }

/* ── Corps ───────────────────────────────────────────────────── */
body.theme-luv .pa-body {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 6px clamp(18px, 5cqi, 30px) clamp(18px, 4cqi, 24px);
}
/* Offre phare : un gros chiffre */
body.theme-luv .pa-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
    row-gap: 2px;
    margin: 0;
}
body.theme-luv .pa-hero small { color: var(--luv-text-dim); font-size: clamp(14px, 3.4cqi, 18px); font-weight: 800; }
body.theme-luv .pa-hero b,
body.theme-luv .pa-palier b {
    font-family: var(--luv-font-display);
    font-weight: 400;
    font-size: clamp(40px, 11.5cqi, 64px);
    line-height: 1;
    white-space: nowrap;
    color: var(--brand-2);
    text-shadow: 0 0 28px color-mix(in srgb, var(--brand) 45%, transparent);
}
body.theme-luv .pa-hero span,
body.theme-luv .pa-palier span { font-size: clamp(17px, 4cqi, 22px); font-weight: 800; line-height: 1.15; }
body.theme-luv .pa-hero em,
body.theme-luv .pa-palier em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-size: clamp(13px, 3cqi, 14.5px);
    font-weight: 600;
    color: var(--luv-text-dim);
}
body.theme-luv .pa-also { margin: 14px 0 0; color: var(--luv-text-dim); font-size: 14px; line-height: 1.55; }
body.theme-luv .pa-also b { color: var(--luv-text); }

/* Sélecteur de paliers (/bonus) */
body.theme-luv .pa-label { margin: 0 0 10px; color: var(--luv-text-dim); font-size: 14px; font-weight: 700; }
body.theme-luv .pa-seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--luv-line);
}
body.theme-luv .pa-seg button {
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--luv-text-dim);
    font: 800 16px var(--luv-font-body);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
body.theme-luv .pa-seg button:hover { color: var(--luv-text); }
body.theme-luv .pa-seg button[aria-pressed="true"] {
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    color: var(--brand-ink);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 40%, transparent);
}
body.theme-luv .pa-palier {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 14px 0 0;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--luv-line);
}

/* ── Code en ticket + bouton ─────────────────────────────────── */
body.theme-luv .pa-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
}
body.theme-luv .pa-ticket {
    --notch: 9px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 0 16px 0 18px;
    border: 0;
    border-radius: 12px;
    background-color: color-mix(in srgb, var(--brand) 16%, #0b152b);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent);
    color: var(--luv-text);
    font-family: var(--luv-font-body);
    text-align: left;
    cursor: pointer;
    /* Encoches de ticket à gauche et à droite */
    -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
            mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
body.theme-luv .pa-ticket:hover { background-color: color-mix(in srgb, var(--brand) 24%, #0b152b); }
body.theme-luv .pa-ticket-txt { display: grid; }
body.theme-luv .pa-ticket-txt small { color: var(--luv-text-mute); font-size: 12px; font-weight: 700; }
body.theme-luv .pa-ticket-txt b { font-family: var(--luv-font-display); font-weight: 400; font-size: 20px; line-height: 1.1; letter-spacing: 0.02em; }
body.theme-luv .pa-ticket-sep { align-self: stretch; margin: 10px 0; border-left: 2px dashed color-mix(in srgb, var(--brand) 40%, transparent); }
body.theme-luv .pa-ticket svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--brand-2); }
body.theme-luv .pa-ic-ok { display: none; }
body.theme-luv .pa-ticket.is-copied { background-color: rgba(20, 196, 106, 0.12); box-shadow: inset 0 0 0 1px rgba(20, 196, 106, 0.7); }
body.theme-luv .pa-ticket.is-copied .pa-ic-copy { display: none; }
body.theme-luv .pa-ticket.is-copied .pa-ic-ok { display: block; color: var(--luv-green); }
body.theme-luv .pa-ticket.is-copied small { color: var(--luv-green); }
body.theme-luv .pa-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    color: var(--brand-ink);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: filter 0.15s ease, transform 0.15s ease;
}
body.theme-luv .pa-cta:hover { filter: brightness(1.07); transform: translateY(-1px); }
body.theme-luv .pa-cta svg { flex: 0 0 auto; width: 18px; height: 18px; }

body.theme-luv .pa-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 16px;
    color: var(--luv-text-mute);
    font-size: 13px;
    line-height: 1.45;
}
body.theme-luv .pa-foot a { color: var(--luv-text-dim); }
body.theme-luv .pa-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
body.theme-luv .pa-more svg { width: 15px; height: 15px; }
body.theme-luv .pa-more:hover { color: var(--luv-text); }

/* Carte étroite (colonne, carrousel) : ticket et bouton l'un sous l'autre */
@container pa (max-width: 520px) {
    body.theme-luv .pa-actions { grid-template-columns: 1fr; }
    body.theme-luv .pa-ticket { justify-content: space-between; }
    body.theme-luv .pa-ticket-sep { margin-left: auto; }
    body.theme-luv .pa-cta { font-size: 14px; }
}

/* Carte détaillée large (/bonus) : en-tête à gauche, offre à droite */
@container pa (min-width: 760px) {
    body.theme-luv .pa--detail .pa-in { display: grid; grid-template-columns: minmax(250px, 0.78fr) 1.22fr; }
    body.theme-luv .pa--detail .pa-top {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        min-height: 340px;
        padding: 64px 30px 30px;
    }
    body.theme-luv .pa--detail .pa-art { position: static; height: 210px; margin: 18px 0 0 34px; transform: rotate(-5deg); }
    body.theme-luv .pa--detail .pa-body { padding: 30px 32px 26px; justify-content: center; }
    body.theme-luv .pa--detail .pa-actions { margin-top: 0; }
    body.theme-luv .pa--detail .pa-logo { width: min(300px, 100%); }
    body.theme-luv .pa--detail.pa--dbot .pa-top { min-height: 250px; }
}

/* ── Accueil : grille, puis carrousel sur mobile ─────────────── */
body.theme-luv .pa-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    max-width: 1180px;
    margin: 0 auto;
}
body.theme-luv .pa-dots { display: none; }
@media (max-width: 980px) {
    body.theme-luv .pa-grid { grid-template-columns: minmax(0, 620px); justify-content: center; gap: 20px; }
}
@media (max-width: 720px) {
    body.theme-luv .pa-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: min(86%, 400px);
        justify-content: start;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        margin: 0 -16px;
        padding: 4px 16px 8px;
        scroll-padding-inline: 16px;
    }
    body.theme-luv .pa-grid::-webkit-scrollbar { display: none; }
    body.theme-luv .pa-grid > .pa { scroll-snap-align: center; }
    body.theme-luv .pa-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
    body.theme-luv .pa-dots button {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.25);
        transition: width 0.2s ease, background-color 0.2s ease;
    }
    body.theme-luv .pa-dots button.is-on { width: 22px; background: var(--luv-orange); }
}

/* Rendu lent : pas d'ombres portées lourdes ni de halo */
.no-hwaccel body.theme-luv .pa { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.no-hwaccel body.theme-luv .pa-art,
.no-hwaccel body.theme-luv .pa-logo { filter: none; }
@media (prefers-reduced-motion: reduce) {
    body.theme-luv .pa-cta,
    body.theme-luv .pa-ticket,
    body.theme-luv .pa-seg button,
    body.theme-luv .pa-dots button { transition: none; }
    body.theme-luv .pa-cta:hover { transform: none; }
}
