/* ============================================
   Lucide - Dashboard & Profile Stylesheet
   ============================================ */

/* --- Dashboard layout --- */
.dashboard {
  max-width: var(--max-width-wide);
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  margin-bottom: 0.25rem;
}

.dashboard-header .subtitle {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* --- Results list --- */
.results-section {
  margin-bottom: 2.5rem;
}

.results-section h2 {
  margin-bottom: 1rem;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: box-shadow var(--transition);
}

.result-card:hover {
  box-shadow: var(--shadow-md);
}

.result-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-info .result-test-name {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.result-info .result-profil-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 0.125rem;
}

.result-info .result-date {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
}

.result-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
}

.empty-state p {
  margin-bottom: 1.5rem;
}

/* --- Profile editing page --- */
.profile-page {
  max-width: 560px;
  margin: 0 auto;
}

.profile-section {
  margin-bottom: 2rem;
}

.profile-section h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid var(--color-primary-light);
}

.profile-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--color-border);
}

.profile-field:last-child {
  border-bottom: none;
}

.profile-field .field-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.profile-field .field-value {
  font-weight: 600;
  color: var(--color-text);
}

.profile-field .field-value.empty {
  color: var(--color-text-light);
  font-style: italic;
  font-weight: 400;
}

.profile-field .field-edit {
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-primary);
  margin-left: 0.75rem;
}

/* Inline edit */
.inline-edit {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.inline-edit input,
.inline-edit select {
  padding: 0.375rem 0.625rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-white);
}

.inline-edit .btn-save {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* --- Danger zone --- */
.danger-zone {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 2px solid var(--color-danger);
  border-radius: var(--radius-md);
}

.danger-zone h3 {
  color: var(--color-danger);
  margin-bottom: 0.75rem;
}

.danger-zone p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

/* --- Auth pages (connexion, inscription) --- */
.auth-page {
  max-width: 420px;
  margin: 2rem auto;
  text-align: center;
}

.auth-page h1 {
  margin-bottom: 0.5rem;
}

.auth-page .auth-subtitle {
  color: var(--color-text-light);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-form {
  text-align: left;
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-link {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* --- Compatibility page --- */
.compat-page {
  max-width: 600px;
  margin: 0 auto;
}

.compat-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.compat-vs {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-light);
  padding: 0.5rem 0;
}

.compat-result {
  text-align: center;
  padding: 2rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.compat-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-primary);
}

.compat-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .result-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .result-actions {
    width: 100%;
  }

  .result-actions .btn {
    flex: 1;
  }

  .compat-inputs {
    grid-template-columns: 1fr;
  }

  .profile-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }
}
