:root {
  --primary: #0d6efd;
  --secondary: #6c757d;
}

.app-logo {
  max-height: 56px;
  max-width: 160px;
  object-fit: contain;
}

.welcome-card {
  border-left: 4px solid var(--primary) !important;
}

.countdown-card {
  border-left: 4px solid #ffc107 !important;
  background: #fffbf0;
}
.countdown-card-expired {
  border-left: 4px solid #dc3545 !important;
  background: #fff5f5;
}
.countdown-timer {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.half-width-field {
  max-width: calc(50% - .5rem);
}
@media (max-width: 767px) {
  .half-width-field { max-width: 100%; }
}

/* Stepper */
#stepper-nav {
  position: relative;
}
#stepper-nav::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #dee2e6;
  z-index: 0;
}
.step-item {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.step-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #dee2e6;
  color: #6c757d;
  font-weight: 600;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.step-item.active .step-circle {
  box-shadow: 0 0 0 4px rgba(13, 110, 253, .15);
}
.step-item.active .step-circle,
.step-item.done .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* Admin sidebar */
.admin-sidebar {
  min-height: 100vh;
  background: #1e2a3a;
}
.admin-sidebar a {
  color: #c7d0da;
  text-decoration: none;
}
.admin-sidebar a.active,
.admin-sidebar a:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.admin-sidebar .nav-link {
  padding: .6rem 1rem;
  border-radius: .375rem;
}

.stat-card {
  border-left: 4px solid var(--primary);
}

/* Lignes dynamiques (téléphones / spécialités supplémentaires) */
.dynamic-field-group {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.dynamic-field-row {
  max-width: calc(50% - .5rem);
}
.dynamic-add-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #eef4ff;
  color: var(--primary);
  border: 1px dashed #b6d1ff;
  border-radius: 999px;
  padding: .4rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.dynamic-add-btn:hover {
  background: #dfeaff;
  border-color: var(--primary);
  color: var(--primary);
}
.dynamic-add-btn:active {
  transform: scale(.97);
}
@media (max-width: 767px) {
  .dynamic-field-row { max-width: 100%; }
}

/* Champs avec icône (formulaire public) */
.icon-input .input-group-text {
  background: #f8f9fb;
  border-right: none;
  color: #6c757d;
  width: 42px;
  justify-content: center;
}
.icon-input .form-control {
  border-left: none;
}
.icon-input .form-control:focus {
  border-color: var(--primary);
  box-shadow: none;
}
.icon-input:focus-within .input-group-text {
  border-color: var(--primary);
  color: var(--primary);
}
.icon-input-whatsapp .input-group-text {
  color: #25d366;
}
.icon-input-whatsapp:focus-within .input-group-text {
  border-color: #25d366;
  color: #25d366;
}
.icon-input-whatsapp .form-control:focus {
  border-color: #25d366;
}

/* ============ Table Candidatures — habillage ============ */

/* Avatar avec initiales */
.candidate-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
  font-size: .78rem;
  flex-shrink: 0;
}
.candidate-cell {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.candidate-cell .candidate-name {
  font-weight: 600;
  color: #1f2937;
  line-height: 1.1;
}
.candidate-cell .candidate-email {
  font-size: .75rem;
  color: #9ca3af;
}

/* Badges société */
.badge-societe {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35em .65em;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.badge-societe::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.badge-societe-geosystems {
  background: #e7f1ff;
  color: #0b5ed7;
}
.badge-societe-geosystems::before { background: #0d6efd; }

.badge-societe-evolutis {
  background: #f3e8ff;
  color: #7e22ce;
}
.badge-societe-evolutis::before { background: #9333ea; }

.badge-societe-none {
  background: #fff3cd;
  color: #997404;
}
.badge-societe-none::before { background: #ffc107; }

/* Badges statut candidature */
.badge-status {
  padding: .3em .6em;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
}
.badge-status-new { background: #e7f1ff; color: #0b5ed7; }
.badge-status-viewed { background: #eef2f7; color: #495057; }
.badge-status-shortlisted { background: #d1f7e3; color: #0f8a52; }
.badge-status-rejected { background: #fde2e1; color: #c0392b; }

/* Badge spécialité */
.badge-specialty {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #495057;
  padding: .3em .65em;
  border-radius: 6px;
  font-size: .75rem;
}

/* Date + heure empilées */
.cell-date .date-day { font-weight: 500; color: #343a40; }
.cell-date .date-time { display: block; font-size: .72rem; color: #adb5bd; }

/* Table générale */
#table-applications, #table-specialties, #table-users, #table-history {
  border-collapse: separate;
  border-spacing: 0;
}
#table-applications thead th, #table-specialties thead th, #table-users thead th, #table-history thead th {
  background: #f8f9fb;
  border-bottom: 2px solid #edf0f3;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6c757d;
  font-weight: 700;
  white-space: nowrap;
}
#table-applications tbody tr, #table-specialties tbody tr, #table-users tbody tr {
  transition: background-color .12s ease;
}
#table-applications tbody tr:hover, #table-specialties tbody tr:hover, #table-users tbody tr:hover {
  background-color: #f7f9ff !important;
}
#table-applications td, #table-specialties td, #table-users td, #table-history td {
  vertical-align: middle;
}

/* En-tête de groupe RowGroup (par société) */
tr.dtrg-group td {
  background: #f1f4f9 !important;
  border-top: 1px solid #e5e9f0;
  border-bottom: 1px solid #e5e9f0;
  padding: .55rem 1rem !important;
  font-weight: 700;
  font-size: .82rem;
  color: #1f2937;
  letter-spacing: .01em;
}

/* Boutons d'action groupés */
.action-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.action-btn-group .btn {
  border-radius: .4rem !important;
  width: 32px;
  height: 32px;
  padding: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#table-applications td:last-child {
  white-space: nowrap;
}
