/* =================== VARIABLES GLOBALES =================== */
:root {
    --texte: #f6f8fa;
    --fond: #6291e9;
    --fond-menu: #163697;
    --section-bg: #6291e9;
    --h2-color: #1e48c5;
    --h1-font: 'Georgia', serif;
    --texte-font: Arial, sans-serif;
}

/* =================== RESET =================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--texte-font);
    font-size: 15px;
    color: var(--texte);
    background-color: var(--fond);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =================== HEADER =================== */
#header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* ---- HERO ---- */
.hero {
    height: 15vh;
    background: url("../images/fond.jpg") no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 24px rgba(30,44,84,0.18);
}

.hero h1 {
    color: var(--texte);
    font-size: 4rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-family: Impact, sans-serif;
}

.logo-hero {
    height: 80px;
    width: 80px;
    vertical-align: middle;
    margin-right: 18px;
}

/* ---- MENU ---- */
header {
    background-color: var(--fond-menu);
    width: 100%;
    text-align: center;
    padding: 15px 0;
    transition: all 0.3s ease;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    position: relative;
    margin: 0 15px;
}

nav ul li a {
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: var(--texte);
    text-decoration: none;
    font-weight: bold;
    padding: 10px;
    display: block;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #dcdcdc;
}

/* ---- Flèche pour les menus déroulants ---- */
nav ul li.menu-item-has-children .arrow {
    width: 8px;
    height: 8px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.3s ease;
}

nav ul li.menu-item-has-children.open .arrow {
    transform: translateY(-50%) rotate(135deg);
}

/* ---- Sous-menu ---- */
nav ul li .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1b3ba0;
    list-style-type: none;
    margin: 0;
    padding: 10px 0;
    border-radius: 4px;
    width: 200px;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 999;
}

nav ul li.open .sub-menu {
    display: block;
    opacity: 1;
}

nav ul li .sub-menu li a {
    padding: 8px 20px;
    color: white;
    display: block;
}

nav ul li .sub-menu li a:hover {
    background-color: #f0f0f0;
    color: black;
}

/* =================== MAIN =================== */
main {
    padding: 40px 20px;
    margin-top: 25vh;
    flex: 1;
}

main h2 {
    font-size: 2rem;
    color: var(--h2-color);
    font-family: var(--h1-font);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

main h3 {
    font-size: 1.3rem;
    color: #001c46;
    margin-top: 18px;
    margin-bottom: 8px;
    font-weight: bold;
}

main p {
    color: #2d3655;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* =================== CARDS POUR VEILLES =================== */
/* =================== CARDS POUR VEILLES =================== */
.card-container {
    display: flex;
    flex-wrap: nowrap;       /* toutes les cards sur une seule ligne */
    overflow-x: auto;        /* scroll horizontal si nécessaire */
    gap: 20px;               /* espace entre les cards */
    width: 100%;
    margin: 20px auto;       /* centre le container horizontalement */
    padding-bottom: 10px;
    justify-content: center;
}

.card {
    flex: 0 0 300px;         /* largeur fixe pour chaque card */
    background-color: #f0f4ff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.card h3 {
    font-size: 1.3rem;
    color: var(--h2-color);
    margin-bottom: 12px;
}

.card p {
    font-size: 1rem;
    color: #2d3655;
    margin-bottom: 16px;
    line-height: 1.4;
}

.card .btn {
    align-self: flex-start;
    text-decoration: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* =================== FOOTER =================== */
footer {
    background-color: var(--fond-menu);
    text-align: center;
    padding: 10px;
    font-size: 12px;
    color: var(--texte);
    margin-top: auto;
}

/* =================== BOUTONS =================== */
button, .btn {
    background: #163697;
    color: var(--texte);
    border: 1px solid var(--h2-color);
    font-weight: normal;
    padding: 8px 22px;
    border-radius: 8px;
    margin: 0 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

button:hover, .btn:hover {
    background: var(--h2-color);
    color: #fff;
    transform: scale(1.03);
}

.btn-active {
    background: var(--h2-color);
    color: #fff;
    border: none;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

/* =================== LIENS =================== */
a {
    color: var(--h2-color);
    text-decoration: underline;
}

a:hover {
    color: #002d94;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 2.2rem;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 8px 0;
    }

    nav ul li .sub-menu {
        position: relative;
        width: 100%;
        box-shadow: none;
    }

    main {
        margin-top: 28vh;
        padding: 25px;
    }

    .card-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
    }
}
