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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #4CAF50 0%, #2c5f2d 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.annonces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
}

.annonces-grid .annonce-card {
    width: 100%;
}

.annonce-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.annonce-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.annonce-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.annonce-content {
    padding: 1.5rem;
}

.annonce-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.prix {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c5f2d;
    margin-bottom: 0.5rem;
}

.description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    background: #2c5f2d;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    background: #1e5f1e;
}

/* Page d'annonce détaillée */
.annonce-detail {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 2rem auto;
}

/* Galerie de photos */
.photo-gallery {
    margin-bottom: 2rem;
}

.main-photo {
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.thumbnail {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail:hover {
    border-color: #2c5f2d;
}

.thumbnail.active {
    border-color: #2c5f2d;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.annonce-detail h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.annonce-detail .prix-detail {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c5f2d;
    margin-bottom: 1.5rem;
}

.annonce-detail .caracteristiques {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.annonce-detail .caracteristiques h3 {
    margin-bottom: 1rem;
    color: #333;
}

.annonce-detail .caracteristiques ul {
    list-style: none;
    padding: 0;
}

.annonce-detail .caracteristiques li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.annonce-detail .caracteristiques li:last-child {
    border-bottom: none;
}

.annonce-detail .caracteristiques strong {
    color: #2c5f2d;
    margin-right: 0.5rem;
}

.description-detail {
    line-height: 1.8;
    color: #555;
    margin-bottom: 2rem;
}

.description-detail p {
    text-align: justify;
}

.contact-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: #333;
}

.btn-retour {
    background: #6c757d;
    margin-top: 1rem;
}

.btn-retour:hover {
    background: #5a6268;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .annonces-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .annonce-detail {
        padding: 1rem;
    }

    .main-photo {
        height: 300px;
    }

    .thumbnail {
        height: 80px;
    }

    .thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.3rem;
    }
}