/* ============================================================
   GenIAcademy — pages d'authentification & messages
   (réutilise .form-block / .form-row / .btn-pay de la maquette)
   ============================================================ */

.auth-wrap {
  max-width: 460px;
  margin: 24px auto 80px;
}
.auth-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.auth-title em { font-style: italic; color: var(--terra-light); }
.auth-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-wrap .form-block { margin-bottom: 18px; }

/* Bouton submit en pleine largeur, basé sur .btn-pay */
.auth-wrap .btn-pay {
  width: 100%;
  border: none;
  cursor: pointer;
  font: inherit;
}

.auth-help { font-size: 12px; color: var(--muted); margin-top: 6px; }

.auth-field-error { color: #ff8a7a; font-size: 12.5px; margin-top: 6px; }
.auth-errors {
  color: #ffb3a8;
  background: rgba(204, 31, 31, 0.12);
  border: 1px solid rgba(204, 31, 31, 0.3);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 13px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.auth-links a { color: var(--muted); text-decoration: none; }
.auth-links a:hover { color: var(--paper); }

/* Bouton "Déconnexion" dans la top-bar (form POST inline) */
.logout-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover { background: var(--paper); color: var(--ink); }

/* ============================================================
   Page création de compte — épurée, pleine largeur, 2 colonnes
   ============================================================ */
.register-page { width: 100%; margin-top: 8px; }
.register-head { margin-bottom: 28px; }
.register-head .auth-sub { margin-bottom: 0; }

/* Grille des champs : 1 colonne (mobile) -> 2 colonnes (medium+) */
.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px 28px;
  margin-bottom: 28px;
}
@media (min-width: 768px) {
  .auth-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Les champs s'appuient sur l'espacement de la grille, pas sur leur marge */
.auth-grid .form-row { margin-bottom: 0; }

.register-actions {
  display: flex; align-items: center; flex-wrap: wrap;
  justify-content: space-between;   /* lien à gauche, bouton submit à droite */
  gap: 16px 24px;
}
.register-submit {
  display: inline-block;
  width: auto;
  min-width: 240px;
  border: none; cursor: pointer; font: inherit;
}
.register-login { font-size: 13px; color: var(--muted); }
.register-login a { color: var(--terra-light); text-decoration: none; }
.register-login a:hover { color: var(--paper); }

/* ============================================================
   Fiche profil
   ============================================================ */
.profile-page { width: 100%; margin-top: 8px; }

.profile-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--terra) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 32px; color: #fff;
  flex-shrink: 0; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity { min-width: 0; }
.profile-name {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: 26px; letter-spacing: -0.5px;
}
.profile-email { color: var(--muted); font-size: 14px; margin-top: 2px; }

.profile-edit-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--terra);
  color: var(--terra-light);
  border-radius: 100px;
  padding: 10px 20px;
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.profile-edit-btn:hover { background: var(--terra); color: #fff; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px 24px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 24px;
}
.profile-field { display: flex; flex-direction: column; gap: 5px; }
.profile-field .k {
  font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
}
.profile-field .v { font-size: 15px; }

.profile-bio {
  margin-top: 24px; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: 'Fraunces', serif; font-style: italic;
  color: rgba(255, 255, 255, 0.8); line-height: 1.6;
}

.profile-prefs {
  margin-top: 24px; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.profile-prefs h3 {
  font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--terra-light); margin-bottom: 14px; font-weight: 500;
}
.profile-prefs .pref-row {
  display: flex; justify-content: space-between;
  font-size: 14px; padding: 7px 0;
  color: rgba(255, 255, 255, 0.85);
}
.profile-prefs .pref-row .pk { color: var(--muted); }
.profile-prefs a {
  display: inline-block; margin-top: 14px;
  color: var(--terra-light); font-size: 13px; text-decoration: none;
}
.profile-prefs a:hover { color: var(--paper); }

/* Champ multiligne (bio) dans les formulaires de la maquette */
.form-row textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.2s;
}
.form-row textarea:focus { border-color: var(--terra); }

/* Modale d'édition du profil : scrollable si le formulaire est long */
.modal-content.profile-edit {
  max-height: 86vh;
  overflow-y: auto;
}

/* ============================================================
   Page Pro — cartes de services
   ============================================================ */
.pro-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.pro-service {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.pro-service .ico { font-size: 26px; margin-bottom: 12px; }
.pro-service .t {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: 17px; margin-bottom: 8px;
}
.pro-service .d { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Messages flash */
.messages { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.message.success { border-color: rgba(30, 92, 66, 0.5); color: #8fe0b8; }
.message.error { border-color: rgba(204, 31, 31, 0.4); color: #ffb3a8; }
.message.warning { border-color: rgba(200, 150, 71, 0.5); color: var(--gold); }
