/* Account pages (connexion, inscription, compte, mot de passe). Built only from v2.css tokens. */

/* ── Shared form bits ─────────────────────────────────────────────── */
.account-page .account-field { margin-bottom: 16px; }
.account-page .account-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.account-page .account-help { font-size: 13px; color: var(--text-muted); margin: 6px 0 0; }
.account-page .account-help--after-grid { margin: -6px 0 14px; }
.account-page .account-optional { font-weight: 400; color: var(--text-muted); }
.account-page .account-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-primary); margin: 0; }
.account-page .account-errors { margin: 0; padding-left: 18px; text-align: left; }
.account-page .account-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.account-page .contact-form .form-label { font-weight: 500; margin-bottom: 6px; }
.account-page .form-control { min-height: 44px; }
.account-page .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(58, 87, 149, 0.15); }

/* Buttons: site .mdl-btn, with readable secondary/primary in dark mode */
.account-page .account-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.account-page .account-actions .mdl-btn { display: inline-flex; }
.account-page .mdl-btn-secondary { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--table-border); }
.account-page .mdl-btn-secondary:hover { background: var(--surface-3); border-color: var(--border-color-strong); }
[data-theme="dark"] .account-page .mdl-btn-primary { color: var(--text-primary); }
.account-page .account-btn-danger { background: var(--danger); color: var(--text-inverse); }
.account-page .account-btn-danger:hover { background: var(--red); filter: brightness(0.92); }

/* City autocomplete (reuses header.css .city-suggest) */
.account-page .account-city-input { position: relative; }
.account-page .account-city .city-suggest { top: calc(100% + 2px); }
.account-page .account-city .city-suggest.is-open { display: block !important; }

/* Password field with show/hide button */
.account-page .acct-pw { position: relative; }
.account-page .acct-pw .form-control { padding-right: 46px; }
.account-page .acct-reveal {
    position: absolute; top: 0; right: 0; height: 100%; width: 44px;
    display: flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--text-muted); cursor: pointer;
}
.account-page .acct-reveal:hover, .account-page .acct-reveal:focus-visible { color: var(--primary); }

/* ── Sign-in pages: one card split into a brand side and a form side ── */
.account-page .acct-auth {
    display: grid;
    grid-template-columns: minmax(260px, 5fr) 7fr;
    background: var(--surface-1);
}
.account-page .acct-auth--md { grid-template-columns: minmax(260px, 5fr) 7fr; }
.account-page .acct-auth--md .acct-panel { display: flex; flex-direction: column; justify-content: center; }
.account-page .acct-auth--md .acct-panel__inner { width: 100%; max-width: 460px; margin: 0 auto; }
.account-page .acct-alt--mobile { display: none; }

.account-page .acct-brand {
    display: flex; flex-direction: column; gap: 14px;
    padding: 36px 32px;
    background: var(--primary);
    color: #ffffff;
}
.account-page .acct-brand__logo { width: 64px; height: 64px; }
.account-page .acct-brand__title { margin: 4px 0 0; font-size: 1.45rem; font-weight: 600; line-height: 1.25; color: #ffffff; }
.account-page .acct-brand__text { margin: 0; line-height: 1.55; opacity: 0.92; }
.account-page .acct-brand__list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 14px; }
.account-page .acct-brand__list li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.account-page .acct-brand__list i {
    flex: 0 0 30px; width: 30px; height: 30px; margin-top: -4px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255, 255, 255, 0.14); font-size: 13px;
}
.account-page .acct-brand__foot {
    margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.22);
    display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; font-size: 14px;
}
.account-page .acct-brand a { color: #ffffff; }
.account-page .acct-btn-ghost {
    display: inline-block; padding: 8px 16px; border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 8px;
    color: #ffffff; font-weight: 500; text-decoration: none;
}
.account-page .acct-btn-ghost:hover { background: #ffffff; color: var(--secondary); }

.account-page .acct-panel { padding: 36px 48px 40px; min-width: 0; }
.account-page .acct-panel .npdc-title { margin-top: 0; }
.account-page .acct-lead { color: var(--text-secondary); margin: -2px 0 20px; line-height: 1.55; }
.account-page .acct-section {
    margin: 26px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--table-border);
    font-size: 12px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--primary);
}
.account-page .acct-section:first-child, .account-page .acct-section--first { margin-top: 4px; }
[data-theme="dark"] .account-page .acct-section { color: var(--primary-hover); }
.account-page .acct-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 2px 0 18px; font-size: 14px; }
.account-page .acct-submit { width: 100%; justify-content: center; padding: 0.75rem 1.25rem; font-size: 1rem; font-weight: 600; margin-top: 8px; }
.account-page .acct-legal { font-size: 13px; color: var(--text-muted); margin: 18px 0 0; text-align: center; }
.account-page .acct-alt { font-size: 14px; color: var(--text-secondary); margin: 16px 0 0; text-align: center; }

@media (max-width: 991px) {
    .account-page .acct-auth, .account-page .acct-auth--md { grid-template-columns: 1fr; }
    .account-page .acct-brand { padding: 20px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
    .account-page .acct-brand__logo { width: 44px; height: 44px; }
    .account-page .acct-brand__title { font-size: 1.1rem; margin: 0; flex: 1 1 0; min-width: 0; }
    .account-page .acct-brand__text { flex-basis: 100%; font-size: 14px; margin-top: 6px; }
    .account-page .acct-brand__list, .account-page .acct-brand__foot { display: none; }
    .account-page .acct-panel { padding: 22px 18px 26px; }
    .account-page .acct-alt--mobile { display: block; }
}
@media (max-width: 767px) {
    .account-page .account-grid { grid-template-columns: 1fr; }
}

/* ── Account page (/compte): blue profile side + setting rows ─────── */
.account-page .acct-auth--account { grid-template-columns: 300px minmax(0, 1fr); }
.account-page .acct-auth--account .acct-panel__inner { max-width: 860px; }
.account-page .acct-profile { display: flex; gap: 14px; align-items: center; }
.account-page .acct-avatar {
    flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #ffffff; color: var(--primary); font-size: 1.6rem; font-weight: 600;
}
.account-page .acct-profile__text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.account-page .acct-profile__name { font-size: 1.2rem; font-weight: 600; overflow-wrap: anywhere; }
.account-page .acct-nav { display: flex; flex-direction: column; gap: 2px; margin: 6px -12px 0; }
.account-page .acct-nav a { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 8px; text-decoration: none; }
.account-page .acct-nav a:hover, .account-page .acct-nav a:focus-visible { background: rgba(255, 255, 255, 0.12); }
.account-page .acct-nav i { width: 18px; text-align: center; }
.account-page button.acct-btn-ghost { background: transparent; cursor: pointer; font: inherit; }
.account-page .acct-brand form.acct-brand__foot { margin-bottom: 0; }

.account-page .acct-setting { border-bottom: 1px solid var(--table-border); }
.account-page .acct-setting > summary, .account-page .acct-setting__summary {
    list-style: none;
    display: grid; grid-template-columns: minmax(140px, 210px) minmax(0, 1fr) auto; gap: 4px 20px; align-items: center;
    padding: 14px 0;
}
.account-page .acct-setting > summary { cursor: pointer; }
.account-page .acct-setting > summary::-webkit-details-marker { display: none; }
.account-page form.acct-setting { margin: 0; }
.account-page button.acct-setting__action { cursor: pointer; font-family: inherit; line-height: inherit; }
.account-page button.acct-setting__action:hover { border-color: var(--border-color-strong); }
.account-page .acct-setting > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.account-page .acct-setting__label { font-weight: 600; color: var(--text-primary); }
.account-page .acct-setting__value { color: var(--text-secondary); overflow-wrap: anywhere; }
.account-page .acct-setting__action {
    padding: 6px 14px; border: 1px solid var(--table-border); border-radius: 8px; background: var(--surface-2);
    color: var(--primary); font-size: 14px; font-weight: 500; white-space: nowrap;
}
[data-theme="dark"] .account-page .acct-setting__action { color: var(--primary-hover); }
.account-page .acct-setting > summary:hover .acct-setting__action { border-color: var(--border-color-strong); }
.account-page .acct-setting__action--danger, [data-theme="dark"] .account-page .acct-setting__action--danger { color: var(--danger); }
.account-page .acct-when-open { display: none; }
.account-page .acct-setting[open] .acct-when-open { display: inline; }
.account-page .acct-setting[open] .acct-when-closed { display: none; }
.account-page .acct-setting__body { max-width: 580px; padding: 2px 0 22px; }
.account-page .acct-setting__body .mdl-btn { display: inline-flex; }
.account-page .acct-muted { color: var(--text-muted); }
.account-page .acct-tag {
    display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; vertical-align: 1px;
    border: 1px solid var(--table-border); background: var(--surface-2);
    color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
}
.account-page .acct-tag--current { margin: 0; color: var(--success); border-color: currentColor; background: transparent; white-space: nowrap; }

.account-page .acct-sessions { list-style: none; padding: 0; margin: 0; }
.account-page .acct-session {
    display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--table-border);
}
.account-page .acct-session__icon { font-size: 18px; color: var(--text-muted); text-align: center; }
.account-page .acct-session__text { display: flex; flex-direction: column; font-size: 14px; color: var(--text-secondary); }
.account-page .acct-session__text strong { color: var(--text-primary); font-weight: 600; }
.account-page .acct-session form, .account-page .acct-sessions__all { margin: 0; }
.account-page .acct-sessions__all { margin-top: 14px; }
.account-page .acct-btn-sm { display: inline-flex; padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.account-page .acct-section--danger, [data-theme="dark"] .account-page .acct-section--danger { color: var(--danger); }
.account-page .acct-delete-warning { color: var(--danger); margin: 0 0 12px; }

@media (max-width: 991px) {
    .account-page .acct-auth--account { grid-template-columns: 1fr; }
    .account-page .acct-auth--account .acct-brand { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
    .account-page .acct-auth--account .acct-brand__text { flex-basis: auto; margin: 0; }
    .account-page .acct-auth--account .acct-brand__foot--keep { align-self: flex-start; border-top: 0; padding-top: 4px; }
    .account-page .acct-nav { display: none; }
    .account-page .acct-brand__foot--keep { display: flex; margin-top: 4px; padding-top: 12px; }
}
@media (max-width: 767px) {
    .account-page .acct-setting > summary, .account-page .acct-setting__summary { grid-template-columns: minmax(0, 1fr) auto; }
    .account-page .acct-setting__label { grid-column: 1; grid-row: 1; }
    .account-page .acct-setting__value { grid-column: 1; grid-row: 2; }
    .account-page .acct-setting__action { grid-column: 2; grid-row: 1 / span 2; }
}
