/* ================================================================
   /assets/css/kit-detail.css — fiche kit (12/09/2026)
   Fichier SEPARE de kits.css : kits_detail.php ne chargeait PAS
   kits.css (tout son CSS etait inline). Le garder a part preserve
   exactement le rendu d'avant ; fusionner avec kits.css aurait fait
   appliquer a la fiche kit des regles (.ep-kit-*, .epk-lightbox)
   qu'elle ne recevait pas.
   ================================================================ */

/* ================================================================
   Deplace depuis app/views/kits_detail.php (12/09/2026) — CSS inchange, ordre conserve.
   ================================================================ */
/* ─── L7.4 : États stock du kit (couleurs identiques à product) ─── */
.ep-buy-stock {
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--ep-radius-md, 8px);
  padding: 10px 14px;
}
.ep-buy-stock.en_stock {
  color: var(--ep-green-dark, #006633);
  background: var(--ep-green-light, #EAF3DE);
  border: 1px solid var(--ep-green-light, #EAF3DE);
}
.ep-buy-stock.sur_commande {
  color: var(--ep-orange-dark, #854F0B);
  background: var(--ep-orange-light, #FAEEDA);
  border: 1px solid var(--ep-orange-light, #FAEEDA);
}
.ep-buy-stock.nous_contacter {
  color: var(--ep-text-muted, #6B6B6B);
  background: var(--ep-bg-section, #F5F5F5);
  border: 1px solid var(--ep-border, #E5E5E5);
}
.ep-buy-stock-detail {
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px;
  line-height: 1.4;
}

/* ─── L7.4 : Boutons buybox kit (couleurs identiques à product) ─── */
/* Barre mobile fixe (prix + ajouter) — cachée par défaut (desktop) */
.ep-kit-mobile-bar { display: none; }
.ep-kit-btn-addcart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--ep-gold, #C9A24A);
  color: var(--ep-text, #1A1A1A);
  border: 1px solid var(--ep-gold, #C9A24A);
  border-radius: var(--ep-radius-md, 8px);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--ep-tr-fast, 0.15s ease), border-color 0.15s ease;
}
.ep-kit-btn-addcart:hover {
  background: var(--ep-gold-dark, #A8842F);
  border-color: var(--ep-gold-dark, #A8842F);
  color: var(--ep-text, #1A1A1A);
}
.ep-kit-btn-addcart.is-loading { opacity: 0.6; pointer-events: none; }
.ep-kit-btn-askinfo {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: transparent;
  color: var(--ep-text, #1A1A1A);
  border: 1px solid var(--ep-border, #E5E5E5);
  border-radius: var(--ep-radius-md, 8px);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: border-color var(--ep-tr-fast, 0.15s ease);
}
.ep-kit-btn-askinfo:hover {
  border-color: var(--ep-text, #1A1A1A);
  color: var(--ep-text, #1A1A1A);
}

/* ─── L7.4 : Lightbox kit (copie autonome du système produit) ─── */
.epk-lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 9999;
  flex-direction: column; align-items: center; justify-content: center;
}
.epk-lightbox.open { display: flex; }
.epk-lightbox-stage {
  position: relative; width: 92vw; height: 82vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: manipulation;
}
.epk-lightbox-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: var(--ep-radius-sm, 4px); cursor: zoom-in;
  user-select: none; -webkit-user-drag: none;
  transform-origin: center center; transition: transform 0.18s ease; will-change: transform;
}
.epk-lightbox-stage.is-zoomed img { cursor: zoom-out; transition: none; }
.epk-lightbox-close {
  position: absolute; top: 18px; right: 26px; color: #fff;
  font-size: 32px; cursor: pointer; line-height: 1; z-index: 2;
  background: none; border: 0; padding: 0;
}
.epk-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff; background: rgba(0,0,0,0.35);
  border: 0; border-radius: 50%; cursor: pointer; z-index: 2;
  transition: background 0.15s ease;
}
.epk-lightbox-nav:hover { background: rgba(0,0,0,0.6); }
.epk-lightbox-prev { left: 20px; }
.epk-lightbox-next { right: 20px; }
.epk-lightbox-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13px; letter-spacing: 1px;
  background: rgba(0,0,0,0.4); padding: 4px 12px; border-radius: 999px;
}
@media (max-width: 600px) {
  .epk-lightbox-nav { width: 40px; height: 40px; font-size: 24px; }
}
.ep-kit-carousel-slide:hover .ep-kit-carousel-thumb { border-color: var(--ep-red) !important; }
/* Responsive : grille passe en colonne sur mobile */
@media (max-width: 768px) {
  .ep-kit-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  /* L7.4 — sur mobile, le bloc prix repasse en flux normal (pas de sticky) */
  .ep-kit-summary {
    position: static !important;
    top: auto !important;
    max-height: none !important;     /* annule la limite hauteur viewport */
    display: block !important;        /* annule le flex column */
  }
  /* Mobile : photo reprend hauteur fixe (sinon flex:1 lui donnerait 0px) */
  .ep-kit-summary .ep-kit-photo {
    flex: none !important;
    height: 240px !important;
  }
  /* L7.4 — barre mobile fixe en bas : prix + bouton Ajouter */
  .ep-kit-mobile-bar {
    display: flex !important;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--ep-white, #fff);
    border-top: 1px solid var(--ep-border, #E5E5E5);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  }
  .ep-kit-mobile-bar-price {
    display: flex; flex-direction: column; line-height: 1.1; flex: 0 0 auto;
  }
  .ep-kit-mobile-bar-amount { font-size: 20px; font-weight: 700; color: var(--ep-text, #1A1A1A); }
  .ep-kit-mobile-bar-suffix { font-size: 11px; color: var(--ep-text-muted, #6B6B6B); }
  .ep-kit-mobile-bar-btn {
    flex: 1 1 auto;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 13px 16px;
    background: var(--ep-gold, #C9A24A);
    color: var(--ep-text, #1A1A1A);
    border: 0; border-radius: var(--ep-radius-md, 8px);
    font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
  }
  .ep-kit-mobile-bar-btn.is-loading { opacity: 0.6; pointer-events: none; }
  /* Espace en bas pour que la barre fixe ne masque pas le footer/contenu */
  .ep-section { padding-bottom: 80px; }
  /* L7.4 — lignes composants : grid → flex-wrap (robuste quel que soit le nb de colonnes) */
  .ep-kit-item-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }
  /* La checkbox/case garde sa taille, la désignation prend le reste de la 1re ligne */
  .ep-kit-item-row > div:first-child { flex: 0 0 auto !important; }
  .ep-kit-item-row > div:nth-child(2) {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  /* Toutes les autres cellules (qty, PV, %, PA, sous-total) passent sous la désignation,
     réparties en ligne, alignées à gauche */
  .ep-kit-item-row > div:nth-child(n+3) {
    flex: 0 0 auto !important;
    text-align: left !important;
    font-size: 13px !important;
  }
  /* Le sous-total (dernière cellule) prend toute la largeur, mis en évidence */
  .ep-kit-item-row > div:last-child {
    flex: 1 0 100% !important;
    text-align: right !important;
    border-top: 1px dashed var(--ep-border) !important;
    padding-top: 8px !important;
    margin-top: 4px !important;
  }
  /* Carrousel : vignettes un peu plus petites */
  .ep-kit-carousel-slide { width: 100px !important; }
  .ep-kit-carousel-thumb { width: 100px !important; height: 100px !important; }
  /* Photo du kit : ratio plus haut sur mobile pour ne pas être trop plate */
  .ep-kit-photo { aspect-ratio: 4 / 3 !important; }
}

