/* ===========================================
   Styles page profil — lego4 (Compréhension)
   =========================================== */

.profil-container {
    max-width: 720px;
    margin: 0 auto;
}

.profil-titre {
    color: var(--text);
    margin-bottom: 1.5rem;
}

.profil-section {
    background: var(--white);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 1.5rem;
}

.profil-section h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.section-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Formulaire pseudo */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.input-with-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-status input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
}

.input-with-status input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 20%, transparent);
}

/* Status icon : Lucide injecté via JS ou caractère unicode */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.status-icon.valid {
    color: var(--success);
}

.status-icon.invalid {
    color: var(--error);
}

.status-icon.loading {
    color: var(--text-light);
}

.status-icon svg,
.status-icon i[data-lucide] {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.error-message {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Infos compte */
.account-info p {
    margin: 0.5rem 0;
    color: var(--text);
}

.account-info a {
    color: var(--primary);
}

/* Boutons */
.btn-secondary {
    background: var(--secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-sunken, #f0f0f0);
}

.btn-danger {
    background: var(--error);
    color: white;
    border: 1px solid var(--error);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-small);
    font-weight: 600;
}

.btn-danger:hover {
    background: color-mix(in oklab, var(--error), black 12%);
    color: white;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Zone danger */
.danger-section {
    border: 1px solid color-mix(in oklab, var(--error) 25%, white);
    background: var(--error-bg);
}

.danger-section h3 {
    color: var(--error);
}

.danger-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.danger-action p {
    color: var(--text);
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
    max-width: 480px;
}

/* Responsive */
@media (max-width: 768px) {
    .profil-section {
        padding: 1.5rem;
    }

    .danger-action {
        flex-direction: column;
        align-items: flex-start;
    }
}
