/* === SINGLE PRODUCT STYLES === */

/* Import de la police Lato uniquement pour la breadcrumb */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;600&display=swap');

/* ------- Typographies clés ------- */
.single-product h1.product_title,
.single-product .price,
.single-product .single_add_to_cart_button {
    font-family: Tahoma, Geneva, sans-serif;
}

/* Breadcrumb (fil d'Ariane) */
.single-product .woocommerce-breadcrumb {
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
}

.single-product .woocommerce-breadcrumb a {
    color: #444;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'Lato', sans-serif;
}

.single-product .woocommerce-breadcrumb a:hover {
    color: var(--bs-primary, #4a8ef0);
    text-decoration: none;
}

/* ------- Titre / Prix ------- */
.single-product h1.product_title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: #111;
}

.single-product .woocommerce:where(body:not(.woocommerce-uses-block-theme)) div.product p.price,
.single-product .woocommerce:where(body:not(.woocommerce-uses-block-theme)) div.product span.price {
    font-weight: 600;
    font-size: 1.3rem;
    color: #000 !important;
    margin-bottom: 1rem;
    display: block;
    font-family: Tahoma, Geneva, sans-serif;
}

/* ------- Bouton "Ajouter au panier" (base) ------- */
.single-product .single_add_to_cart_button {
    font-weight: 600;
    text-transform: uppercase;
    background-color: #000; /* fond noir */
    border: none;
    color: #fff;
    padding: 0 1.5rem;
    border-radius: 2rem;
    transition: all 0.25s ease;
    font-family: Tahoma, Geneva, sans-serif;
    height: 48px; /* même hauteur que la quantité */
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-product .single_add_to_cart_button:hover,
.single-product .single_add_to_cart_button:focus {
    background-color: #222;
    color: #fff;
}

/* ------- Correctif priorité WooCommerce (neutralise le violet des .button.alt) ------- */
/* Sélecteur copié depuis l'inspecteur, remis ici pour surclasser */
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button.alt {
    background-color: #000 !important; /* noir forcé */
    border-color: #000 !important;
    color: #fff !important;
}

/* États hover/focus/active/disabled cohérents en noir */
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.alt:hover,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt:hover,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button.alt:hover,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button.alt:hover,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.alt:hover,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button.alt:hover,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.alt:focus,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt:focus,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button.alt:focus,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button.alt:focus,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.alt:focus,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button.alt:focus {
    background-color: #222 !important;
    border-color: #222 !important;
    color: #fff !important;
}

/* Quand Woo injecte .added ou .loading, on reste en noir */
.single-product .single_add_to_cart_button.added,
.single-product .single_add_to_cart_button.loading {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

/* ------- Bloc panier ------- */
.single-product form.cart {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Champ quantité : même hauteur que le bouton */
.single-product .quantity input[type=number] {
    max-width: 80px;
    text-align: center;
    border: 1px solid #ccc;
    height: 48px;
    border-radius: 0.5rem;
    font-family: Tahoma, Geneva, sans-serif;
}

/* ------- Image principale (inchangée) ------- */
.single-product div.images img {
    border-radius: 0;
    transition: transform 0.3s ease;
}

.single-product div.images img:hover {
    transform: scale(1.03);
}

/* ------- Galerie : miniatures ------- */
.single-product .woocommerce-product-gallery {
    --thumb-gap: 8px;
    --thumb-height: 70px;
    --thumb-border: 1px solid rgba(0,0,0,.08);
}

/* UL des miniatures */
.single-product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    list-style: none;
}

/* LI : 4 colonnes fixes */
.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    width: 25%;
    padding: 2px 2px 0 0;
    box-sizing: border-box;
}

/* IMG des miniatures --- sans arrondi */
.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
    width: 100%;
    height: var(--thumb-height);
    object-fit: cover;
    border-radius: 0;
    border: var(--thumb-border);
    background: #fff;
    display: block;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
    opacity: 0.95;
}

/* Survol : légère élévation */
.single-product .woocommerce-product-gallery .flex-control-thumbs li img:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    opacity: 1;
}

/* État actif (miniature sélectionnée) --- bordure noire */
.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
    border-color: #000;
    opacity: 1;
}

/* Petits écrans */
@media (max-width: 576px) {
    .single-product .woocommerce-product-gallery {
        --thumb-gap: 6px;
        --thumb-height: 60px;
    }
}

/* Onglets & produits liés */
.single-product .woocommerce-tabs,
.single-product .related.products {
    font-family: Tahoma, Geneva, sans-serif;
}

/* Amélioration page de produit ici */

/* Base (toutes tailles) */
.single-product div.product p.price,
.single-product div.product span.price {
    margin: 20px 0 0 0;
}

.single-product .woocommerce-product-details__short-description {
    margin: 20px 0 20px 0;
}

.single-product form.cart + .mytheme-product-usps {
    margin-top: 50px;
    margin-bottom: 100px;
}

/* Par défaut (desktop) */
.woocommerce div.product form.cart .button {
    width: 75%;
}

.paddin-6 {
    padding: 10px 6rem 0 6rem;
}

/* ≤1200px : seul cas où tu voulais une marge différente sur le prix */
@media (max-width: 1200px) {
    .single-product div.product p.price,
    .single-product div.product span.price {
        margin: 10px 0 0 0;
    }
    
    .woocommerce div.product form.cart .button {
        width: 70%;
    }
    
    .paddin-6 {
        padding: 1rem 1rem 0 1rem;
    }
}

/* ≤992px : bouton plein largeur (meilleure UX tablette/mobile) */
@media (max-width: 992px) {
    .woocommerce div.product form.cart .button {
        width: 69%;
    }
}

@media (max-width: 892px) {
    .woocommerce div.product form.cart .button {
        width: 68%;
    }
}

/* ≤767px : on garde 100% pour la lisibilité */
@media (max-width: 767px) {
    .woocommerce div.product form.cart .button {
        width: 67%;
    }
    
    .paddin-6 {
        padding: 2rem 0.5rem 0 0.5rem;
    }
}

@media (max-width: 600px) {
    .woocommerce div.product form.cart .button {
        width: 65%;
    }
    
    .paddin-6 {
        padding: 1rem 1rem 0 1rem;
    }
}

@media (max-width: 560px) {
    .woocommerce div.product form.cart .button {
        width: 62%;
    }
    
    .paddin-6 {
        padding: 1rem 1rem 0 1rem;
    }
}

/* ≤500px : idem, 100% */
@media (max-width: 500px) {
    .woocommerce div.product form.cart .button {
        width: 60%;
    }
    
    .paddin-6 {
        padding: 1rem 1rem 0 0 0;
    }
}

/* ========================
   CONTAINER PROMO - VERSION PREMIUM AMÉLIORÉE
   ======================== */

.product-promo-container {
    margin-bottom: 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ========================
   BADGE "OFFRE DU MOIS" - VERSION PREMIUM
   ======================== */

.promo-badge-wrapper {
    position: relative;
    display: inline-block;
}

.promo-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff1744 0%, #e91e63 50%, #d81b60 100%);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: Tahoma, Geneva, sans-serif;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.35), 
                0 2px 8px rgba(233, 30, 99, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Effet de brillance animé subtil */
.promo-badge-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shine 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.promo-badge:hover {
    background: linear-gradient(135deg, #ff1744 0%, #d81b60 50%, #c2185b 100%);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.45), 
                0 3px 12px rgba(233, 30, 99, 0.3);
}

/* Petit point lumineux pour attirer l'attention */
.promo-badge::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 8px;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ========================
   CODE PROMO - TEXTE SIMPLE ET ÉLÉGANT
   ======================== */

.promo-code {
    display: inline-flex;
    align-items: center;
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-family: Tahoma, Geneva, sans-serif;
    background: transparent;
    border: none;
    position: relative;
    padding: 4px 8px;
    transition: all 0.3s ease;
    cursor: default;
}


/* Effet au survol subtil */
.promo-code:hover {
    color: #000000;
    transform: translateX(2px);
}

/* ========================
   RESPONSIVE - BADGE PROMO
   ======================== */

@media (max-width: 768px) {
    .product-promo-container {
        text-align: center;
        justify-content: center;
        margin-bottom: 0.75rem;
        gap: 10px;
    }
    
    .promo-badge {
        font-size: 0.7rem;
        padding: 5px 14px;
        border-radius: 18px;
    }
    
    .promo-code {
        font-size: 0.88rem;
    }
    
    .promo-code::before {
        font-size: 0.95rem;
        margin-right: 5px;
    }
}

@media (max-width: 480px) {
    .product-promo-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .promo-badge {
        font-size: 0.68rem;
        padding: 4px 12px;
    }
    
    .promo-code {
        font-size: 0.85rem;
    }
}

/* ========================
   ACCESSIBILITÉ - BADGE PROMO
   ======================== */

@media (prefers-reduced-motion: reduce) {
    .promo-badge,
    .promo-code,
    .promo-badge-shine {
        animation: none !important;
        transition: none !important;
    }
    
    .promo-badge::before {
        animation: none !important;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .promo-code {
        color: #e0e0e0;
    }
    
    .promo-code:hover {
        color: #ffffff;
    }
}

/* ========================
   SPINNER BOOTSTRAP - BOUTON AJOUTER AU PANIER
   ======================== */

/* État de chargement du bouton */
.single-product .single_add_to_cart_button.is-adding {
    position: relative;
    color: #fff !important;
    cursor: not-allowed;
    opacity: 0.85;
}

/* Le spinner Bootstrap intégré */
.single-product .single_add_to_cart_button .spinner-border {
    display: inline-block;
    vertical-align: middle;
}

/* Ajustement du spinner sur mobile */
@media (max-width: 575.98px) {
    .single-product .single_add_to_cart_button .spinner-border-sm {
        width: 0.9rem;
        height: 0.9rem;
        border-width: 0.15em;
    }
}

/* Animation pulse supplémentaire (optionnel) */
.single-product .single_add_to_cart_button.is-adding {
    animation: btnPulse 1.5s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% {
        opacity: 0.85;
    }
    50% {
        opacity: 1;
    }
}

/* Désactivation hover pendant le chargement */
.single-product .single_add_to_cart_button.is-adding:hover,
.single-product .single_add_to_cart_button.is-adding:focus {
    background-color: #000 !important;
    transform: none !important;
    box-shadow: none !important;
}