/* --- Variables de Couleur & Thème --- */
:root {
    /* Palette Modern Gamer Redjio (Dark & Futuristic) */
    --color-bg: #0f0f13;       /* Fond profond */
    --color-surface: #14141a;  /* Surface légèrement plus claire */
    --color-surface-hover: #1c1c24;
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0b0;

    /* Accents - Redjio Orange & Red */
    --color-accent: #FF6B00;   /* Orange Redjio */
    --color-accent-dim: #994000;
    --color-highlight: #ff0000; /* Rouge Vif */
    --color-glow: rgba(255, 107, 0, 0.6); /* Lueur Orange */
    --color-border-tech: rgba(255, 255, 255, 0.1);

    /* Glassmorphism */
    --glass-bg: rgba(15, 15, 20, 0.8);
    --glass-border: 1px solid rgba(255, 107, 0, 0.2);
    --glass-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    --backdrop-blur: blur(16px);

    /* Header */
    --header-bg: rgba(10, 10, 14, 0.9);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Rajdhani', 'Inter', sans-serif; /* Idée future: ajouter une police sci-fi */
}

/* --- Global Reset & Base --- */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    /* Background permanent */
    background-image: url('/images/background.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px rgba(255, 107, 0, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 0, 0.5); }
    100% { box-shadow: 0 0 10px rgba(255, 107, 0, 0.2); }
}

main {
    flex-grow: 1;
    padding: 3rem 0;
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    color: var(--color-text-primary);
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 { font-weight: 900; }
h2 { font-weight: 800; border-bottom: 2px solid var(--color-accent); display: inline-block; padding-bottom: 0.5rem; }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.3s ease;
}
a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Header Sticky & Glass --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-accent-dim);
    padding: 1rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title img {
    height: 50px;
    filter: drop-shadow(0 0 5px rgba(255,107,0,0.5));
    transition: transform 0.3s;
}
.site-title:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px var(--color-accent));
}

.site-header nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.site-header nav a {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-primary);
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
}
.site-header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}
.site-header nav a:hover::after {
    width: 100%;
}

/* --- Hero / Stream Layout (Command Center) --- */
.home-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Sidebar Links */
.sidebar-links {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}
.sidebar-links h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.social-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.social-links a {
    display: block;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid transparent;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.social-links a:hover {
    background: linear-gradient(90deg, rgba(255,107,0,0.1), transparent);
    border-left: 3px solid var(--color-accent);
    padding-left: 1.5rem;
    color: #fff;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

/* Stream Area "Command Center" */
.page-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px var(--color-glow);
    font-style: italic;
}

#stream-and-chat-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0; /* Gap handled by internal borders */
    background: #000;

    /* Futuristic Frame */
    border: 2px solid var(--color-surface);
    outline: 1px solid var(--color-accent);
    outline-offset: -5px;
    box-shadow: 0 0 50px rgba(255, 107, 0, 0.15);

    position: relative;
    z-index: 1;
}

/* Tech Decorators Corners */
#stream-and-chat-container::before, #stream-and-chat-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--color-accent);
    z-index: 2;
    transition: all 0.5s;
}
#stream-and-chat-container::before { top: -1px; left: -1px; clip-path: polygon(0 0, 100% 0, 0 100%); }
#stream-and-chat-container::after { bottom: -1px; right: -1px; clip-path: polygon(100% 100%, 0 100%, 100% 0); }

#stream-container {
    flex: 1 1 650px;
    aspect-ratio: 16 / 9;
    position: relative;
}
#chat-container {
    flex: 0 1 350px;
    min-height: 400px;
    border-left: 2px solid var(--color-surface);
    background: #0a0a0e;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- News Section (Holo Cards) --- */
.latest-news {
    margin-top: 5rem;
}
.latest-news h2 {
    text-align: left;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 5px solid var(--color-accent);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.news-card-wrapper {
    /* Container pour l'effet de bordure custom */
    position: relative;
    padding: 2px; /* Epaisseur bordure */
    background: linear-gradient(135deg, var(--color-accent) 0%, transparent 40%, transparent 60%, var(--color-highlight) 100%);
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.news-card-wrapper:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 10px var(--color-glow));
}

.news-card {
    display: block;
    position: relative;
    background: var(--color-surface);
    height: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%); /* Match parent */
    text-decoration: none;
}

.news-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}
.news-card:hover .news-card-bg {
    transform: scale(1.1);
}

.news-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.2));
}

.news-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}
.news-card-content h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
    color: #fff;
    text-transform: uppercase;
    font-weight: 800;
    -webkit-text-stroke: 1px var(--color-accent);
}

/* --- List View Styling (News & Events) --- */
.article-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--color-accent);
    padding: 1.5rem;
    border-radius: 4px;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.2);
}

.article-thumbnail {
    width: 300px;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/9;
    border: 1px solid var(--color-accent);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.article-item-content {
    flex: 1;
}

.article-item-content h2 {
    margin-top: 0;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    -webkit-text-stroke: 1px var(--color-accent);
    margin-bottom: 0.5rem;
}

.article-item-content h2 a {
    color: inherit;
    text-decoration: none;
}

.article-item-content h2 a:hover {
    color: #fff;
    text-shadow: 0 0 15px var(--color-accent);
}

.article-item-content small {
    display: block;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.article-item-content p {
    color: #ddd;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .article-item {
        flex-direction: column;
    }
    .article-thumbnail {
        width: 100%;
        max-width: none;
    }
}

/* Event Badge Tech Style */
.event-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-accent);
    color: #000;
    font-weight: 800;
    padding: 0.5rem 1.5rem;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
    text-transform: uppercase;
    font-size: 0.8rem;
    z-index: 5;
}

/* --- Footer --- */
.site-footer {
    background: #050508;
    border-top: 1px solid #1a1a2e;
    padding: 3rem 0;
    text-align: center;
    margin-top: 5rem;
    color: #555;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-links {
        display: none;
    }
    #chat-container {
        display: none; /* Cache le chat sur mobile/tablette pour focus stream */
    }
}

/* --- Cookie Consent Banner --- */
#cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--color-accent);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 107, 0, 0.2);
    padding: 1.5rem 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    color: var(--color-text-primary);
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

#cookie-consent-banner p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.cookie-buttons .btn {
    padding: 0.8rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

#accept-cookies {
    background: var(--color-accent);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}

#accept-cookies:hover {
    background: #fff;
    box-shadow: 0 0 25px var(--color-accent);
    transform: translateY(-2px);
}

#refuse-cookies {
    background: transparent;
    border: 1px solid var(--color-text-secondary);
    color: var(--color-text-secondary);
}

#refuse-cookies:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 600px) {
    #cookie-consent-banner {
        width: 95%;
        bottom: 10px;
        padding: 1rem;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-buttons .btn {
        width: 100%;
        max-width: none;
    }
}

/* --- News Article Content Styling (Fixed Mode) --- */
.article-content {
    font-family: var(--font-body, sans-serif);
    font-weight: 400;
    line-height: 1.6;
    font-size: 1.1rem;
    color: #e0e0e0; /* Readable light gray */
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--color-accent);
    margin: 1em 0;
}

.news-article {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}
