/* === Global === */
body.page-id-7,
body.page-id-892,
body.page-id-858 {
  background-image: url(https://hca-elec.com/wp-content/uploads/2026/02/view-futuristic-lighting-lamp-design-1-scaled-e1770336311995.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* === Layout général === */
.page-commande {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fff;
  color: #333;
  padding: 0;
  margin: 0;
}

.page-container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* === Lang switcher === */
.lang-switcher {
  text-align: center;
  margin-bottom: 15px;
}
.lang-switcher a {
  margin:0 8px;
  padding: 5px;
  text-decoration: none;
  border: 2px solid black;
  border-radius:10px;
  background:darkorange;
  color: black;
  font-weight: 500;
}
.lang-switcher a.active {
  color: white;
  border: 2px solid white;
  border-radius:10px;
  font-weight: 700;
}

/* === Layout commande === */
.commande-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
}
.commande-galerie {
  flex: 1;
  max-width: 500px;
}
.commande-formulaire {
  flex: 1;
  max-width: 600px;
}

/* === Conteneur galerie produit === */
.galerie-container {
  background:#E6E6E6;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  text-align: center;
  max-width: 500px;
  margin: auto;
}

/* === Titre + description === */
.galerie-container h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  font-weight: 600;
  color: #222;
}
.galerie-container p {
  color: #555;
  margin-bottom: 15px;
  font-size: 1rem;
}

/* === Bloc prix === */
.product-prices {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.product-prices .old-price {
  text-decoration: line-through;
  color: #999;
}
.product-prices .new-price {
  font-size: 1.6rem;
  font-weight: bold;
  color: #ff6600;
}
.product-prices .promo {
  background: #ff6600;
  color: #fff;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* === Étoiles === */
.stars {
  color: gold;
  margin-bottom: 12px;
}

/* === Photo principale === */
.photo-principale {
  margin-bottom: 20px;
}
.photo-principale img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === Miniatures === */
.miniatures {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.miniatures img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.2s, transform 0.2s;
}
.miniatures img:hover {
  border: 2px solid #ff6600;
  transform: scale(1.05);
}

/* === Formulaire === */
.form-commande {
  background:#E6E6E6;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.form-commande h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: 600;
  color: #222;
}

.ligne {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}
.ligne.double .champ {
  flex: 1;
}

.champ input, .champ select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  transition: border 0.2s;
}
.champ input:focus, .champ select:focus {
  border-color: #ff6600;
  outline: none;
}

/* Centrage du bouton Ajouter un modèle */
.ajt-btn {
  display: block;
  margin: 0 auto 20px auto;
  background: darkorange;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s;
  text-align: center;
}
.ajt-btn:hover {
  background: #e65c00;
}

/* === Ligne produit === */
.produit-ligne {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.produit-ligne .champ {
  flex: 1;
}
.produit-ligne select,
.produit-ligne input[type="number"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border 0.2s;
}
.produit-ligne select:focus,
.produit-ligne input[type="number"]:focus {
  border-color: #ff6600;
  outline: none;
}

/* === Bouton supprimer === */
.produit-ligne .remove-btn,
.produit-ligne button.remove-btn {
  background: none !important;
  border: none !important;
  color: #ff0000 !important;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
  margin-left: 8px;
}
.produit-ligne .remove-btn:hover,
.produit-ligne button.remove-btn:hover {
  color: #cc0000 !important;
  transform: scale(1.2);
}

/* === Résumé commande === */
.resume-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 15px;
  margin-top: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}
.resume-box h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}
.resume-item_A {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #666;
}
.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}
.delivery-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: border 0.2s;
}
.delivery-card:hover {
  background:darkorange;
  border-color:#E6E6E6;
}
.delivery-card input {
  background:#ff6600;
  accent-color:#E6E6E6;
}
.resume-total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 14px;
  margin-top: 10px;
}

/* === Bouton commander === */
.btn {
  display: block;
  width: 100%;
  max-width: 320px;
  background: #ff6600;
  color: #fff;
  padding: 16px;
  font-size: 1.3rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin: 25px auto 0 auto;
  transition: background 0.2s;
}
.btn:hover {
  background: #e65c00;
}

/* === Popup === */
.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
}
.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 400px;
  text-align: center;
}
.popup-content h3 {
  margin-bottom: 15px;
}
.popup-content button {
  background: #ff6600;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
}
.popup-content button:hover {
  background: #e65c00;
}

/* === Header commande (ajout) === */
.commande-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.commande-total {
  font-weight: bold;
}

/* === RTL / LTR === */
/* Forcer RTL sur les blocs internes */
.page-commande.rtl .resume-item_A,
.page-commande.rtl .resume-total {
  flex-direction: row-reverse;   /* inverse l’ordre des spans */
  text-align: right;
}

.page-commande.rtl .delivery-card {
  flex-direction: row-reverse;   /* inverse input et texte */
  text-align: right;
}

.page-commande.rtl .commande-layout {
  flex-direction: row-reverse;   /* galerie à droite, formulaire à gauche */
}


/* === Responsive === */
@media (max-width: 768px) {
  .commande-layout {
    flex-direction: column;
    gap: 20px;
  }
  .btn {
    max-width: 100%;
  }
}

/* === Responsive mobile (ajout) === */
@media (max-width: 480px) {
  .page-container {
    max-width: 100%;
    padding: 10px;
  }

  .commande-header {
    font-size: 14px;   /* réduit la taille du texte */
    flex-wrap: nowrap; /* force une seule ligne */
  }

  .commande-total {
    font-size: 14px;
  }

  .resume-item_A {
    font-size: 14px;
  }

  .photos-container,
  .form-container {
    max-width: 100%;
    margin: 0;
  }

  .photos-container img {
    width: 100%;
    height: auto;
  }
}
