/* ========== CSS VARIABLES ========== */
:root {
    --color-primary: #314E9F;
    --color-navbar: #314E9F;
    --color-text: #333;
    --color-white: white;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --font-body: Verdana, Geneva, sans-serif;
    --font-heading: Georgia, serif;
    --container-max-width: 800px;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.7;
    background-color: var(--color-white);
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: normal;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
}

h3 {
    font-size: 1.2rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    font-style: italic;
}

p {
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

strong {
    font-weight: 600;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========== LAYOUT ========== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ========== HEADER ========== */
header {
    background-color: var(--color-navbar);
    padding: var(--spacing-md) 0 var(--spacing-sm) 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .container {
    text-align: center;
}

.logo {
    width: 100px;
    height: auto;
    margin-bottom: var(--spacing-md);
}

/* ========== NAVIGATION ========== */
nav.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.3s ease;
    padding-bottom: 0.3rem;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-menu a.active {
    border-bottom: 2px solid var(--color-white);
}

/* Burger menu (hidden on desktop) */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.burger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    margin: 3px 0;
    transition: 0.3s;
}

/* Mobile overlay menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-navbar);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-menu-overlay.active {
    display: flex;
}

.mobile-nav-menu {
    list-style: none;
    text-align: center;
}

.mobile-nav-menu li {
    margin: var(--spacing-lg) 0;
}

.mobile-nav-menu a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 1.5rem;
    transition: opacity 0.3s ease;
}

.mobile-nav-menu a:hover {
    opacity: 0.8;
}

.close-menu {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    padding: var(--spacing-sm) 0;
    font-size: 0.75rem;
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--color-text);
    margin: 0 0.5rem;
}

.breadcrumb .current {
    color: var(--color-text);
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-portrait {
    object-position: center 25%;
}

.hero-image-bottom {
    object-position: center bottom;
}

.hero-image-top {
    object-position: center top;
}

/* Hero content container - pour les héros avec contenu structuré */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    padding: 0 2rem;
    max-width: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Hero date - affichée en haut */
.hero-date {
    color: #FFA500;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* Hero title - dans hero-content ou seul */
.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: normal;
    line-height: 1.3;
    z-index: 2;
    padding: 0 2rem;
    max-width: 1000px;
    width: 100%;
}

/* Hero title dans hero-content */
.hero-content .hero-title {
    position: static;
    transform: none;
    padding: 0;
    margin: 0;
}

/* Hero subtitle - ligne d'informations sous le titre */
.hero-subtitle {
    color: var(--color-white);
    font-size: 1.1rem;
    line-height: 1.6;
}

.hero-subtitle a {
    color: #FFA500;
    text-decoration: none;
    font-weight: 600;
}

.hero-subtitle a:hover {
    text-decoration: underline;
}

/* Hero info - texte informatif en bas */
.hero-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    color: var(--color-white);
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.5;
    text-align: center;
    z-index: 2;
}

/* ========== ARTICLE CONTENT ========== */
article {
    background-color: var(--color-white);
    padding: var(--spacing-xl) 0;
}

.intro {
    font-size: 1.75rem;
    color: var(--color-primary);
    text-align: left;
    margin-bottom: var(--spacing-md);
    padding: 0;
    font-family: var(--font-heading);
    line-height: 1.4;
}

.content-section {
    margin-bottom: var(--spacing-xl);
}

.content-section p {
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
}

/* ========== SUBTITLES (BODY TEXT BOLD from DOCX) ========== */
.content-section h3.subtitle {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.8;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

/* ========== IMAGES ========== */
.article-image {
    width: 100%;
    height: auto;
    margin: var(--spacing-md) 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ========== FOOTER ========== */
footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-lg) 0;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========== STYLES PAGES ARTICLES ========== */
/* Pour les pages articles individuelles avec hero */
body.article-page header {
    background-color: transparent;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

body.article-page header .logo {
    width: 150px;
}

/* Gradient sombre sous le header pour rendre le logo visible */
body.article-page header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

/* Breadcrumb avec moins d'espace en dessous */
body.article-page .breadcrumb {
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

/* Réduire l'espace au-dessus de l'intro */
body.article-page .intro {
    margin-top: 0;
}

/* Équilibrer l'espace autour des images */
body.article-page .article-image {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Caption sous les images : collé à l'image */
.article-image + .caption {
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

/* Supprimer les marges des sections de contenu pour contrôler l'espace */
body.article-page .content-section {
    margin-bottom: 0;
}

body.article-page .intro {
    margin-bottom: 1.5rem;
}

/* Footer blanc pour les pages articles */
body.article-page footer {
    background-color: white;
    color: var(--color-text);
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* ========== STYLES PAGE LISTE ARTICLES ========== */
body.articles-list header {
    background-color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

body.articles-list header .logo {
    margin-bottom: 0;
}

body.articles-list footer {
    background-color: white;
    color: var(--color-text);
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .hero {
        height: 350px;
    }

    .hero-title {
        font-size: 2rem;
        padding: 0 var(--spacing-sm);
        top: 60%;
    }

    .hero-content {
        gap: 1rem;
    }

    .hero-date {
        font-size: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-info {
        font-size: 0.85rem;
        padding: 1rem 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .intro {
        font-size: 1.25rem;
        padding: var(--spacing-md) 0;
    }

    /* Ajustements mobile pour les pages articles */
    body.article-page .intro {
        padding: 0;
        font-size: 1.5rem;
    }

    /* Navigation mobile */
    .nav-menu {
        display: none;
    }

    .burger {
        display: flex;
        position: absolute;
        top: var(--spacing-md);
        right: var(--spacing-md);
    }

    .logo {
        margin-bottom: 0;
    }

    header {
        padding: var(--spacing-md) 0;
        position: relative;
    }
}
