/**
 * Lowforehead Forum - Version 2.0 Additional Styles
 * À inclure APRÈS style.css dans le header
 */

/* ============================
   HEADER Z-INDEX FIX
============================ */

.site-header {
    position: relative;
    z-index: 9999;
}

/* Forcer le contenu principal à avoir un z-index inférieur */
.main-content,
.container,
.forum-header,
.categories-list,
.topic-view,
.posts-list,
.post-item {
    position: relative;
    z-index: 1;
}

/* S'assurer que le dropdown est AU-DESSUS de TOUT */
body {
    position: relative;
}

.notif-container {
    position: relative;
    z-index: 999999;
}

/* ============================
   NOTIFICATIONS
============================ */

.notif-container {
    margin-left: 15px;
}

.notif-bell {
    position: relative;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.notif-bell:hover {
    transform: scale(1.1);
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-red);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-dropdown {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 350px;
    background-color: var(--light-gray-card);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.notif-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    z-index: 999999 !important;
    position: fixed !important;
}

.notif-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notif-dropdown-header h4 {
    margin: 0;
    font-size: 16px;
}

.notif-dropdown-list {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item-mini {
    display: flex;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.notif-item-mini:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.notif-icon-mini {
    font-size: 20px;
}

.notif-content-mini {
    flex: 1;
    font-size: 14px;
    color: var(--font-color-secondary);
}

.notif-dropdown-footer {
    padding: 12px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.no-notifs {
    padding: 30px;
    text-align: center;
    color: var(--font-color-secondary);
    font-style: italic;
}

/* Page notifications */
.notifications-page {
    background-color: var(--light-gray-card);
    border-radius: var(--border-radius);
    padding: 30px;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.notifications-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--font-color-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.filter-btn:hover {
    color: var(--font-color-main);
}

.filter-btn.active {
    color: var(--accent-gray);
    border-bottom-color: var(--accent-gray);
}

.notification-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.notification-item.unread {
    background-color: rgba(66, 133, 244, 0.1);
    border-left: 4px solid var(--accent-blue);
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.notification-icon {
    font-size: 24px;
}

.notification-content {
    flex: 1;
}

.notification-text {
    margin-bottom: 5px;
}

.notification-meta {
    font-size: 12px;
    color: var(--font-color-secondary);
}

/* ============================
   RECHERCHE
============================ */

.search-mini {
    display: flex;
    gap: 5px;
    align-items: center;
}

.search-input-mini {
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--font-color-main);
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input-mini:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-gray);
    width: 250px;
}

.btn-search {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.btn-search:hover {
    transform: scale(1.1);
}

/* Bouton recherche mobile */
.search-mobile-btn {
    display: none; /* Caché sur desktop par défaut */
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    margin-left: 15px;
}

.search-mobile-btn:hover {
    transform: scale(1.1);
}

.search-icon {
    display: inline-block;
}

/* Page de recherche */
.search-page {
    background-color: var(--light-gray-card);
    border-radius: var(--border-radius);
    padding: 30px;
}

.search-form-container {
    margin-bottom: 40px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--font-color-main);
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gray);
}

.search-filters {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.result-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.result-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.result-header {
    margin-bottom: 10px;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-gray);
}

.result-category {
    font-size: 13px;
    color: var(--font-color-secondary);
    margin-left: 10px;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--font-color-secondary);
}

.result-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.result-excerpt {
    line-height: 1.6;
}

mark {
    background-color: var(--accent-yellow);
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.search-help {
    padding: 40px;
    text-align: center;
    color: var(--font-color-secondary);
}

.search-help h3 {
    margin-bottom: 20px;
}

.search-help ul {
    list-style: none;
    padding: 0;
}

.search-help li {
    padding: 10px 0;
}

/* ============================
   LIKES
============================ */

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 15px;
}

.post-likes {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-like {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--font-color-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-like:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-gray);
}

.btn-like.liked {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.like-count {
    font-size: 14px;
    color: var(--font-color-secondary);
}

.post-actions-inline {
    display: flex;
    gap: 15px;
}

/* ============================
   SIGNATURES
============================ */

.post-signature {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-style: italic;
    color: var(--font-color-secondary);
}

.signature-content {
    font-size: 13px;
    font-style: italic;
    color: var(--font-color-secondary);
    line-height: 1.4;
}

/* ============================
   BBCODE / QUOTES
============================ */

.quote {
    background-color: #252525;
    border-left: 4px solid var(--accent-gray);
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
}

.quote-author {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-gray);
    margin-bottom: 10px;
}

.quote-content {
    font-style: italic;
    color: var(--font-color-secondary);
}

.code-block {
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.code-block code {
    color: #00ff00;
}

.mention {
    color: var(--accent-blue);
    font-weight: 700;
}

/* ============================
   PAGINATION
============================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 30px 0;
}

.page-link {
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--font-color-main);
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover:not(.disabled):not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-gray);
}

.page-link.active {
    background-color: var(--accent-gray);
    color: var(--dark-gray-bg);
    border-color: var(--accent-gray);
}

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

/* ============================
   PROFIL UTILISATEUR
============================ */

.profile-view {
    background-color: var(--light-gray-card);
    border-radius: var(--border-radius);
    padding: 30px;
}

.profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar-large {
    flex-shrink: 0;
}

.avatar-xl {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--accent-gray);
}

.profile-info h1 {
    margin-bottom: 10px;
}

.profile-meta {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-item {
    color: var(--font-color-secondary);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-gray);
    display: block;
    margin-bottom: 10px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--font-color-secondary);
}

.profile-signature-edit,
.profile-signature-display {
    margin-bottom: 40px;
    padding: 25px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.profile-recent-posts {
    margin-bottom: 30px;
}

.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-post-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    transition: background-color 0.3s ease;
}

.recent-post-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.recent-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.recent-post-title {
    font-weight: 600;
    color: var(--accent-gray);
}

.recent-post-date {
    font-size: 12px;
    color: var(--font-color-secondary);
}

.recent-post-category {
    font-size: 13px;
    color: var(--font-color-secondary);
    margin-bottom: 8px;
}

.recent-post-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--font-color-secondary);
}

/* ============================
   ADMIN LOGS
============================ */

.admin-logs-page {
    background-color: var(--light-gray-card);
    border-radius: var(--border-radius);
    padding: 30px;
}

.logs-filters {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
}

.action-badge {
    padding: 4px 12px;
    background-color: rgba(66, 133, 244, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-blue);
}

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

/* ============================
   FORUM STATISTICS
============================ */

.forum-stats {
    margin: 40px 0;
    padding: 25px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stats-container .stat-item {
    text-align: center;
    color: var(--font-color-secondary);
    font-size: 14px;
}

.stats-container .stat-item strong {
    color: var(--accent-gray);
    font-weight: 700;
}

/* ============================
   ANIMATIONS
============================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item,
.result-item,
.recent-post-item {
    animation: fadeIn 0.3s ease;
}

/* Loading spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-gray);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================
   FORM HINTS
============================ */

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--font-color-secondary);
    font-style: italic;
}

.success-message {
    background-color: rgba(52, 168, 83, 0.2);
    border: 1px solid var(--accent-green);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: var(--accent-green);
    font-weight: 600;
}

/* ============================
   RESPONSIVE DESIGN
============================ */

/* DESKTOP SMALL - 950px */
@media (max-width: 950px) {
    .notif-dropdown {
        width: 320px;
    }

    .search-input-mini {
        min-width: 150px;
    }
}

/* TABLETTES - 768px */
@media (max-width: 768px) {
    /* Notifications dropdown - adapté tablette */
    .notif-dropdown {
        width: 90vw;
        max-width: 350px;
        right: 5%;
        top: 80px;
    }

    /* Recherche - cacher la mini barre, afficher le bouton mobile */
    .search-mini {
        display: none;
    }

    .search-mobile-btn {
        display: inline-block;
    }

    .search-input-group {
        flex-direction: column;
    }

    .search-filters {
        flex-direction: column;
    }

    /* Profil */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .avatar-xl {
        width: 100px;
        height: 100px;
    }

    /* Likes et actions */
    .post-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .post-actions-inline {
        flex-wrap: wrap;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }

    .page-link {
        padding: 6px 10px;
        font-size: 14px;
    }

    /* Stats forum */
    .stats-container {
        flex-direction: column;
        gap: 10px;
    }

    .stat-item {
        text-align: center;
    }

    /* Logs filters */
    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }
}

/* SMARTPHONES - 480px */
@media (max-width: 480px) {
    /* Notifications - dropdown pleine largeur mobile */
    .notif-dropdown {
        top: 70px;
        left: 10px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 100%;
    }

    .notif-bell {
        font-size: 24px;
    }

    /* Recherche cachée sur mobile, bouton visible */
    .search-mini {
        display: none !important;
    }

    .search-mobile-btn {
        display: inline-block;
        font-size: 22px;
        margin-left: 0;
    }

    /* Likes et citations */
    .btn-like,
    .btn-text {
        font-size: 13px;
        padding: 6px 10px;
    }

    .like-count {
        font-size: 12px;
    }

    .post-footer {
        gap: 10px;
    }

    .post-actions-inline {
        gap: 8px;
    }

    /* Signatures */
    .post-signature {
        font-size: 11px;
        padding-top: 10px;
    }

    /* BBCode quotes */
    .quote {
        padding: 10px;
        margin: 10px 0;
    }

    .quote-author {
        font-size: 11px;
    }

    /* Pagination compacte */
    .pagination {
        gap: 3px;
    }

    .page-link {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 30px;
    }

    /* Stats forum compactes */
    .forum-stats {
        padding: 15px 10px;
        font-size: 13px;
    }

    .stats-container {
        gap: 8px;
    }

    .stat-item {
        font-size: 12px;
    }

    /* Search page */
    .search-page {
        padding: 15px;
    }

    .search-input {
        font-size: 14px;
        padding: 12px;
    }

    .result-item {
        padding: 15px;
    }

    .result-title {
        font-size: 16px;
    }

    .result-excerpt {
        font-size: 13px;
    }

    /* Notifications page */
    .notif-item {
        padding: 12px;
    }

    /* Mentions */
    .mention {
        font-size: 13px;
    }
}

/* ============================
   HOVER EFFECTS
============================ */

.user-avatar:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.category-card:hover,
.topic-item:hover,
.post-item:hover {
    transform: translateY(-2px);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ============================
   ADMIN QUICK LINKS
============================ */

.admin-quick-links {
    text-align: center;
    margin: 30px 0;
    padding: 20px 0;
}
