/* ============================
   Amani – Dashboard Propriétaire
   ============================ */

/* Wrapper global */
.afs-dashboard-wrapper {
  max-width: 1120px;
  margin: 60px auto 80px;
  padding: 32px 32px 40px;
  background: #f7f3ec;
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.08);
  font-family: inherit;
  color: #171717;
  box-sizing: border-box;
}

.afs-dashboard-wrapper h2 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.afs-dashboard-wrapper > p {
  margin: 0 0 20px;
  color: rgba(0, 0, 0, 0.6);
}

/* Liens texte par défaut (hors boutons) */
.afs-dashboard-wrapper a {
  color: #171717;
  text-decoration: none;
}

.afs-dashboard-wrapper a:hover {
  text-decoration: underline;
}

/* ============================
   Boutons génériques
   ============================ */

.afs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.afs-btn-primary {
  background: #111111;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.afs-btn-primary:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.afs-btn-ghost {
  background: #f7f3ec;
  color: #111111;
  border-color: rgba(0, 0, 0, 0.12);
}

.afs-btn-ghost:hover {
  background: #111111;
  color: #ffffff;
  transform: translateY(-1px);
}

.afs-btn-outline {
  background: #ffffff;
  color: #111111;
  border-color: rgba(0, 0, 0, 0.18);
}

.afs-btn-outline:hover {
  background: #111111;
  color: #ffffff;
}

/* Bloc d’actions (en haut, quand connecté) */
.afs-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 32px;
}

/* ============================
   État non connecté
   ============================ */

.afs-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* ============================
   Bloc profil investisseur
   ============================ */

.afs-investor-profile {
  display: none;
  background: #ffffff;
  border-radius: 22px;
  padding: 22px 22px 26px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.08);
  margin-bottom: 32px;
}

.afs-investor-profile.is-open {
  display: block;
}

.afs-investor-profile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.afs-investor-intro {
  margin: 0 0 16px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
}

.afs-investor-intro a {
  text-decoration: underline;
}

.afs-investor-message {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ecfdf3;
  color: #166534;
  font-size: 13px;
}

/* Formulaire profil */

.afs-investor-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.afs-investor-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.afs-investor-field label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: rgba(0, 0, 0, 0.72);
}

.afs-investor-field input,
.afs-investor-field textarea,
.afs-investor-field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 14px;
  font-size: 14px;
  background: #fafafa;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.afs-investor-field textarea {
  min-height: 70px;
  resize: vertical;
}

.afs-investor-field input:focus,
.afs-investor-field textarea:focus,
.afs-investor-field select:focus {
  outline: none;
  border-color: #e0b478;
  box-shadow: 0 0 0 1px rgba(224, 180, 120, 0.4);
  background: #ffffff;
}

.afs-investor-submit {
  margin-top: 4px;
}

/* ============================
   Services propriétaires
   (accompagnement juridique, investisseurs, projet…)
   ============================ */

.afs-services-section {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.afs-services-section h3 {
  font-size: 22px;
  margin: 0 0 8px;
}

.afs-services-section-intro {
  margin: 0 0 24px;
  color: rgba(0, 0, 0, 0.65);
  max-width: 760px;
}

.afs-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Si tu as plutôt une structure verticale sans grid,
   ces styles resteront neutres. */

.afs-service-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 18px 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
}

.afs-service-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.afs-service-card p {
  margin: 0 0 14px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
}

.afs-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Pour les boutons de service type “Demander un accompagnement” */
.afs-service-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}

.afs-service-btn:hover {
  background: #111111;
  color: #ffffff;
}

/* Message de confirmation (si tu l’utilises) */
.afs-service-notice {
  margin-top: 10px;
  font-size: 13px;
  color: #166534;
}

/* ============================
   Tableau des propriétés
   ============================ */

.afs-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  margin-top: 26px;
}

.afs-table thead {
  background: #f4f2ed;
}

.afs-table th,
.afs-table td {
  padding: 12px 18px;
  text-align: left;
}

.afs-table th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.afs-table tbody tr:nth-child(even) {
  background: #fbfaf8;
}

.afs-table tbody tr:hover {
  background: #f5f1eb;
}

/* Lien “Voir” dans le tableau */
.afs-table td[data-label="Actions"] a {
  font-weight: 500;
  text-decoration: underline;
}

/* Bloc "aucune propriété" */
.afs-empty {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff4e5;
  font-size: 14px;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 980px) {
  .afs-dashboard-wrapper {
    margin: 30px 16px 40px;
    padding: 24px 18px 28px;
    border-radius: 24px;
  }

  .afs-dashboard-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .afs-btn {
    width: 100%;
    justify-content: center;
  }

  .afs-investor-form-row {
    grid-template-columns: 1fr;
  }

  .afs-auth-actions {
    flex-direction: column;
  }

  .afs-services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .afs-services-grid {
    grid-template-columns: 1fr;
  }

  /* Tableau → cards */
  .afs-table thead {
    display: none;
  }

  .afs-table,
  .afs-table tbody,
  .afs-table tr,
  .afs-table td {
    display: block;
    width: 100%;
  }

  .afs-table {
    box-shadow: none;
    background: transparent;
  }

  .afs-table tr {
    margin: 0 0 14px;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  }

  .afs-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
  }

  .afs-table td:last-child {
    border-bottom: none;
  }

  .afs-table td::before {
    content: attr(data-label);
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
  }
}
