/* IdeaBoard Frontend Styles */

/* Formulaire d'idée */
.ib-idea-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ib-idea-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ib-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ib-form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.ib-form-group .required {
    color: #e74c3c;
}

.ib-form-group input,
.ib-form-group textarea,
.ib-form-group select {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.ib-form-group input:focus,
.ib-form-group textarea:focus,
.ib-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.ib-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.ib-field-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.ib-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.ib-submit-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ib-submit-btn:hover {
    background: #005a87;
}

.ib-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ib-loading {
    color: #666;
    font-style: italic;
}

.ib-form-messages {
    margin-top: 15px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Upload de médias */
.ib-media-upload {
    border: 2px dashed #e1e5e9;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.ib-media-upload:hover {
    border-color: #007cba;
}

.ib-media-upload input[type="file"] {
    margin-bottom: 15px;
}

.ib-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.ib-file-item {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.ib-file-name {
    font-weight: 500;
    color: #333;
}

.ib-file-progress {
    color: #666;
    font-size: 14px;
}

.ib-file-status {
    color: #28a745;
    font-size: 14px;
}

.ib-file-error {
    color: #e74c3c;
    font-size: 14px;
}

/* Interface des idées */
.ib-ideas-container {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.ib-idea {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.ib-idea:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ib-idea-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ib-idea-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.ib-idea-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.ib-idea-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ib-idea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

.ib-vote-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ib-vote-btn {
    background: none;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ib-vote-btn:hover {
    border-color: #007cba;
    color: #007cba;
}

.ib-vote-btn.active {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

.ib-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ib-vote-count {
    font-weight: 600;
    color: #333;
}

.ib-idea-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.ib-tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

.ib-tag:hover {
    background: #dee2e6;
    color: #495057;
}

.ib-idea-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ib-status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.ib-status-under-review {
    background: #fff3e0;
    color: #f57c00;
}

.ib-status-accepted {
    background: #e8f5e8;
    color: #2e7d32;
}

.ib-status-rejected {
    background: #ffebee;
    color: #c62828;
}

/* Filtres */
.ib-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.ib-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ib-filter-group label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.ib-filter-group select,
.ib-filter-group input {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
}

.ib-filter-group input[type="search"] {
    background: white;
}

/* Pagination */
.ib-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.ib-pagination a,
.ib-pagination span {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.ib-pagination a:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.ib-pagination .current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Loading */
.ib-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .ib-idea-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .ib-idea-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .ib-idea-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .ib-vote-section {
        justify-content: center;
    }
    
    .ib-filters {
        grid-template-columns: 1fr;
    }
    
    .ib-pagination {
        flex-wrap: wrap;
    }
}

/* reCAPTCHA */
.g-recaptcha {
    margin: 15px 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ib-idea {
    animation: fadeIn 0.3s ease;
}

/* États de vote */
.ib-vote-btn.voted-up {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.ib-vote-btn.voted-down {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Trending indicator */
.ib-trending {
    position: relative;
}

.ib-trending::before {
    content: "🔥";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 16px;
}

/* Statistiques */
.ib-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.ib-stat-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.ib-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #007cba;
    display: block;
}

.ib-stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}