/* style.css */

/* --- Variables et Reset --- */
:root {
    --bg-color: #0b0f19;
    --primary-text-color: #e0e7ff;
    --secondary-text-color: #a0a8c2;
    --accent-color: #ff9a28; /* Orange jupitérien */
    --surface-color: #1a2035;
    --border-color: #2a314e;
    --font-title: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    font-family: var(--font-body);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Typographie --- */
h1, h2, h3, h4 {
    font-family: var(--font-title);
    color: var(--accent-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; border-bottom: 2px solid var(--accent-color); padding-bottom: 0.5rem; }
h3 { font-size: 1.5rem; color: var(--primary-text-color); }
p { margin-bottom: 1rem; color: var(--secondary-text-color); }
a { color: var(--accent-color); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary-text-color); }
ul { list-style: none; margin-left: 20px; }
li { margin-bottom: 0.5rem; }
ul li::before { content: '»'; color: var(--accent-color); margin-right: 10px; }

/* --- Header --- */
.site-header {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
}
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
}
.main-nav li { margin: 0 0 0 1.5rem; }
.main-nav a { font-weight: 700; }
.main-nav a.active { color: #fff; border-bottom: 2px solid #fff; }

/* --- Layout Principal --- */
.page-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding: 40px 20px;
}
.sidebar {
    position: sticky;
    top: 100px; /* hauteur du header + marge */
    align-self: start;
}
.sidebar-widget {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.sidebar-widget h3 { margin-top: 0; }
.sidebar-widget ul { margin-left: 0; }
.sidebar-widget li::before { content: '›'; }

/* --- Contenu Principal --- */
.content-section {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.intro-block {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 1.5rem;
}
.intro-image img {
    width: 400px;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.intro-ad {
    width: 336px;
    height: 280px;
    background-color: var(--surface-color); /* Fallback si la pub ne charge pas */
}

.article-meta {
  border-top: 1px solid #ccc; /* Ajoute une fine ligne grise au-dessus */
  padding-top: 10px;           /* Espace entre la ligne et le texte */
  margin-top: 30px;            /* Espace au-dessus de la ligne */
  font-size: 0.85em;           /* Texte encore un peu plus petit */
  color: #666;                  /* Gris moyen */
}

/* style.css */

/* ... TOUT LE CSS PRÉCÉDENT ... */


/* --- NOUVEAU: FAQ Section --- */
.faq-container details {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: background-color 0.3s;
}

.faq-container details[open] {
    background-color: #212842; /* Légèrement plus clair quand ouvert */
}

.faq-container summary {
    font-weight: 700;
    color: var(--primary-text-color);
    padding: 1rem;
    cursor: pointer;
    outline: none; /* Enlève le focus disgracieux */
    list-style: none; /* Cache le marqueur par défaut sur certains navigateurs */
    position: relative;
}

/* Style custom pour la flèche (icône) */
.faq-container summary::after {
    content: '+';
    color: var(--accent-color);
    font-size: 1.5rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease-in-out;
}

.faq-container details[open] summary::after {
    content: '−'; /* Change en signe moins quand c'est ouvert */
    transform: translateY(-50%) rotate(180deg);
}

/* Cache le marqueur par défaut sur tous les navigateurs */
.faq-container summary::-webkit-details-marker {
    display: none;
}

.faq-container details p {
    padding: 0 1rem 1rem 1rem;
    margin: 0;
    border-top: 1px solid var(--border-color);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--surface-color);
    color: var(--secondary-text-color);
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-widget em {
    color: var(--primary-text-color);
    font-family: var(--font-title);
}
.footer-widget ul, .footer-widget .social-link { margin-left: 0; display: block; }
.footer-widget li::before { content: ''; margin: 0; }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* --- Bouton "Back to Top" --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none; /* Caché par défaut */
    z-index: 100;
    transition: opacity 0.3s, transform 0.3s;
}
#back-to-top:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr; /* Le sidebar passe au-dessus du contenu */
    }
    .sidebar {
        position: static;
        margin-bottom: 40px;
    }
}
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .intro-block {
        flex-direction: column;
    }
    .intro-image img, .intro-ad {
        width: 100%;
    }
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0 1rem;
    }
}