:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-container: #e0e7ff;
  --on-primary-container: #1e1b4b;
  --surface: #ffffff;
  --surface-container: #f8fafc;
  --surface-container-high: #f1f5f9;
  --outline: #cbd5e1;
  --outline-variant: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent-color: #4f46e5;
  --rail-width: 78px;
  --md-radius-sm: 8px;
  --md-radius-md: 14px;
  --md-radius-lg: 20px;
  --md-radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  background-color: #f8fafc;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════
   MATERIAL DESIGN 3 STEPPER (WIZARD)
   ══════════════════════════════════════════════════════════ */
.md3-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--outline-variant);
  position: sticky;
  top: 0;
  z-index: 100;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: var(--md-radius-pill);
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid transparent;
  user-select: none;
}

.step-item:hover {
  background: var(--surface-container-high);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--outline);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.25s;
}

.step-item.active {
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-color: rgba(79, 70, 229, 0.2);
}
.step-item.active .step-num {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

.step-item.completed .step-num {
  background: #10b981;
  color: #ffffff;
}

.step-divider {
  width: 32px;
  height: 2px;
  background: var(--outline-variant);
}

/* Step Container Views */
.wizard-step {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}
.wizard-step.active {
  display: block;
}

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

/* ══════════════════════════════════════════════════════════
   NAVIGATION EN RAIL (DESKTOP & MOBILE)
   ══════════════════════════════════════════════════════════ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.nav-rail {
  width: var(--rail-width);
  background-color: #0b0f19;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
}

.rail-brand {
  margin-bottom: 1.5rem;
}
.rail-brand i {
  color: #818cf8;
}

.rail-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 0 0.35rem;
  flex: 1;
}

.rail-item {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 100%;
  padding: 0.6rem 0.2rem;
  border-radius: var(--md-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.rail-item i {
  font-size: 1.25rem;
}
.rail-item span {
  font-size: 0.68rem;
  font-weight: 600;
}
.rail-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.rail-item.active {
  color: #ffffff;
  background: var(--accent-color);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Bouton Paramètres ancré tout en bas de la sidebar sur grand écran */
.rail-item-settings {
  margin-top: auto;
  border-top: 1px solid #1e293b;
  padding-top: 0.75rem !important;
}

.rail-footer {
  margin-top: 0.75rem;
  text-align: center;
}

.network-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.network-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.network-dot.offline {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.app-content-wrapper {
  margin-left: var(--rail-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════
   MD3 CARDS & TEMPLATES GALLERY (ÉTAPE 1)
   ══════════════════════════════════════════════════════════ */
.md3-card {
  background: #ffffff;
  border-radius: var(--md-radius-lg);
  border: 1px solid var(--outline-variant);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.template-card {
  border: 2px solid var(--outline-variant);
  border-radius: var(--md-radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  background: #ffffff;
  position: relative;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-color);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

.template-card.active {
  border-color: var(--accent-color);
  background: #fbfbfe;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.template-badge-check {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--outline-variant);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.template-card.active .template-badge-check {
  background: var(--accent-color);
  transform: scale(1.1);
}

/* Miniature visuelle de facture */
.template-mock-preview {
  height: 110px;
  background: #f8fafc;
  border: 1px solid var(--outline-variant);
  border-radius: var(--md-radius-sm);
  padding: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.mock-header {
  height: 18px;
  border-radius: 4px;
  width: 50%;
  margin-bottom: 6px;
}
.mock-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-line {
  height: 6px;
  background: #e2e8f0;
  border-radius: 2px;
}
.mock-footer {
  display: flex;
  justify-content: flex-end;
}
.mock-total {
  height: 12px;
  width: 30%;
  border-radius: 3px;
}

/* Color Swatches MD3 */
.color-swatch-md3 {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1.5px var(--outline);
  transition: transform 0.2s, box-shadow 0.2s;
}
.color-swatch-md3:hover, .color-swatch-md3.active {
  transform: scale(1.2);
  box-shadow: 0 0 0 2.5px #0f172a;
}

/* ══════════════════════════════════════════════════════════
   ÉTAPE 2 : REMPLISSAGE (MODES D'ENTRÉE)
   ══════════════════════════════════════════════════════════ */
.input-mode-tabs .nav-link {
  border-radius: var(--md-radius-pill);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface-container-high);
  border: 1px solid transparent;
  padding: 0.45rem 1rem;
  transition: all 0.2s;
  margin: 0 3px;
}
.input-mode-tabs .nav-link.active {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.big-mic-btn {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--accent-color);
  font-size: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}
.big-mic-btn:hover {
  transform: scale(1.08);
}
.big-mic-btn.recording {
  background: #ef4444 !important;
  color: #ffffff !important;
  animation: pulse-ring 1.3s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 22px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.photo-hero-dropzone {
  border: 2px dashed var(--outline);
  border-radius: var(--md-radius-lg);
  background: #f8fafc;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.photo-hero-dropzone:hover, .photo-hero-dropzone.dragover {
  border-color: var(--accent-color);
  background: var(--primary-container);
}

/* ══════════════════════════════════════════════════════════
   ÉTAPE 3 : APERÇU A4 ET STYLES DE MODÈLES
   ══════════════════════════════════════════════════════════ */
.invoice-paper-wrapper {
  background: #94a3b8;
  padding: 2rem 1rem;
  border-radius: var(--md-radius-lg);
  overflow-x: auto;
}

.invoice-paper {
  background: #ffffff;
  color: #0f172a;
  border-radius: 6px;
  padding: 2.8rem 2.2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  min-height: 800px;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  font-size: 0.95rem;
}

/* Mode Impression & Export PDF pur (Zéro ombre, zéro bordure de carte, dimensions A4 parfaites) */
.invoice-paper.for-print-pdf {
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  max-width: 720px !important;
  min-width: 720px !important;
  width: 720px !important;
  margin: 0 auto !important;
  padding: 1rem 1.25rem !important;
  min-height: auto !important;
  box-sizing: border-box !important;
}

/* Cartes de Détails Client & Paiement harmonisées */
.invoice-detail-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem 1.15rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}
.invoice-detail-card.client-card {
  border-left: 4px solid var(--accent-color);
}
.invoice-detail-card.payment-card {
  border-left: 4px solid #10b981;
}
.invoice-detail-card .detail-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 0.35rem;
}
.invoice-detail-card .detail-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}
.invoice-detail-card .detail-card-meta {
  font-size: 0.82rem;
  color: #475569;
  margin-top: 0.25rem;
  line-height: 1.45;
}

/* Tableau d'Articles A4 sans grilles verticales lourdes */
.invoice-paper table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.invoice-paper thead th {
  border: none !important;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.invoice-paper tbody td {
  padding: 0.75rem 0.85rem;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: 0.9rem;
}
.invoice-paper tbody tr:last-child td {
  border-bottom: 2px solid #cbd5e1 !important;
}

/* Modèle 1: Moderne Épuré */
.template-modern .invoice-header-box {
  border-bottom: 3px solid var(--accent-color);
  padding-bottom: 1.25rem;
}
.template-modern .invoice-title-badge {
  background: var(--accent-color);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-weight: 700;
}
.template-modern thead th {
  background: var(--accent-color) !important;
  color: #ffffff !important;
  border: none;
}
.template-modern .total-highlight {
  color: var(--accent-color);
  font-weight: 700;
}

/* Modèle 2: Classique Comptable */
.template-classic {
  font-family: Georgia, 'Times New Roman', serif;
}
.template-classic .invoice-header-box {
  border-bottom: 2px double #334155;
  padding-bottom: 1rem;
}
.template-classic .invoice-title-badge {
  border: 1px solid #334155;
  color: #0f172a;
  padding: 0.25rem 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.template-classic thead th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-top: 1px solid #334155 !important;
  border-bottom: 2px solid #334155 !important;
}

/* Modèle 3: Minimaliste Studio */
.template-minimal {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: none;
}
.template-minimal .invoice-header-box {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1rem;
}
.template-minimal .invoice-title-badge {
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.template-minimal thead th {
  background: transparent !important;
  color: #64748b !important;
  border-bottom: 1px solid #cbd5e1 !important;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.template-minimal table td {
  border-bottom: 1px solid #f8fafc;
}

/* Modèle 4: Corporate Dark */
.template-corporate .invoice-header-box {
  background: #0f172a;
  color: #ffffff;
  margin: -2.8rem -2.2rem 1.5rem -2.2rem;
  padding: 2.2rem 2.2rem 1.5rem 2.2rem;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.template-corporate .invoice-header-box h4, 
.template-corporate .invoice-header-box .text-primary {
  color: #ffffff !important;
}
.template-corporate thead th {
  background: #0f172a !important;
  color: #ffffff !important;
}

/* Modèle 5: Élite B2B */
.template-elite_b2b .invoice-header-box {
  border-left: 5px solid var(--accent-color);
  padding-left: 1rem;
}
.template-elite_b2b thead th {
  background: #f1f5f9 !important;
  color: var(--accent-color) !important;
  border-top: 2px solid var(--accent-color) !important;
  border-bottom: 2px solid var(--accent-color) !important;
}

/* Modèle 6: Créatif & Commerce */
.template-creative .invoice-header-box {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
  border-radius: 8px;
  padding: 1.5rem;
}
.template-creative thead th {
  background: var(--accent-color) !important;
  color: #ffffff !important;
  border-radius: 4px;
}

/* Stamp & Watermark */
.stamp-box {
  border: 2px dashed #dc2626;
  color: #dc2626;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  display: inline-block;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.8rem;
  transform: rotate(-4deg);
  opacity: 0.85;
}

.watermark-banner {
  border-top: 1px dashed #cbd5e1;
  padding-top: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

/* Boutons Pilule MD3 */
.btn-pill {
  border-radius: var(--md-radius-pill);
  padding: 0.55rem 1.4rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION (Sous 992px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .nav-rail {
    width: 100%;
    height: 62px;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    flex-direction: row;
    padding: 0 0.5rem;
    border-right: none;
    border-top: 1px solid #1e293b;
    justify-content: space-around;
  }
  .rail-brand, .rail-footer {
    display: none;
  }
  .rail-items {
    flex-direction: row;
    justify-content: space-around;
    padding: 0;
    gap: 0;
  }
  .rail-item {
    padding: 0.35rem 0.2rem;
    border-radius: var(--md-radius-md);
  }
  .rail-item i {
    font-size: 1.15rem;
  }
  .rail-item span {
    font-size: 0.65rem;
  }
  .rail-item-settings {
    margin-top: 0 !important;
    border-top: none !important;
    padding-top: 0.35rem !important;
  }
  .app-content-wrapper {
    margin-left: 0;
    margin-bottom: 68px;
  }
  .md3-stepper {
    padding: 0.5rem;
  }
  .step-item {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }
}

/* ══════════════════════════════════════════════════════════
   ASSISTANT IA MALIA (OFFCANVAS & CHATBOT MD3)
   ══════════════════════════════════════════════════════════ */
.ai-offcanvas {
  position: fixed !important;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px !important;
  max-width: 95vw !important;
  background: #ffffff;
  border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.2) !important;
  z-index: 1060 !important;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex !important;
  flex-direction: column;
}
.ai-offcanvas.show {
  transform: translateX(0) !important;
}

.ai-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1055;
  animation: fadeIn 0.2s ease-out;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background-color: #f8fafc;
}

.ai-chat-bubble {
  max-width: 86%;
  padding: 0.75rem 1rem;
  border-radius: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.45;
  animation: fadeIn 0.2s ease-in-out;
}

.ai-chat-bubble.bot {
  background-color: #ffffff;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ai-chat-bubble.user {
  background: var(--accent-color);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.ai-chat-quick-pill {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--md-radius-pill);
  border: 1px solid rgba(79, 70, 229, 0.3);
  background: rgba(79, 70, 229, 0.06);
  color: var(--accent-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}
.ai-chat-quick-pill:hover {
  background: var(--accent-color);
  color: #ffffff;
}

.ai-chat-input-bar {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

#ai-chat-input {
  min-height: 40px;
  max-height: 180px;
  resize: none;
  overflow-y: hidden;
  border-radius: 1.25rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  line-height: 1.45;
  transition: height 0.12s ease-out;
  border-color: #cbd5e1;
}
#ai-chat-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.chat-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #475569;
  border: none;
  transition: all 0.2s;
}
.chat-action-btn:hover {
  background: #e2e8f0;
  color: var(--accent-color);
}
.chat-action-btn.recording {
  background: #ef4444;
  color: #ffffff;
  animation: pulseMic 1.2s infinite;
}

/* ══════════════════════════════════════════════════════════
   FULLSCREEN DRAG AND DROP OVERLAY
   ══════════════════════════════════════════════════════════ */
.drag-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: fadeIn 0.15s ease-out;
}
.drag-fullscreen-overlay.active {
  display: flex !important;
}

.drag-fullscreen-box {
  background: #ffffff;
  padding: 3rem;
  border-radius: 2rem;
  border: 3px dashed var(--accent-color);
  max-width: 520px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: scale(1);
  transition: transform 0.2s;
}

/* ══════════════════════════════════════════════════════════
   CENTRE DE PARAMÈTRES AVEC SIDEBAR INTERNE & SOUS-PAGES
   ══════════════════════════════════════════════════════════ */
.settings-sidebar {
  border-radius: var(--md-radius-lg);
  border: 1px solid var(--outline-variant);
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.settings-subnav {
  gap: 0.35rem;
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--md-radius-md);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-dark);
}

.settings-nav-btn:hover {
  background: var(--surface-container-high);
}

.settings-nav-btn.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--accent-color);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.08);
}

.settings-nav-btn i {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.settings-nav-btn .nav-title {
  font-size: 0.88rem;
  line-height: 1.25;
}

.settings-nav-btn .nav-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: normal;
  margin-top: 2px;
}

.settings-nav-btn.active .nav-desc {
  color: #6366f1;
}

/* Geo Quick Chips */
.geo-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.geo-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 1rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.geo-quick-chip:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: var(--text-dark);
  transform: translateY(-1px);
}

/* Sous-panneaux */
.settings-subpanel {
  animation: fadeIn 0.2s ease-out;
}

/* Cartes écosystème Weegosoft */
.ecosystem-card {
  border: 1px solid var(--outline-variant);
  border-radius: var(--md-radius-md);
  padding: 1.25rem;
  background: #ffffff;
  transition: all 0.2s ease;
  height: 100%;
}

.ecosystem-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}

/* FAQ Accordion Styling */
.faq-card {
  border: 1px solid var(--outline-variant);
  border-radius: var(--md-radius-md);
  margin-bottom: 0.75rem;
  background: #ffffff;
  overflow: hidden;
}

.faq-header {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  transition: background 0.15s;
}

.faq-header:hover {
  background: #f1f5f9;
}

.faq-body {
  padding: 1.25rem;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  border-top: 1px solid #f1f5f9;
}

/* Mobile responsive tabs */
@media (max-width: 991.98px) {
  .settings-subnav {
    flex-direction: row !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  .settings-subnav::-webkit-scrollbar {
    display: none;
  }
  .settings-nav-btn {
    white-space: nowrap;
    width: auto;
    padding: 0.55rem 0.85rem;
    flex-shrink: 0;
  }
  .settings-nav-btn .nav-desc {
    display: none;
  }
}

