/*
Theme Name: DealFrance
Description: Thème WordPress multi-région pour les offres Amazon. Supporte 18+ pays (FR, JP, US, CA, DE, UK, ES, IT, AU, IN, BR, MX, SG, TR, AE, NL, SE, PL). Interface moderne et mobile-friendly avec gestion automatique des devises et langues.
Version: 1.2.0
Author: DealFrance Team
Text Domain: dealfrance
Domain Path: /languages
*/

/* Styles de base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
    text-decoration: none;
}

.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-form {
    display: flex;
    border: 2px solid #007cba;
    border-radius: 25px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Categories Grid */
.categories-section {
    padding: 60px 0;
    background: white;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
    color: #007cba;
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Product Grid */
.deals-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 aspect ratio */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.stars {
    color: #ffc107;
    margin-right: 8px;
}

.rating-count {
    font-size: 12px;
    color: #666;
}

.product-pricing {
    margin-bottom: 15px;
}

.current-price {
    font-size: 20px;
    font-weight: bold;
    color: #007cba;
}

.old-price {
    font-size: 16px;
    text-decoration: line-through;
    color: #999;
    margin-left: 10px;
}

.deal-button {
    width: 100%;
    background: #007cba;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: block;
}

.deal-button:hover {
    background: #0056b3;
    text-decoration: none;
    color: white;
}

/* Filters */
.filters-section {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.filters-container {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.filter-select, .filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.btn-apply, .btn-reset {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply {
    background: #007cba;
    color: white;
}

.btn-apply:hover {
    background: #0056b3;
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #545b62;
}

/* Mobile Filter Drawer */
.filter-toggle {
    display: none;
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

.filter-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.filter-drawer.active {
    display: block;
}

.filter-drawer-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: white;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.filter-drawer.active .filter-drawer-content {
    transform: translateX(0);
}

.filter-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section p, .footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 10px;
}

.pagination a, .pagination span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    color: #007cba;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #007cba;
    color: white;
}

.pagination .current {
    background: #007cba;
    color: white;
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-search {
        max-width: 100%;
        margin: 0;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .deals-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-toggle {
        display: block;
    }
    
    .filters-section {
        display: none;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .categories-section, .deals-section {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    .product-card {
        margin: 0 5px;
    }
    
    .deals-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.hidden { display: none; }
.visible { display: block; }

/* SEO & Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for accessibility */
a:focus, button:focus, input:focus, select:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}
