/* ============================================================
   amazon-showcase.css - Fiche produit Amazon animee
   Remplace le background video quand annonceurs_id == 9
   ============================================================ */

/* ---------- FOND PLEIN ECRAN ---------- */
.amazon-showcase-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    cursor: pointer;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amazon-showcase-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(241, 175, 33, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: showcaseGlow 8s ease-in-out infinite alternate;
    top: 10%;
    left: 60%;
}

.amazon-showcase-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 153, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: showcaseGlow 6s ease-in-out infinite alternate-reverse;
    bottom: 10%;
    left: 20%;
}

@keyframes showcaseGlow {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.6; }
    100% { transform: translate(30px, -20px) scale(1.15); opacity: 1; }
}

/* ---------- CARTE PRODUIT ---------- */
.amazon-product-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 32px 28px 28px;
    max-width: 360px;
    width: 85vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(241, 175, 33, 0.15);
    text-align: center;
    animation: cardEntrance 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- IMAGE PRODUIT ---------- */
.amazon-product-card .product-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
    animation: imgFloat 4s ease-in-out infinite;
}

@keyframes imgFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ---------- TITRE ---------- */
.amazon-product-card .product-title {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
    margin: 0 0 10px;
    max-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    animation: fadeInUp 0.6s ease both;
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- ETOILES ---------- */
.amazon-stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease both;
    animation-delay: 0.5s;
}

.amazon-stars .stars-display {
    position: relative;
    display: inline-block;
    font-size: 18px;
    letter-spacing: 2px;
    color: #ddd;
}

.amazon-stars .stars-display::before {
    content: '\2605\2605\2605\2605\2605';
    color: #ff9900;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    width: var(--star-width, 0%);
}

.amazon-stars .stars-text {
    font-size: 13px;
    color: #777;
    font-weight: 600;
}

/* ---------- PRIX ---------- */
.amazon-product-card .product-price {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #b12704;
    margin: 6px 0 14px;
    animation: priceScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.7s;
}

@keyframes priceScale {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---------- BOUTON CTA ---------- */
.amazon-product-card .product-cta {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(180deg, #f7c948 0%, #f1af21 100%);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeInUp 0.5s ease both;
    animation-delay: 0.9s;
    box-shadow: 0 4px 15px rgba(241, 175, 33, 0.3);
}

.amazon-product-card .product-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 175, 33, 0.5);
    text-decoration: none;
    color: #1a1a1a;
}

/* ---------- BADGE "Bon Plan" ---------- */
.amazon-product-card .amazon-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    background: #f7c948;
    padding: 2px 10px;
    border-radius: 4px;
    margin-top: 10px;
    animation: fadeInUp 0.4s ease both;
    animation-delay: 1.1s;
}

/* ---------- LIEN "Voir d'autres Bons Plans" ---------- */
.amazon-product-card .amazon-more-link {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 8px;
    text-decoration: none;
    transition: color 0.2s;
    animation: fadeInUp 0.4s ease both;
    animation-delay: 1.2s;
}

.amazon-product-card .amazon-more-link:hover {
    color: #f1af21;
    text-decoration: underline;
}

/* ---------- SIDEBAR (pages secondaires) ---------- */
.amazon-sidebar-card {
    position: fixed;
    top: 90px;
    right: 40px;
    width: 280px;
    max-width: calc(100vw - 540px);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    padding: 24px 18px 16px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    animation: cardEntrance 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    z-index: 5;
}

.amazon-sidebar-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.amazon-sidebar-link:hover {
    text-decoration: none;
}

.amazon-sidebar-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin: 0 auto 12px;
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    animation: imgFloat 4s ease-in-out infinite;
}

.amazon-sidebar-title {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #e8e8e8;
    line-height: 1.35;
    margin: 0 0 8px;
    max-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.amazon-sidebar-price {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #f7c948;
    margin: 4px 0 12px;
}

.amazon-sidebar-cta {
    display: inline-block;
    padding: 10px 22px;
    background: linear-gradient(180deg, #f7c948 0%, #f1af21 100%);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 13px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(241, 175, 33, 0.3);
}

.amazon-sidebar-link:hover .amazon-sidebar-cta {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 175, 33, 0.5);
}

.amazon-sidebar-card .amazon-stars {
    margin-bottom: 6px;
}

.amazon-sidebar-card .amazon-stars .stars-display {
    font-size: 16px;
    color: #555;
}

.amazon-sidebar-card .amazon-stars .stars-text {
    color: #aaa;
}

.amazon-sidebar-card .amazon-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #1a1a1a;
    background: #f7c948;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 8px;
}

.amazon-sidebar-card .amazon-more-link {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
    text-decoration: none;
    transition: color 0.2s;
}

.amazon-sidebar-card .amazon-more-link:hover {
    color: #f7c948;
    text-decoration: underline;
}

/* Sur desktop, masquer la sidebar quand le plein ecran est affiche */
.amazon-sidebar-card.fullscreen-desktop {
    display: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
    /* Toutes les sidebars deviennent statiques sous le contenu */
    .amazon-sidebar-card {
        position: static;
        width: auto;
        max-width: 400px;
        margin: 20px auto;
    }
    /* Sur mobile, montrer la sidebar meme sur les pages plein ecran */
    .amazon-sidebar-card.fullscreen-desktop {
        display: block;
    }
    /* Masquer le fond plein ecran sur mobile (la sidebar suffit) */
    .amazon-showcase-bg {
        display: none;
    }
    .amazon-product-card {
        max-width: 300px;
        padding: 24px 20px 20px;
    }
    .amazon-product-card .product-img {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 600px) {
    .amazon-showcase-bg {
        align-items: flex-start;
        padding-top: 80px;
    }
    .amazon-product-card {
        max-width: 280px;
        padding: 20px 16px 16px;
    }
    .amazon-product-card .product-img {
        width: 120px;
        height: 120px;
    }
    .amazon-product-card .product-title {
        font-size: 13px;
    }
    .amazon-product-card .product-price {
        font-size: 22px;
    }
}
