/* main.css — Reset, base, utilitaires */

* {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%; height: 100dvh;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  position: relative;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  background: url('../assets/images/fabrics.png') no-repeat center;
  background-size: cover;
  opacity: 0.03; /* Très transparent comme demandé */
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4, h5, h6, .display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
}

/* ─── APP SHELL ──────────────────────────────────────────────── */
#app {
  width: 100%; height: 100dvh;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ─── SCREEN ────────────────────────────────────────────────── */
.screen {
  display: none; flex-direction: column;
  flex: 1; overflow: hidden;
  position: absolute; inset: 0;
}
.screen.active { display: flex; }

/* ─── SCROLL ZONE ────────────────────────────────────────────── */
.scroll-zone {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.scroll-zone::before {
  content: "";
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px; height: 280px;
  background: url('../assets/icons/logo-mma.png') no-repeat center;
  background-size: contain;
  opacity: 0.035;
  filter: grayscale(1);
  pointer-events: none;
  z-index: -1;
}
.scroll-zone::-webkit-scrollbar { display: none; }

/* ─── TOPBAR ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  flex-shrink: 0;
  position: relative; z-index: 5;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }

.topbar-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--gold);
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.topbar-logo img { width: 28px; height: 28px; object-fit: contain; }

.topbar-info h1 {
  font-size: 16px; font-weight: 600;
  color: var(--text); line-height: 1.2;
}

.boutique-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--gold-dim); border: 1px solid var(--gold);
  font-size: 10px; color: var(--gold); font-weight: 600;
  letter-spacing: 0.3px; cursor: pointer; transition: all 0.2s;
}

.topbar-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
}
.icon-btn:active { transform: scale(0.92); border-color: var(--gold); }

/* ─── SEARCH BAR ─────────────────────────────────────────────── */
.search-bar {
  margin: 0 16px 14px;
  position: relative; flex-shrink: 0;
}
.search-bar input {
  width: 100%;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px 12px 42px;
  font-size: 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif;
  outline: none; transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.search-bar input::placeholder { color: var(--text-3); }
.search-bar input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.search-icon {
  position: absolute; left: 14px;
  top: 50%; transform: translateY(-50%);
  color: var(--text-3);
}

/* ─── SECTION LABEL ──────────────────────────────────────────── */
.section-label {
  padding: 4px 20px 10px;
  font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-3); font-weight: 600;
}

/* ─── BOTTOM NAV ─────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding-bottom: 12px;
  z-index: 100;
  display: none; /* caché par défaut, affiché après login */
}
.bottom-nav.visible { display: flex; }

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 14px;
  transition: all 0.2s;
  flex: 1;
}
.nav-item:active { background: var(--gold-dim); }
.nav-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: color 0.2s;
}
.nav-item.active .nav-icon { color: var(--gold); }
.nav-label {
  font-size: 10px; font-weight: 500; color: var(--text-3); transition: color 0.2s;
}
.nav-item.active .nav-label { color: var(--gold); font-weight: 600; }
.nav-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0; transition: opacity 0.2s;
  margin-top: 1px;
}
.nav-item.active .nav-dot { opacity: 1; }

/* ─── FAB ────────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 92px; right: 20px;
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 24px var(--gold-glow), 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  z-index: 99;
  display: none;
}
.fab.visible { display: flex; }
.fab:active { transform: scale(0.92); }
.fab svg { width: 24px; height: 24px; stroke: white; stroke-width: 2; fill: none; }

/* ─── UTILITIES ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-2); }
.text-error { color: #C0392B; }
.text-success { color: #27AE60; }
.fw-600 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 32px;
  text-align: center; gap: 12px;
}
.empty-icon { color: var(--text-3); margin-bottom: 4px; }
.empty-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 600; color: var(--text);
}
.empty-text { font-size: 13px; color: var(--text-3); line-height: 1.6; }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fadeUp { animation: fadeUp 0.5s cubic-bezier(0.16,1,0.3,1) both; }

/* ─── LUXURY BACKGROUNDS ─────────────────────────────────────── */
.bg-luxury-login {
  background-color: #171513;
  background-image: 
    radial-gradient(at 0% 0%, rgba(184, 149, 42, 0.15) 0, transparent 50%), 
    radial-gradient(at 100% 100%, rgba(184, 149, 42, 0.1) 0, transparent 50%),
    linear-gradient(to bottom, rgba(23, 21, 19, 0.4), rgba(23, 21, 19, 0.85)),
    url('../assets/images/luxuryboutiqu.png');
  background-size: cover;
  background-position: center;
}

.bg-facade {
  background-color: #121212;
  background-image: 
    radial-gradient(at 0% 100%, rgba(184, 149, 42, 0.1) 0, transparent 50%),
    linear-gradient(to bottom, rgba(23, 21, 19, 0.5), rgba(23, 21, 19, 0.95)),
    url('../assets/images/facade.png');
  background-size: cover;
  background-position: center;
}
[data-theme="dark"] .bg-facade {
  background: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.95)), url('../assets/images/facade.png') no-repeat center;
}

/* Fix mobile viewport height issues for footer */
.screen-with-footer {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: calc(var(--vh, 1vh) * 100);
}

.form-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  z-index: 10;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}
