﻿
.profile_page {
    width: 100%;
    max-width: none; /* plein écran */
    margin: 0; /* plus centré */
}

    /* même esprit que .accountManager_page .band */
    .profile_page .band {
        padding: 16px 20px;
        border-bottom: var(--border);
        min-width: 0;
    }

    /* Form */
    .profile_page .profile-form {
        max-width: none;
    }

    .profile_page .field {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
    }

    /* Bande Info : limiter la largeur des champs */
    #band-info .fields {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }

    #band-info .field {
        flex: 0 0 auto;
        min-width: 200px;
        max-width: 320px;
    }

    #band-info input {
        width: 100%;
        max-width: 320px;
    }

    /* Bande Langue : champ + bouton sur la même ligne */
    .profile_page .profile-row {
        display: grid;
        grid-template-columns: minmax(0, 520px) auto; /* évite l'écrasement */
        gap: 12px;
        align-items: end;
    }

    .profile_page .actions {
        margin-top: 12px;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }

    .profile_page .actions--bottom {
        margin-top: 0; /* aligné au bas du select */
    }

    /* Bande MDP : champs en colonne */
    .profile_page .fields {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Messages */
    .profile_page .form-message {
        margin-top: 10px;
        font-size: .95rem;
    }

        .profile_page .form-message.ok {
            color: var(--success, #35c48c);
        }

        .profile_page .form-message.err {
            color: var(--danger, #ff5a6b);
        }

/* Responsive */
@media (max-width: 1250px) {
    .profile_page .profile-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .profile_page .actions--bottom {
        margin-top: 12px;
        justify-content: flex-start; /* optionnel: bouton à gauche sur mobile */
    }
}

/* On limite seulement la largeur des champs */
#band-lang .field {
    max-width: 520px;
}

/* Le conteneur prend toute la largeur (pour pousser le bouton à droite) */
#band-password .fields {
    max-width: none;
}

/* On limite seulement la largeur des champs */
#band-password .field {
    max-width: 520px;
}

/* Les inputs suivent la largeur du field */
#band-password input[type="password"] {
    width: 100%;
    max-width: 520px;
}

/* ===== Security ===== */
.securityPage__flash {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--border, #e6e6e6);
    border-radius: 8px;
}

.securityCard__line {
    margin: 6px 0;
}

/* Row spéciale : prend toute la largeur (pas limité à 520px) */
.profile_page .profile-row--wide {
    grid-template-columns: 1fr auto;
    align-items: center;
}

/* Evite le margin par défaut des <p> dans les rows */
.profile_page .profile-row__text {
    margin: 0;
}

/* Desktop : 1 ligne */
@media (min-width: 1251px) {
    .profile_page .profile-row--wide .profile-row__text {
        white-space: nowrap;
    }
}

/* Mobile / small : row en 1 colonne => bouton sous le texte */
@media (max-width: 1250px) {
    .profile_page .profile-row--wide {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

        .profile_page .profile-row--wide .profile-row__text {
            white-space: normal;
        }

        .profile_page .profile-row--wide .actions--bottom {
            margin-top: 12px;
            justify-content: flex-start;
        }

    #band-mfa .actions {
        flex-direction: column;
        align-items: flex-start; /* pour éviter étirement bizarre */
    }

        #band-mfa .actions .btn {
            width: 100%;
            max-width: 320px;
        }
}

/* ===== MFA Setup (inline in Profil) ===== */
.mfa-qr {
    margin: 16px 0;
}

.mfa-qr img {
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.mfa-key {
    margin: 8px 0 16px;
    font-size: .95rem;
}

.mfa-key code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 4px 8px;
    border: 1px solid var(--border, #eee);
    border-radius: 6px;
    letter-spacing: .1em;
}

.recovery-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.recovery-codes code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 6px 10px;
    border: 1px solid var(--border, #eee);
    border-radius: 6px;
    background: rgba(255,255,255,.04);
}

.btn--secondary {
    background: transparent;
    border: 1px solid var(--color2, #888);
    color: var(--fg);
}

.btn--secondary:hover {
    border-color: var(--color1);
}
