/**
 * Zero2Hero V3 - Styles modernes avec préservation des IDs
 * Palette: Blanc #ffffff, Dégradé héros #0070F3 → #FF385C, Vert #22C55E
 * Bordures arrondies: 15px, Ombres douces
 */

:root {
    --gradient-hero: linear-gradient(135deg, #8a5bff 0%, #ff6f91 100%);
    --gradient-primary: linear-gradient(135deg, #8a5bff 0%, #ff6f91 100%);
    --color-green: #22C55E;
    --color-gray-bg: #F5F5F7;
    --color-border: #E5E7EB;
    --color-text: #111111;
    --color-text-secondary: #555555;
    --border-radius: 15px;
    --border-radius-small: 12px;
    --border-radius-large: 16px;
    --shadow-soft: 0 8px 20px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    color: var(--color-text);
}

/* Background animé sur le conteneur de page complet - Méthode multi-couches */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #ec4899 0%, #c084fc 50%, #fb923c 100%);
    animation: backgroundFade 5s ease-in-out infinite;
}

/* ============================================
   OVERRIDE THEME SPACING - Force suppression des marges du thème
   ============================================ */
/* Cibler les conteneurs WordPress qui ajoutent des marges */
.wp-site-blocks .wp-block-post-content:has(#zero2hero-generator),
.wp-block-post-content:has(#zero2hero-generator),
article:has(#zero2hero-generator),
main:has(#zero2hero-generator),
.entry-content:has(#zero2hero-generator) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Masquer le titre de la page WordPress sur les pages Zero2Hero */
.wp-block-post-title:has(~ * #zero2hero-generator),
article:has(#zero2hero-generator) .wp-block-post-title,
main:has(#zero2hero-generator) .wp-block-post-title {
    display: none !important;
}

/* Override Twenty Twenty-Five spacing spécifique */
.wp-site-blocks > * + *:has(#zero2hero-generator),
.wp-site-blocks > :has(#zero2hero-generator) {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

/* Force le conteneur direct à avoir zéro spacing */
div:has(> #zero2hero-generator),
section:has(> #zero2hero-generator) {
    padding: 0 !important;
    margin: 0 !important;
}

/* Exception : permettre le margin-top sur la timeline sticky */
.zero2hero-steps-sticky {
    margin-top: 0px !important;
}

/* Supprimer les paddings du contenu principal WordPress */
.site-content:has(#zero2hero-generator) {
    padding-top: -20px !important;
}

/* Override pour le conteneur de page WordPress */
.wp-block-group:has(#zero2hero-generator) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
}

/* ============================================
   HEADER STICKY AVEC TIMELINE MODERNE (inspiré CodePen)
   ============================================ */
.zero2hero-steps-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    margin-bottom: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #ff7a18, #af002d 50%, #319197);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Masquer la timeline sur les pages produits par défaut (sauf si activée par JS) */
body.single-product .zero2hero-steps-sticky {
    display: none !important;
}

/* Afficher uniquement en mode révélation */
body.single-product.z2h-revelation-mode .zero2hero-steps-sticky {
    display: flex !important;
}

.timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 30px;
    border-radius: 16px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
}

/* Étapes */
.timeline .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    position: relative;
    transition: all 0.4s ease;
}

.timeline .step .icon {
    background: white;
    color: #5b4bff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
}

.timeline .step.active .icon {
    background: linear-gradient(135deg, #8a5bff, #ff6f91);
    color: white;
    transform: scale(1.15);
}

.timeline .step.completed .icon {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: white;
    transform: scale(1.05);
}

.timeline .step .label {
    margin-top: 10px;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Lignes de connexion */
.timeline .line {
    height: 3px;
    width: 80px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    position: relative;
    align-self: center;
    margin-top: -35px; /* Aligner avec le centre des icônes (60px / 2 + marge) */
    transition: background 0.4s ease;
}

/* Ligne complétée (verte) */
.timeline .line.completed {
    background: linear-gradient(90deg, #22C55E, #16A34A);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

/* Animation hover */
.timeline .step:hover .icon {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

/* ============================================
   CONTENEUR PRINCIPAL
   ============================================ */
#zero2hero-generator {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.zero2hero-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 0;
    margin-top: 0.5rem;
}

.zero2hero-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    margin-top: 30px;
    line-height: 1.2;
}

.zero2hero-header p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* ============================================
   WORKFLOW STEPS - Une seule visible à la fois
   ============================================ */
.workflow-step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    background: var(--color-gray-bg) !important;
    border: none;
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    box-shadow: none;
    margin-bottom: 1rem;
}

.workflow-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-gray-bg);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8a5bff 0%, #ff6f91 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

.step-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: var(--color-text);
    margin: 0;
}

/* ============================================
   ÉTAPE 1: UPLOAD + GENRE + SCÉNARIO
   ============================================ */
.upload-section {
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease;
}

/* Masquer la zone d'upload quand la détection est visible */
.upload-section.hidden {
    display: none !important;
}

.upload-area {
    border: 2px dashed #cccccc;
    border-radius: var(--border-radius-large);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--color-gray-bg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #0070F3;
    background: #f0f7ff;
}

.upload-area.dragover {
    border-color: #0070F3;
    background: #e6f2ff;
    transform: scale(1.02);
}

/* Bouton d'upload animé avec particules */
.upload-btn-animated {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin: 0 auto 1rem;
    background: transparent;
}

.upload-btn-animated:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.upload-btn-animated:active {
    transform: scale(0.95);
}

/* Style Particules avec gradient du site */
.pulse-particles {
    background: linear-gradient(135deg, #8a5bff 0%, #ff6f91 25%, #ec4899 50%, #8a5bff 75%, #ff6f91 100%);
    background-size: 300% 300%;
    overflow: visible;
    animation: gradientMove 2s linear infinite;
}

.pulse-particles .arrow-upload {
    width: 50px;
    height: 50px;
    color: white;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

/* Ondes de pulse */
.pulse-particles::before,
.pulse-particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.6);
    opacity: 0;
    top: 0;
    left: 0;
    pointer-events: none;
}

.pulse-particles:hover::before {
    animation: pulse-wave 1.5s ease-out infinite;
}

.pulse-particles:hover::after {
    animation: pulse-wave 1.5s ease-out 0.4s infinite;
}

.pulse-particles:hover .arrow-upload {
    animation: float-up 2s ease-in-out infinite;
}

/* Animations - Gradient de fond animé */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation spécifique pour le fond de page */
@keyframes gradientMoveBackground {
    0% {
        background-position: 0% 0%;
    }
    25% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* Animation par opacité - Plus fiable que background-position */
@keyframes backgroundFade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes pulse-wave {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

@keyframes float-up {
    0%, 100% { 
        transform: translateY(0) scale(1); 
    }
    50% { 
        transform: translateY(-12px) scale(1.1); 
    }
}

/* Ancien style pour compatibilité */
.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-area p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Section de détection */
#detection-section {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--color-gray-bg);
    border-radius: var(--border-radius);
    position: relative;
    animation: fadeInUp 0.5s ease;
}

/* Bouton pour changer d'image */
.change-image-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
}

.change-image-btn:hover {
    background: var(--color-gray-bg);
    border-color: #0070F3;
    color: #0070F3;
}

#detection-section h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

/* Options de genre - Horizontales */
.gender-selection {
    margin-bottom: 2rem;
}

.gender-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.gender-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 1rem 1.5rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-small);
    background: white;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.gender-option:hover {
    border-color: #8a5bff;
    background: #f8f5ff;
    transform: translateY(-2px);
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option input[type="radio"]:checked + .gender-icon {
    transform: scale(1.3);
}

.gender-option:has(input[type="radio"]:checked) {
    border-color: #8a5bff;
    background: linear-gradient(135deg, rgba(138,91,255,0.1), rgba(255,111,145,0.1));
    box-shadow: 0 4px 15px rgba(138,91,255,0.3);
}

.gender-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.gender-label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

/* Grille de scénarios */
.scenarios-section {
    margin-top: 2rem;
}

#scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.scenario-card {
    padding: 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-small);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scenario-card:hover {
    border-color: #8a5bff;
    background: #f8f5ff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.scenario-card.selected {
    border-color: #8a5bff;
    background: var(--gradient-hero);
    color: white;
    box-shadow: var(--shadow-hover);
}

.scenario-card .scenario-icon {
    font-size: 2rem;
}

.scenario-card h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.scenario-card p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Boutons */
#generate-btn,
.generate-btn {
    background: linear-gradient(135deg, #8a5bff 0%, #ff6f91 25%, #ec4899 50%, #8a5bff 75%, #ff6f91 100%);
    background-size: 300% 300%;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Inter', sans-serif;
    animation: gradientMove 2s linear infinite;
}

#generate-btn:hover:not(:disabled),
.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 91, 255, 0.4);
    filter: brightness(1.15);
}

#generate-btn:disabled,
.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

/* ============================================
   LOADER DE GÉNÉRATION IA - Éclair SVG
   ============================================ */
.ai-loader-container {
    text-align: center;
    margin-top: 2rem;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: var(--border-radius);
    animation: fadeInUp 0.5s ease;
    box-shadow: var(--shadow-md);
}

.ai-loader-content {
    max-width: 500px;
    margin: 0 auto;
}

.ai-loader-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.ai-loader-subtitle {
    font-size: 1rem;
    color: var(--color-text-light);
    margin: 0 0 3rem 0;
}

/* Loader SVG Éclair */
.z2h-flat-fill {
    position: relative;
    display: grid;
    place-items: center;
    margin: 2rem auto;
}

.bolt-fill {
    fill: url(#grad);
    transition: all 0.3s ease-out;
}

.progress-text {
    position: absolute;
    bottom: -40px;
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(90deg, #8a5bff, #ff6f91);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   LOADER DE CRÉATION AUTOMATIQUE - Éclair SVG
   ============================================ */
.creation-loader-container {
    text-align: center;
    margin-top: 2rem;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: var(--border-radius);
    animation: fadeInUp 0.5s ease;
    box-shadow: var(--shadow-md);
}

.creation-loader-content {
    max-width: 500px;
    margin: 0 auto;
}

.creation-loader-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.creation-loader-subtitle {
    font-size: 1rem;
    color: var(--color-text-light);
    margin: 0 0 3rem 0;
}

.bolt-fill-creation {
    transition: all 0.3s ease-out;
}

.progress-text-creation {
    position: absolute;
    bottom: -40px;
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(90deg, #8a5bff, #ff6f91);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.creation-current-step {
    margin-top: 3rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
}

.creation-current-step .step-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.creation-current-step .step-description {
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 0;
    font-weight: 500;
}

/* Aperçu image générée - Style CodePen */
#generation-result {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    padding: 3rem 2rem;
    background: var(--color-gray-bg) !important;
    border-radius: 20px;
    animation: fadeInUp 0.5s ease;
    box-shadow: none;
}

.result-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* En-tête du résultat */
.result-header {
    width: 100%;
}

/* Message de succès engageant */
.success-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.success-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* Bouton principal avec gradient violet/rose */
#proceed-to-products,
.proceed-btn {
    background: linear-gradient(135deg, #A855F7 0%, #EC4899 25%, #ff5caa 50%, #A855F7 75%, #EC4899 100%);
    background-size: 300% 300%;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.3);
    width: 100%;
    max-width: 400px;
    animation: gradientMove 2s linear infinite;
}

#proceed-to-products:hover,
.proceed-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(168, 85, 247, 0.4);
    filter: brightness(1.15);
}

/* Conteneur image avec style moderne */
#generated-image-container,
.image-container {
    margin: 0 auto;
    padding: 0;
    max-width: 500px;
    width: 100%;
    border: none;
    background: transparent;
    position: relative;
}

#generated-image-container img,
.image-container img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

#generated-image-container img:hover,
.image-container img:hover {
    transform: scale(1.02);
}

/* Bouton de régénération - Style moderne */
.change-image-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.change-image-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.change-image-btn:hover {
    background: linear-gradient(135deg, #A855F7 0%, #EC4899 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.25);
}

.change-image-btn:active {
    transform: translateY(0);
}

/* ============================================
   ÉTAPE 2: SÉLECTION PRODUIT (1200+ produits)
   ============================================ */
.product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

.filter-group select,
.filter-group input[type="text"],
#search-filter {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus,
#search-filter:focus {
    outline: none;
    border-color: #0070F3;
    box-shadow: 0 0 0 3px rgba(0,112,243,0.1);
}

#search-filter {
    width: 100%;
}

/* Grille de produits responsive */
#products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    grid-auto-rows: minmax(auto, max-content);
    align-items: start;
}

.product-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: visible;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: fit-content;
    min-height: 500px;
    padding-bottom: 1rem;
}

.product-card:hover {
    border-color: #0070F3;
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card.selected {
    border-color: #0070F3;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(0,112,243,0.1);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* ============================================
   RESET COMPLET DES STYLES WORDPRESS/THEME
   ============================================ */
#zero2hero-generator #products-grid .product-card .product-info {
    padding: 8px !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
    min-height: auto !important;
    height: auto !important;
}

/* TITRES - Hauteur fixe 40px */
#zero2hero-generator #products-grid .product-card .product-title,
#zero2hero-generator #products-grid .product-card .product-info h4,
#zero2hero-generator .product-card .product-info h4.product-title,
#zero2hero-generator #products-grid .product-card h4 {
    all: unset !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 40px !important;
    max-height: 40px !important;
    min-height: 40px !important;
    line-height: 20px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

/* DESCRIPTIONS - Hauteur fixe 58px */
#zero2hero-generator #products-grid .product-card .product-description,
#zero2hero-generator #products-grid .product-card .product-info p,
#zero2hero-generator .product-card .product-info p.product-description,
#zero2hero-generator #products-grid .product-card p {
    all: unset !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: #666 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 58px !important;
    max-height: 58px !important;
    min-height: 58px !important;
    line-height: 19px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

/* PRIX - Hauteur fixe 19px */
#zero2hero-generator #products-grid .product-card .product-price,
#zero2hero-generator #products-grid .product-card .product-info .product-price,
#zero2hero-generator .product-card .product-info div.product-price {
    all: unset !important;
    display: block !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0070F3 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 19px !important;
    max-height: 19px !important;
    min-height: 19px !important;
    line-height: 19px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.product-variants {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    min-height: 36px;
    height: auto !important;
    align-items: center;
}

.variant-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-swatch:hover {
    transform: scale(1.15);
    border-color: #0070F3;
}

.product-select-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.product-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,112,243,0.3);
}

/* Pagination */
.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.pagination-btn {
    background: #eee;
    color: var(--color-text);
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #ddd;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.pagination-btn.primary:hover:not(:disabled) {
    box-shadow: 0 4px 15px rgba(0,112,243,0.3);
}

.pagination-info {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

/* Loading state */
.loading-products {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0070F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   ÉTAPE 3: CRÉATION AUTOMATIQUE
   ============================================ */
.creation-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.creation-step {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-small);
    background: white;
    transition: all 0.3s ease;
}

.creation-step.active {
    border-color: #0070F3;
    background: #f0f7ff;
    box-shadow: 0 4px 15px rgba(0,112,243,0.15);
}

.creation-step.completed {
    border-color: var(--color-green);
    background: #f0fdf4;
}

.creation-step.error {
    border-color: #FF385C;
    background: #fff5f5;
}

.step-icon {
    font-size: 2rem;
    margin-right: 1.5rem;
    min-width: 50px;
    text-align: center;
}

.step-text {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-text);
}

.step-status {
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

/* Résultat de création */
#creation-result {
    text-align: center;
    padding: 3rem 2rem;
    background: #ECFDF5;
    border-radius: var(--border-radius-large);
    border: 2px solid var(--color-green);
    position: relative;
    overflow: hidden;
}

/* Effet confettis subtil */
#creation-result::before {
    content: '✨';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

#creation-result::after {
    content: '🎉';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.success-message {
    margin-bottom: 2rem;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-message h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--color-green);
    margin-bottom: 0.75rem;
}

.success-message p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

.product-preview {
    margin-bottom: 2rem;
}

.product-preview h5 {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

#product-mockups {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#product-mockups img {
    max-width: 200px;
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-soft);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
#view-product {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover,
#view-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,112,243,0.3);
}

.btn-secondary,
#create-another {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
    padding: 0.85rem 1.75rem;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
#create-another:hover {
    background: var(--color-gray-bg);
    border-color: #0070F3;
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE TABLETTE
   ============================================ */
@media (max-width: 1200px) and (min-width: 769px) {
    .zero2hero-steps-sticky {
        padding: 0.75rem 1.5rem;
    }
    
    .timeline {
        gap: 15px;
        padding: 15px 20px;
    }
    
    .timeline .step .icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .timeline .step .label {
        font-size: 14px;
    }
    
    .timeline .line {
        width: 60px;
    }
    
    #products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .product-card {
        padding-bottom: 1rem;
    }
    
    #zero2hero-generator #products-grid .product-card .product-info {
        padding: 1rem !important;
    }
    
    #zero2hero-generator #products-grid .product-card .product-title,
    #zero2hero-generator #products-grid .product-card .product-info h4,
    #zero2hero-generator .product-card .product-info h4.product-title {
        font-size: 0.975rem !important;
        line-height: 1.23 !important;
        height: 2.5rem !important;
        max-height: 2.5rem !important;
        min-height: 2.5rem !important;
        margin: 0 0 0.5rem 0 !important;
    }
    
    #zero2hero-generator #products-grid .product-card .product-description,
    #zero2hero-generator #products-grid .product-card .product-info p,
    #zero2hero-generator .product-card .product-info p.product-description {
        font-size: 0.85rem !important;
        line-height: 1.33 !important;
        height: 3.6rem !important;
        max-height: 3.6rem !important;
        min-height: 3.6rem !important;
        margin: 0 0 0.5rem 0 !important;
    }
    
    #zero2hero-generator #products-grid .product-card .product-price,
    #zero2hero-generator #products-grid .product-card .product-info .product-price,
    #zero2hero-generator .product-card .product-info div.product-price {
        font-size: 0.975rem !important;
        height: 1.2rem !important;
        max-height: 1.2rem !important;
        min-height: 1.2rem !important;
        margin: 0 0 0.5rem 0 !important;
    }
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
    .zero2hero-steps-sticky {
        padding: 0.75rem 0.5rem;
        margin-top: 15px !important;
        justify-content: center;
        width: 100%;
    }
    
    /* Timeline horizontale sur mobile */
    .timeline {
        flex-direction: row;
        gap: 8px;
        padding: 15px 10px;
        width: 100%;
        max-width: 100%;
    }
    
    .timeline .step .icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .timeline .step .label {
        font-size: 11px;
        margin-top: 6px;
    }
    
    .timeline .line {
        width: 20px;
        height: 3px;
        background: rgba(255,255,255,0.5);
        margin-top: -30px; /* Aligner avec le centre des icônes (45px / 2 + marge) */
        align-self: center;
        transition: background 0.4s ease;
    }
    
    /* Ligne complétée en mode mobile (horizontale) */
    .timeline .line.completed {
        background: linear-gradient(90deg, #22C55E, #16A34A);
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
    }
    
    #zero2hero-generator {
        margin: 0 auto;
        padding: 0 0.75rem;
    }
    
    .zero2hero-header {
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .zero2hero-header h2 {
        font-size: 1.6rem;
    }
    
    .zero2hero-header p {
        font-size: 1rem;
    }
    
    .workflow-step {
        padding: 1.5rem;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .gender-options {
        flex-direction: column;
    }
    
    .gender-option {
        flex-direction: row;
        justify-content: center;
    }
    
    #scenarios-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .product-filters {
        flex-direction: column;
    }
    
    #products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card {
        padding-bottom: 1rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    #zero2hero-generator #products-grid .product-card .product-info {
        padding: 0.875rem !important;
    }
    
    #zero2hero-generator #products-grid .product-card .product-title,
    #zero2hero-generator #products-grid .product-card .product-info h4,
    #zero2hero-generator .product-card .product-info h4.product-title {
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
        height: 2.4rem !important;
        max-height: 2.4rem !important;
        min-height: 2.4rem !important;
        margin: 0 0 0.4rem 0 !important;
    }
    
    #zero2hero-generator #products-grid .product-card .product-description,
    #zero2hero-generator #products-grid .product-card .product-info p,
    #zero2hero-generator .product-card .product-info p.product-description {
        font-size: 0.825rem !important;
        line-height: 1.3 !important;
        height: 3.4rem !important;
        max-height: 3.4rem !important;
        min-height: 3.4rem !important;
        margin: 0 0 0.4rem 0 !important;
    }
    
    #zero2hero-generator #products-grid .product-card .product-price,
    #zero2hero-generator #products-grid .product-card .product-info .product-price,
    #zero2hero-generator .product-card .product-info div.product-price {
        font-size: 0.95rem !important;
        height: 1.2rem !important;
        max-height: 1.2rem !important;
        min-height: 1.2rem !important;
        margin: 0 0 0.4rem 0 !important;
    }
    
    .product-select-btn {
        padding: 0.65rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
    
    .products-pagination {
        flex-wrap: wrap;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    /* Message de succès responsive */
    .success-title {
        font-size: 1.5rem;
    }
    
    .success-subtitle {
        font-size: 0.9rem;
    }
    
    .btn-primary-large {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    #generated-image-container {
        max-width: 100%;
    }
    
    #generated-image-container img {
        max-height: 300px;
    }
    
    /* Loader responsive */
    .ai-loader-container {
        padding: 3rem 1rem;
    }
    
    .ai-loader-title {
        font-size: 1.3rem;
    }
    
    .ai-loader-subtitle {
        font-size: 0.9rem;
        margin-bottom: 2rem !important;
    }
    
    .z2h-flat-fill {
        margin: 1rem auto;
    }
    
    .bolt {
        width: 100px;
        height: 133px;
    }
    
    .progress-text {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    #view-product,
    #create-another {
        width: 100%;
    }
    
    /* Bouton sticky au bas de l'écran sur mobile */
    .mobile-sticky-btn {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem;
        background: white;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
        z-index: 50;
    }
}

/* ============================================
   ANIMATIONS ET TRANSITIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

