/* =================== POLICE D'ÉCRITURE (GOOGLE FONTS) =================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* =================== VARIABLES DE COULEURS =================== */
:root {
    --primary-color: #0077c8;
    --dark-grey: #333333;
    --medium-grey: #555555;
    --light-grey: #f4f4f4;
    --white-color: #ffffff;
    --header-height: 80px;
}

/* =================== STYLES GLOBAUX / RESET =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-grey);
    background-color: var(--white-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    animation: fadeInPage 0.5s ease-in-out forwards;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

body.fade-out {
    animation: fadeOutPage 0.5s ease-in-out forwards;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =================== HEADER & NAVIGATION =================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background-color 0.3s ease-in-out;
}

.logo-link {
    flex-shrink: 0;
}

.logo-link img {
    height: 40px;
    display: block;
    transition: height 0.3s ease;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 25px;
    transition: gap 0.3s ease;
}

nav a {
    font-weight: 500;
    font-size: 16px;
    color: var(--medium-grey);
    transition: color 0.3s ease, font-size 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

nav a.nav-active {
    color: var(--primary-color);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* =================== SECTION ACCUEIL (HÉROS) =================== */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height) + 60px) 5% 60px 5%;
    gap: 60px;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 550px;
    align-self: center;
    animation: slideInFromLeft 1s ease-out forwards;
}

.hero-text h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.hero-gallery {
    flex: 1;
    max-width: 50%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 120px;
    gap: 10px;
    animation: fadeIn 1s 0.5s ease-out forwards;
    opacity: 0;
    position: relative;
    z-index: 1;
}

.hero-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 10;
}

.hero-section {
    flex-direction: column;
    text-align: center;
    gap: 40px;
}

.hero-text,
.hero-gallery {
    max-width: 100%;
}

.hero-gallery img:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.hero-gallery img:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 2; }
.hero-gallery img:nth-child(3) { grid-column: 3 / 4; grid-row: 2 / 3; }
.hero-gallery img:nth-child(4) { grid-column: 1 / 2; grid-row: 3 / 5; }
.hero-gallery img:nth-child(5) { grid-column: 2 / 4; grid-row: 3 / 4; }
.hero-gallery img:nth-child(6) { grid-column: 2 / 3; grid-row: 4 / 5; }
.hero-gallery img:nth-child(7) { grid-column: 3 / 4; grid-row: 4 / 5; }

/* =================== PAGES DE CONTENU =================== */
.content-page {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 60px) 20px 60px 20px;
    transition: background-color 0.3s ease-in-out;
}

.content-page h1 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

.content-page h2 {
    font-size: 1.8rem;
    margin-top: 60px;
    margin-bottom: 30px;
}

.content-page p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.content-page ul { list-style: none; padding-left: 0; }
.content-page ul li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}
.content-page ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.image-grid img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.single-image-container {
    max-width: 700px;
    margin: 60px auto 0 auto;
}

.single-image-container img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* =================== PAGE QUI SUIS-JE =================== */
.about-layout { display: flex; align-items: flex-start; gap: 40px; margin-top: 40px; }
.about-image { flex-basis: 300px; flex-shrink: 0; }
.about-image img { width: 100%; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.about-text { flex-grow: 1; }
.about-text .signature { margin-top: 30px; font-weight: bold; font-style: italic; color: var(--primary-color); }

/* =================== FOOTER =================== */
footer {
    margin-top: auto;
    background-color: var(--dark-grey);
    color: var(--light-grey);
    padding: 40px 5%;
    text-align: center;
    transition: background-color 0.3s ease-in-out;
}

footer .contact-info h3 { margin-bottom: 15px; font-weight: 600; color: var(--white-color); }
footer .contact-info p { margin-bottom: 10px; line-height: 1.6; }
footer .contact-info a { color: var(--white-color); text-decoration: underline; text-underline-offset: 4px; transition: color 0.3s ease; }
footer .contact-info a:hover { color: var(--primary-color); }

.footer-links { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: 20px; }
.footer-links a { font-size: 0.9rem; color: var(--light-grey); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { text-decoration: underline; color: var(--white-color); }
.social-link svg { fill: var(--light-grey); transition: fill 0.3s ease; }
.social-link:hover svg { fill: var(--white-color); }

/* =================== RESPONSIVE & MENU BURGER =================== */

.burger-menu {
    display: none;
    cursor: pointer;
    z-index: 1002;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-grey);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 1400px) {
    nav ul {
        gap: 20px;
    }
    nav a {
        font-size: 15px;
    }
}

@media (max-width: 1200px) {
    nav {
        display: none;
    }

    .burger-menu {
        display: block;
    }

    nav.mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 300px;
        background-color: var(--dark-grey);
        z-index: 1001;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        padding-top: var(--header-height);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    nav.mobile-nav.is-open {
        transform: translateX(0);
    }

    nav.mobile-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0;
    }

    nav.mobile-nav ul .hide-on-desktop {
        display: list-item;
    }

    nav.mobile-nav ul li {
        width: 100%;
        text-align: center;
    }

    nav.mobile-nav ul a {
        display: block;
        padding: 20px 0;
        color: #f0f0f0;
        font-size: 1.2rem;
    }

    nav.mobile-nav ul a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--primary-color);
    }

    nav.mobile-nav a.nav-active {
        background-color: var(--primary-color);
        color: #fff !important;
    }

    .logo-link img {
        height: 40px;
    }

    .burger-menu.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .burger-menu.is-active span:nth-child(2) { opacity: 0; }
    .burger-menu.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* =================== MODE SOMBRE =================== */
body.dark-mode {
    --dark-grey: #e0e0e0;
    --medium-grey: #a0a0a0;
    --light-grey: #2a2a2a;
    --white-color: #121212;
    color: var(--dark-grey);
}

body.dark-mode header,
body.dark-mode nav.mobile-nav.is-open {
    background-color: #1f1f1f;
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05);
}

body.dark-mode footer {
    background-color: #1f1f1f;
    color: var(--medium-grey);
}

body.dark-mode footer a,
body.dark-mode .social-link svg {
    color: var(--dark-grey);
    fill: var(--dark-grey);
}

body.dark-mode footer .contact-info h3 { color: #fff; }
body.dark-mode footer a:hover,
body.dark-mode .social-link:hover svg { color: #fff; fill: #fff; }

.theme-toggle-button {
    background: none; border: none; cursor: pointer; padding: 5px;
    display: flex; align-items: center; justify-content: center;
    color: var(--dark-grey);
}

.theme-toggle-button .feather-sun { display: block; }
.theme-toggle-button .feather-moon { display: none; }
body.dark-mode .theme-toggle-button .feather-sun { display: none; }
body.dark-mode .theme-toggle-button .feather-moon { display: block; }
body.dark-mode .burger-menu.is-active span { background-color: #fff; }

body.dark-mode nav.mobile-nav.is-open ul a {
    color: #f0f0f0; /* Couleur claire fixe */
}
body.dark-mode nav.mobile-nav.is-open a.nav-active {
    color: #fff !important;
}

/* =================== TRANSITIONS DE PAGE ET ANIMATIONS =================== */
@keyframes fadeInPage { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOutPage { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideInFromLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hide-on-desktop {
    display: none;
}

@media (max-width: 1150px) {
    .hide-on-desktop {
        display: list-item;
    }
}

/* =================== STYLE DES DRAPEAUX =================== */

.language-switcher {
    gap: 12px;
}

.language-switcher a {
    display: block;
    line-height: 0;
    border-radius: 3px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.language-switcher a:hover {
    transform: scale(1.1);
}

.language-switcher a.lang-active {
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* =================== MOBILE PAGE QUI SUIS-JE =================== */

@media (max-width: 1150px) {
    .about-layout {
        flex-direction: column;
        align-items: center;
    }

    .about-text {
        text-align: left;
    }
}