/* ==========================================================
   VELENDY — ACCOUNT
========================================================== */

.account-page {
    --account-blue: #1473ff;
    --account-blue-dark: #075ed6;
    --account-violet: #7657ff;
    --account-green: #10a878;
    --account-ink: #080d1b;
    --account-muted: #667085;
    --account-line: #e3e8f0;
    --account-soft: #f5f8fd;
}

/* Structure */

.account-section,
.account-section *,
.account-section *::before,
.account-section *::after {
    box-sizing: border-box;
}

.account-section {
    position: relative;
    padding: 90px 0 100px;
    color: var(--account-ink);
    background: #faf9f6;
    isolation: isolate;
}

.account-container {
    position: relative;
    width: min(calc(100% - 64px), 560px);
    margin: 0 auto;
}

/* Présentation */

.account-heading {
    margin-bottom: 34px;
}

.account-eyebrow {
    margin: 0 0 20px;
    color: #647ca5;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.account-heading h1 {
    max-width: 560px;
    margin: 0;
    color: var(--account-ink);
    font-size: clamp(38px, 4.6vw, 54px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.055em;
}

.account-heading > p:last-child {
    max-width: 470px;
    margin: 22px 0 0;
    color: var(--account-muted);
    font-size: 16px;
    line-height: 1.7;
}

/* Cartes */

.account-card {
    min-width: 0;
    margin: 0 0 24px;
    padding: 34px;
    background: #fff;
    border: 1px solid var(--account-line);
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(12, 26, 48, .035);
}

.account-card h2 {
    margin: 0 0 22px;
    color: var(--account-ink);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.045em;
}

.account-card > p {
    margin: 0;
    color: var(--account-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* Formulaire */

.account-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 9px;
    margin: 0;
    color: var(--account-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.account-field > small {
    display: block;
    margin: -3px 0 0;
    color: var(--account-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.65;
}

.account-field > input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    padding: 13px 15px;
    color: var(--account-ink);
    background: #fff;
    border: 1px solid #d8dde4;
    border-radius: 8px;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    transition:
        border-color .2s,
        box-shadow .2s,
        background-color .2s;
}

.account-field > input:hover {
    border-color: #aebbd0;
}

.account-field > input:focus-visible {
    background: #fff;
    border-color: var(--account-blue);
    outline: 3px solid rgba(20, 115, 255, .16);
    outline-offset: 2px;
}

.account-field > input::placeholder {
    color: #9aa4b3;
    opacity: 1;
}

.account-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

/* Choix du type de compte */

.account-role-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.account-role-fieldset > legend {
    margin: 0 0 12px;
    padding: 0;
    color: var(--account-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.account-roles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.account-role {
    display: flex;
    min-width: 0;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 15px;
    color: var(--account-muted);
    background: #fff;
    border: 1px solid var(--account-line);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition:
        color .2s,
        background-color .2s,
        border-color .2s,
        box-shadow .2s;
}

.account-role:hover {
    color: var(--account-ink);
    background: var(--account-soft);
    border-color: #bfd5f7;
}

.account-role:has(input:checked) {
    color: var(--account-blue-dark);
    background: #eaf2ff;
    border-color: var(--account-blue);
}

.account-role:focus-within {
    outline: 3px solid rgba(20, 115, 255, .16);
    outline-offset: 3px;
}

.account-role > input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--account-blue);
    cursor: pointer;
}

/* Boutons */

.account-button {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 15px 20px;
    color: #fff;
    background: var(--account-blue);
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color .2s,
        border-color .2s,
        box-shadow .2s;
}

.account-button:hover {
    color: #fff;
    background: var(--account-blue-dark);
    box-shadow: 0 8px 22px rgba(20, 115, 255, .16);
}

.account-button:focus-visible {
    outline: 3px solid rgba(20, 115, 255, .35);
    outline-offset: 4px;
}

.account-button > span {
    float: none;
}

.account-button > span[aria-hidden="true"] {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    transition: transform .2s;
}

.account-button:hover > span[aria-hidden="true"] {
    transform: translateX(4px);
}

.account-button-secondary {
    justify-content: center;
    color: var(--account-ink);
    background: #fff;
    border-color: var(--account-line);
    text-align: center;
}

.account-button-secondary:hover {
    color: var(--account-blue-dark);
    background: #eaf2ff;
    border-color: #bfd5f7;
    box-shadow: none;
}

/* Liens inscription / connexion */

.account-form .account-switch {
    margin: 0;
    color: var(--account-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    text-align: center;
}

.account-switch > a {
    color: var(--account-blue);
    font-weight: 700;
    text-decoration: none;
    text-underline-offset: 4px;
    transition: color .2s;
}

.account-switch > a:hover {
    color: var(--account-blue-dark);
    text-decoration: underline;
}

.account-switch > a:focus-visible {
    outline: 3px solid rgba(20, 115, 255, .35);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Messages d’erreur */

.account-error {
    margin: 0 0 24px;
    padding: 16px 18px;
    color: #a33229;
    background: #fff4f2;
    border: 1px solid #f1cbc5;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* Informations du compte */

.account-details {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px 20px;
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}

.account-details > dt {
    margin: 0;
    color: var(--account-muted);
    font-weight: 400;
}

.account-details > dd {
    min-width: 0;
    margin: 0;
    color: var(--account-ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Mobile */

@media (max-width: 760px) {
    .account-section {
        padding: 64px 0 72px;
    }

    .account-container {
        width: min(calc(100% - 40px), 560px);
    }

    .account-heading {
        margin-bottom: 28px;
    }

    .account-heading h1 {
        font-size: 40px;
    }

    .account-heading > p:last-child {
        margin-top: 20px;
        font-size: 15px;
    }

    .account-card {
        padding: 26px;
        border-radius: 12px;
    }

    .account-field > input {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .account-section {
        padding: 48px 0 56px;
    }

    .account-heading h1 {
        font-size: 36px;
        letter-spacing: -.05em;
    }

    .account-eyebrow {
        margin-bottom: 16px;
        font-size: 10px;
    }

    .account-card {
        padding: 22px;
    }

    .account-form {
        gap: 22px;
    }

    .account-columns {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .account-roles {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .account-role {
        min-height: 52px;
    }

    .account-details {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .account-details > dd {
        margin-bottom: 16px;
    }

    .account-details > dd:last-child {
        margin-bottom: 0;
    }
}

/* Accessibilité */

@media (prefers-reduced-motion: reduce) {
    .account-field > input,
    .account-role,
    .account-button,
    .account-button > span[aria-hidden="true"],
    .account-switch > a {
        transition: none;
    }

    .account-button:hover > span[aria-hidden="true"] {
        transform: none;
    }
}