/* ==========================================================================
   AspoPartner Design System — Refonte Premium
   Theme: Obsidian Sapphire · Glassmorphism Luxury · Dark Mode
   Typography: Outfit (Headings) · Inter (Body/UI) · JetBrains Mono (Code)
   ========================================================================== */

/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  /* Backgrounds */
  --bg-base:          #060b14;
  --bg-surface:       #0c1424;
  --bg-card:          rgba(14, 22, 40, 0.72);
  --bg-card-hover:    rgba(20, 32, 58, 0.88);
  --bg-input:         rgba(8, 14, 28, 0.9);
  --bg-glass:         rgba(10, 16, 32, 0.85);
  --bg-glass-light:   rgba(255, 255, 255, 0.035);

  /* Borders */
  --border-subtle:    rgba(255, 255, 255, 0.07);
  --border-medium:    rgba(255, 255, 255, 0.12);
  --border-focus:     #3b82f6;
  --border-active:    rgba(99, 102, 241, 0.5);

  /* Text */
  --text-main:        #edf2ff;
  --text-secondary:   #cbd5e1;
  --text-muted:       #8892a4;
  --text-dim:         #4b5776;
  --text-inverse:     #030712;

  /* Primary */
  --primary:          #3b82f6;
  --primary-dark:     #1d4ed8;
  --primary-hover:    #2563eb;
  --primary-glow:     rgba(59, 130, 246, 0.3);
  --primary-subtle:   rgba(59, 130, 246, 0.1);

  /* Accents */
  --accent-indigo:    #6366f1;
  --accent-cyan:      #06b6d4;
  --accent-violet:    #7c3aed;

  /* Semantic */
  --success:          #10b981;
  --success-bg:       rgba(16, 185, 129, 0.1);
  --success-border:   rgba(16, 185, 129, 0.25);

  --warning:          #f59e0b;
  --warning-bg:       rgba(245, 158, 11, 0.1);
  --warning-border:   rgba(245, 158, 11, 0.3);

  --danger:           #ef4444;
  --danger-bg:        rgba(239, 68, 68, 0.1);
  --danger-border:    rgba(239, 68, 68, 0.25);

  /* Radius */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   22px;
  --r-2xl:  30px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs:   0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-sm:   0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-md:   0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg:   0 20px 50px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.05);

  /* Transitions */
  --t-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse 80% 60% at 10% -10%,  rgba(59, 130, 246, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(99, 102, 241, 0.1)  0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%,  rgba(6, 182, 212, 0.04)  0%, transparent 70%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

p { color: var(--text-secondary); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: #93c5fd; }
strong { color: #fff; }

/* ─── Layout ──────────────────────────────────────────────────────────────  */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── ANIMATIONS ──────────────────────────────────────────────────────────  */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slideToast {
  from { transform: translateX(calc(100% + 20px)); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

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

/* ─── HEADER ──────────────────────────────────────────────────────────────  */
.main-header {
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: background var(--t-base), box-shadow var(--t-base);
}

.header-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.9rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-indigo) 100%);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform var(--t-spring), box-shadow var(--t-base);
  flex-shrink: 0;
}

.brand:hover .brand-icon {
  transform: scale(1.07) rotate(-3deg);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.65), inset 0 1px 0 rgba(255,255,255,0.2);
}

.brand-icon svg { width: 22px; height: 22px; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fff 30%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 2px;
}

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

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1rem 0.4rem 0.5rem;
  background: var(--bg-glass-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-full);
  transition: border-color var(--t-fast), background var(--t-fast);
}

.user-profile-badge:hover {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.05);
}

.user-avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-indigo) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-heading);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name-span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}

.user-role-span {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── MAIN CONTENT ────────────────────────────────────────────────────────  */
.main-content {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem;
  width: 100%;
}

.view-section {
  animation: fadeSlideIn 0.4s var(--t-slow) both;
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────────  */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.1);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, var(--primary-dark) 100%);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: var(--bg-glass-light);
  border-color: var(--border-medium);
  color: var(--text-secondary);
}
.btn-outline:hover {
  background: #1c2638;
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-block { width: 100%; }
.btn-lg    { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-sm    { padding: 0.38rem 0.85rem; font-size: 0.8rem; border-radius: var(--r-sm); }

.btn-danger {
  background-color: #dc2626;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background-color: #b91c1c;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--r-sm);
  background-color: #0f172a;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-action-icon:hover {
  background-color: #1e293b;
  color: #ffffff;
  border-color: var(--border-medium);
  transform: translateY(-1px);
}
.btn-action-icon.danger:hover {
  background-color: #3b1419;
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.btn-action-icon:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.badge-role-admin {
  background-color: #1a1336;
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.35);
  font-weight: 700;
}

.badge-role-apporteur {
  background-color: #082730;
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-weight: 600;
}

.modal-badge-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #1a1336;
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.35);
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-badge-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #311317;
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── FORMS ───────────────────────────────────────────────────────────────  */
.form-group {
  margin-bottom: 1.4rem;
  display: flex;
  flex-direction: column;
}

.form-row,
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 680px) {
  .form-row, .form-grid-2 { grid-template-columns: 1fr; }
}

label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

label .required {
  color: var(--danger);
  font-size: 0.75rem;
}

.label-heading {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="url"],
input:not([type]),
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: #fff;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Neutralisation des décorations natives pour input search */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

/* Indicateur calendrier sombre pour input date */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
}

/* Éviter le fond blanc indésirable lors du pré-remplissage ou autofill par le navigateur */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #080e1c inset !important;
  box-shadow: 0 0 0 1000px #080e1c inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18), 0 1px 3px rgba(0, 0, 0, 0.3);
  background: rgba(10, 18, 36, 0.95);
}

input::placeholder, textarea::placeholder {
  color: var(--text-dim);
  font-size: 0.875rem;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234b5776' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select option { background: #111827; color: #fff; }

textarea { resize: vertical; min-height: 96px; }

.field-hint {
  font-size: 0.73rem;
  color: var(--text-dim);
  margin-top: 0.38rem;
  line-height: 1.45;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input { padding-right: 5.2rem; }

.input-badge {
  position: absolute;
  right: 10px;
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.18rem 0.5rem;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  border: 1px solid var(--border-subtle);
  pointer-events: none;
}

.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrapper input { padding-right: 3.2rem; }

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  transition: color var(--t-fast);
}
.btn-toggle-pwd:hover { color: var(--text-secondary); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ─── PASSWORD RULES ──────────────────────────────────────────────────────  */
.password-rules-card {
  margin-top: 0.85rem;
  background: rgba(8, 14, 28, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
}

.rules-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
}

.rules-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.strength-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  transition: all var(--t-base);
}

.rules-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1.25rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 540px) {
  .rules-list { grid-template-columns: 1fr; }
}

.rule-item {
  font-size: 0.77rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: color var(--t-fast);
}

.rule-icon {
  font-size: 0.65rem;
  font-weight: 900;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-item.invalid { color: var(--text-dim); }
.rule-item.invalid .rule-icon { color: var(--danger); }

.rule-item.valid { color: #34d399; }
.rule-item.valid .rule-icon { color: var(--success); }

.strength-meter {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-full);
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0%;
  border-radius: var(--r-full);
  transition: width var(--t-slow), background var(--t-slow);
}

/* ─── AUTH VIEW ───────────────────────────────────────────────────────────  */
.auth-hero {
  text-align: center;
  max-width: 800px;
  margin: 2rem auto 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0f1e38;
  color: #7dd3fc;
  padding: 0.4rem 1.1rem;
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.35);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 30%, #bfdbfe 70%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.auth-card-container {
  max-width: 740px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
}

.auth-tab-btn {
  flex: 1;
  padding: 1.1rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
  border-bottom: 2px solid transparent;
}

.auth-tab-btn:hover { color: #fff; }

.auth-tab-btn.active {
  color: #ffffff;
  background: #111e38;
  border-bottom-color: var(--primary);
}

.auth-panel { padding: 2.5rem; }

.panel-header { margin-bottom: 2rem; }

.panel-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.panel-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ─── ALERTS ──────────────────────────────────────────────────────────────  */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  animation: fadeSlideIn var(--t-fast) both;
}

.alert-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #fca5a5;
}

/* ─── RELATION TYPE CARDS ─────────────────────────────────────────────────  */
.relation-radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.relation-card { cursor: pointer; position: relative; }

.relation-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.relation-card-inner {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1rem 0.85rem;
  text-align: center;
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
}

.relation-card:hover .relation-card-inner {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.rel-icon { font-size: 1.5rem; line-height: 1; }

.rel-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.rel-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.relation-card input[type="radio"]:checked + .relation-card-inner {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3), var(--shadow-glow);
  transform: translateY(-2px);
}

/* ─── PORTAL / DASHBOARD ──────────────────────────────────────────────────  */
.user-dashboard-banner,
.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 2rem 2.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.user-dashboard-banner::before,
.admin-header-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
}

@media (max-width: 768px) {
  .user-dashboard-banner, .admin-header-bar { flex-direction: column; }
}

.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #0a2533;
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.6rem;
}

.badge-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #2b1f07;
  color: #fcd34d;
  border: 1px solid var(--warning-border);
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.6rem;
}

.user-greeting,
.page-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 560px;
}

.user-tags {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.user-tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.28rem 0.75rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
}

.badge-count {
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-full);
  padding: 0.08rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.banner-actions, .admin-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-start;
  flex-shrink: 0;
}

/* ─── TAB NAVIGATION ──────────────────────────────────────────────────────  */
.portal-nav {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.portal-nav::-webkit-scrollbar { display: none; }

.portal-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--text-muted);
  padding: 0.7rem 1.3rem;
  border-radius: var(--r-md) var(--r-md) 0 0;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-base);
  position: relative;
  bottom: -1px;
}

.portal-tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.portal-tab-btn.active {
  background: var(--bg-card);
  color: #fff;
  border-color: var(--border-subtle);
  border-bottom-color: transparent;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.portal-tab-btn.active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--r-full) var(--r-full) 0 0;
}

.portal-tab-content {
  animation: fadeSlideIn 0.3s both;
}

/* ─── CARDS ───────────────────────────────────────────────────────────────  */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.85rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.card-header { margin-bottom: 1.5rem; }

.card-header h2 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.87rem;
  line-height: 1.6;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title-group h2 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.card-title-group p  { color: var(--text-muted); font-size: 0.87rem; }

/* ─── KPI GRID ────────────────────────────────────────────────────────────  */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
  box-shadow: var(--shadow-xs);
}

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

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

.icon-blue    { background: rgba(59,130,246,0.12);  border: 1px solid rgba(59,130,246,0.25); }
.icon-indigo  { background: rgba(99,102,241,0.12);  border: 1px solid rgba(99,102,241,0.25); }
.icon-amber   { background: rgba(245,158,11,0.12);  border: 1px solid var(--warning-border); }
.icon-emerald { background: rgba(16,185,129,0.12);  border: 1px solid var(--success-border); }

.kpi-data { display: flex; flex-direction: column; }

.kpi-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  margin-bottom: 0.3rem;
  letter-spacing: -0.03em;
}

.kpi-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── FILTER TOOLBAR ──────────────────────────────────────────────────────  */
.filter-toolbar,
.filter-controls-bar {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.5rem;
}

.filter-item,
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 160px;
  flex: 1;
}

.filter-item label,
.filter-group label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}

.filter-item input,
.filter-item select,
.filter-group input,
.filter-group select {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
}

/* ─── DATA TABLES ─────────────────────────────────────────────────────────  */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.87rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

.siret-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: #93c5fd;
  background: #0f1c34;
  padding: 0.22rem 0.55rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: inline-block;
  letter-spacing: 0.03em;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-unique {
  background: var(--success-bg);
  color: #34d399;
  border: 1px solid var(--success-border);
}

.badge-shared {
  background: var(--warning-bg);
  color: #fbbf24;
  border: 1px solid var(--warning-border);
  cursor: pointer;
  transition: all var(--t-fast);
}
.badge-shared:hover {
  background: rgba(245, 158, 11, 0.2);
  transform: scale(1.04);
}

.relation-badge {
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
  display: inline-block;
}

.relation-perso       { color: #c4b5fd; border: 1px solid rgba(167,139,250,0.35); background: #1a1336; }
.relation-fournisseur { color: #7dd3fc; border: 1px solid rgba(56,189,248,0.35);  background: #0a2533; }
.relation-prestataire { color: #f9a8d4; border: 1px solid rgba(244,114,182,0.35); background: #2b1022; }
.relation-conseil     { color: #fde68a; border: 1px solid rgba(245,158,11,0.35);  background: #2b1f07; }

/* ─── SHARED SIRETS ───────────────────────────────────────────────────────  */
.shared-sirets-list { display: flex; flex-direction: column; gap: 1.5rem; }

.shared-group-card {
  background: rgba(12, 20, 36, 0.8);
  border: 1px solid var(--warning-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  transition: box-shadow var(--t-base);
}

.shared-group-card:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.08);
}

.shared-group-header {
  background: rgba(245, 158, 11, 0.06);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.shared-siret-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.shared-conflict-badge {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
  padding: 0.28rem 0.85rem;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shared-meta-dates {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.shared-submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
}

.submission-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: border-color var(--t-base);
}

.submission-detail-card:hover { border-color: var(--border-medium); }

.submission-detail-card.first-registrant {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.03);
}

.submission-rank-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-full);
}

.rank-first  { background: var(--success-bg); color: #34d399; border: 1px solid var(--success-border); }
.rank-second { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-subtle); }

.submission-apporteur-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  padding-right: 5.5rem;
  font-family: var(--font-heading);
}

.submission-apporteur-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.77rem;
  color: var(--text-muted);
}

.submission-row { display: flex; flex-direction: column; gap: 0.25rem; }

.submission-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  font-weight: 700;
}

.submission-value { font-size: 0.87rem; color: var(--text-secondary); }

.relation-details-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 0.7rem 0.9rem;
  font-size: 0.83rem;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.55;
}

/* ─── MODALS ──────────────────────────────────────────────────────────────  */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

dialog.modal-overlay {
  border: none;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 1.5rem;
  box-sizing: border-box;
  color: inherit;
}
dialog.modal-overlay::backdrop {
  background: transparent;
}

.modal-dialog {
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
  animation: scaleIn 0.25s var(--t-spring) both;
}

.modal-dialog.modal-md { max-width: 600px; }

.modal-content {
  background: #0d1526;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.015);
  position: relative;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
}

.modal-title-wrap { display: flex; flex-direction: column; gap: 0.4rem; }

.modal-badge-success {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--success-bg);
  color: #34d399;
  border: 1px solid var(--success-border);
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-badge-email {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #0f1e38;
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-header h2 { font-size: 1.3rem; }

.btn-close-modal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  font-size: 0.85rem;
}

.btn-close-modal:hover {
  background: #1f2c42;
  color: #ffffff;
  border-color: var(--border-medium);
}

.modal-body { padding: 2rem; }

.modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

.duplicate-alert-banner {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--warning-border);
  border-radius: var(--r-md);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.alert-icon { font-size: 1.75rem; line-height: 1; flex-shrink: 0; }

.alert-body h3 { font-size: 1rem; color: #fbbf24; margin-bottom: 0.4rem; }

.alert-body p {
  font-size: 0.87rem;
  color: #fef3c7;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.alert-confidentiality-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.73rem;
  background: #2b1f07;
  color: #fde68a;
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-sm);
  font-weight: 500;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.recap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 580px) {
  .recap-grid { grid-template-columns: 1fr; }
}

.recap-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 0.9rem 1.1rem;
  transition: border-color var(--t-fast);
}

.recap-item:hover { border-color: var(--border-medium); }
.recap-item.recap-full { grid-column: 1 / -1; }

.recap-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.recap-val { font-size: 0.92rem; color: #fff; font-weight: 500; }

/* ─── EMAIL VIEWER ────────────────────────────────────────────────────────  */
.email-meta-header {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  font-size: 0.84rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.email-body-content {
  background: rgba(8, 14, 28, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1.35rem;
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #94a3b8;
  font-family: var(--font-mono);
}

/* ─── NOTIFICATIONS ───────────────────────────────────────────────────────  */
.notifications-list { display: flex; flex-direction: column; gap: 0.75rem; }

.notification-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: all var(--t-base);
  cursor: pointer;
}

.notification-card:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateX(4px);
}

.notification-subject {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.notification-time {
  font-size: 0.73rem;
  color: var(--text-dim);
}

/* ─── TOASTS ──────────────────────────────────────────────────────────────  */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(20, 30, 52, 0.97);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  padding: 0.9rem 1.25rem;
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideToast 0.35s var(--t-spring) both;
  max-width: 400px;
  backdrop-filter: blur(16px);
}

.toast-success { border-left: 3px solid var(--success); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-error   { border-left: 3px solid var(--danger); }

/* ─── FOOTER ──────────────────────────────────────────────────────────────  */
.main-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 11, 20, 0.9);
  backdrop-filter: blur(12px);
  padding: 1.25rem 1.75rem;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────  */
@media (max-width: 1024px) {
  .main-content { padding: 2rem 1.25rem; }
  .header-content { padding: 0.8rem 1.25rem; }
  .shared-submissions-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .auth-panel { padding: 1.75rem 1.25rem; }
  .card { padding: 1.35rem; }
  .user-dashboard-banner, .admin-header-bar { padding: 1.5rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .modal-body, .modal-header, .modal-footer { padding: 1.25rem 1.5rem; }
}

@media (max-width: 540px) {
  .main-content { padding: 1.25rem 1rem; }
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.75rem; }
  .portal-tab-btn { padding: 0.6rem 0.9rem; font-size: 0.82rem; }
  .brand-subtitle { display: none; }
  .filter-toolbar { flex-direction: column; }
  .filter-item { min-width: 100%; }
}

/* ─── NOUVEAUX STYLES : GESTION DE LA VALIDATION DES COMPTES ────────────── */
.badge-pending-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.btn-action-validate-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.32rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.btn-action-validate-pill:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-action-validate-pill:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

