/*
 * ═══════════════════════════════════════════════════════════════
 * BIZME.FR — ESPACE INTÉRIEUR MEMBRE — Maestro Premium v1.0
 * Auteur : Nova / Maestro Design Premium — Christian Luc
 * Date   : 2026-05-13
 *
 * Périmètre : sidebar, cards missions, filtres, colonnes,
 *             Select2, chatbot LEA, header membre, stats
 * ═══════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────
   1. LAYOUT 3 COLONNES — RESPIRATION GLOBALE
   ─────────────────────────────────────────────*/

/* Fond général espace membre — léger bleu très doux */
body.scrollbar-primary,
.scrollbar-primary {
  background: #F0F4FF !important;
  color: #0F172A !important;
}

/* Conteneur principal — padding généreux */
.col-md-7.bg-container,
.col-md-7 {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* ─────────────────────────────────────────────
   2. SIDEBAR GAUCHE — REFONTE PREMIUM
   ─────────────────────────────────────────────*/
.left-sidebar {
  background: #FFFFFF !important;
  border-right: 1px solid #E8EEFF !important;
  box-shadow: 2px 0 16px rgba(27, 42, 142, 0.05) !important;
  padding: 20px 12px 40px !important;
  min-height: 100vh;
}

/* Bouton CTA sidebar — or signature */
.btn-ajout-mission,
.left-sidebar .btn-outline-bizme {
  background: linear-gradient(135deg, #C9A84C, #A8893A) !important;
  color: #1B1B1B !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.30) !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.02em !important;
  border-radius: 50px !important;
  padding: 10px 16px !important;
  transition: all 0.2s ease !important;
  margin-bottom: 8px !important;
}
.btn-ajout-mission:hover,
.left-sidebar .btn-outline-bizme:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45) !important;
  color: #1B1B1B !important;
}

/* Liste menu sidebar — épurée */
.left-sidebar .list-group {
  padding-top: 16px !important;
}
.left-sidebar .list-group-item {
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
  margin-bottom: 2px !important;
}
.left-sidebar .list-group-item a {
  display: flex !important;
  align-items: center !important;
  padding: 9px 10px !important;
  border-radius: 10px !important;
  font-size: 0.825rem !important;
  font-weight: 500 !important;
  color: #475569 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  gap: 10px !important;
}
.left-sidebar .list-group-item a:hover {
  background: #EEF2FF !important;
  color: #1B2A8E !important;
  padding-left: 14px !important;
}
.left-sidebar .list-group-item a i {
  width: 16px !important;
  text-align: center !important;
  font-size: 0.8rem !important;
  color: #94A3B8 !important;
  flex-shrink: 0 !important;
}
.left-sidebar .list-group-item a:hover i {
  color: #2563EB !important;
}

/* Item actif sidebar */
.left-sidebar .list-group-item a.active,
.left-sidebar .list-group-item a[class*="fw-bold"] {
  background: #EEF2FF !important;
  color: #1B2A8E !important;
  font-weight: 600 !important;
}

/* Séparateur visuel entre groupes */
.left-sidebar .list-group-item a.text-danger {
  color: #DC2626 !important;
  margin-top: 8px !important;
}
.left-sidebar .list-group-item a.text-danger:hover {
  background: #FEF2F2 !important;
}

/* Section Freelances Elite dans sidebar */
.left-sidebar .card {
  border: 1px solid #E8EEFF !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  margin-top: 16px !important;
}
.left-sidebar .card-header {
  background: #EEF2FF !important;
  color: #1B2A8E !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 10px 12px !important;
  border-radius: 11px 11px 0 0 !important;
  border-bottom: 1px solid #E0E7FF !important;
}

/* ─────────────────────────────────────────────
   3. ONGLETS NAVIGATION (Freelances/Missions)
   ─────────────────────────────────────────────*/
.nav-tabs {
  border-bottom: 2px solid #E8EEFF !important;
  gap: 4px !important;
  padding: 0 4px !important;
}
.nav-tabs .nav-link {
  border: none !important;
  border-bottom: 2px solid transparent !important;
  color: #64748B !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 10px 16px !important;
  border-radius: 8px 8px 0 0 !important;
  transition: all 0.15s ease !important;
  background: transparent !important;
  margin-bottom: -2px !important;
}
.nav-tabs .nav-link:hover {
  color: #1B2A8E !important;
  background: #F0F4FF !important;
}
.nav-tabs .nav-link.active {
  color: #1B2A8E !important;
  border-bottom: 2px solid #C9A84C !important;
  background: #FFFFFF !important;
  font-weight: 700 !important;
}

/* ─────────────────────────────────────────────
   4. BANDEAU "JE RECHERCHE UNE MISSION"
   ─────────────────────────────────────────────*/
.bg-biz-logo,
.card-header.bg-biz-logo,
[class*="bg-biz-logo"] {
  background: linear-gradient(135deg, #1B2A8E 0%, #2563EB 100%) !important;
  color: #FFFFFF !important;
  border-radius: 14px 14px 0 0 !important;
}

/* ─────────────────────────────────────────────
   5. CARDS GÉNÉRALES — ESPACE INTÉRIEUR
   ─────────────────────────────────────────────*/
.card {
  border: 1px solid #E8EEFF !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 12px rgba(27, 42, 142, 0.05) !important;
  background: #FFFFFF !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease !important;
  overflow: hidden !important;
  margin-bottom: 16px !important;
}
.card:hover {
  box-shadow: 0 6px 24px rgba(27, 42, 142, 0.10) !important;
  transform: translateY(-1px) !important;
}
.card-body {
  padding: 18px 20px !important;
}
.card-header {
  padding: 14px 20px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  border-bottom: 1px solid #E8EEFF !important;
}

/* ─────────────────────────────────────────────
   6. FILTRES DE RECHERCHE — ZONES DE SAISIE
   ─────────────────────────────────────────────*/

/* Labels filtres — plus légers que UPPERCASE */
.card-body label,
.filter-label,
form label {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #64748B !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 6px !important;
  display: block !important;
}

/* Inputs et selects — premium */
.form-control,
.form-select,
input[type="text"],
input[type="date"],
textarea {
  border: 1.5px solid #DDE4F5 !important;
  border-radius: 10px !important;
  font-size: 0.9rem !important;
  padding: 10px 14px !important;
  background: #FAFBFF !important;
  color: #0F172A !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
}
.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="date"]:focus {
  border-color: #2563EB !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10) !important;
  outline: none !important;
}

/* ─────────────────────────────────────────────
   7. SELECT2 — CORRIGER LES BULLES SUPERPOSÉES
   ─────────────────────────────────────────────
   Bug : les .select2-selection__choice se superposent
   Fix : container flex + wrap + z-index clean
   ─────────────────────────────────────────────*/
.select2-container {
  width: 100% !important;
}
.select2-container--default .select2-selection--multiple {
  border: 1.5px solid #DDE4F5 !important;
  border-radius: 10px !important;
  background: #FAFBFF !important;
  padding: 6px 8px !important;
  min-height: 42px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
  position: relative !important;
  z-index: auto !important;
}
.select2-container--default .select2-selection--multiple:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10) !important;
  outline: none !important;
}
/* Les bulles tags — propres, bien espacées */
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  padding: 2px 4px !important;
  position: static !important;
  overflow: visible !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: #EEF2FF !important;
  border: 1px solid #C7D2FE !important;
  border-radius: 20px !important;
  color: #1B2A8E !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 3px 10px !important;
  position: static !important;          /* ← CORRIGE la superposition */
  float: none !important;               /* ← CORRIGE la superposition */
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: #6366F1 !important;
  font-size: 0.9rem !important;
  line-height: 1 !important;
  border: none !important;
  background: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  order: 2 !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: #DC2626 !important;
}
/* Dropdown Select2 */
.select2-dropdown {
  border: 1px solid #DDE4F5 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(27, 42, 142, 0.12) !important;
  overflow: hidden !important;
}
.select2-container--default .select2-results__option--highlighted {
  background: #EEF2FF !important;
  color: #1B2A8E !important;
}
.select2-container--default .select2-results__option--selected {
  background: #C7D2FE !important;
  color: #1B2A8E !important;
}

/* ─────────────────────────────────────────────
   8. PILULES FILTRES (Toutes/En ligne/Présentiel)
   ─────────────────────────────────────────────*/
.btn-group .btn,
.filter-pills .btn,
[class*="btn-outline-primary"],
[class*="btn-check"] + label {
  border-radius: 50px !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  padding: 7px 16px !important;
  border: 1.5px solid #DDE4F5 !important;
  color: #475569 !important;
  background: #FAFBFF !important;
  transition: all 0.15s ease !important;
}
.btn-group .btn:hover,
.filter-pills .btn:hover {
  border-color: #2563EB !important;
  color: #1B2A8E !important;
  background: #EEF2FF !important;
}
.btn-group .btn.active,
.btn-group .btn-primary,
.btn-check:checked + label {
  background: linear-gradient(135deg, #1B2A8E, #2563EB) !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 3px 10px rgba(27, 42, 142, 0.20) !important;
}

/* ─────────────────────────────────────────────
   9. CARDS MISSIONS / ANNONCES — REFONTE
   ─────────────────────────────────────────────*/

/* Card annonce individuelle */
.card-annonce,
.annonce-card,
.mission-card {
  border-left: 3px solid #2563EB !important;
  border-radius: 12px !important;
  padding: 16px !important;
  background: #FFFFFF !important;
  box-shadow: 0 2px 10px rgba(27, 42, 142, 0.06) !important;
  transition: all 0.2s ease !important;
  margin-bottom: 12px !important;
}
.card-annonce:hover,
.annonce-card:hover {
  border-left-color: #C9A84C !important;
  box-shadow: 0 4px 20px rgba(27, 42, 142, 0.12) !important;
  transform: translateX(2px) !important;
}

/* Titre annonce — hiérarchie forte */
.card h5, .card h6,
.annonce-card h5, .annonce-card h6 {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  text-transform: none !important;    /* Supprimer les MAJUSCULES */
  line-height: 1.4 !important;
  margin-bottom: 6px !important;
}

/* Date — format lisible */
.card .text-muted.small,
.annonce-date,
[class*="date"] small {
  font-size: 0.78rem !important;
  color: #94A3B8 !important;
}

/* ─────────────────────────────────────────────
   10. BLOC STATS DROITE — "BizMe en chiffres"
   ─────────────────────────────────────────────*/
.stats-sidebar,
.col-md-3 .card {
  border-radius: 14px !important;
  overflow: hidden !important;
}

/* Chiffres stats — grands et lisibles */
.stat-number,
.col-md-3 .h3,
.col-md-3 .display-6 {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: #1B2A8E !important;
  line-height: 1.1 !important;
}

/* Labels stats */
.stat-label,
.col-md-3 .small {
  font-size: 0.78rem !important;
  color: #64748B !important;
  font-weight: 500 !important;
}

/* ─────────────────────────────────────────────
   11. BADGES ELITE & SCORE — ACCENTS OR
   ─────────────────────────────────────────────*/
.badge-elite,
[class*="elite"],
span.badge[class*="warning"],
.badge.bg-warning {
  background: linear-gradient(135deg, #C9A84C, #A8893A) !important;
  color: #1B1B1B !important;
  border-radius: 20px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  padding: 3px 9px !important;
  letter-spacing: 0.03em !important;
}

/* Score profil */
.badge.bg-primary,
.score-badge,
span[class*="score"] {
  background: #1B2A8E !important;
  color: #FFFFFF !important;
  border-radius: 20px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
}

/* ─────────────────────────────────────────────
   12. CHATBOT LEA — HARMONISATION PALETTE
   ─────────────────────────────────────────────
   Remplace le jaune/vert qui jurait
   ─────────────────────────────────────────────*/
#chat-bubble,
.bg-me-logo#chat-bubble,
.chat-bubble-float {
  background: linear-gradient(135deg, #1B2A8E, #2563EB) !important;
  border-radius: 50px !important;
  box-shadow: 0 6px 24px rgba(27, 42, 142, 0.35) !important;
  padding: 12px 20px !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  transition: all 0.2s ease !important;
  border: 1.5px solid rgba(201, 168, 76, 0.4) !important;  /* Bordure or subtile */
}
#chat-bubble:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 30px rgba(27, 42, 142, 0.45) !important;
}
#chat-bubble strong,
.bg-me-logo strong {
  color: #FFFFFF !important;
}

/* ─────────────────────────────────────────────
   13. HEADER MEMBRE — NETTOYAGE
   ─────────────────────────────────────────────*/
header nav.navbar,
.navbar.navbar-light {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid #E8EEFF !important;
  box-shadow: 0 1px 12px rgba(27, 42, 142, 0.06) !important;
  height: 60px !important;
}

/* Avatar utilisateur — border premium */
.navbar img[class*="avatar"],
.navbar .rounded-circle,
img.rounded-circle {
  border: 2px solid #E8EEFF !important;
  transition: border-color 0.15s ease !important;
}
.navbar .rounded-circle:hover {
  border-color: #C9A84C !important;
}

/* ─────────────────────────────────────────────
   14. BOUTONS GÉNÉRAUX — UNIFICATION
   ─────────────────────────────────────────────*/

/* CTA primaire bleu — espace membre */
.btn-primary,
.btn-bizme:not(.btn-ajout-mission) {
  background: linear-gradient(135deg, #1B2A8E, #2563EB) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 10px 20px !important;
  box-shadow: 0 3px 12px rgba(27, 42, 142, 0.20) !important;
  transition: all 0.2s ease !important;
}
.btn-primary:hover,
.btn-bizme:hover:not(.btn-ajout-mission) {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 18px rgba(27, 42, 142, 0.30) !important;
  color: #FFFFFF !important;
}

/* CTA or — actions premium */
.btn-warning,
.btn-premium,
.btn-gold {
  background: linear-gradient(135deg, #C9A84C, #A8893A) !important;
  color: #1B1B1B !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 12px rgba(201, 168, 76, 0.25) !important;
  transition: all 0.2s ease !important;
}
.btn-warning:hover,
.btn-gold:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 18px rgba(201, 168, 76, 0.40) !important;
  color: #1B1B1B !important;
}

/* Outline secondaire */
.btn-outline-primary,
.btn-outline-bizme {
  border: 1.5px solid #2563EB !important;
  color: #2563EB !important;
  background: transparent !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}
.btn-outline-primary:hover,
.btn-outline-bizme:hover {
  background: #EEF2FF !important;
  color: #1B2A8E !important;
  border-color: #1B2A8E !important;
}

/* Recherche premium outline */
.btn-outline-light {
  border: 1.5px solid rgba(255,255,255,0.5) !important;
  color: #FFFFFF !important;
  border-radius: 10px !important;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.15) !important;
}

/* ─────────────────────────────────────────────
   15. FOND CONTAINER TAGS (bg-container)
   ─────────────────────────────────────────────*/
.bg-container {
  background-color: #EEF2FF !important;
}
.bg-container span,
.bg-container .badge {
  background: #EEF2FF !important;
  color: #1B2A8E !important;
  border: 1px solid #C7D2FE !important;
  border-radius: 20px !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  padding: 3px 10px !important;
  display: inline-block !important;
  margin: 2px !important;
}

/* ─────────────────────────────────────────────
   16. MICRO-DÉTAILS PREMIUM
   ─────────────────────────────────────────────*/

/* Dividers */
hr {
  border-color: #E8EEFF !important;
  opacity: 1 !important;
  margin: 16px 0 !important;
}

/* Notifications bell — propre */
.notification-bell,
.btn-notification,
a[href*="notification"] {
  position: relative !important;
}

/* Textes secondaires */
.text-muted {
  color: #94A3B8 !important;
}

/* Focus accessible WCAG 2.2 */
:focus-visible {
  outline: 2px solid #2563EB !important;
  outline-offset: 2px !important;
}

/* Scrollbar intérieure */
.scrollbar-primary::-webkit-scrollbar       { width: 5px !important; }
.scrollbar-primary::-webkit-scrollbar-track { background: #F0F4FF !important; }
.scrollbar-primary::-webkit-scrollbar-thumb { background: #C7D2FE !important; border-radius: 3px !important; }
.scrollbar-primary::-webkit-scrollbar-thumb:hover { background: #2563EB !important; }

/* ─────────────────────────────────────────────
   FIN BIZME INTERIOR v1.0
   Problèmes résolus :
   ✅ Select2 bulles superposées → flex wrap
   ✅ Sidebar trop dense → whitespace + groupes
   ✅ Palette monochrome → or sur CTA primaires
   ✅ Cards sans respiration → padding + radius
   ✅ LEA jaune qui jure → bleu profond + bordure or
   ✅ Boutons incohérents → 3 styles unifiés
   ─────────────────────────────────────────────*/

/* ============================================================
   SIDEBAR SECTIONS — groupes thématiques (Nova 2026-05-19)
   ============================================================ */

/* Titre de groupe */
.left-sidebar .sidebar-section {
  margin-bottom: 4px !important;
}
.left-sidebar .sidebar-section-title {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #94A3B8 !important;
  padding: 6px 10px 3px !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.left-sidebar .sidebar-section-title i {
  font-size: 0.6rem !important;
  color: #CBD5E1 !important;
}

/* Ligne séparatrice entre sections */
.left-sidebar .sidebar-section + .sidebar-section {
  border-top: 1px solid #F1F5F9 !important;
  padding-top: 6px !important;
  margin-top: 2px !important;
}

/* Zone danger — isolée */
.left-sidebar .sidebar-danger-zone {
  border-top: 1px solid #FEE2E2 !important;
  padding-top: 8px !important;
  margin-top: 4px !important;
  padding-left: 10px !important;
}
.left-sidebar .sidebar-danger-zone a {
  display: flex !important;
  align-items: center !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  color: #DC2626 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}
.left-sidebar .sidebar-danger-zone a:hover {
  background: #FEF2F2 !important;
}

/* Suppression du padding-top par défaut sur les groupes */
.left-sidebar .sidebar-section .list-group {
  padding-top: 0 !important;
}
