/**
 * Additional Responsive Styles
 * 
 * @package JVPC_New
 * @since 1.0.0
 */

/* ===========================================
   BACK TO TOP BUTTON
   =========================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===========================================
   BREADCRUMBS
   =========================================== */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.breadcrumbs a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.breadcrumbs span {
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-xs) var(--spacing-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.breadcrumbs .separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 var(--spacing-xs);
    user-select: none;
}

/* ===========================================
   PAGINATION
   =========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-2xl) 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: white;
    border: 2px solid var(--bg-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination a.active,
.pagination span.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-previous,
.pagination-next {
    font-weight: 600;
}

.pagination-numbers {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

/* ===========================================
   SOCIAL SHARING
   =========================================== */
.social-sharing {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

.social-sharing-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    transition: all var(--transition-normal);
}

.social-twitter {
    background-color: #1DA1F2;
}

.social-twitter:hover {
    background-color: #0d8bd9;
    transform: scale(1.1);
}

.social-facebook {
    background-color: #4267B2;
}

.social-facebook:hover {
    background-color: #2d4a8f;
    transform: scale(1.1);
}

.share-twitter-btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: #1DA1F2;
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.share-twitter-btn:hover {
    background-color: #0d8bd9;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===========================================
   PRODUCT INFO MESSAGE
   =========================================== */
.product-info-message {
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    margin-top: var(--spacing-xl);
}

/* ===========================================
   CATEGORY BADGE
   =========================================== */
.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--secondary-color);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-normal);
    white-space: nowrap;
    margin: 0;
    line-height: 1.2;
}

.category-badge:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===========================================
   PRODUCT META (Badges container)
   =========================================== */
.product-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin: var(--spacing-md) 0;
}

.product-platform-wrapper {
    display: flex;
    align-items: center;
    margin: 0;
}

/* ===========================================
   PLATFORM BADGE
   =========================================== */
.jvpc-platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin: 0;
    line-height: 1.2;
}

a.jvpc-platform-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===========================================
   PRODUCT ANIMATIONS
   =========================================== */
.product-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.product-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation */
.products-grid .product-card:nth-child(1) { transition-delay: 0.1s; }
.products-grid .product-card:nth-child(2) { transition-delay: 0.2s; }
.products-grid .product-card:nth-child(3) { transition-delay: 0.3s; }
.products-grid .product-card:nth-child(4) { transition-delay: 0.4s; }
.products-grid .product-card:nth-child(5) { transition-delay: 0.5s; }
.products-grid .product-card:nth-child(6) { transition-delay: 0.6s; }

/* ===========================================
   LOADING STATE
   =========================================== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================================
   UTILITIES
   =========================================== */
.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: var(--spacing-sm); }
.pt-2 { padding-top: var(--spacing-md); }
.pt-3 { padding-top: var(--spacing-lg); }
.pt-4 { padding-top: var(--spacing-xl); }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: var(--spacing-sm); }
.pb-2 { padding-bottom: var(--spacing-md); }
.pb-3 { padding-bottom: var(--spacing-lg); }
.pb-4 { padding-bottom: var(--spacing-xl); }

/* ===========================================
   CONTENT STYLING
   =========================================== */
.entry-content ul,
.product-description ul,
.product-content-text ul,
.product-caracteristiques ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.entry-content ol,
.product-description ol,
.product-content-text ol {
    list-style: decimal;
    margin-left: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.entry-content li,
.product-description li,
.product-content-text li,
.product-caracteristiques li {
    margin-bottom: var(--spacing-sm);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
}

.entry-content th,
.entry-content td {
    padding: var(--spacing-sm);
    border: 1px solid var(--bg-light);
    text-align: left;
}

.entry-content th {
    background-color: var(--bg-light);
    font-weight: 600;
}

/* ===========================================
   COMMENTS
   =========================================== */
.comments-area {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-2xl);
    border-top: 2px solid var(--bg-light);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
}

.comment-author {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.comment-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.comment-reply-link {
    font-size: 0.875rem;
    color: var(--primary-color);
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */
/* Mobile Layout pour les fiches de produits à partir de 900px */
@media (max-width: 900px) {
    /* Hide desktop elements sur les fiches */
    .product-single .desktop-only {
        display: none !important;
    }
    
    .product-single .desktop-introduction {
        display: none !important;
    }
    
    /* Show mobile elements sur les fiches */
    .product-single .mobile-jaquette-first {
        display: block;
        margin-bottom: var(--spacing-lg);
    }
    
    .product-single .mobile-jaquette-first .product-image-wrapper {
        position: static;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .product-single .mobile-jaquette-first .product-image {
        max-height: 250px;
        width: 100%;
        object-fit: contain;
        border-radius: 0;
        box-shadow: none;
    }
    
    .product-single .mobile-best-offer-wrapper {
        display: block;
        margin: var(--spacing-lg) 0;
    }
    
    .product-single .mobile-best-offer-wrapper .best-offer {
        text-align: center;
    }
    
    .product-single .mobile-best-offer-wrapper .best-offer .section-title {
        text-align: center;
    }
    
    .product-single .mobile-best-offer-wrapper .best-offer-content {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .product-single .mobile-best-offer-wrapper .best-offer-merchant {
        justify-content: center;
    }
    
    .product-single .mobile-introduction {
        display: block;
        margin: var(--spacing-lg) 0;
    }
    
    .product-single .mobile-other-offers {
        display: block;
        margin: var(--spacing-lg) 0;
        text-align: center;
    }
    
    .product-single .mobile-other-offers .other-offers-title {
        text-align: center;
    }
    
    .product-single .mobile-game-info {
        display: block;
        margin: var(--spacing-lg) 0;
        text-align: center;
    }
    
    .mobile-game-info .product-meta-info-under-image {
        align-items: center;
    }
    
    /* Mobile typography */
    .product-header-simple .product-title {
        font-size: 1.5rem;
    }

    .product-header-simple {
        padding: var(--spacing-lg) 0;
    }

    .product-meta-info {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* CTA cards en colonne sur petits écrans */
@media (max-width: 640px) {
    .platform-cta-grid {
        grid-template-columns: 1fr;
    }

    .platform-cta-card {
        padding: var(--spacing-md);
    }
}

@media (max-width: 576px) {
    .product-card {
        opacity: 1;
        transform: none;
    }
    
    .products-grid .product-card {
        transition-delay: 0s !important;
    }
}

/* ===========================================
   PRINT STYLES
   =========================================== */
@media print {
    .back-to-top,
    .social-sharing,
    .pagination,
    .comments-area,
    .product-card-cta {
        display: none !important;
    }

    .product-header {
        height: auto !important;
        padding: 2rem !important;
    }

    a {
        text-decoration: underline;
    }
}

/* === PAGE D'ACCUEIL REFONTE — RESPONSIVE === */

@media (max-width: 1024px) {
    .hp-hero__container {
        grid-template-columns: 1fr;
        height: auto;
    }
    .hp-hero__side {
        grid-template-rows: none;
        grid-template-columns: 1fr 1fr;
    }
    .hp-flash-deals__grid {
        --grid-cols: 3;
    }
    .hp-accessories__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hp-alert-banner__inner {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .prix-drops-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Blog hero tablette */
    .blog-hero {
        grid-template-columns: 1fr 1.6fr 1fr;
        height: 335px;
    }
    /* Blog index — tablette */
    .blog-index-layout {
        grid-template-columns: 1fr;
    }
    .blog-index-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .prix-drops-hero__title {
        font-size: 2rem;
    }
    .prix-drops-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Blog index — mobile */
    .blog-index-wrap {
        margin-top: var(--spacing-xl);
    }
    /* Blog hero mobile */
    .blog-hero {
        grid-template-columns: 1fr;
        height: auto;
    }
    .blog-hero__item {
        height: 210px;
    }
    .blog-hero__item--main {
        height: 270px;
    }
    .blog-hero__item + .blog-hero__item {
        border-left: none;
        border-top: 2px solid rgba(255, 255, 255, 0.15);
    }
    /* Hero slider : texte haut, jaquette milieu, bouton bas — grille colonne */
    .hp-hero__slide {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "text"
            "cover"
            "cta";
        text-align: center;
        padding: 20px 20px 44px;
        row-gap: 14px;
    }
    .hp-hero__main-text {
        align-items: center;
        gap: 10px;
    }
    .hp-hero__prices {
        justify-content: center;
    }
    .hp-hero__cover {
        width: 160px;
        justify-self: center;
    }
    /* Bouton en flux normal — plus de position absolute */
    .hp-hero__cta {
        justify-self: center;
        align-self: auto;
    }
    /* Flèches réduites sur mobile */
    .hp-hero__arrow {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    .hp-hero__title {
        font-size: 22px;
    }
    .hp-hero__price-current {
        font-size: 34px;
    }
    .hp-hero__discount-bg {
        font-size: 110px;
        right: 0;
        top: -20px;
    }
    /* Side cards : empilées */
    .hp-hero__side {
        grid-template-columns: 1fr;
    }
    /* Bons plans : 1 colonne sur mobile — override le style inline --grid-cols */
    .hp-flash-deals__grid,
    .hp-flash-deals__grid--v3 {
        grid-template-columns: 1fr;
    }
    .hp-accessories__grid {
        grid-template-columns: 1fr;
    }
    .hp-magazine__layout {
        grid-template-columns: 1fr;
    }
    .hp-magazine__grid {
        grid-template-columns: 1fr;
    }
    .hp-trust__inner {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hp-trust__sep {
        display: none;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .hp-alert-banner__title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .prix-drops-grid {
        grid-template-columns: 1fr;
    }
    .prix-drops-hero {
        min-height: 260px;
    }
    .prix-drops-hero__title {
        font-size: 1.6rem;
    }
    .hp-flash-deals__grid,
    .hp-flash-deals__grid--v3 {
        grid-template-columns: 1fr;
    }
    .hp-hero__side {
        grid-template-columns: 1fr;
    }
    /* V3 horizontal → empilé verticalement sur mobile */
    .hp-deal-card--v3 {
        flex-direction: column;
        min-height: 0;
    }
    .hp-deal-card--v3 .hp-deal-card__image-wrap {
        width: 100%;
        height: 160px;
        padding: 14px;
    }
    .hp-deal-card--v3 .hp-deal-card__image {
        height: 130px;
        width: auto;
        max-width: 120px;
        margin: 0 auto;
    }
    .hp-deal-card--v3 .hp-deal-card__body {
        border-left: none;
        border-top: 1px solid #ecebef;
    }
    .hp-deal-card--v3 .hp-deal-card__cta {
        align-self: stretch;
        text-align: center;
    }
}

@media (max-width: 992px) {
    .blog-index-main .posts-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .blog-index-main .posts-wrapper {
        grid-template-columns: 1fr;
    }
}
