:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --light-color: #ecf0f1;
    --dark-color: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    gap: 15px;
    margin-bottom: 2rem;
}

#searchInput {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#categoryFilter {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.offer-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}


.offer-content {
    padding: 20px;
}

.offer-content h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.offer-content p {
    margin-bottom: 15px;
    color: #666;
}

.offer-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

.category-badge {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #2980b9;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.pagination button {
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

footer {
    background: var(--light-color);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

.offer-image {
    position: relative;
    transform: scale(0.9);
    padding-top: 60%;
    width: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px 8px 0 0;
}

/* Optional: Add hover effect */
.offer-card:hover .offer-image {
    transform: scale(1.03);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }
    
    .offers-grid {
        grid-template-columns: 1fr;
    }
}

/* Style pour la section code */
.code-section {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 3px solid #3498db;
}

.code-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.code-value {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin: 5px 0;
}

.copy-code {
    background: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.copy-code:hover {
    background: #2980b9;
}
