/* ===== STYLE.CSS — CSS partagé StickerInsta ===== */

/* --- Base --- */
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: #0f0f1a;
  color: #fff;
  overflow-x: hidden;
  padding-top: 84px;
}

body::before {
  content: "";
  position: fixed;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background:
    radial-gradient(circle at 20% 30%, rgba(138,43,226,0.6) 0%, transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(0,100,255,0.5) 0%, transparent 50%),
    radial-gradient(circle at 35% 75%, rgba(75,0,130,0.4) 0%, transparent 50%),
    radial-gradient(circle at 60% 65%, rgba(0,191,255,0.35) 0%, transparent 50%);
  filter: blur(90px);
  opacity: 0.9;
  z-index: -1;
  animation: floatBackground 22s ease-in-out infinite;
  will-change: transform;
  contain: strict;
}

@keyframes floatBackground {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.03) translate(-25px, 20px); }
  100% { transform: scale(1) translate(0, 0); }
}

/* Mobile : désactiver les effets coûteux pour les performances */
@media (max-width: 768px) {
  body::before {
    filter: blur(40px);
    animation: none;
    opacity: 0.7;
  }
  .topbar {
    backdrop-filter: none;
  }
  .delivery-bar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(15,15,26,0.85);
  }
}

/* --- Header / Topbar --- */
.topbar {
  background: #000;
  backdrop-filter: saturate(140%) blur(8px);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  padding: 0 20px;
  box-sizing: border-box;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  min-width: 170px;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* --- Navigation --- */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links {
  display: flex;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  opacity: 0.92;
}

.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a18, #af2dff, #2b7bff);
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
}

.nav-cta:hover { transform: translateY(-1px); }

.nav-reassurance {
  display: none;
  font-size: 0.78rem;
  opacity: 0.85;
  white-space: nowrap;
}

/* --- Header actions / Cart --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-icon a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cart-icon i { font-size: 1.2rem; }

.cart-icon #cart-count {
  background: red;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  position: absolute;
  top: -8px;
  right: -10px;
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* --- Burger menu --- */
.nav-toggle {
  display: none;
  width: 42px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  margin: 0;
}

/* --- Delivery bar --- */
.delivery-bar {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 9;
  background: rgba(15,15,26,0.28);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.delivery-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.95;
}

/* --- CTA buttons (gradient) --- */
.cta-button,
a.cta-button,
.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a18, #af2dff, #2b7bff);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  border: none;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cta-button:hover,
a.cta-button:hover,
.cta-link:hover {
  transform: translateY(-1px) scale(1.02);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 50px;
  font-size: 0.9rem;
  color: #aaa;
}

.footer-nav {
  margin-bottom: 14px;
}

footer a {
  color: #eee;
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  text-decoration: underline;
}

/* --- Cookie banner --- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #000;
  color: white;
  padding: 15px;
  border-radius: 10px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.95rem;
  visibility: hidden;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .3s, transform .3s, visibility .3s;
}

.cookie-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner a {
  color: #00bfff;
  text-decoration: underline;
}

.cookie-buttons button {
  margin-left: 10px;
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.cookie-buttons button:first-child {
  background: #00bfff;
  color: #000;
}

.cookie-buttons button:last-child {
  background: #444;
  color: white;
}

/* ===== Desktop header: grid 3 colonnes ===== */
@media (min-width: 861px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .brand { justify-self: start; min-width: auto; }
  .primary-nav { justify-self: center; min-width: 0; }
  .nav-links { justify-content: center; }
  .header-actions { justify-self: end; }
}

/* ===== Mobile header ===== */
@media (max-width: 860px) {
  body { padding-top: 92px; }
  .delivery-bar { display: block; }
  .brand-name { display: none; }

  .nav-toggle { display: flex; }

  .topbar-inner { justify-content: space-between; }

  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: auto;
    gap: 8px;
  }

  .nav-toggle { order: 1; }
  .header-actions { order: 3; }

  .primary-nav {
    position: fixed;
    top: calc(56px + 30px);
    left: 0;
    right: 0;
    background: #000;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 14px 18px 16px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    z-index: 9;
  }

  body.nav-open .primary-nav { display: flex; }

  .nav-links { flex-direction: column; align-items: flex-start; width: 100%; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 8px 2px; }
  .nav-cta { width: 100%; justify-content: center; }
  .nav-reassurance { display: none; }
}
