/* ================================
   🟢 CONTENEUR PRINCIPAL DES ANNONCES
   ================================ */
.container-annonces {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes par défaut */
    gap: 20px; /* Espacement entre les annonces */
    margin: 0 auto;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* ================================
   🟣 STYLE D'UNE ANNONCE
   ================================ */
.annonce {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    height: auto;
    max-height: 500px;
    overflow: hidden;
}

/* Image de l’annonce */
.annonce img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}

/* Titre de l’annonce */
.annonce h2 {
    font-size: 1.2rem;
    color: #00c8ff;
    text-shadow: 0 0 15px #00c8ff, 0 0 25px #00c8ff;
    margin: 0 0 10px;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* Description */
.annonce .description {
    font-size: 1rem;
    color: white;
    margin-bottom: 20px;
    max-height: 100px;
    overflow: hidden;
}

/* Prix */
.annonce .prix {
    font-size: 1.2rem;
    color: #00c8ff;
    margin: 10px 0;
}

/* Bouton "Voir l’annonce" */
.annonce .btn-annonce {
    background-color: #00c8ff;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    word-wrap: break-word;
    display: block;
    width: 100%;
}

/* ================================
   📱 RESPONSIVE DESIGN
   ================================ */

/* Écrans moyens (tablettes) */
@media (max-width: 768px) {
    .container-annonces {
        grid-template-columns: repeat(2, 1fr);
    }

    .annonce {
        flex: 1 1 calc(50% - 20px);
    }

    .annonce img {
        max-height: 120px;
        object-fit: contain;
    }

    .annonce h2 {
        font-size: 1.4rem;
    }

    .annonce .description {
        font-size: 1rem;
        max-height: none;
        overflow: visible;
    }

    .annonce .btn-annonce {
        padding: 15px 25px;
    }
}

/* Petits écrans (mobiles) */
@media (max-width: 480px) {
    .container-annonces {
        grid-template-columns: 1fr;
    }

    .annonce {
        max-height: none;
    }

    .annonce img {
        max-height: 120px;
        object-fit: contain;
    }

    .annonce h2 {
        font-size: 1rem;
    }

    .annonce .description {
        font-size: 1rem;
    }

    .annonce .btn-annonce {
        padding: 15px 25px;
    }
}

/* ================================
   🔍 SECTION RECHERCHE STYLISÉE
   ================================ */
.search-wrappershop {
    background: rgba(0, 100, 255, 0.6);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    border: 3px solid rgba(0, 140, 255, 0.9);
    box-shadow:
        0 0 10px rgba(0, 100, 255, 0.9),
        0 0 20px rgba(0, 140, 255, 0.7),
        0 0 30px rgba(0, 180, 255, 0.5);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.search-wrappershop:hover {
    background: rgba(130, 0, 255, 0.7);
    border-color: rgba(180, 0, 255, 0.9);
    box-shadow:
        0 0 10px rgba(130, 0, 255, 0.9),
        0 0 20px rgba(180, 0, 255, 0.7),
        0 0 30px rgba(210, 0, 255, 0.5);
}

/* Champ de recherche */
.search-inputshop {
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: cyan;
    font-size: 1.2rem;
    box-shadow: 0 0 12px cyan;
    outline: none;
    transition: 0.3s;
}

.search-input::placeholder {
    color: #88ffff;
}

/* Sélecteur de tri */
.sort-select {
    width: 100%;
    max-width: 300px;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 10px;
    background: rgba(0, 100, 255, 0.6);
    color: cyan;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
    border: 2px solid rgba(0, 255, 255, 0.5);
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
    text-align: center;
}

/* Effet focus du select */
.sort-select:focus,
.sort-select:active {
    background: rgba(0, 100, 255, 0.7);
    box-shadow: 0 0 15px rgba(0, 255, 255, 1);
    border-color: rgba(0, 255, 255, 1);
}

/* Options du menu déroulant */
.sort-select option {
    padding: 10px;
    background-color: rgba(0, 100, 255, 0.5);
    color: cyan;
    font-size: 1rem;
    border: none;
    transition: background-color 0.3s ease;
}

/* Survol des options */
.sort-select option:hover {
    background-color: rgba(128, 0, 255, 0.3);
    color: white;
}

/* ================================
   ⚙️ BOUTONS FUTURISTES
   ================================ */
.extractButton {
    padding: 12px 24px;
    font-size: 1.1em;
    color: #00ff88;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #00ff88;
    border-radius: 10px;
    text-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.extractButton:hover {
    background: #00ff88;
    color: #000;
    box-shadow: 0 0 12px #00ff88, 0 0 20px #00ff88;
}

/* Bouton Ajouter une annonce */
.add-annonce-btn {
    font-size: 1.1em;
    color: #ff6600;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #ff6600;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.add-annonce-btn:hover {
    background: #ff6600;
    color: #000;
    box-shadow: 0 0 12px #ff6600, 0 0 20px #ff6600;
}

/* ================================
   🧭 MESSAGE AUCUN RÉSULTAT
   ================================ */
.no-result {
    text-align: center;
    color: white;
    font-size: 1.2em;
}
