/*
 * Formulaire bbPress - Style moderne
 * @version 1.0.0
 */

/* Container du formulaire */
#new-post {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 48px;
    max-width: 900px;
    margin: 64px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    scroll-margin-top: 100px; /* Pour le scroll smooth avec le header fixe */
}

/* S'assurer que le formulaire est visible */
#bbpress-forums form#new-post,
#bbpress-forums .bbp-topic-form {
    display: block !important;
    visibility: visible !important;
}

/* Wrapper du formulaire */
.ids-topic-form-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 40px;
    background: #F8FAFC;
}

/* Message de connexion */
.ids-login-message {
    max-width: 600px;
    margin: 64px auto;
    padding: 48px;
    background: #FFFFFF;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ids-login-message p {
    font-size: 18px;
    color: #64748B;
    margin-bottom: 24px;
}

.ids-login-message a:not(.ids-button) {
    color: var(--ids-blue-primary);
    text-decoration: none;
    font-weight: 600;
}

.ids-login-message a:not(.ids-button):hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .ids-topic-form-wrapper {
        padding: 40px 24px;
    }
    
    .ids-login-message {
        margin: 40px 24px;
        padding: 32px 24px;
    }
}

#bbpress-forums fieldset {
    border: none;
    padding: 0;
    margin: 0 0 32px 0;
}

#bbpress-forums fieldset legend {
    font-family: 'Afacad', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #020617;
    margin-bottom: 24px;
    padding: 0;
    line-height: 1.5 !important;
}

/* Labels */
#bbpress-forums label {
    font-family: 'Afacad', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-bottom: 8px;
}

/* Champs de saisie */
#bbpress-forums input[type="text"],
#bbpress-forums textarea,
#bbpress-forums select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-family: 'Afacad', sans-serif;
    font-size: 16px;
    color: #020617;
    transition: all 0.3s ease;
}

#bbpress-forums input[type="text"]:focus,
#bbpress-forums textarea:focus,
#bbpress-forums select:focus {
    outline: none;
    border-color: #000091;
    box-shadow: 0 0 0 3px rgba(0, 0, 145, 0.1);
}

#bbpress-forums textarea {
    min-height: 200px;
    resize: vertical;
}

/* Boutons */
#bbpress-forums button[type="submit"],
#bbpress-forums input[type="submit"] {
    background: #000091;
    color: #FFFFFF;
    font-family: 'Afacad', sans-serif;
    font-size: 18px;
    font-weight: 600;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#bbpress-forums button[type="submit"]:hover,
#bbpress-forums input[type="submit"]:hover {
    background: #000070;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 145, 0.3);
}

/* Description helper text */
#bbpress-forums .bbp-form-description {
    font-family: 'Afacad', sans-serif;
    font-size: 14px;
    color: #64748B;
    margin-top: 8px;
}

/* Champ d'upload d'image */
.ids-topic-image-upload {
    margin-bottom: 24px;
    padding: 20px;
    background: #F8FAFC;
    border: 2px dashed #CBD5E1;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.ids-topic-image-upload:hover {
    border-color: var(--ids-blue-primary);
    background: #EFF6FF;
}

.ids-topic-image-upload label {
    display: block;
    font-weight: 600;
    color: var(--ids-text-dark);
    margin-bottom: 12px;
    font-size: 16px;
}

.ids-topic-image-upload input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--ids-border-gray);
    border-radius: 8px;
    background: #FFFFFF;
    font-family: 'Afacad', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.ids-topic-image-upload input[type="file"]:hover {
    border-color: var(--ids-blue-primary);
}

.ids-topic-image-upload input[type="file"]:focus {
    border-color: var(--ids-blue-primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 145, 0.2);
    outline: none;
}

.ids-current-image {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.ids-current-image img {
    display: block;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ids-current-image label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-weight: 400;
    font-size: 14px;
    color: #64748B;
    cursor: pointer;
}

.ids-current-image input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.ids-topic-image-upload small {
    display: block;
    margin-top: 8px;
    color: #64748B;
    font-size: 14px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    #new-post {
        padding: 24px;
        margin: 32px 16px;
    }
    
    #bbpress-forums fieldset legend {
        font-size: 24px;
    }
    
    .ids-topic-image-upload {
        padding: 16px;
    }
    
    .ids-current-image img {
        max-width: 100%;
    }
}

/* Masquer les éléments inutiles */
#bbpress-forums .bbp-submit-wrapper {
    margin-top: 32px;
}

#bbpress-forums #subscription-toggle {
    margin-top: 24px;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 8px;
}

/* Style des tags/taxonomies si utilisés */
#bbpress-forums .bbp-topic-tags {
    margin-top: 16px;
}

/* Message d'info/notice */
#bbpress-forums .bbp-template-notice {
    background: #EFF6FF;
    border-left: 4px solid #000091;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

#bbpress-forums .bbp-template-notice p {
    font-family: 'Afacad', sans-serif;
    color: #1E40AF;
    margin: 0;
}

