/**
 * ============================================================================
 * PIXIA — STYLES
 * ============================================================================
 * Styles du générateur d'images IA.
 * Couleur identitaire : dynamique depuis la BDD via var(--px-primary).
 * Les variables CSS sont injectées inline par le template Twig :
 *   --px-primary      : couleur principale
 *   --px-primary-rgb  : triplet RGB (ex: "99, 102, 241") pour les transparences
 *   --px-secondary    : couleur secondaire (gradient)
 *   --px-bg           : fond léger
 *   --px-border       : bordure légère
 * ============================================================================
 */

/* ── Numéros d'étapes ─────────────────────────────────────────────────────── */

.px-step-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    background: var(--px-primary, #6366F1);
    color: white;
}

/* ── Onglets mode (texte / PDF) ───────────────────────────────────────────── */

[data-pixia--generator-target="modeTab"][data-active="true"] {
    background: white;
    color: var(--px-primary, #6366F1);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
    font-weight: 600;
}

[data-pixia--generator-target="modeTab"][data-active="false"] {
    color: #6B7280;
}

/* ── Bouton "Améliorer" (ghost teinté couleur outil) ──────────────────────── */

.px-soft-btn {
    color: var(--px-primary, #6366F1) !important;
}

.px-soft-btn:hover {
    background: rgb(var(--px-primary-rgb, 99 102 241) / 0.08) !important;
}

/* ── Textarea : focus ring couleur outil ──────────────────────────────────── */

.px-textarea:focus {
    border-color: var(--px-primary, #6366F1);
    box-shadow: 0 0 0 3px rgb(var(--px-primary-rgb, 99 102 241) / 0.12);
}

/* ── Dropzone : hover couleur outil ──────────────────────────────────────── */

.px-dropzone:hover {
    border-color: var(--px-primary, #6366F1);
    background: rgb(var(--px-primary-rgb, 99 102 241) / 0.04);
}

/* ── Boutons d'option (qualité / format) ─────────────────────────────────── */

.px-option-btn:hover {
    border-color: rgb(var(--px-primary-rgb, 99 102 241) / 0.4);
    background: rgb(var(--px-primary-rgb, 99 102 241) / 0.04);
}

.px-option-btn[data-active="true"] {
    border-color: var(--px-primary, #6366F1);
    background: rgb(var(--px-primary-rgb, 99 102 241) / 0.06);
}

/* ── Icône de format (mini carré dans les boutons format) ────────────────── */

.px-option-btn[data-active="true"] .px-format-icon {
    border-color: var(--px-primary, #6366F1);
    background: rgb(var(--px-primary-rgb, 99 102 241) / 0.1);
}

/* ── Label tokens (dans les options qualité) ─────────────────────────────── */

.px-token-label {
    color: var(--px-primary, #6366F1);
}

/* ── Spinner scroll infini ───────────────────────────────────────────────── */

.px-spinner {
    color: var(--px-primary, #6366F1);
}

/* ── Style picker — thumbnails avec icône thématique ─────────────────────── */

.pixia-style-picker {
    display: flex;
    gap: 0.375rem;
}

/* Card colonne : thumbnail gradient + label */
.pixia-style-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
    padding: 0 0 0.375rem;
    position: relative;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 0.875rem;
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 130ms ease;
    outline: none;
}

.pixia-style-card:hover {
    transform: translateY(-2px);
}

.pixia-style-card[data-active="true"] {
    border-color: var(--px-primary, #6366F1);
    box-shadow: 0 0 0 3px rgb(var(--px-primary-rgb, 99 102 241) / 0.15);
}

/* Thumbnail carré avec gradient et icône centrée */
.pixia-style-card__img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 200ms ease;
    position: relative;
}

.pixia-style-card:hover .pixia-style-card__img {
    transform: scale(1.04);
}

/* Icône SVG blanche sur gradient */
.pixia-style-card__icon {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.30));
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Gradients par style */
.pixia-style-card__img[data-style="vivid"] {
    background: linear-gradient(145deg, #FF6B6B 0%, #C026D3 45%, #7C3AED 100%);
}

.pixia-style-card__img[data-style="natural"] {
    background: linear-gradient(145deg, #6EE7B7 0%, #10B981 45%, #065F46 100%);
}

.pixia-style-card__img[data-style="cinematic"] {
    background: linear-gradient(145deg, #1E3A5F 0%, #0F172A 50%, #0C0A1E 100%);
}

.pixia-style-card__img[data-style="anime"] {
    background: linear-gradient(145deg, #FDA4AF 0%, #C084FC 45%, #818CF8 100%);
}

.pixia-style-card__img[data-style="sketch"] {
    background: linear-gradient(145deg, #F1F5F9 0%, #94A3B8 50%, #64748B 100%);
}

/* Label */
.pixia-style-card__label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #4B5563;
    white-space: nowrap;
}

.pixia-style-card[data-active="true"] .pixia-style-card__label {
    color: var(--px-primary, #6366F1);
    font-weight: 700;
}
