/* =====================================================
   ZED ESPACE CLIENT - CSS
   ===================================================== */

.client-space-body {
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* =====================================================
   TOPBAR
   ===================================================== */
.client-topbar {
  background: var(--navy-dark);
  border-bottom: 3px solid var(--gold);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.client-topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 14px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.client-topbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  flex-shrink: 0;
}

.client-topbar-logo img {
  height: 40px;
  width: auto;
}

.client-topbar-logo span {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
}

.client-topbar-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.client-topbar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.client-topbar-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.client-topbar-nav a.active {
  background: rgba(220, 182, 97, 0.15);
  color: var(--gold);
}

.client-topbar-nav a svg {
  width: 16px;
  height: 16px;
}

.client-topbar-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.client-user-info {
  text-align: right;
}

.client-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.client-user-company {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.2;
  margin-top: 2px;
}

.client-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--white);
  transition: all 0.2s ease;
}

.client-logout-btn:hover {
  background: var(--gold);
  color: var(--navy-dark);
}

.client-logout-btn svg {
  width: 16px;
  height: 16px;
}

.client-topbar-back {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.client-topbar-back:hover {
  color: var(--gold);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.client-main {
  flex: 1;
  padding: 40px 0;
}

.client-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 30px;
}

/* =====================================================
   FOOTER
   ===================================================== */
.client-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 25px 0;
  text-align: center;
  font-size: 13px;
}

.client-footer a {
  color: var(--gold);
  text-decoration: none;
}

.client-footer a:hover {
  text-decoration: underline;
}

/* =====================================================
   ALERTES (flash messages)
   ===================================================== */
.client-alert {
  max-width: 1300px;
  margin: 16px auto 0;
  padding: 14px 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.client-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.client-alert-success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.client-alert-danger {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

/* =====================================================
   PAGE LOGIN / CENTRÉ
   ===================================================== */
.client-auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.client-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(15, 33, 80, 0.15);
  overflow: hidden;
}

.client-auth-header {
  background: linear-gradient(135deg, #0F2150 0%, #1B346D 100%);
  color: var(--white);
  padding: 35px 35px 30px;
  text-align: center;
}

.client-auth-header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  margin: 0 0 8px 0;
  color: var(--gold);
}

.client-auth-header p {
  margin: 0;
  font-size: 14px;
  opacity: 0.85;
  line-height: 1.5;
}

.client-auth-body {
  padding: 35px;
}

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

.client-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.client-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border 0.2s, box-shadow 0.2s;
  background: var(--white);
}

.client-form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(220, 182, 97, 0.15);
}

.client-form-help {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 6px;
  line-height: 1.4;
}

.client-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.client-form-row a {
  font-size: 13px;
  color: var(--navy);
  text-decoration: none;
}

.client-form-row a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* Boutons */
.client-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.client-btn-primary {
  background: var(--navy);
  color: var(--white);
  width: 100%;
}

.client-btn-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 33, 80, 0.3);
}

.client-btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
}

.client-btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

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

.client-btn-outline:hover {
  border-color: var(--navy);
  color: var(--navy-dark);
}

/* =====================================================
   CARDS
   ===================================================== */
.client-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(15, 33, 80, 0.06);
  overflow: hidden;
  margin-bottom: 24px;
}

.client-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
}

.client-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy-dark);
  margin: 0;
}

.client-card-body {
  padding: 24px;
}

/* =====================================================
   PAGE HEADER (titre de page + description)
   ===================================================== */
.client-page-header {
  margin-bottom: 28px;
}

.client-page-header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--navy-dark);
  margin: 0 0 6px 0;
}

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

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .client-topbar-nav a span {
    display: none;
  }

  .client-topbar-nav a {
    padding: 10px 12px;
  }
}

@media (max-width: 768px) {
  .client-topbar-inner {
    padding: 12px 16px;
    gap: 12px;
  }

  .client-topbar-logo span {
    display: none;
  }

  .client-user-info {
    display: none;
  }

  .client-topbar-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .client-container {
    padding: 0 16px;
  }

  .client-main {
    padding: 24px 0;
  }

  .client-auth-card {
    margin: 0 10px;
  }

  .client-auth-body {
    padding: 25px;
  }

  .client-auth-header {
    padding: 25px;
  }
}
/* =====================================================
   DASHBOARD CLIENT
   À ajouter à la fin de assets/css/client-space.css
   ===================================================== */

/* ===== CARTES STATISTIQUES (top du dashboard) ===== */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.dashboard-stat-card {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(15, 33, 80, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 33, 80, 0.12);
}

.dashboard-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-stat-icon svg {
  width: 26px;
  height: 26px;
}

.dashboard-stat-info {
  flex: 1;
  min-width: 0;
}

.dashboard-stat-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--navy-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.dashboard-stat-label {
  font-size: 12px;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.dashboard-stat-progress {
  width: 100%;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.dashboard-stat-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ===== 2 COLONNES (demandes + documents) ===== */
.dashboard-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* ===== LISTES DANS LES CARDS ===== */
.dashboard-list {
  max-height: 420px;
  overflow-y: auto;
}

.dashboard-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

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

a.dashboard-list-item:hover {
  background: var(--gray-50);
}

.dashboard-list-item-content {
  flex: 1;
  min-width: 0;
}

.dashboard-list-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list-item-meta {
  font-size: 11px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dashboard-list-item-status {
  flex-shrink: 0;
}

/* Barre de progression dans les items */
.dashboard-progress {
  width: 100%;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.dashboard-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Badges de statut */
.dashboard-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.dashboard-status-pending {
  background: rgba(220, 182, 97, 0.15);
  color: #a07b30;
}

.dashboard-status-partial {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

.dashboard-status-complete {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
}

/* Icône de fichier (mini) */
.dashboard-doc-icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* État vide */
.dashboard-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
}

.dashboard-empty p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

/* ===== BLOC INFOS COMPTE ===== */
.account-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.account-info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 4px;
}

.account-info-value {
  font-size: 14px;
  color: var(--navy-dark);
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .account-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 850px) {
  .dashboard-two-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }

  .account-info-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-number {
    font-size: 28px;
  }
}
/* =====================================================
   PAGES DEMANDES / DOCUMENTS
   À ajouter à la fin de assets/css/client-space.css
   ===================================================== */

/* ===== FILTRES (tabs) ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-dark);
  text-decoration: none;
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--gold);
  background: var(--gray-50);
}

.filter-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.filter-count {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.filter-tab.is-active .filter-count {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== LISTE DES DEMANDES (cartes) ===== */
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.request-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.request-card:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 20px rgba(15, 33, 80, 0.1);
  transform: translateY(-2px);
}

.request-card-main {
  flex: 1;
  min-width: 0;
}

.request-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.request-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy-dark);
  margin: 0;
  line-height: 1.3;
}

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

.request-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.request-card-meta {
  font-size: 12px;
}

.request-card-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.request-progress-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
}

.request-card-arrow {
  flex-shrink: 0;
  color: var(--gray-400);
  transition: color 0.2s, transform 0.2s;
}

.request-card:hover .request-card-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

.request-card-arrow svg {
  width: 22px;
  height: 22px;
}

/* ===== PAGE DÉTAIL D'UNE DEMANDE - ITEMS ===== */
.item-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--gray-300);
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.item-card.has-docs {
  border-left-color: #28a745;
}

.item-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

/* Formulaire upload caché par défaut */
.item-upload-form {
  display: none;
  padding: 0 20px 16px;
}

.item-upload-form.is-visible {
  display: block;
}

/* Documents uploadés sous l'item */
.item-docs-list {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

.item-doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100);
}

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

/* Icônes d'action (téléchargement, suppression) */
.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  color: var(--gray-600);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.icon-action:hover {
  background: var(--gray-100);
  color: var(--navy);
  border-color: var(--gray-300);
}

.icon-action.danger:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border-color: rgba(220, 53, 69, 0.3);
}

.icon-action svg {
  width: 14px;
  height: 14px;
}

/* ===== TABLEAU DES DOCUMENTS ===== */
.docs-table {
  width: 100%;
  border-collapse: collapse;
}

.docs-table thead {
  background: var(--gray-50);
}

.docs-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}

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

.docs-table tbody tr:hover {
  background: var(--gray-50);
}

.docs-table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .request-card {
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .request-card-arrow {
    display: none;
  }

  .request-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .request-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .docs-table thead {
    display: none;
  }

  .docs-table tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 12px;
  }

  .docs-table td {
    display: block;
    padding: 8px 0;
    border: none;
    text-align: left !important;
  }

  .docs-table td:first-child {
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 12px;
    margin-bottom: 8px;
  }
}
/* =====================================================
   PAGE MON COMPTE
   À ajouter à la fin de assets/css/client-space.css
   ===================================================== */

.account-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

/* Détails du compte (lignes label + valeur) */
.account-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.account-detail-row:last-child {
  border-bottom: none;
}

.account-detail-label {
  font-size: 12px;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.account-detail-value {
  font-size: 14px;
  color: var(--navy-dark);
  font-weight: 500;
  text-align: right;
}

/* Historique des connexions */
.login-history {
  max-height: 350px;
  overflow-y: auto;
}

.login-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100);
}

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

.login-history-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  border-radius: 50%;
  flex-shrink: 0;
}

.login-history-icon svg {
  width: 16px;
  height: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}