/* ================================================================
   PORTAIL FRANCE ETUVES — CSS COMMUN
   ================================================================ */

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a3a5c;
  --primary-light: #2c5282;
  --primary-dark: #0f2440;
  --accent: #e74c3c;
  --accent-hover: #c0392b;
  --success: #27ae60;
  --success-light: #d4edda;
  --warning: #f39c12;
  --warning-light: #fff3cd;
  --danger: #e74c3c;
  --danger-light: #f8d7da;
  --info: #3498db;
  --info-light: #d1ecf1;
  --store-color: #3498db;
  --sav-color: #e67e22;
  --docs-color: #27ae60;
  --monitor-color: #8e44ad;
  --refurbished-color: #16a085;
  --rental-color: #2980b9;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #868e96;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;

  /* === FRANCE ETUVES DESIGN SYSTEM === */
  --fe-blue:        #1A3A6B;
  --fe-blue-mid:    #2356A8;
  --fe-blue-light:  #EBF0FA;
  --fe-red:         #C0272D;
  --fe-red-dim:     rgba(192,39,45,0.1);
  --fe-sidebar-w:   230px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ================================================================
   SIDEBAR GLOBALE
   ================================================================ */
.global-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 230px;
  height: 100vh;
  background: var(--fe-blue);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.sidebar-flag {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.sidebar-flag span {
  width: 4px;
  height: 26px;
  border-radius: 2px;
}

.flag-bl { background: #4A7BCC; }
.flag-wh { background: rgba(255,255,255,0.85); }
.flag-rd { background: var(--fe-red); }

.sidebar-brand {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.sidebar-subbrand {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-nav-section {
  padding: 10px 20px 4px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

.sidebar-nav-item.active {
  color: #fff;
  border-left-color: #fff;
  background: rgba(255,255,255,0.1);
}

.sidebar-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-cart-badge {
  margin-left: auto;
  background: var(--fe-red);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  min-width: 16px;
  text-align: center;
}

/* Footer utilisateur */
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-username {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
}

.sidebar-userrole {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}

.sidebar-logout {
  width: 100%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}

.sidebar-logout:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Hamburger — masque sur desktop */
.sidebar-hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 300;
  background: var(--fe-blue);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar-hamburger svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

/* Overlay fond sombre mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 190;
}

.sidebar-overlay.show {
  display: block;
}

/* Topbar interne (dans la zone contenu, pas la sidebar) */
.page-topbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 28px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.page-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ================================================================
   LAYOUT PAGE
   ================================================================ */
.page-container {
  min-height: 100vh;
  background: var(--gray-50);
}

/* Quand la sidebar est active (classe ajoutee par global-nav.js) */
.page-container.with-sidebar {
  margin-left: var(--fe-sidebar-w);
}

body.body-with-sidebar {
  margin-left: 230px;
}

@media (max-width: 768px) {
  body.body-with-sidebar {
    margin-left: 0 !important;
  }
}

.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 30px;
}

.page-content.narrow { max-width: 700px; }
.page-content.wide { max-width: 1300px; }

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 24px;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.page-header p {
  color: var(--gray-600);
  font-size: 14px;
}

/* ================================================================
   AUTH LAYOUT (login, register, etc.)
   ================================================================ */
.auth-container {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.auth-header {
  background: var(--primary);
  color: var(--white);
  padding: 30px;
  text-align: center;
}

.auth-header .logo { font-size: 28px; font-weight: 700; letter-spacing: 1px; }
.auth-header .subtitle { font-size: 14px; opacity: 0.85; margin-top: 4px; }

.auth-body { padding: 30px; }
.auth-body h2 { font-size: 20px; color: var(--gray-800); margin-bottom: 20px; text-align: center; }

.auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--gray-600);
}

.auth-links a { color: var(--primary); font-weight: 500; }
.auth-links .separator { margin: 0 8px; color: var(--gray-400); }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.card-body { padding: 24px; }

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  font-size: 16px;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ================================================================
   FORMS
   ================================================================ */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.form-group input::placeholder { color: var(--gray-400); }

.form-group .input-icon { position: relative; }
.form-group .input-icon input { padding-left: 40px; }
.form-group .input-icon svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--gray-400);
}

.form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-inline input { flex: 1; margin-bottom: 0; }

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.gamme-select { position: relative; }

.gamme-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 14px;
  color: var(--gray-800);
  font-family: inherit;
  cursor: pointer;
}

.gamme-select-trigger:hover { border-color: var(--gray-400); }
.gamme-select-trigger img { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; background: var(--gray-100); flex-shrink: 0; }
.gamme-select-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gamme-select-caret { width: 14px; height: 14px; color: var(--gray-500); flex-shrink: 0; }

.gamme-select-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
}

.gamme-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--gray-800);
  cursor: pointer;
}

.gamme-select-option:hover { background: var(--gray-50); }
.gamme-select-option img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; background: var(--gray-100); flex-shrink: 0; }
.gamme-select-option-code { font-weight: 600; color: var(--gray-700); flex-shrink: 0; white-space: nowrap; }
.gamme-select-option-label { flex: 1; font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.password-rules { font-size: 11px; color: var(--gray-500); margin-top: 4px; }

.activation-code-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.activation-code-part {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.activation-code-part:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.activation-code-sep {
  color: var(--gray-400);
  font-weight: 700;
}

@media (max-width: 480px) {
  .activation-code-group { gap: 3px; }
  .activation-code-part { padding: 8px 0; font-size: 12px; }
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: auto;
  margin-top: 3px;
  accent-color: var(--primary);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-decoration: none;
  font-family: inherit;
  line-height: 1.4;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-primary.full-width { width: 100%; }

.btn-secondary { background: var(--primary); color: var(--white); }
.btn-secondary:hover { background: var(--primary-light); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover { background: var(--primary); color: var(--white); }

.btn-ghost { background: transparent; color: var(--primary); padding: 6px 12px; }
.btn-ghost:hover { background: var(--gray-100); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: var(--accent-hover); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ================================================================
   ALERTS & MESSAGES
   ================================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.alert.show { display: block; }

.alert-error, .alert-danger {
  background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0;
}

.alert-info {
  background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe;
}

.alert-warning {
  background: #fffbeb; color: #92400e; border: 1px solid #fde68a;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  background: var(--gray-800);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-success { background: var(--success); }
.toast.toast-error { background: var(--danger); }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: var(--white);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.table th {
  background: var(--gray-50);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

table.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

table.table tr:last-child td { border-bottom: none; }
table.table tr:hover td { background: var(--gray-50); }

table.table .text-right { text-align: right; }
table.table .text-center { text-align: center; }
table.table .nowrap { white-space: nowrap; }

/* ================================================================
   BADGES & TAGS
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-success { background: var(--success-light); color: #155724; }
.badge-warning { background: var(--warning-light); color: #856404; }
.badge-danger { background: var(--danger-light); color: #721c24; }
.badge-info { background: var(--info-light); color: #0c5460; }
.badge-neutral { background: var(--gray-200); color: var(--gray-700); }

/* ================================================================
   STEPPER (checkout)
   ================================================================ */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

.stepper-step.active { color: var(--primary); font-weight: 700; }
.stepper-step.done { color: var(--success); }

.stepper-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.stepper-step.active .stepper-num { background: var(--primary); color: var(--white); }
.stepper-step.done .stepper-num { background: var(--success); color: var(--white); }

.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 12px;
}

.stepper-line.done { background: var(--success); }

/* ================================================================
   PRODUCT CARDS (catalogue)
   ================================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.product-card .product-image {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.product-card .product-ref {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-800);
}

.product-card .product-range {
  font-size: 12px;
  color: var(--gray-500);
  margin-left: 6px;
}

.product-card .product-desc {
  font-size: 13px;
  color: var(--gray-600);
  margin: 8px 0 12px;
  line-height: 1.5;
}

.product-card .product-specs {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.product-card .product-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.product-card .price-public {
  font-size: 12px;
  color: var(--gray-400);
  text-decoration: line-through;
}

.product-card .price-client {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.product-card .price-unit {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 400;
}

/* ================================================================
   CART ITEMS
   ================================================================ */
.cart-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
}

.cart-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cart-item-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-800);
}

.cart-item-desc {
  font-size: 13px;
  color: var(--gray-600);
}

.cart-item-price {
  font-weight: 400;
  font-size: 13px;
  color: var(--primary);
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  font-size: 16px;
}

.cart-item-remove:hover { color: var(--danger); background: var(--danger-light); }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--gray-600);
}

.cart-item-qty input[type="number"] {
  width: 60px;
  padding: 5px 8px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

.cart-item-sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--gray-200);
}

.cart-item-sub span { margin-right: 12px; }

.cart-item-sub .sub-remove {
  color: var(--gray-400);
  cursor: pointer;
  font-size: 11px;
  margin-left: 4px;
}

.cart-item-sub .sub-remove:hover { color: var(--danger); }

.cart-item-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* Sous-liste options / accessoires d'une étuve */
.cart-subitems {
  margin-top: 12px;
  margin-left: 20px;
  border-left: 3px solid var(--gray-200);
  padding-left: 14px;
}

.cart-subitem-group { margin-bottom: 6px; }

.cart-subitem-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.cart-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--gray-100);
  font-size: 13px;
}

.cart-subitem:last-child { border-bottom: none; }

.cart-subitem-code {
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  min-width: 70px;
}

.cart-subitem-desc {
  flex: 1;
  color: var(--gray-500);
  font-size: 12px;
}

.cart-subitem-price {
  color: var(--primary);
  font-weight: 400;
  white-space: nowrap;
  font-size: 13px;
}

.cart-subitem-qty input {
  width: 48px;
  padding: 2px 5px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  text-align: center;
  font-size: 12px;
}

.cart-subitem-remove {
  background: none;
  border: none;
  color: var(--gray-300);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}

.cart-subitem-remove:hover { color: var(--danger); }

/* ================================================================
   TOTALS BOX
   ================================================================ */
.totals-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--gray-700);
}

.totals-row.discount { color: var(--danger); }
.totals-row.transport { color: var(--gray-600); }

.totals-row.total {
  border-top: 2px solid var(--gray-200);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}

/* ================================================================
   COUPON
   ================================================================ */
.coupon-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
}

.coupon-bar input {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  width: 160px;
}

.coupon-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--success-light);
  color: #155724;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}

.coupon-active .coupon-remove {
  cursor: pointer;
  color: #721c24;
  font-weight: 700;
  margin-left: 4px;
}

/* ================================================================
   PANEL / MODAL
   ================================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-box .modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
}

.modal-box .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray-500);
  padding: 4px 8px;
  border-radius: 4px;
}

.modal-box .modal-close:hover { background: var(--gray-100); }
.modal-box .modal-body { padding: 24px; }
.modal-box .modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.panel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}

.panel-item:last-child { border-bottom: none; }

.panel-item-info { flex: 1; }
.panel-item-price { font-weight: 600; color: var(--primary); margin: 0 12px; white-space: nowrap; }

/* ================================================================
   SHIPPING / PAYMENT
   ================================================================ */
.option-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.option-card:hover { border-color: var(--gray-400); }
.option-card.selected { border-color: var(--primary); background: rgba(26,58,92,0.03); }

.option-card input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--primary);
}

.option-card-content h4 {
  font-size: 15px;
  margin-bottom: 2px;
  color: var(--gray-800);
}

.option-card-content p {
  font-size: 12px;
  color: var(--gray-500);
}

.info-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.7;
}

.info-box strong { color: var(--gray-800); }

.bank-details {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bank-details tr td {
  padding: 10px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
}

.bank-details tr:last-child td { border-bottom: none; }
.bank-details tr td:first-child { color: var(--gray-600); width: 120px; }
.bank-details tr td:last-child { font-weight: 600; }

/* ================================================================
   LOADING SPINNER
   ================================================================ */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-dark {
  border-color: var(--gray-200);
  border-top-color: var(--primary);
}

.loading-center {
  display: flex;
  justify-content: center;
  padding: 40px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   2FA CODE INPUT
   ================================================================ */
.code-input {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.code-input input {
  width: 48px; height: 56px;
  text-align: center;
  font-size: 22px; font-weight: 700;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.code-input input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

/* ================================================================
   ACCUEIL — SERVICE CARDS
   ================================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.service-card .icon {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.service-card .icon svg { width: 28px; height: 28px; color: var(--white); }

.service-card .icon.store { background: var(--store-color); }
.service-card .icon.sav { background: var(--sav-color); }
.service-card .icon.docs { background: var(--docs-color); }
.service-card .icon.monitoring { background: var(--monitor-color); }
.service-card .icon.refurbished { background: var(--refurbished-color); }
.service-card .icon.rental { background: var(--rental-color); }

.service-card h3 { font-size: 17px; color: var(--gray-800); margin-bottom: 8px; }
.service-card p { font-size: 13px; color: var(--gray-600); line-height: 1.5; }

.service-card .arrow {
  margin-top: 16px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

/* ================================================================
   PROFILE CARDS
   ================================================================ */
.profile-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.profile-card h2 {
  font-size: 18px;
  color: var(--gray-800);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--gray-500);
}

.empty-state svg {
  width: 48px; height: 48px;
  margin-bottom: 14px;
  color: var(--gray-300);
}

.empty-state h3 { font-size: 16px; color: var(--gray-600); margin-bottom: 6px; }
.empty-state p { font-size: 13px; margin-bottom: 16px; }

/* ================================================================
   UTILITIES
   ================================================================ */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-sm { font-size: 12px; }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .global-sidebar {
    transform: translateX(-230px);
    transition: transform 0.25s ease;
    width: 230px;
  }

  .global-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-hamburger {
    display: flex;
  }

  .page-container.with-sidebar {
    margin-left: 0 !important;
    padding-top: 56px;
  }

  .page-content {
    padding: 16px;
    overflow-x: hidden;
  }
  .product-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .auth-card { max-width: 100%; }
  .auth-header { padding: 20px; }
  .auth-body { padding: 20px; }
  .stepper-step span { display: none; }
  .form-row { flex-direction: column; gap: 0; }

  /* Filtres store : empiler en colonne sur mobile */
  #ovenFilters,
  #articleFilters {
    flex-direction: column;
    align-items: stretch !important;
  }

  #ovenFilters .form-group,
  #articleFilters .form-group {
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  #ovenFilters select,
  #ovenFilters input,
  #articleFilters select,
  #articleFilters input {
    width: 100%;
  }

  #ovenFilters .btn,
  #articleFilters .btn {
    width: 100%;
  }
}
