/* PLC Forge & Games - Forum Stylesheet */

/* Variables de couleurs reprises du thème principal */
:root {
    /* Palette principale - Thème de flamme */
    --primary-color: #e63900;    /* Rouge feu plus profond */
    --secondary-color: #ff7700;   /* Orange flamme vif */
    --accent-color: #ffb700;      /* Jaune doré */
    --dark-color: #2a2a2a;        /* Noir charbon */
    --light-color: #f8f4e8;       /* Blanc cassé chaud */
    --danger-color: #cc2936;      /* Rouge danger ajusté */
    --success-color: #2a9d4a;     /* Vert succès ajusté */
    
    /* Couleurs pour effets pixel art */
    --pixel-red: #e63900;         /* Aligné avec primary */
    --pixel-orange: #ff7700;      /* Aligné avec secondary */
    --pixel-yellow: #ffb700;      /* Aligné avec accent */
    --pixel-dark: #1a1a1a;        /* Noir plus profond pour contraste */
    --pixel-light: #fff8e8;       /* Blanc chaud pour pixel art */
    
    /* Couleurs additionnelles pour dégradés */
    --flame-dark: #992600;        /* Rouge foncé pour dégradés profonds */
    --flame-highlight: #ffcc55;   /* Jaune clair pour effets de brillance */
}

/* Styles spécifiques à la page d'accueil du forum */

/* Bannière d'accueil */
.forum-hero {
    background: linear-gradient(135deg, var(--dark-color), #3a3a3a);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    border-top: 4px solid var(--secondary-color);
    border-bottom: 4px solid var(--secondary-color);
}

/* Particules animées pour l'effet de flamme */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
    animation: float-up 8s linear infinite;
    image-rendering: pixelated;
    box-shadow: 0 0 5px var(--accent-color);
}

@keyframes float-up {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100px) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

.forum-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 0h4v4H0V0zm8 0h4v4H8V0zm8 0h4v4h-4V0zm-16 8h4v4H0V8zm8 0h4v4H8V8zm8 0h4v4h-4V8zm-16 8h4v4H0v-4zm8 0h4v4H8v-4zm8 0h4v4h-4v-4z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
    image-rendering: pixelated;
}

.forum-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--light-color);
}

/* Ajout d'une ligne pixelisée animée en bas de la section hero, comme dans forum-stats */
.forum-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: repeating-linear-gradient(to right, var(--primary-color), var(--secondary-color) 20px, var(--accent-color) 20px, var(--accent-color) 40px);
    opacity: 0.5;
    animation: pixel-slide 10s linear infinite;
    image-rendering: pixelated;
}

.forum-hero h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 var(--flame-dark);
    animation: text-flicker 3s infinite alternate;
}

.forum-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    text-shadow: 2px 2px 0 var(--flame-dark);
}

/* Animation de flamme pour le texte */
@keyframes text-flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 1;
        text-shadow: 4px 4px 0 var(--flame-dark),
                   -2px -2px 0 var(--flame-dark),
                   0 0 8px var(--secondary-color),
                   0 0 12px var(--accent-color);
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.8;
        text-shadow: none;
    }
}

/* Sections du forum */
.forum-sections {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Style du lien entourant les cartes de catégorie */
.forum-sections a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: all 0.3s ease;
}

.forum-sections a:hover {
    transform: translateY(-5px) translateX(-5px);
}

.forum-section {
    background-color: var(--light-color);
    border: 4px solid transparent;
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h8v1H0V0zm0 7h8v1H0V7zm0-1h1v1H0V6zm7 0h1v1H7V6zM0 1h1v5H0V1zm7 0h1v5H7V1z' fill='%23ff7700'/%3E%3C/svg%3E") 2 stretch;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
    image-rendering: pixelated;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.forum-sections a:hover .forum-section {
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.2);
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h8v1H0V0zm0 7h8v1H0V7zm0-1h1v1H0V6zm7 0h1v1H7V6zM0 1h1v5H0V1zm7 0h1v5H7V1z' fill='%23ffcc00'/%3E%3C/svg%3E") 2 stretch;
}

.forum-section-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: inline-block;
    background: var(--light-color);
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 0;
    border: 2px solid var(--primary-color);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.forum-sections a:hover .forum-section-icon {
    transform: scale(1.1);
}

.forum-section h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.forum-sections a:hover .forum-section h3 {
    color: var(--secondary-color);
}

.forum-section p {
    color: var(--dark-color);
    margin-bottom: 15px;
    flex-grow: 1;
    min-height: 60px; /* Hauteur minimale pour le texte */
}

.forum-section-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--dark-color);
    border-top: 2px dashed var(--secondary-color);
    padding-top: 10px;
    margin-top: auto; /* Pousse les stats en bas de la carte */
    width: 100%;
}

/* Statistiques du forum */
.forum-stats {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--dark-color), #3a3a3a);
    border-top: 4px solid var(--secondary-color);
    border-bottom: 4px solid var(--secondary-color);
    color: var(--light-color);
    text-align: center;
    position: relative;
}

.forum-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 0h4v4H0V0zm8 0h4v4H8V0zm8 0h4v4h-4V0zm-16 8h4v4H0V8zm8 0h4v4H8V8zm8 0h4v4h-4V8zm-16 8h4v4H0v-4zm8 0h4v4H8v-4zm8 0h4v4h-4v-4z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
    image-rendering: pixelated;
}

.forum-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

.forum-stat {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--secondary-color);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.forum-stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-family: 'Press Start 2P', cursive;
}

.forum-stat-label {
    font-size: 1rem;
    color: var(--light-color);
    text-transform: uppercase;
}

/* Dernières discussions */
.latest-discussions {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.latest-discussions h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.discussion-list {
    list-style: none;
    padding: 0;
}

/* Style du lien entourant les cartes de catégorie */
.discussion-list a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: all 0.3s ease;
}

.discussion-item {
    background-color: var(--light-color);
    margin-bottom: 15px;
    padding: 15px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.discussion-item:hover {
    transform: translateX(5px);
    border-left-color: var(--primary-color);
}

.discussion-avatar {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    border-radius: 0;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-color);
    font-size: 1.5rem;
    border: 2px solid var(--dark-color);
}

.discussion-content {
    flex: 1;
}

.discussion-title {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.discussion-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--dark-color);
}

/* Bouton d'action */
.action-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 25px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.2s steps(2);
    position: relative;
    overflow: hidden;
    text-align: center;
    margin-top: 20px;
}

.action-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px) translateX(-2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
}

.action-button:active {
    transform: translateY(2px) translateX(2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* Transitions entre sections */
.section-transition {
    height: 40px;
    position: relative;
    z-index: 10;
    overflow: hidden;
    margin: 40px 0;
}

.section-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--light-color) 0%, var(--dark-color) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 50%, 75% 60%, 50% 50%, 25% 60%, 0 50%);
    z-index: 1;
    image-rendering: pixelated;
}

.section-transition::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: repeating-linear-gradient(to right, var(--primary-color), var(--secondary-color) 20px, var(--accent-color) 20px, var(--accent-color) 40px);
    opacity: 0.5;
    animation: pixel-slide 10s linear infinite;
    image-rendering: pixelated;
}

@keyframes pixel-slide {
    0% { background-position: 0 0; }
    100% { background-position: 100px 0; }
}

/* Message pour liste de discussions vide */
.empty-discussions-container {
    background-color: var(--light-color);
    margin-bottom: 15px;
    padding: 30px;
    border: 4px solid transparent;
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h8v1H0V0zm0 7h8v1H0V7zm0-1h1v1H0V6zm7 0h1v1H7V6zM0 1h1v5H0V1zm7 0h1v5H7V1z' fill='%23ff7700'/%3E%3C/svg%3E") 2 stretch;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
    image-rendering: pixelated;
    text-align: center;
}

.empty-discussions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.empty-discussions-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: inline-block;
    background: var(--light-color);
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border: 3px solid var(--secondary-color);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.empty-discussions h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.empty-discussions p {
    color: var(--dark-color);
    margin-bottom: 20px;
    max-width: 500px;
}

.pixel-character {
    width: 64px;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Crect x='24' y='8' width='16' height='16' fill='%23ff7700'/%3E%3Crect x='16' y='16' width='8' height='8' fill='%23ff7700'/%3E%3Crect x='40' y='16' width='8' height='8' fill='%23ff7700'/%3E%3Crect x='16' y='24' width='32' height='8' fill='%23ff7700'/%3E%3Crect x='16' y='32' width='8' height='8' fill='%23ff7700'/%3E%3Crect x='40' y='32' width='8' height='8' fill='%23ff7700'/%3E%3Crect x='24' y='40' width='16' height='8' fill='%23ff7700'/%3E%3Crect x='16' y='48' width='8' height='8' fill='%23ff7700'/%3E%3Crect x='40' y='48' width='8' height='8' fill='%23ff7700'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    margin-top: 10px;
    image-rendering: pixelated;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* Styles pour l'en-tête de catégorie */
.category-header {
    background: linear-gradient(135deg, var(--dark-color), #3a3a3a);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    border-top: 4px solid var(--secondary-color);
    border-bottom: 4px solid var(--secondary-color);
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 0h4v4H0V0zm8 0h4v4H8V0zm8 0h4v4h-4V0zm-16 8h4v4H0V8zm8 0h4v4H8V8zm8 0h4v4h-4V8zm-16 8h4v4H0v-4zm8 0h4v4H8v-4zm8 0h4v4h-4v-4z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
    image-rendering: pixelated;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: repeating-linear-gradient(to right, var(--primary-color), var(--secondary-color) 20px, var(--accent-color) 20px, var(--accent-color) 40px);
    opacity: 0.5;
    image-rendering: pixelated;
}

.category-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    display: inline-block;
    background: var(--light-color);
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    border: 3px solid var(--primary-color);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
}

.category-header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: var(--light-color);
    text-shadow: 4px 4px 0 var(--flame-dark);
    margin: 0;
}

.category-description {
    color: var(--light-color);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 0 var(--flame-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .forum-hero h1 {
        font-size: 1.8rem;
    }
    
    .forum-hero p {
        font-size: 1rem;
    }
    
    .forum-sections {
        grid-template-columns: 1fr;
    }
    
    .forum-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .discussion-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .discussion-avatar {
        margin-bottom: 10px;
    }
    
    .empty-discussions h3 {
        font-size: 1rem;
    }
    
    .category-header h1 {
        font-size: 1.5rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.8rem;
        margin-right: 15px;
    }
    
    .category-description {
        font-size: 1rem;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .forum-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Badge résolu pour les topics */
.topic-resolved-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 8px;
    background-color: var(--success-color);
    color: var(--light-color);
    font-size: 0.7rem;
    border-radius: 0; /* Style pixelisé sans arrondi */
    vertical-align: middle;
    position: relative;
    top: -2px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
    border: 1px solid #1a7a38; /* Bordure plus foncée */
    font-family: 'Press Start 2P', cursive;
    animation: badge-pulse 2s infinite alternate;
}

.topic-resolved-badge i {
    margin-right: 4px;
    font-size: 0.7rem;
}

@keyframes badge-pulse {
    0% {
        box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    }
    100% {
        box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2), 0 0 8px var(--success-color);
    }
}