/* --- Global Styles & Fonts --- */
:root {
    --primary-blue: #005A9C;      /* Un bleu fort et professionnel */
    --light-blue-bg: #F0F8FF;     /* Couleur de fond légère */
    --dark-blue-header: #0d2c4a;   /* Couleur foncée pour header et footer */
    --text-color: #333;           /* Couleur principale du texte */
    --white-color: #FFFFFF;        /* Blanc */
    --accent-red: #CE1126;        /* Rouge d'accentuation */
    --footer-text-color: #d1e3f3; /* Couleur du texte dans le footer */
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--light-blue-bg);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1; /* Permet au contenu principal de pousser le footer vers le bas */
}

h1, h2, h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--primary-blue);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-red);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Styles pour le bloc publicitaire personnalisé */
.custom-ad-placement {
    width: 340px;
    height: 280px;
    margin: 40px auto;
    border: 2px solid #00C8C8; /* primary-flashy */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    background-color: #FFFFFF; /* white */

    flex-shrink: 0;
    flex-grow: 0;
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-button {
    background-color: #FFB347 !important; /* secondary-flashy avec !important */
    color: #FFFFFF; /* white */
    border: none;
    padding: 8px 15px; /* Réduction du padding pour mieux s'adapter */
    border-radius: 8px;
    font-size: 0.95em; /* Légère réduction de la taille de police */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;

    position: absolute;
    bottom: 15px; /* Ajustement de la position pour qu'il soit plus bas */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    white-space: nowrap; /* Empêche le texte du bouton de passer à la ligne */
}

.ad-button:hover {
    background-color: #FFC06F !important; /* Un orange plus clair (avec !important) */
    transform: translateX(-55%) translateY(-2px); /* Centrage + léger effet de soulèvement */
}


/* --- Header --- */
.site-header {
    background-color: var(--dark-blue-header);
    padding: 10px 5%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    color: var(--white-color);
    font-size: 1.5em;
    font-weight: bold;
}

.logo-image {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid var(--white-color);
}

.main-nav a {
    color: var(--white-color);
    margin-left: 20px;
    font-size: 1.1em;
}

.main-nav a.nav-button {
    background-color: var(--primary-blue);
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.main-nav a.nav-button:hover {
    background-color: var(--accent-red);
    color: var(--white-color);
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    color: var(--white-color);
    background-color: var(--dark-blue-header); 
    padding: 40px 20px; 
    border-radius: 8px;
    max-width: 1400px; 
    margin: 40px auto 0 auto; /* Espace sous le header */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.hero-image {
   display: none;
}

.hero-text {
    position: static;
    transform: none;
    background: none;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.hero h1 {
    font-size: 3em;
    margin: 0;
    color: var(--white-color);
}

.hero p {
    font-size: 1.2em;
    margin: 10px 0 0;
    opacity: 0.9;
}

/* --- Section Image & Publicité --- */
.intro-feature-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; 
    gap: 30px;
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-image, .feature-ad {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background-color: #e9ecef;
}

.feature-image {
    width: 400px;
    height: 280px;
}
.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-ad {
    width: 338px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Mise en Page Principale --- */
.main-content-area {
    display: flex;
    gap: 30px;
    padding: 0 5% 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.content-column {
    flex: 3;
}

.sidebar-column {
    flex: 1;
}

/* --- Blocs de Contenu --- */
.intro-text, .explore-section, .flags-list, .faq-section {
    background-color: var(--white-color);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.intro-text p {
    font-size: 1.1em;
}

.article-meta {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #666;
}

/* ================================================= */
/*  STYLE CORRIGÉ ET NETTOYÉ POUR SECTION EXPLORER   */
/* ================================================= */
.explore-section h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    font-family: 'Oswald', sans-serif;
    color: #0d2c4a;
}

.color-grid {
    display: grid;
    /* Crée une grille responsive qui s'adapte à la largeur de l'écran. C'est la magie de auto-fit. */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.color-grid .explore-btn {
    display: block; 
    background-color: #c0392b; /* Rouge */
    color: white !important; /* Force la couleur du texte à rester blanche */
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease-in-out;
    border: none;
}

.color-grid .explore-btn:hover {
    background-color: #a93226;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Liste des Drapeaux --- */
.flags-list h2 {
    text-align: center;
    font-size: 2.2em;
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 10px;
    margin-bottom: 30px;
}
.flag-entry {
   margin-bottom: 40px;
   opacity: 0; /* Pour l'animation JS */
   transform: translateY(30px);
   transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.flag-entry.visible { /* Classe ajoutée par JS */
    opacity: 1;
    transform: translateY(0);
}
.flag-entry h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
}
.flag-container {
    width: 100%;
    max-width: 450px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- FAQ SECTION --- */
.faq-entry {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}
.faq-entry:last-child {
    border-bottom: none;
}
.faq-entry h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

/* --- Barre Latérale & Pubs --- */
.ad-placeholder {
    background-color: #f9f9f9;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #999;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-blue-header);
    color: var(--footer-text-color);
    padding: 50px 5% 20px;
    margin-top: auto;
}

.footer-container, .header-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    text-align: left;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 220px;
}

.footer-column h4 {
    color: var(--white-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-blue);
}

.footer-column.about p {
    font-size: 0.95em;
    line-height: 1.7;
}

.footer-column.links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column.links li {
    margin-bottom: 10px;
}

.footer-column.links a {
    color: var(--footer-text-color);
    transition: all 0.3s;
}

.footer-column.links a:hover {
    color: var(--white-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2a4a6a;
    font-size: 0.9em;
    color: #a9c1d8;
}

/* --- Bouton Scroll-to-Top & Header Scrolled --- */
.scroll-top-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-blue);
    color: var(--white-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.3s;
}

.scroll-top-button.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-button:hover {
    background-color: var(--accent-red);
    color: var(--white-color);
}

.site-header.scrolled {
    background-color: rgba(13, 44, 74, 0.95);
    padding-top: 5px;
    padding-bottom: 5px;
    backdrop-filter: blur(5px);
    transition: padding 0.3s, background-color 0.3s;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-content-area {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav {
        width: 100%;
        display: flex;
        justify-content: space-around;
        margin-left: 0;
    }
    .main-nav a {
        margin-left: 0;
    }
    .hero h1 {
        font-size: 2.2em;
    }
    .hero p {
        font-size: 1em;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
}