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

body {
    font-family:Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

p {
    font-size: 1.1rem;
    color: #666;
}

header {
    background-color: #1a1a1a;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #d4af37;
}

footer {
    background-color: #eee;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
}


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

.card-grid {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.card {
    flex: 1;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.card-header {
    padding: 15px;
    background-color: #f4f4f4;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.card-body {
    padding: 15px;
}


@media (max-width: 576px) {
    .card-grid {
        flex-direction: column; /* Aligne de haut en bas */
    }

    .card {
        flex: none;      /* Désactive le partage de largeur auto */
        width: 100%;     /* Prend toute la largeur disponible */
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}


/* Style spécifique au formulaire de recherche */
.search-form {
    max-width: 600px;
    margin: 40px auto;
    text-align: left; /* Aligne les labels à gauche pour plus de clarté */
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-size: 1rem;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-group input[type="text"]:focus {
    border-color: #d4af37; /* Rappel du doré au focus */
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* Alignement des boutons */
.form-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* Style commun aux boutons du formulaire */
.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border: none;
    text-decoration: none;
}

/* Bouton principal (Afficher) */
.btn-primary {
    background-color: #1a1a1a;
    color: #fff;
    border: 2px solid #1a1a1a;
}

.btn-primary:hover {
    background-color: #d4af37;
    border-color: #d4af37;
    transform: translateY(-2px);
}

/* Bouton secondaire (Retour / Reset) */
.btn-secondary {
    background-color: #fff;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background-color: #f4f4f4;
    color: #333;
    border-color: #ccc;
}

/* Adaptation mobile */
@media (max-width: 576px) {
    .form-buttons {
        flex-direction: column-reverse; /* Met le bouton principal en haut sur mobile */
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
}


/* --- Style des Résultats (Tableau) --- */

.container h2 {
    margin-bottom: 10px;
    color: #1a1a1a;
}

.container p {
    margin-bottom: 30px;
    font-style: italic;
    color: #888;
}

/* Optimisation du tableau */
.table-responsive {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden; /* Pour que les coins arrondis fonctionnent */
    background-color: #fff;
}

.table-responsive thead {
    background-color: #1a1a1a;
    color: #ffffff;
}

.table-responsive th {
    padding: 15px;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-responsive td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    color: #444;
}

/* Effet au survol des lignes */
.table-responsive tbody tr:hover {
    background-color: #fcfcfc;
    transition: background-color 0.2s ease;
}

/* Style de la colonne "Prix" */
.table-responsive td:last-child {
    font-weight: bold;
    color: #1a1a1a;
    text-align: right; /* Aligne le prix à droite pour plus de lisibilité */
}

.table-responsive th:last-child {
    text-align: right;
}

/* --- Bouton de retour --- */

.navigation-links {
    margin-top: 20px;
}

/* Réutilisation ou adaptation de ton bouton existant */
.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #1a1a1a;
    background: transparent;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #1a1a1a;
    color: #fff;
}

/* --- Responsive mobile --- */

@media (max-width: 768px) {
    /* Empêche le tableau de casser le layout sur petit écran */
    .table-responsive {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive th, 
    .table-responsive td {
        padding: 10px;
        font-size: 0.85rem;
    }
}

