/**
 * MycvTop Store - Tablet & iPad Optimization
 * Optimisation complète pour tablettes et iPad
 */

/* ============================================
   TABLETTE STANDARD (481px - 768px)
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
    /* Container tablette */
    .container {
        max-width: 720px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Typographie tablette */
    html {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2.25rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.875rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Header tablette */
    .nav-wrap {
        padding: 1rem 1.5rem;
    }
    
    .brand img {
        height: 100px;
    }
    
    .main-nav {
        display: none;
    }
    
    .burger {
        display: block;
    }
    
    /* Hero Section tablette */
    .hero-section-modern {
        padding: 3rem 0;
    }
    
    .hero-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-image {
        display: none;
    }
    
    /* Grille produits tablette */
    .products-grid,
    .products-grid-modern,
    .products-grid-shop {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Section Featured Products tablette */
    .featured-products-section .products-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .product-card-modern,
    .product-card-shop {
        margin-bottom: 0;
    }
    
    .product-card-modern .product-image-wrapper,
    .product-card-shop .product-image-wrapper,
    .product-image-shop {
        aspect-ratio: 1;
        height: auto;
    }
    
    .product-card-modern .product-info-modern,
    .product-card-shop .product-info-shop {
        padding: 1rem;
    }
    
    .product-card-modern .product-name,
    .product-card-shop .product-name-shop {
        font-size: 1.05rem;
    }
    
    /* Page produit tablette */
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2rem;
    }
    
    .product-images-column {
        position: static;
    }
    
    .image-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .price-new,
    .price-current {
        font-size: 2rem;
    }
    
    /* Page shop tablette */
    .shop-filters {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }
    
    /* Checkout tablette */
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .checkout-item {
        flex-direction: row;
        gap: 1rem;
    }
    
    .checkout-item-image {
        width: 120px;
        height: 120px;
    }
    
    /* Cart Sidebar tablette */
    .cart-sidebar {
        max-width: 400px;
    }
    
    .cart-item {
        flex-direction: row;
        gap: 1rem;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
    
    .cart-item-details {
        flex: 1;
    }
    
    /* Footer tablette */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Catégories tablette */
    .categories-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ============================================
   iPad & TABLETTE LARGE (769px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Container iPad */
    .container {
        max-width: 960px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    /* Typographie iPad */
    html {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Header iPad */
    .nav-wrap {
        padding: 1rem 2rem;
    }
    
    .brand img {
        height: 120px;
    }
    
    .main-nav {
        display: flex;
    }
    
    .burger {
        display: none;
    }
    
    /* Hero Section iPad */
    .hero-section-modern {
        padding: 4rem 0;
    }
    
    .hero-content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    /* Grille produits iPad */
    .products-grid,
    .products-grid-modern,
    .products-grid-shop {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .product-card-modern .product-image-wrapper,
    .product-card-shop .product-image-wrapper,
    .product-image-shop {
        aspect-ratio: 1;
        height: auto;
    }
    
    /* Page produit iPad */
    .product-detail-container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        padding: 2.5rem;
    }
    
    .product-images-column {
        position: sticky;
        top: 2rem;
    }
    
    .image-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .product-title {
        font-size: 2.5rem;
    }
    
    .price-new,
    .price-current {
        font-size: 2.2rem;
    }
    
    /* Page shop iPad */
    .shop-filters {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    /* Checkout iPad */
    .checkout-content {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .checkout-item {
        flex-direction: row;
    }
    
    .checkout-item-image {
        width: 100px;
        height: 100px;
    }
    
    /* Cart Sidebar iPad */
    .cart-sidebar {
        max-width: 420px;
    }
    
    .cart-item {
        flex-direction: row;
        gap: 1.25rem;
    }
    
    .cart-item-image {
        width: 120px;
        height: 120px;
    }
    
    /* Footer iPad */
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* Catégories iPad */
    .categories-grid-modern {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* ============================================
   ORIENTATION LANDSCAPE TABLETTE
   ============================================ */
@media (min-width: 481px) and (max-width: 1024px) and (orientation: landscape) {
    .hero-section-modern {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .hero-content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .nav-wrap {
        padding: 0.75rem 1.5rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .products-grid-modern,
    .products-grid-shop {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   OPTIMISATIONS SPÉCIFIQUES TABLETTE
   ============================================ */
@media (min-width: 481px) and (max-width: 1024px) {
    /* Boutons tablette */
    .btn {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    .btn-large {
        padding: 1.125rem 2.25rem;
        font-size: 1.1rem;
    }
    
    /* Formulaires tablette */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        padding: 0.875rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    /* Espacements tablette */
    section {
        padding: 3.5rem 0;
    }
    
    .section-header-center {
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    /* Cards tablette */
    .product-card-modern,
    .product-card-shop,
    .category-card-modern {
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    
    /* Modals tablette */
    .order-modal,
    .thank-you-modal {
        padding: 2rem;
    }
    
    .modal-content-simple,
    .thank-you-modal-content {
        max-width: 600px;
        padding: 2.5rem;
    }
    
    /* Breadcrumb tablette */
    .breadcrumb {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    /* Alerts tablette */
    .alert {
        padding: 1.25rem;
        font-size: 1rem;
        border-radius: 12px;
    }
}

/* ============================================
   IPAD PRO & TABLETTES LARGE (1025px - 1366px)
   ============================================ */
@media (min-width: 1025px) and (max-width: 1366px) {
    .container {
        max-width: 1200px;
    }
    
    .products-grid-modern,
    .products-grid-shop {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    .product-detail-container {
        gap: 4rem;
        padding: 3rem;
    }
    
    .checkout-content {
        grid-template-columns: 1fr 1.2fr;
        max-width: 1200px;
    }
    
    .cart-sidebar {
        max-width: 450px;
    }
}

/* ============================================
   TOUCH OPTIMIZATIONS TABLETTE
   ============================================ */
@media (min-width: 481px) and (max-width: 1024px) and (hover: none) {
    /* Zones de touche optimisées pour tablette */
    a,
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Améliorer le scroll */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Optimiser les interactions tactiles */
    .product-card-modern:hover,
    .product-card-shop:hover {
        transform: translateY(-4px);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
}

/* ============================================
   PERFORMANCE TABLETTE
   ============================================ */
@media (min-width: 481px) and (max-width: 1024px) {
    /* Réduire les animations complexes */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* Optimiser les ombres */
    .product-card-modern,
    .product-card-shop {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    
    /* Réduire les gradients complexes si nécessaire */
    .btn-primary {
        background: #eab308;
    }
    
    .btn-primary:hover {
        background: #ca8a04;
    }
}

/* ============================================
   UTILITAIRES TABLETTE
   ============================================ */
@media (min-width: 481px) and (max-width: 1024px) {
    .hide-tablet {
        display: none !important;
    }
    
    .show-tablet {
        display: block !important;
    }
    
    .text-center-tablet {
        text-align: center;
    }
    
    .full-width-tablet {
        width: 100% !important;
    }
}
