/* Compte Orpaille : bouton et menu de l'en-tête, fenêtre de connexion, page Mon compte */

.account-box { position: relative; }
.acc-login {
  height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.acc-login:hover { filter: brightness(1.1); }
.acc-avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: #fff; font-weight: 700; font-size: 13px;
}
.acc-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: 240px; padding: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
}
.acc-menu-head { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.acc-menu-head small { overflow: hidden; text-overflow: ellipsis; }
.acc-menu button { display: block; width: 100%; text-align: left; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13.5px; cursor: pointer; }
.acc-menu button:hover { background: var(--panel-2); }
.acc-plan {
  align-self: flex-start; margin-top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgb(var(--accent-rgb) / .15); color: var(--accent);
}
.acc-plan.big { margin-top: 0; padding: 5px 12px; font-size: 12.5px; }

/* Fenêtre modale */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(5, 8, 14, .6); backdrop-filter: blur(4px); animation: fade-in .15s ease-out;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  position: relative; width: 100%; max-width: 400px; padding: 28px 28px 22px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); animation: modal-in .2s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-close { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; justify-content: center; margin: 0; }
.modal-brand { font-weight: 800; font-size: 15px; margin-bottom: 14px; }
.modal-brand { display: flex; align-items: center; gap: 8px; }
.modal-brand .logo-img { border-radius: 6px; flex: none; }
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.auth-form label, .acc-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.auth-form input { height: 40px; }
.auth-form button[type=submit] { height: 42px; margin-top: 4px; font-size: 14.5px; }
.auth-form button:disabled, .acc-form button:disabled { opacity: .6; cursor: wait; }
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); font-size: inherit; font-weight: 600; cursor: pointer; }
button.link:hover { text-decoration: underline; }
.auth-msg { margin: 0; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.auth-msg.error { background: rgba(239, 68, 68, .1); color: var(--down); }
.auth-msg.ok { background: rgba(34, 197, 94, .1); color: var(--up); margin-top: 10px; }
.auth-done { margin: 12px 0 18px; line-height: 1.55; }
.modal > button[data-close].primary { width: 100%; height: 42px; }

/* Page Mon compte */
.account-page { max-width: 720px; }
.acc-section { padding: 16px 0; border-top: 1px solid var(--border); }
.acc-section h3 { margin: 0 0 10px; font-size: 15px; }
.acc-section.highlight { padding: 16px; border: 1px solid var(--accent); border-radius: 12px; margin-bottom: 12px; background: rgb(var(--accent-rgb) / .06); }
.acc-section.danger h3 { color: var(--down); }
.acc-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.acc-form label { flex: 1; min-width: 220px; }
.acc-form input { flex: 1; min-width: 220px; height: 38px; }
.acc-form button { height: 38px; padding: 0 16px; }
.acc-form + .auth-msg { margin-top: 10px; }
.danger-btn { background: transparent; border: 1px solid var(--down); color: var(--down); font-weight: 600; border-radius: 8px; cursor: pointer; }
.danger-btn:hover { background: rgba(239, 68, 68, .1); }

@media (max-width: 600px) {
  .acc-login { padding: 0 10px; font-size: 12.5px; }
  .modal { padding: 24px 18px 18px; }
}
.acc-form[data-acc="password"] input { min-width: 200px; }

/* Œil pour afficher ou masquer un mot de passe */
.pw-wrap { position: relative; display: flex; flex: 1; min-width: 200px; }
.pw-wrap input { width: 100%; padding-right: 40px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.pw-eye:hover { color: var(--text); background: var(--panel-2); }
.pw-eye .ic { width: 17px; height: 17px; }
.acc-menu button.acc-upgrade { color: var(--accent); font-weight: 800; }
