@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul { list-style: none; }

/* Sans ça, une règle d'auteur comme `.mobile-nav a { display: flex }` bat la
   règle par défaut du navigateur et l'attribut `hidden` ne cache plus rien —
   c'est ainsi que le lien du tableau de bord restait visible pour tous. */
[hidden] { display: none !important; }

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-text);
  max-width: 560px;
  line-height: 1.7;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201,144,26,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--black);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  background: var(--cream);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
  box-shadow: 0 8px 32px rgba(37,211,102,0.3);
}

.btn-whatsapp:hover {
  background: #1ebe57;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(37,211,102,0.4);
}

/* ========== NAVBAR ========== */
/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.55rem clamp(1.25rem, 4vw, 3rem) 0.4rem;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

.navbar.dark {
  background: rgba(18,18,18,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Nav inner: logo à gauche, actions à droite (rangée du haut) ── */
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}

/* ── Marque : rangée du bas, toujours centrée sur toute la largeur ── */
.nav-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  line-height: 1.15;
}

.nav-brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.78rem, 2.6vw, 1rem);
  letter-spacing: 0.04em;
  color: var(--cream);
  white-space: nowrap;
}

.navbar.scrolled .nav-brand-title { color: var(--black); }

.nav-brand-tagline {
  display: block;
  font-size: clamp(0.56rem, 1.8vw, 0.68rem);
  font-weight: 400;
  color: rgba(245, 240, 230, 0.72);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.navbar.scrolled .nav-brand-tagline { color: var(--gray-text); }

@media (max-width: 360px) {
  .nav-brand-tagline { font-size: 0.5rem; }
}

/* ── Actions : panier + hamburger ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Cart button */
.nav-cart-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  background: transparent;
  color: var(--cream);
}

.navbar.scrolled .nav-cart-btn { color: var(--black); }

.nav-cart-btn:hover { background: rgba(255,255,255,0.12); }
.navbar.scrolled .nav-cart-btn:hover { background: var(--cream); }

.cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.cart-count.visible { display: flex; }

/* Petit rebond de l'icône panier quand un article vient d'y « atterrir ». */
@keyframes cartBump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.32); }
  55%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.nav-cart-btn.cart-bump { animation: cartBump 420ms cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ── Vol de la miniature produit vers le panier ── */
.fly-clone {
  position: fixed;
  top: 0; left: 0;
  z-index: 3000;
  border-radius: 50%;
  background-color: var(--cream);
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35), 0 0 0 3px rgba(255,255,255,0.6);
  pointer-events: none;
  will-change: transform, opacity;
}
.fly-clone-plain {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gold);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
}

/* ── Hamburger ── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.hamburger:hover { background: rgba(255,255,255,0.12); }
.navbar.scrolled .hamburger:hover { background: var(--cream); }

.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--cream);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.navbar.scrolled .hamburger span { background: var(--black); }

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========== MOBILE NAV ========== */
/* Panneau compact ancré sous le bouton menu, plutôt qu'un bandeau pleine largeur. */
.mobile-nav {
  position: fixed;
  top: calc(var(--nav-height) - 0.35rem);
  right: clamp(0.75rem, 3vw, 2rem);
  left: auto;
  width: min(272px, calc(100vw - 1.5rem));
  max-height: calc(100vh - var(--nav-height) - 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.9rem 0.9rem;
  transform: translateY(-10px) scale(0.98);
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.22s;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.mobile-nav.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 0.62rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--black);
  border-bottom: 1px solid var(--cream-dark);
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-nav a:last-of-type { border-bottom: none; }

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--gold);
  padding-left: 0.3rem;
}

.mobile-nav .btn {
  margin-top: 0.85rem;
  width: 100%;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
}

/* Sur mobile aussi le panneau reste un menu déroulant, pas un plein écran :
   on doit continuer à voir la page derrière. */
@media (max-width: 480px) {
  .mobile-nav {
    right: 0.6rem;
    width: min(258px, calc(100vw - 3rem));
    padding: 0.3rem 0.8rem 0.8rem;
  }
  .mobile-nav a { padding: 0.55rem 0; font-size: 0.87rem; }
}

/* ========== SECTIONS ========== */
.section {
  padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin: 0 auto;
}

/* ========== DIVIDER ========== */
.divider {
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
}

.section-header.centered .divider {
  margin: 1rem auto 1.5rem;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--black);
  color: var(--cream);
  padding: 4rem clamp(1rem, 4vw, 3rem) 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(245,240,232,0.7);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }

.footer-col ul a {
  font-size: 0.875rem;
  color: rgba(245,240,232,0.6);
  transition: var(--transition);
}

.footer-col ul a:hover { color: var(--gold); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgba(245,240,232,0.6);
  margin-bottom: 0.75rem;
}

.footer-contact-item svg {
  flex-shrink: 0;
  color: var(--gold);
  margin-top: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(245,240,232,0.1);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(245,240,232,0.4);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245,240,232,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--cream);
}

.social-link:hover {
  background: var(--gold);
  transform: translateY(-2px);
}

/* ========== CART PANEL ========== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--white);
  z-index: 2001;
  transform: translateX(100%);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
}

.cart-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
}

.cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.cart-close:hover { background: var(--gold); color: var(--white); }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-text);
}

.cart-empty svg { margin: 0 auto 1rem; opacity: 0.4; }

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cream-dark);
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--cream);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.cart-item-info { flex: 1; }

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.875rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover { background: var(--gold); color: var(--white); }

.qty-val {
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  font-size: 0.9rem;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--cream-dark);
  background: var(--cream);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.cart-total-label {
  font-size: 0.9rem;
  color: var(--gray-text);
}

.cart-total-amount {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
}

.cart-footer .btn {
  width: 100%;
  justify-content: center;
}

/* ========== PAGE HERO (generic) ========== */
.page-hero {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 4rem;
  padding-left: clamp(1rem, 4vw, 3rem);
  padding-right: clamp(1rem, 4vw, 3rem);
  background: linear-gradient(135deg, var(--black) 0%, #2A1F0A 100%);
  text-align: center;
  color: var(--white);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--white);
  margin-bottom: 1rem;
}

.page-hero h1 span { color: var(--gold); }

.page-hero p {
  font-size: 1.1rem;
  color: rgba(245,240,232,0.75);
  max-width: 560px;
  margin: 0 auto;
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--black);
  color: var(--white);
  padding: 0.875rem 1.5rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 3000;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-icon { color: var(--gold); }

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Entrée de marque dans le menu mobile */
.mobile-nav-brand {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 0.15rem;
  font-family: var(--font-heading);
  font-weight: 700 !important;
  color: var(--gold-dark) !important;
}
.mobile-nav-brand small {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--gray-text);
}

/* ========== CARTES PRODUIT (partagées par toutes les pages) ========== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--cream-dark);
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.product-img {
  aspect-ratio: 4/3;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--gold);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.product-body {
  padding: 1.25rem;
}

.product-category {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--gray-text);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
}

.product-add-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.product-add-btn:hover { background: var(--gold-dark); transform: scale(1.1); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand { grid-column: 1 / -1; }

  /* Le menu déroulant peut dépasser la hauteur de l'écran */
  .mobile-nav {
    max-height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
  }

  /* Cibles tactiles confortables */
  .mobile-nav a { padding: 0.95rem 0; min-height: 48px; }
  .btn { min-height: 46px; }
  .product-add-btn { width: 40px; height: 40px; }

  /* Deux produits par ligne plutôt qu'une colonne étirée */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .product-add-btn { width: 40px; height: 40px; }
  .product-img { aspect-ratio: 1; }
  .product-body { padding: 0.85rem; }
  .product-name { font-size: 0.92rem; }
  .product-desc { font-size: 0.78rem; }
  .product-price { font-size: 0.92rem; }

  /* Panneau du panier plein écran */
  .cart-panel { width: 100%; max-width: none; }

  /* Le contenu principal respire moins verticalement */
  .section { padding: clamp(2.5rem, 8vw, 4rem) 1rem; }
  .page-hero { padding-inline: 1rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section-title { font-size: clamp(1.5rem, 6vw, 2rem); }
}

/* Évite le zoom automatique d'iOS à la saisie */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px; }
}
