/* ================================================
   COMPTE.CSS — Page « Mon compte »
   Utilise les variables de marque --o-* (définies dans cover.css)
   → thème clair/sombre géré automatiquement.
   ================================================ */

.compte-page .compte-wrap {
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 24px 80px;
}

.compte-head { margin-bottom: 26px; }
.compte-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  color: var(--o-ink);
}
.compte-sub { color: var(--o-ink-soft); font-size: 0.95rem; margin-top: 4px; }

/* ── Carte de réglages ── */
.settings-card {
  background: var(--o-surface);
  border: 1px solid var(--o-line);
  border-radius: 18px;
  box-shadow: var(--o-shadow);
  padding: 26px 26px 22px;
  margin-bottom: 20px;
}
.settings-h2 {
  font-size: 1.05rem;
  color: var(--o-ink);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--o-line);
}

/* ── Avatar ── */
.avatar-row { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.avatar {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: var(--o-blue-tint);
  border: 1px solid var(--o-line);
  display: grid; place-items: center;
  overflow: hidden; flex-shrink: 0;
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem; font-weight: 700; color: var(--o-blue);
}
.avatar-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.avatar-actions .omega-btn { padding: 9px 18px; font-size: 0.85rem; }
.btn-text {
  background: none; border: none; color: var(--error-red, #C73E3E);
  font-size: 0.82rem; cursor: pointer; padding: 0;
}
.btn-text:hover { text-decoration: underline; }
.hint { font-size: 0.78rem; color: var(--o-ink-soft); line-height: 1.45; }

/* Champs : on s'appuie sur .field d'auth.css, on harmonise juste les fonds */
.compte-page .field input {
  background: var(--o-surface);
  border-color: var(--o-line);
  color: var(--o-ink);
}
.compte-page .field input:focus { border-color: var(--o-blue); box-shadow: 0 0 0 3px var(--o-blue-tint); }
.compte-page .field input:disabled { background: var(--o-mist); color: var(--o-ink-soft); cursor: not-allowed; }
.compte-page .field label { color: var(--o-ink-soft); }

/* Select « Année d'étude » : même look que les inputs */
.compte-page .field select {
  width: 100%;
  padding: 11px 13px;
  font-size: 0.92rem;
  border: 1px solid var(--o-line);
  border-radius: 10px;
  background: var(--o-surface);
  color: var(--o-ink);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23789' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.compte-page .field select:focus {
  outline: none;
  border-color: var(--o-blue);
  box-shadow: 0 0 0 3px var(--o-blue-tint);
}

/* Actions de navigation dans l'en-tête de la page compte */
.compte-nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Actions de carte ── */
.card-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.save-msg { font-size: 0.84rem; }
.save-msg-ok { color: var(--success-green, #2D8659); }
.save-msg-err { color: var(--error-red, #C73E3E); }

/* ── Préférences ── */
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pref-text strong { display: block; color: var(--o-ink); font-size: 0.95rem; }

/* Interrupteur */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--o-line); border-radius: 999px; transition: background 0.2s;
}
.switch-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.switch input:checked + .switch-slider { background: var(--o-blue); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ── Session ── */
.session-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 520px) {
  .avatar-row { flex-direction: column; align-items: flex-start; }
}
