* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  font-size: 14px;
  color: #222;
}

html, body {
  overscroll-behavior: none;
}

header {
    display: flex;
    justify-content: space-between;
    margin: 10px;
    border-radius : 15px;
    align-items: center;
    flex-direction: row;
}

.imglistmodal {
    height: 50px;
    width: 50px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
    padding: 5px;
    cursor: pointer;
}

.dropDown {
   padding: 10px;
   border-radius: 20px;
   background: white;
   display: none;
   flex-direction: row;
   gap: 8px;
   max-width: 100%;
   overflow-x: auto;
   overflow-y: hidden;
   white-space: nowrap;
}

.icon-box {
  border: 1px solid #ebebeb9e;
  border-radius: 15px;
  width: 40px;
  height: 40px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* SVG animé */
.icon-box svg {
  height: 20px;
  animation: slideIn 0.6s ease forwards;
}

@keyframes slideIn {
  from {
    width: 0;
    transform: translateX(-10px);
    opacity: 0;
  }
  to {
    width: 24px;
    transform: translateX(0);
    opacity: 1;
  }
}


.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  padding: 10px;
}



input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: none;
}


/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
}

.modal {
  position: absolute;
  background: white;
  padding: 10px;
  width: 400px;
  height: 100%;
  right: 0;
  top: 0;
  overflow-y: auto;
  animation: slideIn .3s;
  transition: 150ms;
}

.modal img#modalImage {
  width: 100%;
  height: 220px;
  object-fit: contain;
}

.close {
  height: 28px !important;
  width: 28px !important;
  color: currentcolor !important;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
}

/* MOBILE */
@media (max-width: 768px) {
  .modal {
    width: 100%;
    height: 75%;
    bottom: 0;
    top: auto;
    border-radius: 20px 20px 0 0;
    animation: slideUp .3s;
  }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
    
    .category {
        max-width: 90px;
    }
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

#brands-lis {
    display: grid;
    /* Crée une grille de 4 colonnes par défaut */
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px;
    padding-top: 20px;
}

.brand-card {
    aspect-ratio: 1 / 1; /* Force le format carré */
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    padding: 15px;
    transition: transform 0.2s ease;
}

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

/* Assure que le SVG s'adapte à la taille du carré */
.brand-card svg {
    width: 100%;
    height: 100%;
    max-width: 60px; /* Ajustez selon vos besoins */
    object-fit: contain;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 1px solid #ddd;
    border-top-color: #111;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}


.category {
    background: yellow;
    padding: 5px;
    border-radius: 8px;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
}


.details {
  
}

.detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.detail span:first-child {
  color: #666;
}

.detail span:last-child {
  font-weight: bold;
}



/* overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 999;
}

.popup-overlay.active {
  display: block;
}

/* sheet */
.popup-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

/* poignée mobile */
.sheet-handle {
  width: 40px;
  height: 4px;
  background: #ccc;
  border-radius: 4px;
  margin: 0 auto 12px;
  display: none;
}

/* filtre */
.filter-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 15px;
  border: 1px solid #ebebeb9e;
  margin-bottom: 12px;
  font-size: 14px;
}

/* tags */
.keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.keyword {
  padding: 6px 12px;
  background: #f3f3f3;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}

.keyword:hover {
  background: #e0e0e0;
}

/* MOBILE MODE */
@media (max-width: 768px) {
  .popup-sheet {
    bottom: 0;
    top: auto;
    left: 0;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    transition: bottom .3s ease;
  }

  .popup-overlay.active .popup-sheet {
    bottom: 0;
  }

  .sheet-handle {
    display: block;
  }
    
    .close {display: none !important;}
}



















.product {
  background: white;
  border-radius: 30px;
  padding: 10px;
  cursor: pointer;
  transition: transform .2s;
  border: 1px solid #ebebeb9e;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product:hover {
  transform: scale(1.03);
}

.product img {
  width: 100%;
  height: 160px;
  object-fit: contain;
}

/* prix */
.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price {
  font-size: 15px;
}

.old-price {
  font-size: 8px;
  color: #999;
  text-decoration: line-through;
    text-decoration-color: red;
    text-decoration-thickness: 1px;
}

.oldprice {
    margin-left: 10px;
    text-decoration-line: line-through;
    text-decoration-color: red;
    text-decoration-thickness: 2px;
}

.green {
  color: #025e09;
  font-weight: bold;
  background: #9afe82;
}













.battery, .specs, .tags {
  display: flex;
  gap: 6px;
  font-size: 11px;
  align-items: center;
  margin-bottom: 4px;
}

.specs span {
  background: #ddd;
  padding: 2px 6px;
  border-radius: 10px;
}








/* L'overlay qui prend tout l'écran */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff; /* Couleur de fond */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Toujours au-dessus */
    transition: opacity 0.5s ease; /* Effet de fondu à la fin */
}

/* Le logo au centre */
.loader-logo {
    width: 150px; /* À ajuster selon votre logo */
    height: auto;
    animation: entree-bounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

    @keyframes entree-bounce {
        0% {
            transform: scale(0);
            opacity: 0;
        }
        100% {
            transform: scale(1);
            opacity: 1;
        }
    }

/* Classe pour bloquer le scroll sur le body */
.no-scroll {
    overflow: hidden;
}









.container { display: flex; align-items: center; }
  .main-icon { width: 40px; height: 40px; cursor: pointer; }

  /* Le conteneur qui recevra les SVG */
  .loadicon {
    width: 20px;
    height: 20px;
    color: #007AFF;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Animation de sortie/apparition */
  .animate-pop {
    animation: popOut 0.5s ease-out forwards, floating 3s ease-in-out infinite 0.5s;
  }

  @keyframes popOut {
    0% { opacity: 0; transform: scale(0) rotate(-20deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
  }

  @keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
  }