/* ========================================
   COMMUNITY.CSS - Styles spécifiques à la page communautaire
   ======================================== */

/* --- ANIMATIONS --- */
@keyframes formFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.community-animate-enter {
    animation: formFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- BOUTONS --- */
.btn-community {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #ffffff;
    border: 1px solid #8b5cf6;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    outline: none;
}

.btn-community:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.btn-community:focus-visible {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.5);
}

.btn-community:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-community:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-community-exit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1f2937;
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
}

.btn-community-exit:hover {
    background: #374151;
    border-color: #4b5563;
    color: #ffffff;
}

.btn-community-exit:focus-visible {
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.3);
}

/* --- FORMULAIRE --- */
.community-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.community-label {
    font-size: 12px;
    font-weight: 600;
    color: #a78bfa; /* Violet clair */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.community-input,
.community-textarea {
    background: #1e293b;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 10px 14px;
    color: #f3f4f6;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
}

.community-input::placeholder,
.community-textarea::placeholder {
    color: #6b7280;
}

.community-input:focus,
.community-textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25);
}

.community-textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
}

/* --- CHECKBOX CONDITIONS --- */
.community-terms-label {
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: #9ca3af;
}

.community-terms-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

/* --- FEEDBACK VISUEL (MESSAGES) --- */
.community-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-error::before {
    content: "⚠️";
    font-size: 16px;
}

.community-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-success::before {
    content: "✅";
    font-size: 16px;
}

/* Utilitaires pour forcer le masquage si géré en JS */
.hidden {
    display: none !important;
}