/* ===========================================
   Styles page profil
   =========================================== */

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

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

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

.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;
}

.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);
    font-size: 1rem;
}

.input-with-status input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.status-icon {
    font-size: 1.25rem;
    width: 24px;
}

.status-icon.valid::after {
    content: "✓";
    color: #22c55e;
}

.status-icon.invalid::after {
    content: "✗";
    color: #ef4444;
}

.status-icon.loading::after {
    content: "⏳";
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Grille thèmes */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    border-color: var(--text-light);
}

.theme-btn.active {
    border-color: var(--primary);
    background: rgba(74, 124, 89, 0.05);
}

.theme-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.theme-name {
    font-size: 0.85rem;
    color: var(--text);
}

/* Infos compte */
.account-info {
    margin-bottom: 1.5rem;
}

.account-info p {
    margin: 0.5rem 0;
}

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

.btn-secondary:hover {
    background: #e5e5e5;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

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

/* Zone danger */
.danger-section {
    border: 1px solid #fecaca;
    background: #fef2f2;
}

.danger-section h2 {
    color: #dc2626;
}

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

.danger-action p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

/* Back link */
.back-link {
    color: var(--text-light);
    text-decoration: none;
    margin-right: 1rem;
}

.back-link:hover {
    color: var(--primary);
}

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

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

    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
