/* ============================================================
   Amicale FSEGT — Design System
   Version: 2.0 | Professionnel & Moderne
   ============================================================ */

/* ---------- Variables & Tokens ---------- */
:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #1976d2;
  --primary-xlight: #e3f2fd;
  --accent: #f9a825;
  --accent-dark: #f57f17;
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --danger: #c62828;
  --danger-light: #ffebee;
  --warning: #f57c00;
  --warning-light: #fff3e0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg-page: #f8fafc;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.06);
  --shadow-xl: 0 40px 100px rgba(0,0,0,.16);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all .25s cubic-bezier(.4,0,.2,1);
  --font-sans: 'Inter', 'Nunito', system-ui, -apple-system, sans-serif;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; }

/* ---------- Container ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
  border-bottom-color: transparent;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  border: 2px solid var(--primary-xlight);
}

.nav-brand-text { display: flex; flex-direction: column; }
.nav-brand-name {
  font-size: .9rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}
.nav-brand-subtitle {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-link i { font-size: .8rem; }

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-xlight);
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn-nav-login {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-nav-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(21,101,192,.35);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding-top: var(--nav-h);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1e88e5 100%);
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 80px;
  background: var(--bg-page);
  clip-path: ellipse(60% 100% at 50% 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
}

.hero-badge i { color: var(--accent); }

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -.02em;
}

.hero-title .accent { color: var(--accent); }

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-ar {
  font-size: .95rem;
  color: rgba(255,255,255,.65);
  direction: rtl;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: .95rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.btn-hero-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(249,168,37,.4);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.btn-hero-secondary:hover {
  background: rgba(255,255,255,.22);
  transform: translateY(-2px);
}

/* Stats flottantes dans le Hero */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hero-stat-card {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.hero-stat-card:hover {
  background: rgba(255,255,255,.2);
  transform: translateY(-4px);
}

.hero-stat-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.3rem;
  color: var(--primary-dark);
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ============================================================
   SECTIONS COMMUNES
   ============================================================ */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-alt { background: var(--bg-white); }

.section-header { text-align: center; margin-bottom: 56px; }

.section-tag {
  display: inline-block;
  background: var(--primary-xlight);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-body { padding: 28px; }
.card-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-xlight);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-text {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Grilles de cartes */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(21,101,192,.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}
.btn-accent:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-page);
  color: var(--text-primary);
}

.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-xs { padding: 5px 10px; font-size: .75rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .92rem;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.1);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control.is-error { border-color: var(--danger); }
.form-error {
  font-size: .78rem;
  color: var(--danger);
  margin-top: 4px;
  font-weight: 600;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  appearance: none;
}

/* ============================================================
   ALERTS / BADGES
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #a5d6a7; }
.alert-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #ef9a9a; }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #ffcc80; }
.alert-info { background: var(--primary-xlight); color: var(--primary-dark); border: 1px solid #90caf9; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-primary { background: var(--primary-xlight); color: var(--primary-dark); }
.badge-muted { background: var(--border-light); color: var(--text-muted); }

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

thead th {
  background: var(--bg-page);
  padding: 14px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background .15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-page); }

td {
  padding: 14px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.amount-positive { color: var(--success); font-weight: 700; }
.amount-negative { color: var(--danger); font-weight: 700; }
.amount-neutral { color: var(--text-secondary); font-weight: 600; }

/* ============================================================
   PORTAIL LOGIN
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, #1e88e5 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  top: -200px;
  right: -200px;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  bottom: -100px;
  left: -100px;
}

.login-box {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.login-header { text-align: center; margin-bottom: 32px; }
.login-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  object-fit: contain;
  margin: 0 auto 16px;
  border: 3px solid var(--primary-xlight);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.login-subtitle { font-size: .88rem; color: var(--text-muted); }

/* Tabs de sélection de rôle */
.role-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-page);
  padding: 6px;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}

.role-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: var(--transition);
}

.role-tab i { font-size: 1.1rem; }

.role-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21,101,192,.25);
}

/* ============================================================
   DASHBOARD (Espace Membre/Fournisseur)
   ============================================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-h);
  background: var(--bg-page);
}

.dashboard-sidebar {
  width: 260px;
  background: var(--primary-dark);
  flex-shrink: 0;
  position: fixed;
  top: var(--nav-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-user {
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-align: center;
}

.sidebar-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent);
  margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,.2);
}

.sidebar-user-name {
  font-size: .92rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.sidebar-user-role {
  font-size: .72rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.sidebar-nav { padding: 16px 12px; }

.sidebar-nav-section {
  font-size: .65rem;
  font-weight: 800;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 8px 8px 4px;
  margin-top: 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  transition: var(--transition);
  margin-bottom: 2px;
}

.sidebar-link i { width: 18px; text-align: center; font-size: .9rem; }

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

.sidebar-link.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-left: 3px solid var(--accent);
}

.sidebar-link.danger { color: rgba(255,100,100,.8); }
.sidebar-link.danger:hover { background: rgba(255,50,50,.1); color: #ff6464; }

.dashboard-main {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-width: 0;
}

.dashboard-page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-page-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
}

.dashboard-page-subtitle {
  font-size: .88rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Stat Cards du Dashboard */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 28px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-xlight); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.gold { background: #fff8e1; color: var(--accent-dark); }

.stat-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Section panel */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title i { color: var(--primary); }
.panel-body { padding: 24px; }

/* ============================================================
   PAGE À PROPOS
   ============================================================ */
.page-hero {
  padding-top: var(--nav-h);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding-bottom: 60px;
  padding-top: calc(var(--nav-h) + 60px);
  text-align: center;
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 50px;
  background: var(--bg-page);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}

.page-hero p { font-size: 1.05rem; color: rgba(255,255,255,.8); }

/* Bureau / Organigramme */
.bureau-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.bureau-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: var(--transition);
}

.bureau-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }

.bureau-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-xlight), var(--primary-xlight));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  margin: 0 auto 16px;
  border: 3px solid var(--primary);
}

.bureau-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.bureau-role {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--primary-xlight);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}

.bureau-grade { font-size: .82rem; color: var(--text-muted); }

/* ============================================================
   PAGE SERVICES
   ============================================================ */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.service-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.service-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}

.service-supplier-name {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.service-specialty {
  font-size: .75rem;
  color: rgba(255,255,255,.75);
  font-weight: 600;
}

.service-card-body { padding: 20px; }
.service-list { list-style: none; }
.service-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .88rem;
  color: var(--text-secondary);
}

.service-list-item:last-child { border-bottom: none; }
.service-list-item i { color: var(--primary); font-size: .8rem; }

/* ============================================================
   PAGE ADHÉSION
   ============================================================ */
.adhesion-container {
  max-width: 720px;
  margin: 0 auto;
}

.adhesion-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}

.adhesion-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 140px;
  position: relative;
}

.adhesion-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--border);
}

.adhesion-step.active::after { background: var(--primary); }

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 8px;
  z-index: 1;
}

.adhesion-step.active .step-circle { background: var(--primary); color: #fff; }
.adhesion-step.done .step-circle { background: var(--success); color: #fff; }

.step-label {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

.adhesion-step.active .step-label { color: var(--primary); font-weight: 800; }

/* ============================================================
   FOURNISSEUR — FACTURES
   ============================================================ */
.facture-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.facture-row:last-child { border-bottom: none; }
.facture-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.facture-icon.paid { background: var(--success-light); color: var(--success); }
.facture-icon.pending { background: var(--warning-light); color: var(--warning); }
.facture-info { flex: 1; min-width: 0; }
.facture-label { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.facture-date { font-size: .78rem; color: var(--text-muted); }
.facture-amount { font-size: 1rem; font-weight: 800; color: var(--text-primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  padding-top: 60px;
}

.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-logo {
  width: 52px; height: 52px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255,255,255,.1);
  padding: 4px;
}

.footer-brand h3 { font-size: .95rem; font-weight: 800; color: #fff; line-height: 1.2; }
.footer-brand .footer-ar { font-size: .78rem; color: rgba(255,255,255,.6); direction: rtl; margin-top: 2px; }
.footer-desc { font-size: .85rem; color: rgba(255,255,255,.6); line-height: 1.7; margin-bottom: 20px; }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--accent); color: var(--primary-dark); }

.footer-title {
  font-size: .78rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  transition: var(--transition);
}
.footer-links a i { font-size: .7rem; color: var(--accent); }
.footer-links a:hover { color: #fff; padding-left: 4px; }

.footer-contact { list-style: none; }
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 12px;
  line-height: 1.5;
}
.footer-contact i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.footer-contact a { color: rgba(255,255,255,.65); transition: var(--transition); }
.footer-contact a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary-color { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-black { font-weight: 900 !important; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }
.pt-5 { padding-top: 32px; }
.p-0 { padding: 0 !important; }
.rounded { border-radius: var(--radius) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(.8); }
  to { opacity: 1; transform: scale(1); }
}

.animate-in { animation: fadeInUp .5s ease forwards; }
.animate-fade { animation: fadeIn .4s ease forwards; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-stats { max-width: 440px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-white);
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform .3s ease;
    z-index: 999;
  }

  .nav-links.open { transform: translateY(0); }
  .nav-hamburger { display: flex; }
  .nav-overlay.open { display: block; }
  .btn-nav-login span { display: none; }

  .hero-title { font-size: 2rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .dashboard-sidebar { transform: translateX(-100%); }
  .dashboard-sidebar.open { transform: translateX(0); }
  .dashboard-main { margin-left: 0; padding: 16px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .login-box { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; max-width: 280px; }
  .hero-cta { flex-direction: column; }
}
