/* Import des variables CSS */
@import url("./root.css");

.forum-delete-btn {
    color: rgb(119, 9, 9);
    transition: all 0.3s ease;
}

.forum-delete-btn a {
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: inline-block;
}

.forum-delete-btn a:hover {
    color: #fff;
    background-color: rgb(119, 9, 9);
    cursor: pointer;
}


/* Styles de base */
.forum-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
    background-size: cover;
    background-position: center;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 80px;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Layout principal */
.box-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 30px 5%;
}

.categories-container {
    flex: 1;
    min-width: 0;
}

.forum-sidebar {
    width: 300px;
}

/* Barre d'actions */
.forum-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-bar {
    display: flex;
    flex: 1;
    min-width: 250px;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-bar button {
    padding: 0 20px;
    background-color: var(--orange-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: var(--green-color);
}

.btn-new-topic {
    padding: 12px 25px;
    background-color: var(--green-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-new-topic:hover {
    background-color: var(--orange-color);
    transform: translateY(-2px);
}

/* Catégories et sujets */
.forum-category {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.category-header {
    background-color: var(--black-blue-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-card {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.topic-card:hover {
    background-color: var(--gray-light-color);
}

.topic-icon {
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5px;
    color: var(--orange-color);
}

.topic-content {
    flex: 1;
    padding: 0 15px;
}

.topic-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.topic-content h3 a {
    color: var(--black-blue-color);
    text-decoration: none;
}

.topic-content h3 a:hover {
    text-decoration: underline;
}

.topic-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
}

.topic-activity {
    width: 150px;
    text-align: right;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-bottom: 5px;
    background-color: var(--light-green, #e0f7ec);
    color: var(--green, #2e7d32);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Sidebar */
.sidebar-widget {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--black-blue-color);
    border-bottom: 2px solid var(--orange-color);
    padding-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.stat-item i {
    color: var(--orange-color);
}

.active-users {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.active-users .user {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
}

.active-users .user-avatar {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
}

.rules-list {
    list-style: none;
}

.rules-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-list i {
    color: var(--green-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover {
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    padding: 12px 25px;
    background-color: var(--green-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-submit:hover {
    background-color: var(--orange-color);
}

/* Forum Topic */
.box-container-forum-detail {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px 10%;
    margin-top: 30px;
}

.topic-detail-header {
    background-size: cover;
    background-position: center;
    color: white;
    padding: 8rem;
    border-radius: 10px;
    height: 30vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.topic-detail-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.topic-top-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.topic-categorie {
    background-color: var(--orange-color-bold);
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.topic-detail-subject {
    font-size: 2rem;
    font-weight: 600;
    margin: 10px 0;
}

.topic-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: var(--shadow);
}

.topic-detail-box {
    width: 100%;
}

.topic-detail-sujet,
.topic-response {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.topic-response:hover {
    border-left: 3px solid var(--orange-color-bold);
    transform: translateX(10px);
}

.topic-detail-sujet-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.share-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light-color);
}

.topic-detail-response h2,
.reply-form h2 {
    font-size: 1.5rem;
    color: var(--black-blue-color);
    margin-bottom: 20px;
}

.topic-response-user {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.response-content p {
    margin-bottom: 10px;
}

.response-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.reply-form .form-group {
    margin-bottom: 15px;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
}

.reply-form .form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-form button {
    background-color: var(--orange-color-bold);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 992px) {
    .forum-sidebar {
        width: 100%;
        order: -1;
    }
}

@media (max-width: 768px) {
    .forum-hero {
        height: 250px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .topic-card {
        flex-direction: column;
    }

    .topic-activity {
        width: 100%;
        text-align: left;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed #ddd;
    }

    /**/
    .topic-detail-subject {
        font-size: 1.5rem;
        text-align: center;
    }

    .topic-top-info {
        justify-content: center;
        font-size: 0.85rem;
    }

    .topic-user-info {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .forum-actions {
        flex-direction: column;
    }

    .search-bar {
        width: 100%;
    }

    .btn-new-topic {
        width: 100%;
        justify-content: center;
    }

    .topic-meta {
        flex-direction: column;
        gap: 5px;
    }

    /**/
    .topic-detail-header {
        padding: 20px 10px;
    }

    .topic-detail-subject {
        font-size: 1.3rem;
    }

    .user-avatar {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .topic-top-info {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
}

