/* Babass Shop — style boutique moderne, inspiré des codes du e-commerce parfum */
:root {
  --gold-1: #fff6c9;
  --gold-2: #ffd700;
  --gold-3: #b8860b;
  --ink: #1a1a1a;
  --muted: #777;
  --bg: #faf8f4;
  --card: #ffffff;
  --accent: #8a6d00;
  --danger: #c0392b;
  --ok: #1e7e34;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
}
a { color: inherit; }

/* --- Logo or 3D --- */
.logo-gold {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 900; letter-spacing: 1px; text-decoration: none;
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 28%, #e0a800 48%, var(--gold-3) 62%, #ffe45e 80%, #7a5c00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(90, 60, 0, .35);
  filter: drop-shadow(0 1px 0 #5c430a) drop-shadow(0 3px 2px rgba(0,0,0,.35));
}
.logo { font-size: 1.9rem; }
.logo-small { font-size: 1.2rem; }
.hero-title { font-size: 3.2rem; margin: 0; }
.footer-logo { font-size: 1.6rem; }

/* --- Header --- */
.site-header { background: #141414; color: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: .7rem 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.searchbar { display: flex; flex: 1; min-width: 200px; max-width: 480px; }
.searchbar input {
  flex: 1; padding: .55rem .8rem; border: none; border-radius: 6px 0 0 6px; font-size: 1rem;
}
.searchbar button {
  border: none; background: var(--gold-2); border-radius: 0 6px 6px 0;
  padding: 0 1rem; font-size: 1.1rem; cursor: pointer;
}
.header-nav { margin-left: auto; display: flex; gap: 1rem; align-items: center; }
.header-nav a { color: #fff; text-decoration: none; font-weight: 600; }
.cart-badge {
  background: var(--gold-2); color: #141414; border-radius: 999px;
  padding: 0 .5rem; font-size: .85rem; font-weight: 700;
}
.delivery-banner {
  background: linear-gradient(90deg, #8a6d00, #b8912a, #8a6d00);
  color: #fff; text-align: center; font-size: .85rem; padding: .35rem .5rem; font-weight: 600;
}

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.page-title { font-size: 1.6rem; margin: .5rem 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.back-link { display: inline-block; margin: .5rem 0; text-decoration: none; color: var(--accent); font-weight: 600; }

/* --- Hero --- */
.hero { text-align: center; padding: 2.5rem 1rem 1.5rem; }
.hero-sub { color: var(--muted); font-size: 1.1rem; margin-top: .4rem; }

/* --- Filtres --- */
.filters { margin-bottom: 1rem; }
.filters-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.filters-form select {
  padding: .55rem .8rem; border: 1px solid #ddd; border-radius: 6px; font-size: .95rem; background: #fff;
}
.results-count { color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }

/* --- Grille produits --- */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem;
}
.card {
  background: var(--card); border-radius: 12px; overflow: hidden; text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.card-img { position: relative; aspect-ratio: 1; background: #f3f0ea; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: .7rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.card-brand { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); font-weight: 700; }
.card-brand.big { font-size: .9rem; }
.card-name { font-size: .92rem; font-weight: 600; }
.card-price { font-size: 1.05rem; font-weight: 800; color: var(--ink); margin-top: auto; padding-top: .3rem; }
.badge {
  position: absolute; top: .5rem; left: .5rem; background: var(--danger); color: #fff;
  font-size: .75rem; font-weight: 700; padding: .2rem .5rem; border-radius: 6px;
}

/* --- Fiche produit --- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1rem; }
.detail-img img { width: 100%; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.detail-info h1 { margin: .3rem 0; font-size: 1.5rem; }
.detail-price { font-size: 1.8rem; font-weight: 800; margin: .8rem 0; }
.stock.ok { color: var(--ok); font-weight: 600; }
.stock.out { color: var(--danger); font-weight: 600; }
.add-form { display: flex; gap: .6rem; align-items: center; margin: 1rem 0; flex-wrap: wrap; }
.qty-input { width: 70px; padding: .55rem; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; }
.section-title { margin-top: 2.5rem; font-size: 1.3rem; }

/* --- Boutons --- */
.btn {
  display: inline-block; padding: .65rem 1.2rem; border-radius: 8px; border: none;
  font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
}
.btn-primary { background: linear-gradient(180deg, #f5c518, #d4a017); color: #1a1a1a; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: #eee; color: var(--ink); }
.btn-ghost.danger { color: var(--danger); }
.btn.big { font-size: 1.1rem; padding: .8rem 1.6rem; }
.btn.small { padding: .35rem .7rem; font-size: .85rem; }

/* --- Panier --- */
.cart-lines { display: flex; flex-direction: column; gap: .8rem; }
.cart-line {
  display: flex; gap: 1rem; align-items: center; background: var(--card);
  padding: .8rem; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.cart-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cart-info { flex: 1; }
.cart-subtotal { font-weight: 800; min-width: 70px; text-align: right; }
.cart-actions { display: flex; gap: .6rem; margin: 1rem 0; }
.cart-total-box {
  background: var(--card); border-radius: 10px; padding: 1.2rem; margin-top: 1rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.cart-total { font-size: 1.3rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); font-size: 1.1rem; }

/* --- Commande --- */
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: start; }
.checkout-form { background: var(--card); padding: 1.4rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.checkout-form h2 { margin-top: 0; font-size: 1.2rem; }
.checkout-form label { display: block; margin-bottom: .9rem; font-weight: 600; font-size: .95rem; }
.checkout-form input[type=text], .checkout-form input[type=tel],
.checkout-form input[type=number], .checkout-form input[type=password],
.checkout-form select, .checkout-form textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .6rem .8rem;
  border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; font-weight: 400; font-family: inherit;
}
.pay-option {
  display: flex !important; gap: .6rem; align-items: flex-start;
  background: #faf8f4; border: 1px solid #e5ddc8; border-radius: 8px; padding: .8rem !important;
}
.pay-option input { margin-top: .25rem; }
.pay-logo { height: 15px; width: auto; max-width: 40px; border-radius: 2px; object-fit: contain; background: #fff; flex-shrink: 0; }
.rate-box { background: #faf8f4; border: 1px solid #e5ddc8; border-radius: 8px; padding: 1rem; margin-bottom: 1.2rem; }
.rate-form { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.rate-form label { font-weight: 600; }
.rate-form input { width: 100px; margin-left: .5rem; padding: .5rem; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; }
.msg-ok { color: #2e7d32; font-weight: 600; }
.pay-disabled { opacity: .65; cursor: not-allowed; }
.badge-soon { background: #c9a227; color: #fff; font-style: normal; font-size: .75rem; padding: .15rem .5rem; border-radius: 20px; margin-left: .4rem; }
.txid-field { display: block; margin: 0 0 1rem 1.5rem; font-size: .9rem; }
.txid-field input { display: block; width: 100%; max-width: 320px; margin-top: .3rem; padding: .6rem .8rem; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; }
.rate-info { background: #f0f7e8; border: 1px solid #c5dfa8; border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .95rem; }
.rail-choices { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem 1.5rem; }
.rail-choices label { font-weight: 400; display: flex; gap: .3rem; align-items: center; }
.order-summary { background: var(--card); padding: 1.2rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.summary-line { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px dashed #eee; font-size: .92rem; }
.summary-total { display: flex; justify-content: space-between; font-size: 1.2rem; padding-top: .8rem; }
.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 600; }
.alert.error { background: #fdecea; color: var(--danger); }
.alert.ok { background: #e6f4ea; color: var(--ok); }
.success-box { background: var(--card); border-radius: 12px; padding: 2rem; max-width: 700px; margin: 1rem auto; box-shadow: 0 2px 12px rgba(0,0,0,.08); }

/* --- Footer --- */
.site-footer { background: #141414; color: #ccc; text-align: center; padding: 2rem 1rem; margin-top: 3rem; }
.site-footer p { margin: .3rem 0; }

/* --- Admin --- */
.admin-body { background: #f0ede6; }
.admin-header {
  background: #141414; color: #fff; padding: .7rem 1rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.admin-header nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-left: auto; }
.admin-header nav a { color: #fff; text-decoration: none; font-size: .92rem; }
.admin-header nav a:hover { color: var(--gold-2); }
.admin-main { padding-bottom: 3rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--card); border-radius: 10px; padding: 1rem; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.stat-num { font-size: 1.8rem; font-weight: 800; }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat.warn .stat-num { color: #b7791f; }
.stat.ok .stat-num { color: var(--ok); }
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); font-size: .92rem; }
.table th, .table td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid #f0ede6; vertical-align: middle; }
.table th { background: #faf8f4; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.nowrap { white-space: nowrap; }
.stock-low { color: var(--danger); font-weight: 800; }
.toolbar { display: flex; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar .searchbar { max-width: 320px; }
.login-box { background: var(--card); max-width: 420px; margin: 4rem auto; padding: 2rem; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.login-box h1 { text-align: center; font-size: 1.3rem; }
.login-box label { display: block; margin-bottom: .9rem; font-weight: 600; }
.login-box input { display: block; width: 100%; margin-top: .3rem; padding: .6rem .8rem; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; }
.order-card { background: var(--card); border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.order-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.order-items { margin: .5rem 0; padding-left: 1.2rem; font-size: .92rem; }
.order-status-form { display: flex; gap: .5rem; margin-top: .6rem; align-items: center; }
.order-status-form select { padding: .45rem .6rem; border: 1px solid #ddd; border-radius: 6px; }
.status { font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: #eee; }
.status.payee { background: #d4edda; color: #155724; }
.status.en_attente { background: #fff3cd; color: #856404; }
.status.annulee { background: #f8d7da; color: #721c24; }
.status.expediee, .status.livree { background: #d1ecf1; color: #0c5460; }

/* --- Mobile --- */
@media (max-width: 720px) {
  .hero-title { font-size: 2.2rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
  .product-detail, .checkout-grid { grid-template-columns: 1fr; }
  .header-inner { gap: .6rem; }
  .searchbar { order: 3; flex-basis: 100%; max-width: none; }
  .cart-line { flex-wrap: wrap; }
  .table { display: block; overflow-x: auto; }
}

/* ================= ANIMATIONS Babass Shop ================= */

/* --- 1. Bannière animée (dégradé mouvant + éléments flottants) --- */
.hero {
  position: relative; overflow: hidden; border-radius: 16px; margin-bottom: 1rem;
  background: linear-gradient(120deg, #1a1a2e, #4a2c6a, #b8860b, #4a2c6a, #1a1a2e);
  background-size: 300% 300%;
  animation: heroGradient 12s ease infinite;
  padding: 3rem 1rem 2rem;
}
@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero::before, .hero::after {
  content: "✨"; position: absolute; font-size: 2rem; opacity: .7;
  animation: floatSparkle 6s ease-in-out infinite;
}
.hero::before { top: 15%; left: 8%; }
.hero::after { bottom: 20%; right: 10%; animation-delay: 3s; }
@keyframes floatSparkle {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .4; }
  50% { transform: translateY(-18px) rotate(20deg); opacity: 1; }
}
.hero-title { animation: fadeSlideDown 1s ease both; }
.hero-sub { color: #f0e6d2; animation: fadeSlideDown 1s .3s ease both; }
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 2. Carrousel produits vedettes --- */
.carousel-section { margin: 0 0 1.5rem; overflow: hidden; }
.carousel-title { font-size: 1.2rem; margin-bottom: .6rem; }
.carousel-track {
  display: flex; gap: 1rem; width: max-content;
  animation: carouselSlide 30s linear infinite;
}
.carousel-track:hover { animation-play-state: paused; }
@keyframes carouselSlide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.carousel-track .card { width: 170px; flex-shrink: 0; }

/* --- 3. Effets hover améliorés sur les cartes --- */
.card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 14px 30px rgba(184,134,11,.25);
}
.card-img img { transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.1); }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(184,134,11,.0); transition: box-shadow .25s;
}
.card:hover::after { box-shadow: 0 0 0 2px rgba(184,134,11,.5); }
.card { position: relative; }

/* Apparition progressive des cartes */
.product-grid .card { animation: cardAppear .5s ease both; }
.product-grid .card:nth-child(2) { animation-delay: .05s; }
.product-grid .card:nth-child(3) { animation-delay: .1s; }
.product-grid .card:nth-child(4) { animation-delay: .15s; }
.product-grid .card:nth-child(5) { animation-delay: .2s; }
.product-grid .card:nth-child(6) { animation-delay: .25s; }
.product-grid .card:nth-child(7) { animation-delay: .3s; }
.product-grid .card:nth-child(8) { animation-delay: .35s; }
@keyframes cardAppear {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 4. Animation ajout panier (vol vers le panier + toast) --- */
.fly-img {
  position: fixed; z-index: 9999; border-radius: 50%; pointer-events: none;
  transition: all .8s cubic-bezier(.3,-.1,.4,1);
}
.cart-bounce { animation: cartBounce .5s ease; }
@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.4); }
}
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(100px);
  background: #1a1a2e; color: #fff; padding: .8rem 1.5rem; border-radius: 30px;
  font-weight: 600; z-index: 9999; opacity: 0; transition: all .4s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,.3);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* --- Boutons avec effet --- */
.btn-primary { transition: transform .15s, box-shadow .15s; }
.btn-primary:hover { transform: scale(1.03); box-shadow: 0 6px 18px rgba(184,134,11,.4); }
.btn-primary:active { transform: scale(.97); }
