/* ========= Product Page Styles ========= */

.product-page {
    display: flex;
    gap: 60px;
    max-width: 1200px;
    margin: 100px auto 60px;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
  }
  
  /* Gallery */
  .gallery {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  }
  .gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    touch-action: pan-y;
  }
  .gallery-thumbs {
    display: flex;
    flex-wrap: wrap;           /* autorise le retour à la ligne */
    gap: 8px;                  /* espace entre les miniatures */
    justify-content: flex-start;
  }
  .gallery-thumbs img {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: .7;
    transition: transform 0.2s;
  }
  .gallery-thumbs img.active,
  .gallery-thumbs img:hover {
    opacity: 1;
  }
  
  /* Info produit */
  .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .product-info h1 {
    font-size: 32px;
    font-weight: 500;
    color: #111;
  }
  .product-info .price {
    font-size: 24px;
    font-weight: 700;
    color: #000;
  }
  .product-info .description {
    font-size: 16px;
    color: #444;
    line-height: 1.5;
  }
  
  /* Option groups */
  .option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .option-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
  }
  
  /* Couleurs en cercles */
  .color-options {
    display: flex;
    flex-wrap: wrap;        /* autorise le passage à la ligne */
    gap: 12px;              /* espace entre les pastilles */
    justify-content: flex-start;
  }
  .color-swatch {
    flex: 0 0 32px;         /* largeur fixe, pas de shrink */
    height: 32px;
    border-radius: 50%;
    border: 0.2px solid black;
    cursor: pointer;
    transition: border-color .2s, transform .2s;
    /* optionally, ajoute un min-width pour être sûr que ça ne rétrécisse pas */
    min-width: 32px;
  }
  
  .color-swatch.active {
    border-color: #111;
    transform: scale(1.1);
    border: 2px solid #000;
  }
  
  /* Tailles en cercles */
  .size-options {
    display: flex;
    gap: 12px;
  }
  .size-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #111;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
  }
  .size-swatch.active {
    background: #111;
    color: #fff;
    transform: scale(1.1);
  }
  
  /* Guide des tailles */
  .size-guide {
    font-size: 14px;
    color: #333;
  }
  .size-guide summary {
    cursor: pointer;
    font-weight: 500;
  }
  .size-guide table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
  }
  .size-guide th,
  .size-guide td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
  }
  .size-guide th {
    background: #f9f9f9;
  }
  
  /* Boutons */
  .btn-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 20px;
  }
  .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background .3s;
  }
  .btn-back {
    background: transparent;
    color: #555;
  }
  .btn-back:hover {
    color: #c00;
  }
  .btn-add {
    background: #111;
    color: #fff;
  }
  .btn-add:hover {
    background: #333;
  }
  
  /* Responsive */
  @media(max-width:768px) {
    .product-page {
      flex-direction: column;
      margin-top: 80px;
    }
    .gallery, .product-info {
      width: 100%;
    }
    .gallery-thumbs {
      justify-content: center;
    }
    .btn-row {
      flex-direction: column;
      align-items: stretch;
    }
  }

  /* Bouton du guide des tailles */
.size-guide-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: #111;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: background .3s;
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
    width: 210px;
  }
  .size-guide-btn:hover {
    background: #333;
  }

  /* Erreur de sélection */
.error-message {
    color: #c00;
    font-size: 14px;
    margin-top: 6px;
  }
.hidden { display: none; }

/* Bouton Guide des tailles (taille réduite) */
.size-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0px 0;
  padding: 6px 12px;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.size-guide-btn i {
  font-size: 16px;
}
.size-guide-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* Accordion (description & composition) */
.accordion {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  background-color: #fff;
  margin-top: 20px;
}
.accordion-item + .accordion-item {
  border-top: 1px solid #eee;
}
.accordion-toggle {
  background-color: #000;
  color: #fff;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 5px;
  transition: background-color 0.3s ease;
  border-radius: 15px;
}
.accordion-toggle::after {
  content: '\f107';
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s linear;
}
.accordion-toggle:hover {
  background-color: #fff;
  color: #000;
}
.accordion-content {
  padding: 16px;
  background-color: #transparent;
  font-size: 16px;
  line-height: 1.5;
}
.accordion-content.open {
  padding-top: 12px;
  padding-bottom: 20px;
}
.accordion-toggle[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(-180deg);
}
.accordion-content p {
  margin: 0;
  line-height: 1.6;
  color: #000000;
  font-size: 14px;
}

.accordion-wrapper {
  overflow: hidden;
  transition: height 0.4s ease;
  height: 0;
  margin-top: -30px;
}

/* ===== Glassmorphism Modal ===== */
.cart-modal {
  position: fixed;
  inset: 0; /* top/right/bottom/left = 0 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  overflow: hidden;
}

/* Backdrop flou + fondu */
.cart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: fadeInBackdrop 0.4s forwards ease-out;
}

/* Conteneur glass */
.cart-modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 410px;
  padding: 32px 24px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  color: #fff;
  transform: translateY(-20px) scale(0.9);
  opacity: 0;
  animation: popIn 0.4s 0.1s forwards ease-out;
}

/* Bouton fermer */
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover {
  color: #fff;
}

/* Icône */
.modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  color: #19b626; /* un vert punchy */
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Titre */
.cart-modal-content h2 {
  margin: 0 0 20px;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* Boutons groupés */
.modal-buttons {
  display: flex;
  gap: 14px;
}

/* Boutons : style commun */
.modal-buttons .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* clé pour shrink correctement */
  flex: 1;
  min-width: 0;

  /* padding un peu réduit si nécessaire */
  padding: 0.6rem 1rem;  /* était 0.75rem 1.5rem */

  white-space: nowrap;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;

  background: rgba(255, 255, 255, 0.20);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  color: #fff;

  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
 }

/* Voir le panier : solide */
.btn-view-cart {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.9);
  font-weight: 400;            /* moins gras */
}
.btn-view-cart:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Continuer : outline */
.btn-continue {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.9);
}
.btn-continue:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeInBackdrop {
  to { opacity: 1; }
}
@keyframes popIn {
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Utilitaire */
.hidden { display: none !important; }

/* Style du sélecteur de langue */
.lang-switcher select,
.mobile-lang select {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: white;
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-switcher select:hover,
.mobile-lang select:hover {
  border-color: #000;
}

/* Positionnement dans le header */
.desktop-lang {
  display: inline-block;
}

/* Masquer la version desktop sur mobile */
@media (max-width: 768px) {
  .desktop-lang {
    display: none;
  }
}

/* Masquer la version mobile sur desktop */
@media (min-width: 769px) {
  .mobile-lang {
    display: none;
  }
}

.delivery-carbon-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  background-color: #f9f9f9;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #333;
}

.delivery-info,
.carbon-info {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-size: 0.95rem;
  color: #333;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.carbon-indicator {
  font-weight: bold;
  margin-left: 4px;
}

.carbon-value {
  margin-left: 6px;
  color: #888;
  font-size: 13px;
}

/* Base container */
#delivery-estimate {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-size: 0.95rem;
  color: #333;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

/* Flag icon—square SVG */
#delivery-estimate .flag-icon {
  width: 32px;
  height: 24px;
  border-radius: 4px;
  margin: 0 0.5rem 0 0.25rem;
  margin-left: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  object-fit: cover;
}

/* Text wrapper to allow fine-tuning */
#delivery-estimate .estimate-text {
  display: inline-block;
  line-height: 1.3;
  font-weight: 500;
}

/* Loading state */
#delivery-estimate.loading {
  color: #777;
}

@media screen and (max-width: 600px) {
  .carbon-value {
    display: none;
  }
}

/* Language Switcher */
.lang-switcher, .mobile-lang {
  display: none !important;
}


  
  