/* Mise à jour Globale du Body Store */
body { background-color: #f5f5f7 !important; }

/* Container de la page Store */
.afi-store-page-canvas {
    position: relative;
    width: 100%;
    z-index: 1;
}

/* Base Fixe pour Effet Parallax Liquid Glass */
.afi-store-halo-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* Halos Lumineux Artificiels (Liquid Glass) */
.afi-store-halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.65;
    animation: afi-store-halo-drift 25s infinite alternate ease-in-out;
}
.afi-store-halo-green { top: -10vh; left: 0vw; width: 50vw; height: 50vh; background: rgba(52, 199, 89, 0.35); }
.afi-store-halo-blue { bottom: -10vh; right: 5vw; width: 60vw; height: 60vh; background: rgba(0, 113, 227, 0.40); animation-delay: -5s; }
.afi-store-halo-pink { top: 30vh; right: 25vw; width: 45vw; height: 45vh; background: rgba(255, 45, 85, 0.30); animation-delay: -10s; }

@keyframes afi-store-halo-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8vw, -8vh) scale(1.15); }
}

/* Bascule des couleurs "Classic Mac App Store Light Mode" -> Liquid Glass */
.afi-storefront-wrapper {
    display: flex;
    flex-direction: row;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    color: #1d1d1f;
    min-height: 80vh;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
    margin: 20px 0;
    overflow: hidden;
}

/* --- SIDEBAR --- */
.afi-store-sidebar {
    width: 280px !important;
    background-color: transparent !important; /* Fusionne avec le glassmorphism parent */
    border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 35px 25px !important; /* Espacement magistral */
    flex-shrink: 0;
}

.afi-sidebar-search {
    background-color: rgba(0, 0, 0, 0.05) !important; /* Enfoncement très léger */
    border-radius: 10px !important;
    padding: 10px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #86868b !important;
    font-size: 14px !important;
    margin-bottom: 40px !important;
}
.afi-sidebar-search svg { width: 14px !important; height: 14px !important; opacity: 0.6 !important; color: #1d1d1f !important; }
.afi-sidebar-search input::placeholder { color: #86868b !important; font-weight: 500; }

.afi-sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important; /* Plus aéré */
}

.afi-nav-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    color: #1d1d1f !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.afi-nav-item svg, .afi-nav-item .dashicons {
    color: #0071e3 !important; /* Icône bleue par défaut */
    opacity: 0.9 !important;
    transition: all 0.2s ease !important;
}

.afi-nav-item:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* Version Sélectionnée (Mac App Store Style) */
.afi-nav-item.active {
    background-color: #0071e3 !important; /* Pill Bleu vif */
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3) !important; /* Légère aura */
}
.afi-nav-item.active svg, .afi-nav-item.active .dashicons {
    color: #ffffff !important; /* Icône passe en blanc */
    opacity: 1 !important;
}

/* --- MAIN CONTENT --- */
.afi-store-main {
    flex-grow: 1;
    padding: 0;
    overflow-y: auto;
}

.afi-app-category {
    display: none;
    animation: afiFadeIn 0.3s ease;
    padding: 40px;
}

.afi-app-category.active {
    display: block;
}

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

.afi-category-header {
    margin-bottom: 30px;
}

.afi-category-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    margin: 0 0 5px 0 !important;
    color: #1d1d1f !important;
}

.afi-category-subtitle {
    font-size: 15px;
    color: #86868b;
    margin: 0;
}

/* --- SECTION / ROW --- */
.afi-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px 30px;
}

/* Redimensionnement des Headers en mode Recherche */
.afi-storefront-wrapper.afi-is-searching .afi-category-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5ea;
    padding-bottom: 8px;
}

.afi-storefront-wrapper.afi-is-searching .afi-category-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #86868b !important;
}

.afi-storefront-wrapper.afi-is-searching .afi-category-subtitle {
    display: none !important;
}

.afi-empty-state {
    text-align: center;
    padding: 80px 0;
    color: #86868b;
    font-size: 15px;
}

/* --- CARDS (Style Apple : Sans fond, ligne séparatrice, icône gauche) --- */
.afi-app-card {
    display: flex;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f5; /* Séparateur léger */
    transition: all 0.2s ease;
}

.afi-app-card:hover {
    background-color: rgba(255, 255, 255, 0.10); /* Très subtil, presque transparent */
    backdrop-filter: blur(15px) saturate(120%);
    -webkit-backdrop-filter: blur(15px) saturate(120%);
    border-radius: 14px;
    transform: scale(1.02);
    border-color: transparent;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    z-index: 2;
    position: relative;
}

.afi-app-card:last-child {
    border-bottom: none;
}

.afi-app-card-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 18px;
    background-color: #f5f5f7;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.08); /* Effet d'ombre d'icône iOS/Mac */
}

.afi-app-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.afi-app-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Force l'alignement à gauche */
    text-align: left; /* Contre le style du thème parent */
}

.afi-app-card-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 0px 0 !important; /* Pas d'espace sous le titre */
    padding: 0 !important;
    color: #1d1d1f;
    line-height: 1.2;
}

.afi-app-card-cat {
    font-size: 13px;
    color: #86868b;
    margin: 2px 0 12px 0 !important; /* Petit espace bouton, collé au titre */
    padding: 0 !important;
    display: block;
    line-height: 1.2;
}

.afi-app-card-action {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

/* Boutons "Obtenir/Prix" type App Store */
.afi-store-btn {
    background-color: #f0f0f5;
    color: #0071e3;
    border: none;
    border-radius: 14px;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    display: inline-block;
    line-height: 1;
}

.afi-store-btn:hover:not(.afi-added):not(.afi-loading) {
    background-color: #0071e3;
    color: #ffffff;
}

.afi-store-btn.afi-added {
    background-color: #34c759 !important;
    color: #ffffff !important;
    cursor: pointer !important;
    pointer-events: auto !important; /* Permet le clic vers le panier */
}

/* Bascule de texte au survol des produits ajoutés */
.afi-btn-text-cart-hover { display: none; }
.afi-store-btn.afi-added:hover {
    background-color: #2fb350 !important;
}
.afi-store-btn.afi-added:hover .afi-btn-text-cart-normal { display: none; }
.afi-store-btn.afi-added:hover .afi-btn-text-cart-hover { display: inline; }

.afi-store-btn.afi-loading {
    opacity: 0.7 !important;
    cursor: wait !important;
}/* =========================================
   CHECKOUT STEPS (Panier -> Paiement)
   ========================================= */
.afi-checkout-steps-container,
.et_pb_module .afi-checkout-steps-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    margin: 40px auto 30px !important;
    max-width: 600px !important;
    width: 100% !important;
    background: transparent !important;
    padding: 0 !important;
}

.afi-checkout-steps-container .afi-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: relative !important;
    z-index: 2 !important;
    flex: 0 0 auto !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.afi-checkout-steps-container .afi-step-circle-wrapper {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: transparent !important;
    transition: background-color 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

.afi-checkout-steps-container .afi-step-circle {
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

.afi-checkout-steps-container .afi-step-svg {
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
}

.afi-checkout-steps-container .afi-step-label {
    margin-top: 5px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Étape Active (Celle en cours) */
.afi-checkout-steps-container .afi-step-active .afi-step-circle-wrapper {
    background-color: #f0f7f9 !important; /* anneau très léger */
    animation: afi-step-pulse 2s infinite cubic-bezier(0.66, 0, 0, 1) !important;
}

@keyframes afi-step-pulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 70, 100, 0.3); }
    70% { box-shadow: 0 0 0 15px rgba(22, 70, 100, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 70, 100, 0); }
}

.afi-checkout-steps-container .afi-step-active .afi-step-circle {
    background-color: #164664 !important; /* Bleu très foncé comme l'image */
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(22, 70, 100, 0.2) !important;
    border: none !important;
}
.afi-checkout-steps-container .afi-step-active .afi-step-svg {
    stroke: #ffffff !important;
}
.afi-checkout-steps-container .afi-step-active .afi-step-label {
    color: #164664 !important;
}

/* Étape Complétée (Déjà passée) */
.afi-checkout-steps-container .afi-step-completed .afi-step-circle {
    background-color: #ffffff !important;
    border: 2px solid #8ba4b9 !important;
    color: #8ba4b9 !important;
}
.afi-checkout-steps-container .afi-step-completed .afi-step-svg {
    stroke: #8ba4b9 !important;
}
.afi-checkout-steps-container .afi-step-completed .afi-step-label {
    color: #8ba4b9 !important;
}

/* Étape En attente (Celle à venir) */
.afi-checkout-steps-container .afi-step-pending .afi-step-circle {
    background-color: #ffffff !important;
    border: 2px solid #cedae3 !important;
    color: #cedae3 !important;
}
.afi-checkout-steps-container .afi-step-pending .afi-step-svg {
    stroke: #cedae3 !important;
}
.afi-checkout-steps-container .afi-step-pending .afi-step-label {
    color: #a7b7c6 !important;
}

/* Séparateur Ligne */
.afi-checkout-steps-container .afi-step-divider {
    flex-grow: 1 !important;
    height: 2px !important;
    background-color: #cedae3 !important;
    margin: 0 15px !important;
    position: relative !important;
    top: -15px !important; /* Aligné avec les cercles */
    transition: background-color 0.3s ease !important;
    display: block !important;
    width: auto !important;
    border: none !important;
    overflow: hidden !important; /* Pour masquer la boule en dehors */
}

/* Lueur boule magique animée sur la ligne (Etape 1 seulement) */
.afi-checkout-steps-container .afi-step-divider:not(.afi-divider-active)::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: -60px; /* PAS de !important, sinon l'animation keyframes ne peut pas ecraser la valeur */
    width: 60px !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #164664, transparent) !important;
    box-shadow: 0 0 5px 1px #164664 !important;
    transform: translateY(-50%) !important;
    animation: afi-magic-trail 2.5s infinite ease-in-out !important;
}

@keyframes afi-magic-trail {
    0% { left: -60px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.afi-checkout-steps-container .afi-step-divider.afi-divider-active {
    background-color: #8ba4b9 !important; /* La ligne devient plus foncée vers l'étape active */
}

/* Sur mobile */
@media (max-width: 600px) {
    .afi-checkout-steps-container {
        max-width: 90% !important;
        margin: 20px auto !important;
    }
    .afi-checkout-steps-container .afi-step-circle-wrapper {
        width: 60px !important;
        height: 60px !important;
    }
    .afi-checkout-steps-container .afi-step-circle {
        width: 40px !important;
        height: 40px !important;
    }
    .afi-checkout-steps-container .afi-step-svg {
        width: 18px !important;
        height: 18px !important;
    }
    .afi-checkout-steps-container .afi-step-label {
        font-size: 11px !important;
        margin-top: 5px !important;
    }
    .afi-checkout-steps-container .afi-step-divider {
        top: -10px !important;
        margin: 0 5px !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .afi-storefront-wrapper {
        flex-direction: column;
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    .afi-store-sidebar {
        width: 100% !important;
        min-width: unset;
        min-height: unset;
        position: relative;
        padding: 16px 16px 8px 16px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    }

    .afi-sidebar-nav {
        display: flex;
        flex-direction: row !important;
        overflow-x: auto;
        padding-bottom: 6px;
        gap: 6px !important;
    }

    .afi-nav-item {
        white-space: nowrap;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    .afi-store-main {
        padding: 0 !important;
    }

    /* Catégorie : supprimer le padding horizontal pour que le slider soit bord-à-bord */
    .afi-app-category {
        padding: 20px 12px !important;
    }

    /* Retirer le border-radius du slider pour qu'il touche les bords */
    .afi-hero-banner-container {
        border-radius: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}


/* ==========================================
   AFI CUSTOM CART (Page Panier)
   ========================================== */
.afi-custom-cart-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1d1d1f;
}

.afi-cart-page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    color: #1d1d1f;
}

.afi-cart-empty {
    text-align: center;
    padding: 80px 20px;
}
.afi-cart-empty h2 {
    font-size: 24px;
    color: #1d1d1f;
    margin-top: 20px;
}

.afi-cart-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.afi-cart-items-section {
    flex: 1;
    border-top: 1px solid #e5e5ea;
}

.afi-cart-item {
    display: flex;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid #e5e5ea;
    gap: 20px;
}

.afi-cart-item-icon {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08);
    background-color: #fcfcfd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.afi-cart-item-details {
    flex: 1;
}

.afi-cart-item-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    margin: 0 0 4px 0 !important;
    color: #1d1d1f !important;
}

.afi-cart-item-type {
    font-size: 13px;
    color: #86868b;
}

.afi-cart-item-price {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    min-width: 80px;
    text-align: right;
}

.afi-cart-item-action {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.afi-cart-remove-btn {
    color: #e30000;
    opacity: 0.6;
    transition: opacity 0.2s;
    display: flex;
}
.afi-cart-remove-btn:hover {
    opacity: 1;
    color: #e30000;
}

/* Sidebar Resumé */
.afi-cart-summary-section {
    width: 320px;
    position: sticky;
    top: 40px;
}

.afi-cart-summary-card {
    background: #fbfbfd;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.afi-cart-summary-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    margin: 0 0 20px 0 !important;
    color: #1d1d1f !important;
}

.afi-cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.afi-cart-summary-total {
    font-size: 20px;
    font-weight: 600;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5ea;
}

.afi-cart-checkout-btn {
    display: block;
    width: 100%;
    margin-top: 24px;
    background-color: #0071e3;
    color: #ffffff !important;
    text-align: center;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}
.afi-cart-checkout-btn:hover {
    background-color: #0077ed;
    color: #ffffff;
}

/* Responsive Cart */
@media (max-width: 768px) {
    .afi-cart-layout {
        flex-direction: column;
    }
    .afi-cart-summary-section {
        width: 100%;
        position: relative;
        top: 0;
    }
    .afi-cart-item {
        flex-wrap: wrap;
    }
    .afi-cart-item-price {
        text-align: left;
    }
    .afi-cart-item-action {
        margin-left: auto;
    }
}

/* ==========================================
   HERO SLIDER (App à la Une)
   ========================================== */
.afi-hero-banner-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    border-radius: 26px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.6);
}

.afi-hero-slider {
    position: relative;
    width: 100%;
    min-height: 380px;
    display: grid;
}

.afi-hero-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateX(30px);
    display: flex;
    flex-wrap: wrap;        /* Permet à .afi-hero-actions de passer sur sa propre ligne */
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 5%;
    z-index: 1;
}

.afi-hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 2;
}

/* Background gradient liquid affectant tout le slide */
.afi-hero-slide-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    opacity: 0.6;
}

.afi-hero-slide-content {
    flex: 0 1 40%;
    max-width: 40%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.afi-hero-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0,0,0,0.05);
    color: var(--hero-color, #0071e3);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.afi-hero-title {
    font-size: 42px !important;
    font-weight: 800 !important;
    letter-spacing: -1px;
    margin: 0 0 4px 0 !important;
    color: #1d1d1f !important;
    line-height: 1.1;
}

.afi-hero-subtitle {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--hero-color, #0071e3) !important;
    margin: 0 0 16px 0 !important;
}

.afi-hero-desc {
    font-size: 15px;
    color: #515154;
    line-height: 1.5;
    margin: 0 0 30px 0 !important;
    max-width: 90%;
}

.afi-hero-actions {
    /* Rangée pleine largeur sous les 2 colonnes logo+texte */
    flex-basis: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 0 40px 30px 40px;
    flex-wrap: nowrap; /* Les boutons ne wrappent JAMAIS entre eux */
}

/* Bouton secondaire "En savoir plus" */
.afi-hero-btn-secondary {
    background: #1d1d1f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15) !important;
}

/* Badge Achat Unique / Licence à vie */
.afi-hero-lifetime-badge {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.2;
    font-size: 11px;
    color: #86868b;
}
.afi-hero-lifetime-badge strong {
    color: #1d1d1f;
    font-weight: 700;
    font-size: 12px;
}
.afi-hero-lifetime-badge span {
    font-size: 9px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.afi-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hero-color, #0071e3);
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.afi-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.afi-hero-btn.added {
    background: #34c759 !important;
}

.afi-hero-btn.private {
    background: #f0f5ff !important;
    color: #0071e3 !important;
    box-shadow: none;
    gap: 6px;
}

/* Visuel / Icône géante à droite */
.afi-hero-slide-visual {
    flex: 0 1 40%;
    max-width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.afi-hero-icon-wrapper {
    width: 220px;
    height: 220px;
    border-radius: 46px;
    background: #fbfbfd;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
    border: 2px solid rgba(255,255,255,0.5);
}

.afi-hero-slide.active .afi-hero-icon-wrapper {
    animation: floatingIcon 6s ease-in-out infinite alternate;
}

@keyframes floatingIcon {
    0% { transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(0); }
    100% { transform: perspective(1000px) rotateY(-10deg) rotateX(2deg) translateY(-15px); }
}

/* Chevrons et Dots de Navigation */
.afi-hero-chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(5px);
}

.afi-hero-chevron:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.afi-hero-prev { left: 15px; }
.afi-hero-next { right: 15px; }

.afi-hero-dots {
    position: absolute;
    bottom: 20px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.afi-hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s;
}

.afi-hero-dot.active {
    width: 24px;
    background: var(--hero-color, #0071e3);
}

/* ==========================================
   RESPONSIVE HERO SLIDER
   ========================================== */

/* --- Tablette + Mobile (jusqu'à 900px) --- */
@media (max-width: 900px) {

    .afi-hero-slider {
        height: auto !important;
        min-height: unset !important;
        padding: 0 !important;
    }

    /* Tous les layouts → colonne : visual en haut, content au milieu, actions en bas */
    .afi-hero-slide,
    .afi-hero-slide.layout-1,
    .afi-hero-slide.layout-2 {
        flex-direction: column !important;
        text-align: center !important;
        padding: 28px 16px 16px 16px !important;
        position: static !important;
        display: none !important;
        transform: none !important;
        gap: 0 !important;
        align-items: center !important;
    }

    .afi-hero-slide.active,
    .afi-hero-slide.layout-1.active,
    .afi-hero-slide.layout-2.active {
        display: flex !important;
    }

    /* Visuel (logo) en 1er */
    .afi-hero-slide-visual,
    .afi-hero-slide.layout-1 .afi-hero-slide-visual,
    .afi-hero-slide.layout-2 .afi-hero-slide-visual {
        order: 1 !important;
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 0 16px 0 !important;
    }

    /* Contenu (texte) en 2ème */
    .afi-hero-slide-content,
    .afi-hero-slide.layout-1 .afi-hero-slide-content,
    .afi-hero-slide.layout-2 .afi-hero-slide-content {
        order: 2 !important;
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 !important;
    }

    /* Boutons en 3ème — pleine largeur, centrés */
    .afi-hero-actions {
        order: 3 !important;
        flex: none !important;
        width: 100% !important;
        padding: 16px 16px 20px 16px !important;
        justify-content: center !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    /* Icône réduite */
    .afi-hero-icon-wrapper,
    .afi-hero-slide.layout-1 .afi-hero-icon-wrapper,
    .afi-hero-slide.layout-2 .afi-hero-icon-wrapper {
        width: 110px !important;
        height: 110px !important;
        border-radius: 24px !important;
        transform: none !important;
        animation: none !important;
    }

    .afi-hero-title    { font-size: 26px !important; }
    .afi-hero-subtitle { font-size: 14px !important; }
    .afi-hero-desc     { font-size: 13px !important; max-width: 100% !important; margin-bottom: 8px !important; }

    .afi-hero-prev, .afi-hero-next { display: none !important; }
    .afi-hero-dots  { bottom: 4px !important; }
    .afi-hero-progress-bar { bottom: 0 !important; }
}

/* --- Mobile (jusqu'à 640px) --- */
@media (max-width: 640px) {

    .afi-hero-banner-container { border-radius: 16px !important; margin-bottom: 16px !important; }

    .afi-hero-icon-wrapper,
    .afi-hero-slide.layout-1 .afi-hero-icon-wrapper,
    .afi-hero-slide.layout-2 .afi-hero-icon-wrapper {
        width: 90px !important;
        height: 90px !important;
        border-radius: 20px !important;
    }

    .afi-hero-title    { font-size: 22px !important; }
    .afi-hero-subtitle { font-size: 13px !important; margin-bottom: 8px !important; }
    .afi-hero-desc     { font-size: 12px !important; }

    .afi-hero-btn {
        padding: 10px 18px !important;
        font-size: 13px !important;
        border-radius: 14px !important;
    }

    /* "Achat Unique" sous les boutons */
    .afi-hero-lifetime-badge {
        order: 3 !important;
        margin-top: 4px !important;
        align-items: center !important;
    }
}

/* --- Très petit mobile (jusqu'à 480px) --- */
@media (max-width: 480px) {
    .afi-storefront-wrapper { margin: 8px 0 !important; border-radius: 12px !important; }
    .afi-hero-title { font-size: 19px !important; }

    .afi-hero-btn {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
}


/* Fix Doublon WC Panier */
.afi-storefront-wrapper a.added_to_cart {
    display: none !important;
}

/* Progress Bar */
.afi-hero-progress-bar {
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.05);
    z-index: 10;
}

.afi-hero-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--hero-color, #0071e3);
}

@keyframes afiSliderProgress {
    from { width: 0%; }
    to { width: 100%; }
}

.afi-hero-progress-fill.run {
    animation: afiSliderProgress 5s linear forwards;
}

.afi-hero-progress-fill.paused {
    animation-play-state: paused;
}

/* ==========================================
   LAYOUT MATRICES (Multi-design)
   ========================================== */

/* Layout 1 : Inversé (Image gauche, Texte droite) */
.afi-hero-slide.layout-1 {
    flex-direction: row-reverse;
}
.afi-hero-slide.layout-1 .afi-hero-icon-wrapper {
    transform: perspective(1000px) rotateY(15deg) rotateX(5deg);
}
@keyframes floatingIconLayout1 {
    0% { transform: perspective(1000px) rotateY(15deg) rotateX(5deg) translateY(0); }
    100% { transform: perspective(1000px) rotateY(10deg) rotateX(2deg) translateY(-15px); }
}
.afi-hero-slide.layout-1.active .afi-hero-icon-wrapper {
    animation: floatingIconLayout1 6s ease-in-out infinite alternate;
}
.afi-hero-slide.layout-1 .afi-hero-slide-bg {
    background: radial-gradient(circle at left top, var(--hero-color)33 0%, transparent 60%);
}

/* Layout 2 : Centré condensé (logo centré + petite icône, texte à droite) */
.afi-hero-slide.layout-2 {
    /* On garde flex-direction: row avec flex-wrap pour être compatible */
    justify-content: center;
    align-items: center;
    padding: 30px 20px 0 20px;
    gap: 4%;
}

.afi-hero-slide.layout-2 .afi-hero-slide-content {
    max-width: 50%;
    flex: 0 1 50%;
}

.afi-hero-slide.layout-2 .afi-hero-slide-visual {
    flex: 0 1 25%;
    max-width: 25%;
}

.afi-hero-slide.layout-2 .afi-hero-icon-wrapper {
    width: 130px;
    height: 130px;
    border-radius: 28px;
    transform: perspective(1000px) rotateY(0deg) rotateX(8deg);
}

@keyframes floatingIconLayout2 {
    0%   { transform: perspective(1000px) rotateY(0deg) rotateX(8deg) translateY(0); }
    100% { transform: perspective(1000px) rotateY(0deg) rotateX(2deg) translateY(-10px); }
}

.afi-hero-slide.layout-2.active .afi-hero-icon-wrapper {
    animation: floatingIconLayout2 4s ease-in-out infinite alternate;
}

.afi-hero-slide.layout-2 .afi-hero-slide-bg {
    background: radial-gradient(circle at center top, var(--hero-color)22 0%, transparent 70%);
}



