/**
 * responsive.css - Styles responsifs pour Oceanic Container Line
 * Version: 2.0 - Mise à jour complète
 */

/* ============================================================
   1. MOBILE FIRST - DEFAUTS
   ============================================================ */

.container {
    padding-left: 16px;
    padding-right: 16px;
}

/* ============================================================
   2. EXTRA SMALL DEVICES (max-width: 374.98px)
   ============================================================ */

@media (max-width: 374.98px) {
    h1 {
        font-size: 1.4rem;
    }
    h2 {
        font-size: 1.2rem;
    }
    h3 {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .hero-stats {
        gap: 16px;
        flex-wrap: wrap;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    
    .product-title {
        font-size: 0.8rem;
        min-height: 2.2rem;
        max-height: 2.2rem;
    }
    .product-price .price {
        font-size: 0.9rem;
    }
    .product-actions {
        flex-direction: column;
        gap: 4px;
    }
    .product-actions .btn {
        width: 100%;
        padding: 6px 4px;
        font-size: 0.7rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ============================================================
   3. SMALL DEVICES - Téléphones (max-width: 575.98px)
   ============================================================ */

@media (max-width: 575.98px) {
    h1 {
        font-size: 1.6rem;
    }
    h2 {
        font-size: 1.3rem;
    }
    h3 {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    .section-header .section-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-section {
        padding: 40px 0;
        text-align: center;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
        gap: 24px;
    }
    .stat-number {
        font-size: 1.8rem;
    }
    
    .top-products-section {
        padding: 30px 0;
    }
    .categories-section {
        padding: 30px 0;
    }
    .about-section {
        padding: 30px 0;
        text-align: center;
    }
    .about-features {
        text-align: left;
    }
    .special-section {
        padding: 30px 0;
        text-align: center;
    }
    .shipping-section {
        padding: 30px 0;
    }
    .cta-section {
        padding: 30px 0;
        text-align: center;
    }
    
    .product-card {
        border-radius: var(--radius-sm);
    }
    .product-body {
        padding: 12px;
    }
    .product-title {
        font-size: 0.85rem;
        min-height: 2.2rem;
        max-height: 2.2rem;
    }
    .product-price .price {
        font-size: 0.95rem;
    }
    .product-actions .btn {
        font-size: 0.7rem;
        padding: 6px 2px;
    }
    
    .category-card {
        padding: 20px 12px;
    }
    .category-icon {
        font-size: 2rem;
    }
    .category-card h4 {
        font-size: 0.95rem;
    }
    
    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }
    
    .site-footer {
        padding: 30px 0 16px;
        text-align: center;
    }
    .footer-bottom {
        text-align: center;
    }
    
    .legal-page .legal-container {
        padding: 20px;
    }
    .legal-page .legal-nav {
        flex-direction: column;
    }
    .legal-page .legal-nav a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .cookie-consent-banner .row {
        text-align: center;
    }
    .cookie-consent-banner .col-lg-4 {
        margin-top: 12px;
    }
    
    .filter-bar .btn-group {
        flex-wrap: wrap;
        margin-top: 8px;
    }
    .filter-bar .btn-group .btn {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .top-bar {
        font-size: 0.7rem;
        padding: 6px 0;
    }
    .top-bar span {
        display: block;
        margin-right: 0 !important;
        padding: 2px 0;
    }
}

/* ============================================================
   4. MEDIUM DEVICES - Tablettes (min-width: 576px et max-width: 767.98px)
   ============================================================ */

@media (min-width: 576px) and (max-width: 767.98px) {
    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-section {
        padding: 50px 0;
    }
    .hero-stats {
        gap: 30px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
}

/* ============================================================
   5. LARGE MOBILE - Grands téléphones (max-width: 991.98px)
   ============================================================ */

@media (max-width: 991.98px) {
    .hero-image {
        margin-top: 30px;
    }
    
    .about-image {
        margin-top: 30px;
    }
    
    .sidebar {
        position: static;
        margin-top: 30px;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .table thead {
        display: none;
    }
    .table tbody tr {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: var(--radius-sm);
        margin-bottom: 16px;
        padding: 12px;
    }
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
    }
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary);
    }
    .table tbody td:first-child {
        padding-top: 0;
    }
    .table tbody td:last-child {
        padding-bottom: 0;
    }
    
    .site-footer .row > div {
        margin-bottom: 30px;
    }
    .site-footer .row > div:last-child {
        margin-bottom: 0;
    }
}

/* ============================================================
   6. LARGE DEVICES - Desktops (min-width: 992px)
   ============================================================ */

@media (min-width: 992px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .hero-section {
        padding: 80px 0;
        min-height: 500px;
        display: flex;
        align-items: center;
    }
    
    .hero-title {
        font-size: 3.2rem;
    }
    
    .site-footer .row > div {
        margin-bottom: 0;
    }
}

/* ============================================================
   7. EXTRA LARGE DEVICES (min-width: 1200px)
   ============================================================ */

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

/* ============================================================
   8. EXTRA EXTRA LARGE DEVICES (min-width: 1400px)
   ============================================================ */

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ============================================================
   9. PRINT STYLES
   ============================================================ */

@media print {
    .top-bar,
    header,
    .navbar,
    .usp-bar,
    .hero-section .hero-buttons,
    .cookie-consent-banner,
    .sidebar,
    .cta-section,
    .social-links,
    .site-footer .footer-bottom,
    .no-print {
        display: none !important;
    }
    
    body {
        background: var(--white) !important;
        color: var(--dark) !important;
        font-size: 12pt;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .product-card {
        page-break-inside: avoid;
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    a {
        color: var(--dark) !important;
        text-decoration: underline !important;
    }
    
    .table {
        border: 1px solid #ddd;
    }
    .table thead {
        background: #f4f4f4 !important;
        color: var(--dark) !important;
    }
    .table th, .table td {
        border: 1px solid #ddd !important;
        padding: 8px !important;
    }
}

/* ============================================================
   10. ACCESSIBILITÉ
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

/* ============================================================
   11. MENU HAMBURGER - CORRECTION COMPLÈTE
   ============================================================ */

/* Le bouton hamburger doit être visible sur mobile */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: block !important;
        border: 2px solid rgba(255, 255, 255, 0.4) !important;
        padding: 12px 16px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
        margin-right: auto !important;
        margin-left: 0 !important;
        transition: all 0.3s ease !important;
    }
    
    .navbar-toggler:hover {
        border-color: #e94560 !important;
        background: rgba(233, 69, 96, 0.15) !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.3) !important;
        outline: none !important;
    }
    
    .navbar-toggler-icon {
        display: inline-block !important;
        width: 30px !important;
        height: 30px !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;
    }
    
    /* ===== MENU DÉROULANT - GRAND ET LARGE ===== */
    .navbar-collapse {
        display: none !important;
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        background: #1a3c6e !important;
        padding: 20px !important;
        border-radius: 12px !important;
        border: 1px solid #2d5a8e !important;
        box-shadow: 0 15px 50px rgba(0,0,0,0.5) !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        width: 100% !important;
        animation: slideDown 0.3s ease !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    /* Animation du menu */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-15px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    /* ===== LIENS DU MENU ===== */
    .navbar-collapse .navbar-nav {
        flex-direction: column !important;
        width: 100% !important;
        gap: 2px !important;
    }
    
    .navbar-collapse .navbar-nav .nav-link {
        padding: 14px 18px !important;
        font-size: 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 4px !important;
        transition: all 0.2s ease !important;
        color: #fff !important;
        display: block !important;
        width: 100% !important;
    }
    
    .navbar-collapse .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.08) !important;
    }
    
    .navbar-collapse .navbar-nav .nav-link.active {
        background: rgba(233, 69, 96, 0.2) !important;
        color: #e94560 !important;
    }
    
    .navbar-collapse .navbar-nav .nav-link i {
        margin-right: 8px !important;
        color: #e94560 !important;
    }
    
    /* ===== DROPDOWN DANS LE MENU ===== */
    .navbar-collapse .dropdown-menu {
        position: relative !important;
        float: none !important;
        width: 100% !important;
        background: rgba(15, 26, 46, 0.95) !important;
        border: 1px solid #2d5a8e !important;
        border-radius: 8px !important;
        padding: 8px 0 !important;
        margin: 6px 0 10px 0 !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
        box-shadow: inset 0 2px 10px rgba(0,0,0,0.3) !important;
        z-index: 99999 !important;
    }
    
    .navbar-collapse .dropdown-menu .dropdown-item {
        color: #b0c4de !important;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
        border-radius: 4px !important;
        transition: all 0.2s ease !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    }
    
    .navbar-collapse .dropdown-menu .dropdown-item:hover {
        background: rgba(233, 69, 96, 0.15) !important;
        color: #fff !important;
        padding-left: 26px !important;
    }
    
    .navbar-collapse .dropdown-menu .dropdown-item i {
        width: 24px !important;
        color: #e94560 !important;
    }
    
    .navbar-collapse .dropdown-menu .dropdown-divider {
        border-color: #2d5a8e !important;
        margin: 4px 0 !important;
    }
    
    .navbar-collapse .dropdown-menu .fw-bold {
        color: #e94560 !important;
    }
    
    /* ===== BOUTON ANGEBOT DANS LE MENU ===== */
    .navbar-collapse .d-lg-none {
        display: block !important;
        margin-top: 12px !important;
        padding-top: 12px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .navbar-collapse .d-lg-none a {
        display: block !important;
        text-align: center !important;
        padding: 14px !important;
        background: #e94560 !important;
        color: #fff !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
    }
    
    .navbar-collapse .d-lg-none a:hover {
        background: #d63851 !important;
        transform: scale(1.02) !important;
    }
}

/* Sur desktop, cacher le bouton hamburger */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
    
    /* Dropdown hover desktop */
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block !important;
    }
    
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        z-index: 9999 !important;
        background: #1a3c6e !important;
        border: 1px solid #2d5a8e !important;
        border-radius: 8px !important;
        padding: 8px 0 !important;
        min-width: 240px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
        animation: dropdownFade 0.25s ease !important;
    }
    
    @keyframes dropdownFade {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .dropdown-item {
        color: #b0c4de !important;
        padding: 8px 20px !important;
        transition: all 0.2s ease !important;
    }
    
    .dropdown-item:hover {
        background: rgba(233, 69, 96, 0.15) !important;
        color: #fff !important;
    }
    
    .dropdown-item i {
        color: #e94560 !important;
        width: 20px;
    }
}

/* ============================================================
   12. ALIGNEMENT DES PRODUITS - UNIFORMISATION
   ============================================================ */

/* Toutes les cartes produits ont la même hauteur */
.row.g-4 {
    display: flex !important;
    flex-wrap: wrap !important;
}

.row.g-4 > [class*="col-"] {
    display: flex !important;
    flex-direction: column !important;
}

.product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
}

.product-card .product-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-card .product-title {
    min-height: 2.6rem !important;
    max-height: 2.6rem !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.product-card .product-meta {
    min-height: 1.6rem !important;
    flex-shrink: 0 !important;
}

.product-card .product-price {
    flex-shrink: 0 !important;
    margin-top: auto !important;
}

.product-card .product-actions {
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

/* Responsive - petits écrans */
@media (max-width: 575.98px) {
    .product-card .product-title {
        min-height: 2.2rem !important;
        max-height: 2.2rem !important;
        font-size: 0.8rem !important;
    }
    
    .product-card .product-price .price {
        font-size: 0.95rem !important;
    }
    
    .product-card .product-actions .btn {
        font-size: 0.7rem !important;
        padding: 6px 2px !important;
    }
}