/* ============================================================
   AKYOU v10 — Mode sombre complet + prix pro + étoiles cartes
   Chargé en dernier : il écrase le thème clair d'origine.
   ============================================================ */

/* --- Base : on inverse les couleurs fond / texte du thème --- */
:root {
  --color-primary: 244, 244, 245;
  --color-secondary: #0c0c0e;
  --color-gray-50: #1b1b1e;
  --color-gray-300: #35353b;
  --color-gray-500: #a1a1aa;
  /* Boutons principaux : blanc sur fond sombre, texte noir */
  --color-button: 245, 245, 245;
  --color-button-text: 17, 17, 17;
  --color-secondary-button: 245, 245, 245;
}

body {
  background-color: #0c0c0e;
  color: #f4f4f5;
}

body .main-container {
  background-color: #0c0c0e;
}

/* --- Sections : fond sombre + texte clair, quoi que dise l'éditeur ---
   Les sections posent leurs couleurs en style inline sur <yc-section> :
   seul un !important ciblant l'élément lui-même peut les écraser. */
yc-section {
  --section-bg-color: #0c0c0e !important;
  --section-text-color: 244, 244, 245 !important;
  background-color: #0c0c0e;
}

footer {
  --footer-bg-color: #0a0a0c !important;
  --footer-text-color: 244, 244, 245 !important;
}

/* --- Cartes produits : fond relevé sur le fond de page --- */
.product-card {
  background-color: #141416;
  border: 1px solid #26262b;
}

.product-card .info {
  background-color: #141416;
}

/* --- Prix façon capture : prix en vert, prix barré en rouge --- */
.product-card .info .price .current {
  color: #2fdc6a !important;
  font-weight: 700;
}

.product-card .info .price .compare-at {
  color: #ff5c5c !important;
}

.price .current {
  color: #2fdc6a;
}

.price .compare-at {
  color: #ff5c5c !important;
}

/* --- Étoiles sur les cartes (note réelle des avis clients) --- */
.product-card .info .rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-card .info .rating .stars {
  display: flex;
  gap: 2px;
  color: #f7b500;
}

.product-card .info .rating svg {
  width: 15px;
  height: 15px;
}

.product-card .info .rating .average {
  display: none;
}

/* --- Formulaires et champs --- */
input,
select,
textarea {
  background-color: #17171a !important;
  color: #f4f4f5 !important;
  border-color: #33333a !important;
}

::placeholder {
  color: #8b8b93 !important;
}

/* --- Fenêtres (quick view, modales) --- */
.modal-content,
.yc-modal__content {
  background-color: #151517 !important;
  color: #f4f4f5 !important;
}

/* --- Choix sélectionné BIEN visible (v12) ---
   Le radio coché se remplissait avec la couleur de texte de la section
   (sombre sur fond sombre = invisible). On force un état net. */
yc-variant[name="radio"] .radio-item input[type="radio"] {
  border-color: rgba(244, 244, 245, 0.55) !important;
}

yc-variant[name="radio"] .radio-item input[type="radio"]:checked {
  background-color: #e8e8ea !important;
  border-color: #e8e8ea !important;
}

yc-variant[name="radio"] .radio-item input[type="radio"]:checked::after {
  background-color: #111111 !important;
}

yc-variant[name="radio"] .radio-item:has(input:checked) {
  color: #ffffff;
  font-weight: 700;
}

yc-variant[name="toggle"] .toggle-item:has(input:checked) {
  background-color: #e8e8ea !important;
  border-color: #e8e8ea !important;
  color: #111111 !important;
}

yc-variant[name="color"] .color-item:has(input:checked) {
  outline: 2px solid #e8e8ea;
  outline-offset: 2px;
}

/* --- Badge « Rupture de stock » sur les cartes produits (v13) --- */
.akyou-oos-badge {
  position: absolute;
  inset-block-start: 1em;
  inset-inline-end: 1em;
  z-index: 3;
  background-color: #e5484d;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* AKYOU v14 — le tiroir (panier/menu) passe AU-DESSUS des boutons flottants (999) :
   le sous-total et le bouton du tiroir ne sont plus masqués. */
yc-drawer .drawer-overlay {
  z-index: 1000;
}
yc-drawer .drawer-box {
  z-index: 1001;
}

/* AKYOU v14 — formulaire express style MIREYA : champs en bordure pointillée */
.express-checkout .field input,
.express-checkout .field select,
.express-checkout .field textarea {
  border: 1.5px dashed rgba(255, 255, 255, 0.45) !important;
  border-radius: 12px !important;
  background: transparent !important;
}
.express-checkout .field input:focus,
.express-checkout .field select:focus,
.express-checkout .field textarea:focus {
  border-color: rgba(255, 255, 255, 0.85) !important;
  outline: none;
}

/* AKYOU v15 — tiroir (panier/menu) ouvert : masquer les boutons flottants
   (le correctif z-index de v14 s'est révélé insuffisant à l'aperçu). */
body:has(yc-drawer[data-hidden$="false"]) .akyou-float-stack {
  display: none !important;
}

/* AKYOU v15 — barre sticky « Commandez maintenant » (mobile) :
   dégager l'espace occupé par les boutons flottants à droite. */
@media (max-width: 820px) {
  .single-product .buy-button .actions[data-sticky] {
    padding-inline-end: 88px;
  }
}

/* AKYOU v16 — barre sticky mobile : la marge de v15 était écrasée par le CSS
   du thème (spécificité) ; on force avec !important et un sélecteur direct. */
@media (max-width: 820px) {
  .actions[data-sticky] {
    padding-inline-end: 88px !important;
  }
}
