/* ============================================================
   HBT Design — Styles globaux
   Charte : fond noir + photo splash, textes blancs, effets holographiques
   ============================================================ */

/* ── Variables ── */
:root {
  --holo:         linear-gradient(90deg, #FFD700, #AAFF00, #00E5FF, #9B00FF, #FF2200);
  --holo-diag:    linear-gradient(135deg, #FFD700 0%, #AAFF00 25%, #00E5FF 50%, #9B00FF 75%, #FF2200 100%);
  --holo-ring:    conic-gradient(from 0deg, #FF0000, #FF6600, #FFD700, #AAFF00, #00FF88, #00E5FF, #0066FF, #9B00FF, #FF0066, #FF0000);
  --bg:           #0A0A0A;
  --bg-card:      #141414;
  --bg-section:   #111111;
  --text:         #FFFFFF;
  --text-muted:   #FFFFFF;
  --text-subtle:  rgba(255, 255, 255, 0.55);
  --navbar-h:     68px;
  --radius:       6px;
  --transition:   0.22s ease;
  --max-width:    1180px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#main-content { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ── Fond photo splash (image fournie par le client) ── */
.bg-splash {
  position: fixed;
  inset: 0;
  background: url('../../images/fond.png') center/cover no-repeat;
  opacity: 0.30;
  z-index: -1;
  pointer-events: none;
}

/* ── Séparateur holographique ── */
.holo-divider {
  height: 3px;
  background: var(--holo);
  opacity: 0.75;
  border: none;
  margin: 0;
}

/* ── Conteneur centré ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Typographie ── */
h1, h2, h3 {
  font-family: 'Cinzel', 'Georgia', serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.15;
}

/* ── Boutons ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: var(--radius);
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover  { opacity: 0.85; transform: translateY(-2px); }
.btn:active { transform: translateY(0); opacity: 1; }

/* Bouton principal : fond noir, texte blanc, bordure arc-en-ciel */
.btn-primary {
  background: linear-gradient(#000, #000) padding-box,
              var(--holo-ring) border-box;
  border: 3px solid transparent;
  color: #fff;
  font-weight: 900;
}

/* Bouton secondaire : même style */
.btn-secondary {
  background: linear-gradient(#000, #000) padding-box,
              var(--holo-ring) border-box;
  border: 3px solid transparent;
  color: #fff;
}

/* Bouton login : même style */
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(#000, #000) padding-box,
              var(--holo-ring) border-box;
  border: 3px solid transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

/* ── Tags : même design que les boutons ── */
.holo-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 4px 14px;
  border-radius: var(--radius);
  background: linear-gradient(#000, #000) padding-box,
              var(--holo-ring) border-box;
  border: 3px solid transparent;
  color: #fff;
}

/* ── Cards avec contour holo ── */
.holo-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  position: relative;
  z-index: 0;
}
.holo-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  background: var(--holo);
  z-index: -1;
  opacity: 0.65;
}

/* ── En-tête de section ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.section-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--holo-diag);
  flex-shrink: 0;
}
.section-label {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text);
}

/* ── Inputs ── */
.holo-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--transition);
  outline: none;
}
.holo-input:focus   { border-color: #FFD700; }
.holo-input::placeholder { color: var(--text-muted); }
select.holo-input option { background: #1a1a1a; color: #fff; }

/* ── Alertes ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-success { background: rgba(0,255,136,0.10); border: 1px solid rgba(0,255,136,0.3); color: #00FF88; }
.alert-error   { background: rgba(255,34,0,0.10);  border: 1px solid rgba(255,34,0,0.3);  color: #FF5533; }

/* ── Utilitaire ── */
.mt-2 { margin-top: 12px; }
.text-center { text-align: center; }

/* ============================================================
   Lightbox — partagée entre home et galerie
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  border: 1px solid rgba(255,255,255,0.08);
  animation: lb-in 0.22s ease;
}
@keyframes lb-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox__close {
  position: absolute;
  top: 12px; right: 14px;
  z-index: 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox__close:hover { background: rgba(255,255,255,0.15); }

.lightbox__img-wrap {
  position: relative; /* nécessaire pour les boutons nav en absolu */
  width: 100%;
  max-height: 55vh;
  flex-shrink: 0;
  overflow: hidden;
  background: #0a0a0a;
}
.lightbox__img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Carousel nav (galerie + home) ── */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.78);
  border: 1.5px solid rgba(255, 215, 0, 0.65);
  color: #FFD700;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
  z-index: 2;
}
.lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: #FFD700;
}
.lightbox__nav[hidden]  { display: none; }
.lightbox__nav:disabled { opacity: 0.20; cursor: default; }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }

.lightbox__counter {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: #FFD700;
  font-size: 11px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 5px 18px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
}

.lightbox__info {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
}
/* Layout desktop : image pleine largeur en haut, infos en dessous en 2 colonnes */
@media (min-width: 640px) {
  .lightbox__panel      { max-width: 980px; }
  .lightbox__img-wrap   { width: 100%; max-height: 58vh; }
  .lightbox__info {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 40px;
    padding: 20px 32px 24px;
    overflow-y: visible;
    align-items: start;
  }
  .lightbox__title         { grid-column: 1; grid-row: 1; }
  .lightbox__motif         { grid-column: 1; grid-row: 2; }
  .lightbox__desc          { grid-column: 1; grid-row: 3 / span 2; }
  .lightbox__prix          { grid-column: 2; grid-row: 1; text-align: right; }
  .lightbox__cart-row      { grid-column: 2; grid-row: 2; justify-content: flex-end; }
  .lightbox__cart-feedback { grid-column: 2; grid-row: 3; text-align: right; }
  .lightbox__cta           { grid-column: 2; grid-row: 4; justify-self: end; }
}
.lightbox__title {
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--text);
}
.lightbox__motif {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #FFD700;
}
.lightbox__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.75;
}
.lightbox__prix {
  font-size: 22px;
  font-weight: 900;
  color: #FFD700;
  letter-spacing: 1px;
}

.lightbox__cart-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lightbox__qty-wrap {
  display: flex;
  align-items: center;
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  overflow: hidden;
}
.lightbox__qty-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 18px;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.lightbox__qty-btn:hover { background: rgba(255,255,255,0.14); }
.lightbox__qty-input {
  width: 48px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  outline: none;
  -moz-appearance: textfield;
}
.lightbox__qty-input::-webkit-inner-spin-button,
.lightbox__qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.lightbox__add-cart { white-space: nowrap; }

.lightbox__cart-feedback {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  min-height: 16px;
}
.lightbox__cart-feedback.success { color: #00FF88; }
.lightbox__cart-feedback.error   { color: #FF5533; }

.lightbox__cta { align-self: flex-start; margin-top: 4px; }
