/* ============================================
   DASHBOARD — Charte graphique RentaLab
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700&family=DM+Sans:wght@400;500;600&display=swap');

/* Bouton retour */
.dashboard-back-bar {
  margin-top: 60px;
  padding: 6px 22px;
  display: flex;
  justify-content: flex-end;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.btn-back {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 4px 0;
  transition: var(--transition);
}
.btn-back:hover {
  color: var(--color-primary);
}

/* Main — fond bleu léger pour distinguer l'espace membre */
.dashboard-main {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
  background: #ffffff;
}

/* Hero dashboard */
.dashboard-hero {
  padding: 80px 22px 60px;
  text-align: center;
  background: transparent;
}

.dashboard-hero h1 {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--color-text);
}

.dashboard-subtitle {
  font-size: 19px;
  color: var(--color-text-light);
}

/* Sections */
.dashboard-section {
  padding: 60px 22px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* CTA cards — align-self: flex-start, ne s'étirent jamais */
.dashboard-cta-card {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  flex-shrink: 0;
  width: 100%;
  padding: 24px;
  background: #ffffff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  transition: var(--transition);
}

.dashboard-cta-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-cta-card .card-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.dashboard-cta-card .card-badge-free {
  color: #34c759;
}

.dashboard-cta-card .card-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.dashboard-cta-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text);
}

.dashboard-cta-card p {
  font-size: 15px;
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.dashboard-cta-card .btn {
  display: inline-block;
  margin-top: auto;
}

/* Cellule LMNP verrouillée (cliquable) */
.cell-lmnp-wrapper {
  position: relative;
  cursor: pointer;
}
.col-lmnp-card-wrapper {
  position: relative;
  align-self: flex-start;
  flex-shrink: 0;
  width: 100%;
}
.col-lmnp-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  pointer-events: auto;
}
.col-lmnp-lock-overlay .lock-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}
.col-lmnp-lock-overlay .lock-title {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}
.col-lmnp-lock-overlay .lock-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 24px 0;
}
.col-lmnp-lock-overlay .btn-unlock {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.col-lmnp-lock-overlay .btn-unlock:hover {
  background: #1d4ed8;
}

/* Titres (ligne 2) — centrés */
.simulations-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  text-align: center;
}

/* Simulations list — conteneur flex */
.simulations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

.simulations-loading {
  color: var(--color-text-light);
  font-size: 15px;
}

.empty-state,
#empty-state {
  background: var(--color-bg-light);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.empty-state p,
#empty-state p {
  font-size: 15px;
  color: var(--color-text-light);
  margin-bottom: 0;
}

/* Cards simulations — Modèle A */
.card-simulation {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  padding: 20px;
  cursor: pointer;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}
.card-simulation:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.11);
}
.sim-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #111827;
  margin: 0 0 4px;
}
.sim-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 14px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.kpi-block {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
}
.kpi-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #6b7280;
  margin: 0 0 2px;
}
.kpi-value {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.kpi-value.pos {
  color: #10b981;
}
.kpi-value.neg {
  color: #ef4444;
}
.sim-footer {
  display: flex;
  justify-content: flex-end;
}
.btn-supprimer {
  font-size: 12px;
  color: #ef4444;
  background: none;
  border: 1px solid #ef4444;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.btn-supprimer:hover {
  background: #fef2f2;
}

.sim-error {
  color: #ef4444;
  font-size: 15px;
}

/* Bloc simulations : titre + cards liés (une colonne sur mobile) */
.sims-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sims-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sims-col h3 {
  text-align: center;
  font-weight: 600;
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--color-text);
  line-height: 1.3;
}

@media (max-width: 768px) {
  .nav-user-email {
    display: none;
  }

  .dashboard-hero h1 {
    font-size: 32px;
  }

  #grid-simulateurs,
  .sims-grid {
    grid-template-columns: 1fr !important;
  }
}
