/**
 * Neo-ATS Recruiter PWA - Styles
 * Design mobile-first avec thème sombre
 */

/* ========================================
   Variables CSS
   ======================================== */
:root {
  /* Couleurs principales */
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --primary-light: #7c8ff0;
  --secondary: #764ba2;
  --accent: #f093fb;

  /* Couleurs de fond */
  --bg-dark: #1a1a2e;
  --bg-card: #16213e;
  --bg-input: #0f1629;
  --bg-overlay: rgba(0, 0, 0, 0.7);

  /* Couleurs de texte */
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #718096;

  /* Couleurs d'état */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Espacements */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Rayons de bordure */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Ombres */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Tailles */
  --header-height: 56px;
  --bottom-nav-height: 64px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 16px; /* Évite le zoom sur iOS */
}

/* ========================================
   Écrans
   ======================================== */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ========================================
   Écran de connexion
   ======================================== */
#login-screen {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0f0f23 100%);
  justify-content: center;
  align-items: center;
  padding: var(--spacing-lg);
}

.login-container {
  width: 100%;
  max-width: 400px;
}

.logo {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.logo-icon {
  width: 180px;
  height: 180px;
  margin: 0 auto var(--spacing-md);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.logo h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo .subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: var(--spacing-xs);
}

.login-form {
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   Formulaires
   ======================================== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.checkbox-label input {
  width: auto;
  margin-right: var(--spacing-sm);
}

.textarea-wrapper {
  position: relative;
}

.textarea-wrapper textarea {
  padding-right: 50px;
}

.voice-btn-small {
  position: absolute;
  right: var(--spacing-sm);
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background var(--transition-fast);
}

.voice-btn-small:hover {
  background: var(--primary-dark);
}

.voice-btn-small svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Boutons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-block {
  width: 100%;
}

.btn-loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.link-btn {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ========================================
   Header
   ======================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-center h1 {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   Contenu principal
   ======================================== */
.app-content {
  flex: 1;
  padding: calc(var(--header-height) + var(--spacing-md)) var(--spacing-md) calc(var(--bottom-nav-height) + var(--spacing-md) + var(--safe-area-bottom));
  overflow-y: auto;
}

/* ========================================
   Section recherche
   ======================================== */
.search-section {
  margin-bottom: var(--spacing-lg);
}

.search-box {
  display: flex;
  gap: var(--spacing-sm);
  background: var(--bg-card);
  padding: var(--spacing-sm);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.search-box input {
  flex: 1;
  padding: var(--spacing-md);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
}

.search-box input:focus {
  outline: none;
}

.voice-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all var(--transition-fast);
}

.voice-btn:hover {
  transform: scale(1.05);
}

.voice-btn:active {
  transform: scale(0.95);
}

.voice-btn svg {
  width: 24px;
  height: 24px;
}

.voice-btn.recording {
  animation: pulse-recording 1.5s infinite;
}

.voice-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  margin-top: var(--spacing-md);
  background: rgba(102, 126, 234, 0.1);
  border-radius: var(--radius-md);
  color: var(--primary);
}

.voice-indicator {
  position: relative;
  width: 12px;
  height: 12px;
}

.pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* ========================================
   Actions rapides
   ======================================== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-card:active {
  transform: translateY(0);
}

.action-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.action-card span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ========================================
   Résultats de recherche
   ======================================== */
.search-results {
  margin-bottom: var(--spacing-lg);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.results-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.results-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.candidate-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  transition: all var(--transition-fast);
}

.candidate-card:hover {
  box-shadow: var(--shadow-md);
}

.candidate-header {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.candidate-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

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

.candidate-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-score {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
}

.candidate-actions {
  display: flex;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.candidate-actions .btn {
  flex: 1;
  padding: var(--spacing-sm);
  font-size: 0.875rem;
}

/* ========================================
   Section récente
   ======================================== */
.recent-section {
  margin-bottom: var(--spacing-lg);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.followups-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.followup-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.followup-icon {
  width: 40px;
  height: 40px;
  background: rgba(102, 126, 234, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.followup-icon svg {
  width: 20px;
  height: 20px;
}

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

.followup-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.followup-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: var(--spacing-lg);
}

/* ========================================
   Navigation bottom
   ======================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background: var(--bg-card);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: var(--spacing-sm);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--spacing-xs);
  color: var(--text-muted);
  transition: color var(--transition-fast);
  min-width: 56px;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item span {
  font-size: 0.7rem;
  font-weight: 500;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.voice-nav {
  position: relative;
  margin-top: -20px;
}

.voice-fab {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--spacing-xs);
}

.voice-fab svg {
  width: 28px;
  height: 28px;
}

/* ========================================
   Modals
   ======================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  animation: fadeIn var(--transition-fast);
}

.modal-content {
  position: relative;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp var(--transition-normal);
  padding-bottom: var(--safe-area-bottom);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  flex: 1;
  padding: var(--spacing-lg);
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer .btn {
  flex: 1;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  gap: var(--spacing-md);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(102, 126, 234, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.analysis-content {
  font-size: 0.9rem;
  line-height: 1.6;
}

.analysis-content strong {
  color: var(--primary);
}

/* ========================================
   Menu latéral
   ======================================== */
.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
}

.side-menu.hidden {
  display: none;
}

.menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  animation: fadeIn var(--transition-fast);
}

.menu-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 85%;
  height: 100%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  animation: slideRight var(--transition-normal);
}

.menu-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.user-avatar svg {
  width: 28px;
  height: 28px;
}

.user-name {
  font-weight: 600;
  display: block;
}

.user-platform {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.menu-nav {
  flex: 1;
  padding: var(--spacing-md);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.menu-item svg {
  width: 20px;
  height: 20px;
}

.menu-item.text-danger {
  color: var(--danger);
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: var(--spacing-md) 0;
}

.menu-footer {
  padding: var(--spacing-lg);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Toast notifications
   ======================================== */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--spacing-md));
  left: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideDown var(--transition-normal);
  pointer-events: auto;
}

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

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

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

.toast.info {
  border-left: 3px solid var(--info);
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
}

.toast-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ========================================
   États
   ======================================== */
.hidden {
  display: none !important;
}

.error-message {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: var(--spacing-md);
  text-align: center;
}

/* ========================================
   Animations
   ======================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

@keyframes pulse-recording {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

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

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* ========================================
   Media queries
   ======================================== */
@media (min-width: 768px) {
  .quick-actions {
    grid-template-columns: repeat(4, 1fr);
  }

  .modal-content {
    max-width: 500px;
    margin: auto;
    border-radius: var(--radius-xl);
  }

  .menu-content {
    width: 320px;
  }
}

@media (min-width: 1024px) {
  .app-content {
    max-width: 800px;
    margin: 0 auto;
  }
}

/* ========================================
   Mode sombre forcé (pour cohérence)
   ======================================== */
@media (prefers-color-scheme: light) {
  /* On garde le thème sombre même en mode clair système */
}

/* ========================================
   Section Offres
   ======================================== */
.offers-section {
  padding: var(--spacing-md);
}

.offers-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.offers-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.offer-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.offer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.offer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.offer-status {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
  text-transform: uppercase;
}

.offer-status.status-active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.offer-status.status-inactive {
  background: rgba(156, 163, 175, 0.2);
  color: var(--text-muted);
}

.offer-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.offer-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.offer-location svg {
  color: var(--primary);
}

.offer-contract {
  background: rgba(102, 126, 234, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.offer-ref {
  color: var(--text-muted);
}

.offer-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.4;
}

.offer-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.match-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

/* ========================================
   Résultats Matching
   ======================================== */
.matching-results {
  padding: var(--spacing-md);
}

.matching-results .section-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.matching-results .section-header h2 {
  flex: 1;
  font-size: 0.95rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.candidate-rank {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

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

.candidate-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.candidate-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.candidate-score {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.candidate-score.score-high {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.candidate-score.score-medium {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.candidate-score.score-low {
  background: rgba(156, 163, 175, 0.2);
  color: var(--text-muted);
}

.candidate-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 4px 0;
}

.candidate-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0;
}

.candidate-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 8px 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--primary);
  line-height: 1.4;
  max-height: 80px;
  overflow: hidden;
}

.candidate-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--spacing-sm);
}

.skill-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary);
  border-radius: var(--radius-sm);
}

.candidate-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* États vides et erreurs */
.empty-state,
.error-state {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-muted);
}

.empty-state svg,
.error-state svg {
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.empty-state .hint {
  font-size: 0.85rem;
  margin-top: var(--spacing-sm);
}

.error-state .error-detail {
  font-size: 0.8rem;
  color: var(--danger);
  margin: var(--spacing-sm) 0;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  color: var(--text-muted);
}

.loading-state .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--spacing-md);
}

/* Bouton petit */
.btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 0.8rem;
}

/* ========================================
   Formulaire Suivi Simplifié
   ======================================== */

.followup-modal-simple .modal-body {
  padding: var(--spacing-md);
}

.followup-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  line-height: 1.4;
}

.followup-input-wrapper {
  position: relative;
  display: flex;
  gap: var(--spacing-sm);
}

.followup-input-wrapper textarea {
  flex: 1;
  min-height: 120px;
  padding: var(--spacing-md);
  padding-right: 60px;
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.followup-input-wrapper textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.followup-input-wrapper textarea::placeholder {
  color: var(--text-muted);
}

.voice-btn-large {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.voice-btn-large:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.voice-btn-large:active {
  transform: scale(0.95);
}

.voice-btn-large.recording {
  animation: pulse-recording 1.5s ease-in-out infinite;
  background: linear-gradient(135deg, var(--danger), #ff6b6b);
}

.voice-btn-large svg {
  width: 24px;
  height: 24px;
}

@keyframes pulse-recording {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
  }
}

.voice-status-inline {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  font-size: 0.85rem;
  color: var(--primary);
}

.pulse-small {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1s ease-in-out infinite;
}

.form-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.form-row label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.date-input {
  flex: 1;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.date-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Preview candidat identifié */
.followup-preview {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.preview-candidate {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Loader dans bouton */
#save-followup-btn .btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#save-followup-btn .btn-loader.hidden {
  display: none;
}

#save-followup-btn.loading .btn-text {
  display: none;
}

#save-followup-btn.loading .btn-loader {
  display: inline-block;
}
