/* ================================================
   🛸 YOUPLUGS SHOP - CSS RESPONSIVE ULTIME
   ================================================ */

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

/* Fond et structure principale */
body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    color: #fff;
}
/* === STYLE DES RÉSULTATS SHOPPING === */

.annonces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding: 20px;
}

.annonce {
  background: rgba(20, 20, 30, 0.9);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
}

.annonce:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.annonce img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}

.annonce h2 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 8px;
}

.annonce .prix {
  color: #00ffc6;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.annonce .description {
  font-size: 0.9rem;
  color: #ccc;
  height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-annonce {
  display: inline-block;
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  color: white;
  padding: 8px 15px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-annonce:hover {
  background: linear-gradient(90deg, #0072ff, #00c6ff);
  transform: translateY(-2px);
}

.no-result {
  text-align: center;
  color: #aaa;
  margin-top: 40px;
  font-size: 1.1rem;
}

/* ================================
   🔍 BARRE DE RECHERCHE RESPONSIVE
   ================================ */
.search-wrappershop {
    background: linear-gradient(135deg, rgba(0, 80, 255, 0.6), rgba(130, 0, 255, 0.5));
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px auto 40px;
    border: 2px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.5);
    max-width: 1200px;
    width: 95%;
}

.search-wrappershop:hover {
    background: linear-gradient(135deg, rgba(130, 0, 255, 0.6), rgba(0, 180, 255, 0.6));
    border-color: rgba(0, 255, 255, 0.8);
}

/* Champs et sélecteurs */
.search-inputshop,
.sort-selectshop {
    flex: 1 1 250px;
    min-width: 200px;
    padding: 12px 15px;
    border-radius: 10px;
    border: none;
    outline: none;
    color: cyan;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    transition: 0.3s;
}

.search-inputshop::placeholder {
    color: #7fffd4;
}

.search-inputshop:focus,
.sort-selectshop:focus {
    box-shadow: 0 0 15px cyan;
    background: rgba(255, 255, 255, 0.12);
}

/* Boutons futuristes */
.extractButtonshop,
.add-annonce-btnshop {
    flex: 1 1 200px;
    min-width: 150px;
    text-align: center;
    padding: 12px 18px;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

/* Bouton Rechercher */
.extractButtonshop {
    color: #00ff88;
    border-color: #00ff88;
    background: rgba(0, 0, 0, 0.6);
}
.extractButtonshop:hover {
    background: #00ff88;
    color: #000;
    box-shadow: 0 0 15px #00ff88;
}

/* Bouton Ajouter une annonce */
.add-annonce-btnshop {
    color: #ff6600;
    border-color: #ff6600;
    background: rgba(0, 0, 0, 0.6);
}
.add-annonce-btnshop:hover {
    background: #ff6600;
    color: #000;
    box-shadow: 0 0 15px #ff6600;
}

/* ================================
   🛒 CONTENEUR DES ANNONCES
   ================================ */
.container-annonceshop {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    width: 95%;
    max-width: 1400px;
    margin: 0 auto 80px;
    padding: 10px;
    overflow: hidden;
}

/* ================================
   💠 STYLE D’UNE ANNONCE
   ================================ */
.annonceshop {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.annonceshop:hover {
    transform: scale(1.02);
    border-color: rgba(0, 255, 255, 0.8);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
}

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

/* Titre */
.annonceshop h2 {
    font-size: 1.1rem;
    color: #00e6ff;
    text-shadow: 0 0 10px #00e6ff, 0 0 20px #00e6ff;
    margin-bottom: 10px;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Description */
.descriptionshop {
    font-size: 0.95rem;
    color: #e0faff;
    margin-bottom: 15px;
    max-height: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Prix */
.prixshop {
    font-size: 1.2rem;
    color: #00ffcc;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Bouton Voir l’annonce */
.btn-annonceshop {
    background: #00e6ff;
    color: #000;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.btn-annonceshop:hover {
    background: #00ffcc;
    box-shadow: 0 0 15px #00ffcc;
}

/* ================================
   ⚠️ MESSAGE : AUCUN RÉSULTAT
   ================================ */
.no-resultshop {
    text-align: center;
    color: #fff;
    font-size: 1.3rem;
    margin-top: 40px;
}

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

/* Grand écrans (≥1200px) : 4 annonces */
@media (min-width: 1200px) {
    .container-annonceshop {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Écrans moyens (≥900px) : 3 annonces */
@media (max-width: 1199px) and (min-width: 900px) {
    .container-annonceshop {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablettes (≥600px) : 2 annonces */
@media (max-width: 899px) and (min-width: 600px) {
    .container-annonceshop {
        grid-template-columns: repeat(2, 1fr);
    }

    .annonceshop img {
        max-height: 160px;
    }
}

/* Petits écrans (mobiles) : 1 annonce */
@media (max-width: 599px) {
    .container-annonceshop {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .annonceshop {
        padding: 15px;
    }

    .annonceshop img {
        max-height: 140px;
    }

    .search-wrappershop {
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }

    .search-inputshop,
    .sort-selectshop,
    .extractButtonshop,
    .add-annonce-btnshop {
        width: 100%;
        flex: none;
    }
}
