/* ==========================================================================
   BNOT SÉMINAIRE - PALETTE OFFICIELLE & MOBILE RESPONSIVE DESIGN SYSTEM
   ========================================================================== */

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

:root {
  /* Official User Palette */
  --text-main: #413A4A;          /* Violet foncé */
  --text-muted: #6E6479;         /* Violet moyen lisible */
  --text-subtle: #988DA5;        /* Violet adouci */
  
  --bg-main: #FAF7FB;            /* Blanc lavande */
  --bg-card: #FFFFFF;            /* Blanc pur */
  --bg-card-hover: #F6F0F8;

  --accent-1: #C7A9D1;           /* Lavande douce (Boutons, Liens, Accent principal) */
  --accent-1-hover: #B492BE;
  --accent-1-light: #F3EAF6;

  --accent-2: #F2B8C6;           /* Rose blush (Survols, détails, badges) */
  --accent-2-hover: #E7A1B2;
  --accent-2-light: #FDF0F3;

  /* Aliases for compatibility */
  --primary: #C7A9D1;
  --primary-hover: #B492BE;
  --primary-pink: #F2B8C6;
  --primary-pink-hover: #E7A1B2;

  --border-color: rgba(199, 169, 209, 0.3);
  --glass-border: rgba(199, 169, 209, 0.25);
  --glass-bg: rgba(250, 247, 251, 0.95);

  --shadow-sm: 0 4px 15px rgba(65, 58, 74, 0.04);
  --shadow-md: 0 10px 28px rgba(65, 58, 74, 0.07);
  --shadow-lg: 0 18px 40px rgba(65, 58, 74, 0.1);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --font-main: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --text-main: #FAF7FB;
  --text-muted: #D3C7DC;
  --text-subtle: #A797B5;
  --bg-main: #201A27;
  --bg-card: #2B2333;
  --bg-card-hover: #352B3F;
  --border-color: rgba(199, 169, 209, 0.25);
  --glass-bg: rgba(32, 26, 39, 0.92);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(242, 184, 198, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(199, 169, 209, 0.25) 0%, transparent 45%);
  background-attachment: fixed;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; touch-action: manipulation; }
img { max-width: 100%; height: auto; display: block; }

#app { display: flex; flex-direction: column; min-height: 100vh; }

.main-content {
  flex: 1;
  padding: 2rem 1.5rem 5rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 2rem;
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-text-container {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-main);
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav-pill-group {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px rgba(65, 58, 74, 0.05);
  border: 1px solid var(--border-color);
  gap: 0.25rem;
}

.nav-pill-item {
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.nav-pill-item:hover, .nav-pill-item.active {
  color: var(--text-main);
  background: var(--accent-1-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-burger {
  display: none;
  font-size: 1.3rem;
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  align-items: center;
  justify-content: center;
}

/* Mobile Nav Drawer */
.mobile-nav-backdrop {
  position: fixed; inset: 0; z-index: 1040;
  background: rgba(10, 25, 47, 0.5); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.mobile-nav-backdrop.active { opacity: 1; pointer-events: auto; }

.mobile-nav-drawer {
  position: fixed; top: 0; right: -300px; width: 280px; height: 100vh;
  background: var(--bg-card); z-index: 1050; padding: 1.5rem;
  box-shadow: var(--shadow-lg); transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.mobile-nav-drawer.open { right: 0; }

.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-color); padding-bottom: 1rem;
}

.mobile-nav-links {
  display: flex; flex-direction: column; gap: 0.5rem; flex: 1; overflow-y: auto;
}

.mobile-nav-link {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.98rem; color: var(--text-main);
  transition: background var(--transition-fast);
}
.mobile-nav-link.active, .mobile-nav-link:hover {
  background: var(--accent-1-light); color: var(--text-main);
}

/* Buttons with Official Palette */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
  text-align: center;
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background: var(--accent-1);
  color: var(--text-main);
  box-shadow: 0 4px 14px rgba(199, 169, 209, 0.4);
}

.btn-primary:hover {
  background: var(--accent-1-hover);
  transform: translateY(-1px);
}

.btn-pink-gradient {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: var(--text-main);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.8rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(242, 184, 198, 0.4);
}

.btn-pink-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(242, 184, 198, 0.5);
}

.btn-outline-pill {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.7rem 1.6rem;
  font-weight: 700;
}

.btn-outline-pill:hover {
  border-color: var(--accent-1);
  background: var(--accent-1-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  position: relative;
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-2);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badges */
.badge-pill-pink {
  background: var(--accent-2);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  display: inline-block;
}

.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.65rem; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}

.badge-primary { background: var(--accent-1-light); color: var(--text-main); border: 1px solid var(--accent-1); }
.badge-info { background: #E2F4F8; color: #155E75; }
.badge-success { background: #E6F4EA; color: #137333; }
.badge-warning { background: #FEF3D6; color: #B45309; }
.badge-danger { background: #FCE8E6; color: #C5221F; }

/* Cards & Layout */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--accent-1);
  box-shadow: var(--shadow-md);
}

.step-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all var(--transition-normal);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-1);
  box-shadow: var(--shadow-md);
}

.icon-badge-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-2-light);
  border: 1px solid var(--accent-2);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.step-card-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.step-card-subtitle {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.step-card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Product Card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-1);
  box-shadow: var(--shadow-md);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--accent-1-light);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-details {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.product-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

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

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.product-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}

/* Modals & Forms */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(65, 58, 74, 0.6); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}

.modal-content {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); max-width: 600px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); position: relative;
}

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

.modal-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--text-main); }
.modal-close { font-size: 1.2rem; color: var(--text-muted); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-main); }
.form-control {
  width: 100%; padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  background: var(--bg-main); border: 1px solid var(--border-color);
  color: var(--text-main); outline: none; transition: all var(--transition-fast);
  font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  min-height: 48px;
}
.form-control:focus { border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(199, 169, 209, 0.25); }

/* Cart Drawer */
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 100%; max-width: 420px; height: 100vh;
  background: var(--bg-card); backdrop-filter: blur(20px); border-left: 1px solid var(--border-color);
  z-index: 1050; box-shadow: var(--shadow-lg); transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-item { display: flex; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.cart-item-img { width: 70px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; }
.cart-item-details { flex: 1; }
.cart-item-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; color: var(--text-main); }
.cart-item-price { color: var(--text-main); font-weight: 800; font-size: 0.9rem; }
.cart-footer { padding: 1.5rem; border-top: 1px solid var(--border-color); background: var(--bg-main); }

/* Toast Notifications */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.75rem; }
.toast {
  padding: 0.85rem 1.25rem; border-radius: var(--radius-md); background: var(--bg-card);
  border: 1px solid var(--border-color); box-shadow: var(--shadow-lg); color: var(--text-main);
  display: flex; align-items: center; gap: 0.75rem; max-width: 360px;
}

.tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1.5rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab-btn { padding: 0.65rem 1.2rem; font-weight: 600; font-size: 0.92rem; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-btn.active { color: var(--text-main); border-bottom-color: var(--accent-1); font-weight: 700; }

.table-responsive { width: 100%; overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-color); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; text-align: left; min-width: 600px; }
.table th, .table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.table th { background: var(--bg-main); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; color: var(--text-muted); }

/* Floating Mobile Cart Button */
.mobile-cart-float-btn {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 990;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: var(--text-main);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(242, 184, 198, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  align-items: center;
  gap: 0.65rem;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (MOBILE, TABLET & DESKTOP)
   ========================================================================== */

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar { padding: 0.75rem 1rem; }
  .nav-pill-group { display: none; }
  .navbar-burger { display: flex; }
  
  .main-content { padding: 1.25rem 1rem 4rem; }

  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 1rem; }

  /* Boutique 2 columns on mobile */
  .boutique-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }

  .product-image-wrap { height: 140px; }
  .product-details { padding: 0.85rem; }
  .product-title { font-size: 0.95rem; line-height: 1.3; }
  .product-desc { font-size: 0.78rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-price { font-size: 1.05rem; }
  .product-footer { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .product-footer .btn { width: 100%; font-size: 0.82rem; padding: 0.5rem 0.75rem; }

  .mobile-cart-float-btn { display: flex; }

  /* Full Width Modals & Forms */
  .modal-overlay { padding: 0.5rem; }
  .modal-content { max-height: 96vh; border-radius: var(--radius-md); }
  .modal-body { padding: 1rem; }
  
  /* Footer responsive 1 column */
  footer div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

@media (max-width: 480px) {
  .brand-title { font-size: 1.2rem; }
  .brand-subtitle { font-size: 0.6rem; }
  
  .boutique-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }
  
  .toast-container { left: 1rem; right: 1rem; bottom: 5rem; }
  .toast { max-width: 100%; }

  .cart-drawer { max-width: 100%; right: -100%; }
}
