/* =========================================================
   ROOT / VARIABLES
   ========================================================= */

:root {
    /* Brand */
    --green: #0C9C25;
    --color-brand-translucent: #0c9c24e3;

    /* Neutrals */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-dark-navy: #031d37;
    --color-text-muted: #666666;
    --color-text-body: #333333;
    --color-border-light: #cccccc;
    --color-bg-light: #f9f9f9;
    --color-bg-lighter: #f2f2f2;

    /* Accents */
    --color-cta-bg: rgb(13, 13, 129);
    --color-link-accent: #273dac;
    --color-error-bg: #f8d7da;
    --color-error-text: #842029;

    /* Overlays / shadows */
    --shadow-soft: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --overlay-dark: rgba(0, 0, 0, 0.4);
    --overlay-hero: rgba(0, 0, 0, 0.281);
}

.serif {
    font-family: "Georgia", "Times New Roman", Times, serif;
    font-weight: normal;
}


/* =========================================================
   RESET / BASE
   ========================================================= */

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    max-width: 100%;
    background: var(--color-white);
}

body.no-scroll {
    overflow: hidden;
}


/* =========================================================
   UTILITIES
   ========================================================= */

.italic {
    font-style: italic;
}

.mobile {
    display: none;
}

.section.mobile {
    display: none;
}

/* Séparateur fin (soulignement de titre) */
.hr-divider {
    border: 1px solid var(--color-black);
    width: 50%;
    margin: auto;
}

/* Séparateur large (avant la section rubriques) */
.hr-wide {
    width: 80%;
    margin: auto;
    margin-top: 50px;
    margin-bottom: 50px;
}

/* Espacement supplémentaire pour certaines sections (ex: page émulation) */
.section--spaced {
    margin-bottom: 50px;
}

/* Contenu de la page d'erreur 404 */
.error-404-content {
    text-align: center;
    padding-bottom: 60px;
}


/* =========================================================
   NAVIGATION (DESKTOP)
   ========================================================= */

.navbar {
    background-color: var(--green);
    padding: 10px 20px;
    font-family: Arial, sans-serif;
    max-width: 100%;
    box-shadow: 0 2px 4px var(--shadow-soft);
}

.sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    max-width: 100%;
    /* LIMITATION de la largeur */
    align-items: center;
    display: flex;
    width: 100%;
}

.nav-wrapper ul {
    list-style-type: none;
    padding: 0;
    display: flex;
}

.nav-wrapper ul li {
    margin: 10px;
    font-size: large;
}

.nav-wrapper ul li a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: Lighter;
}

#nav-desktop li a span {
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
    /* espace entre texte et trait */
}

#nav-desktop li a span::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-dark-navy);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

#nav-desktop li a:hover span::after {
    width: 100%;
}

.nav-wrapper ul.submenu {
    display: none;
    /* caché par défaut */
    position: absolute;
    background-color: var(--green);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 2px 4px var(--shadow-soft);
}

#dropdown-menu {
    display: none;
    margin-top: 0px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 250px;
    height: auto;
    border: solid 1px transparent;
    position: absolute;
    background-color: var(--green);
    /* même couleur que menu */
    z-index: 2;
    /* au-dessus du menu principal */
    padding: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

#dropdown-menu:hover {
    display: block;
}

.has-submenu:hover #dropdown-menu {
    display: block;
}

.logo img {
    width: 150px;
    height: 60px;
}

.logo {
    margin-right: auto;
}


/* =========================================================
   MOBILE NAVIGATION (SIDENAV)
   ========================================================= */

.mobile-toggle {
    display: none;
    /* caché sur desktop */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 10px;
    background: var(--color-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.sidenav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(80%, 320px);
    background: var(--green);
    box-shadow: -2px 0 12px var(--shadow-medium);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1200;
    padding-top: 5rem;
}

.sidenav.is-open {
    transform: translateX(0);
}

.sidenav ul {
    list-style: none;
    margin: 0;
    padding: 0 25px;
    display: flex;
    flex-direction: column;
}

.sidenav li {
    margin: 10px 0;
}

.sidenav li a {
    display: block;
    padding: 8px 5px;
    color: var(--color-white);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: lighter;
    letter-spacing: 0.03em;
}

.sidenav li a:hover {
    text-decoration: underline;
}

.sidenav-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1100;
}

.sidenav-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}


/* =========================================================
   OVERLAY HOVER (flou déclenché par le survol de la nav)
   ========================================================= */

.overlay-hover {
    opacity: 0;
    position: fixed;
    inset: 0;
    backdrop-filter: blur(2px);
    z-index: 3;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.overlay-hover.active {
    opacity: 1;
}


/* =========================================================
   HERO SECTION
   ========================================================= */

.hero-section {
    width: 100%;
    height: 250px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-section img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.hero-section .overlay {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    background: var(--overlay-hero);
    z-index: 1;
}

.hero-text {
    position: absolute;
    color: var(--color-white);
    font-size: 2rem;
    text-align: center;
    z-index: 2;
}


/* =========================================================
   HOME / CONTENT SECTION
   ========================================================= */

.content {
    display: flex;
    padding: 20px;
    max-width: 100%;
    margin: 20px;
}

.img-container {
    position: relative;
    width: 350px;
    margin: auto;
    max-width: 100%;
    height: 550px;
    overflow: hidden;
    display: flex;
    animation: BounceFromLeftSpring 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.img-container img {
    object-fit: cover;
    width: 100%;
    border-radius: 5px;
}

.img-container.big {
    position: relative;
    width: 400px;
    max-width: 100%;
    height: 900px;
    overflow: hidden;
    display: flex;
    top: 0;
    animation: BounceFromLeftSpring 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

/* TEXTE CONTENT */

.text-container {
    margin-left: 100px;
    flex: 1;
    font-size: 16px;
    line-height: 1.2;
}

.text-container span {
    font-weight: lighter;
}

.text-container.italic {
    margin-top: 60px;
}

.text {
    margin: 10px auto;
    line-height: 1.2;
}

.text ul li {
    margin-bottom: 8px;
}

figure figcaption {
    display: none;
}


/* =========================================================
   RUBRIQUES (cartes de la page d'accueil)
   ========================================================= */

/* --- CONTENEUR PRINCIPAL --- */
.rubrique {
    display: flex;
    justify-content: center;
    margin: 50px 50px;
    margin-top: 200px;
    margin-bottom: 200px;
}

/* --- LISTE DES RUBRIQUES --- */
.rubrique ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 100px;
    text-align: center;
}

/* --- CHAQUE RUBRIQUE (li) --- */
.rubrique ul li {
    position: relative;
    padding: 0 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    /* empile titre + texte + bouton */
    height: 100%;
    /* pour aligner les boutons */
}

/* --- TEXTE --- */
.rubrique ul li p {
    font-size: 18px;
    line-height: 1.1;
    margin-top: 10px;
    text-align: center;
    color: var(--color-text-muted);
}

/* --- BOUTON ALIGNÉ EN BAS --- */
.cta {
    margin-top: auto;
    /* pousse le bouton en bas du li */
    padding: 10px 20px;
    background-color: var(--color-cta-bg);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

/* --- LIENS --- */
.rubrique ul li a {
    text-decoration: none;
    color: var(--color-black);
    font-weight: lighter;
    font-size: 22px;
}

.rub-title i {
    font-size: 16px;
    font-weight: lighter;
}

/* --- BARRE VERTICALE ENTRE LES RUBRIQUES --- */
.rubrique ul li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -50px;
    /* aligné avec le gap */
    top: 20px;
    width: 1px;
    height: 100%;
    background-color: var(--color-black);
}

.rub-title {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.rub-title a span {
    position: relative;
    display: inline-block;
    /* indispensable pour positionner ::after */
    padding-bottom: 6px;
    /* espace entre texte et trait */
}

.rub-title a span::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-dark-navy);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.rub-title a:hover span::after {
    width: 100%;
}


/* =========================================================
   SECTIONS (pages émulation / consulting / management)
   ========================================================= */

.title {
    text-align: center;
    font-size: 27px;
    color: var(--color-black);
    font-weight: normal;
}

.contact-title {
    text-align: center;
    font-size: 24px;
    color: var(--color-black);
    font-weight: normal;
}

.title h2 span {
    font-size: 34px;
    font-weight: lighter;
}

.section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    margin: 20px;
    gap: 100px;
}

.section .img-container {
    width: 600px;
    max-width: 100%;
}


/* =========================================================
   PAGE RÉFÉRENCES
   ========================================================= */

.logo-organizer ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.logo-organizer ul li {
    margin: 15px 25px;
}

.logo-organizer ul li img {
    max-width: 150px;
    height: auto;
    display: block;
}

.experience-item {
    border-left: solid .2rem var(--green);
    padding: .625rem 1rem;
    margin-bottom: .8rem;
    box-shadow: 0 8px 16px var(--shadow-soft);
}

.hobbies {
    border-left: solid .2rem var(--color-dark-navy);
    padding: .625rem 1rem;
    margin-bottom: .8rem;
    box-shadow: 0 8px 16px var(--shadow-soft);
}


/* =========================================================
   PAGES LÉGALES (CGU / mentions légales / confidentialité)
   ========================================================= */

.legal-page {
    max-width: 760px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.legal-page .legal-updated {
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 40px;
}

.legal-page h2 {
    color: var(--green);
    font-size: 20px;
    margin-top: 40px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border-light);
}

.legal-page p {
    color: var(--color-text-body);
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-page ul {
    margin: 0 0 16px;
    padding-left: 20px;
}

.legal-page ul li {
    color: var(--color-text-body);
    line-height: 1.6;
    margin-bottom: 8px;
}

.legal-page a {
    color: var(--color-link-accent);
}

.legal-page a:hover {
    text-decoration: none;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    text-align: center;
    padding: 10px 0;
    gap: 20px;
    background-color: var(--green);
    color: var(--color-white);
}

.footer-content>* {
    flex: 1;
    /* chaque élément prend 1/3 de l'espace */
}

.footer-content a {
    color: var(--color-white);
    text-decoration: none;
}

.footer-content img {
    max-width: 150px;
    height: auto;
    margin-top: 50px;
}

.footer-content ul {
    list-style: none;
    padding: 0;
}

.footer-content li {
    margin-bottom: 6px;
    font-weight: lighter;
}

.fab {
    font-size: 34px;
    color: var(--color-white);
    margin-top: 10px;
}


/* =========================================================
   FORMULAIRE DE CONTACT
   ========================================================= */

.flash-success,
.flash-error {
    max-width: 80%;
    margin: 20px auto;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.flash-success {
    background-color: var(--color-brand-translucent);
    color: var(--color-white);
}

.flash-error {
    background-color: var(--color-error-bg);
    color: var(--color-error-text);
}

.form-container {
    width: 80%;
    align-items: center;
    margin: auto;
    padding: 20px;
    height: 600px;
    border-radius: 16px;
    box-shadow: 0 4px 8px var(--shadow-soft);
    display: flex;
    justify-content: space-between;
    background: var(--color-brand-translucent);
}

.logo-contact {
    width: 30%;
    height: auto;
}

.logo-contact img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.form-container form {
    display: flex;
    flex-direction: column;
    width: 40%;
}

.form-container input,
.form-container textarea {
    max-width: 100%;
    width: 100%;
    height: 3rem;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    resize: none;
}

.form-container textarea {
    height: 150px;
    /* hauteur spécifique pour le textarea */
}

.form-container button {
    color: var(--green);
    cursor: pointer;
    background: var(--color-bg-lighter);
    border: none;
    border-radius: 5px;
    height: 3rem;
    width: 50%;
    font-size: 24px;
    justify-content: space-between;
    align-items: center;
    margin: 10px auto;
    display: block;
    margin-bottom: 30px;
}

.form-container button .fas {
    color: var(--color-link-accent);
    margin-left: 10px;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

.fadeIn {
    animation: fadeIn 3s ease forwards;
    opacity: 0;
    /* départ invisible */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounceUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    60% {
        transform: translateY(-10px);
        opacity: 1;
    }

    80% {
        transform: translateY(5px);
    }

    100% {
        transform: translateY(0);
    }
}

.bounceUp {
    animation: bounceUp 1s ease forwards;
    opacity: 0;
}

@keyframes bounceFromLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    60% {
        transform: translateX(20px);
        opacity: 1;
    }

    80% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(0);
    }
}

.bounceFromLeft {
    animation: bounceFromLeft 1s ease forwards;
    opacity: 0;
}

@keyframes bounceFromRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.bounceFromRight {
    animation: bounceFromRight 1s ease-out forwards;
    opacity: 0;
    /* départ invisible */
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        /* agrandissement à 120% */
    }

    100% {
        transform: scale(1);
    }
}

/* Classe à appliquer au logo */
.logo-animated {
    display: inline-block;
    /* important pour scale */
    animation: logoPulse 1s ease-in-out 1s;
    /* durée 1s, boucle infinie */
    transform-origin: center center;
    /* pivot au centre du logo */
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {

    .has-submenu:hover #dropdown-menu {
        display: none;
    }

    /* 2 colonnes en mobile */
    .rubrique ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .rubrique ul li {
        border: 1px solid var(--color-border-light);
        padding: 10px;
        border-radius: 5px;
        background-color: var(--color-bg-light);
    }

    .cta {
        border-radius: 5px;
    }

    /* On enlève les barres verticales */
    .rubrique ul li::after {
        display: none;
    }

    .rubrique {
        margin: 20px;
        margin-bottom: 50px;
    }

    .section {
        display: flex;
        flex-direction: column;
    }

    .section .text,
    .section .img-container {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 10px 0;
    }

    .section .english {
        order: -1;
        width: 100%;
        margin: 10px auto;
    }

    .section.english .img-container {
        display: none;
    }

    figure figcaption {
        font-size: 0.85rem;
        color: var(--color-text-muted);
        text-align: center;
        margin-top: 8px;
        display: block;
    }

    .nav-wrapper ul.desktop {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 40px;
        justify-content: center;
    }

    .footer-content img {
        max-width: 150px;
        height: auto;
        margin-top: 50px;
    }

    .footer-content ul {
        list-style: none;
        padding: 0;
    }

    .footer-content li {
        margin-bottom: 6px;
        font-size: small;
    }

    .hero-text {
        margin: 10px 10px;
    }

    .content {
        display: grid;
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .content article {
        margin: 10px;
    }

    .content .img-container {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 568px) {

    .title h1 {
        font-size: 22px;
    }

    .rubrique {
        margin: 20px;
        margin-bottom: 50px;
    }

    .rubrique ul {
        display: grid;
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .rubrique ul li {
        border: 1px solid var(--color-border-light);
        padding: 10px;
        border-radius: 5px;
        background-color: var(--color-bg-light);
    }

    .cta {
        border-radius: 5px;
    }

    .contact-title {
        text-align: center;
        font-size: 16px;
        color: var(--color-black);
        font-weight: normal;
    }

    .contact-title p {
        text-align: center;
        margin: 10px;
    }

    .hero-text {
        font-size: 1.5rem;
        margin: 10px 10px;
    }
}

@media (max-width: 1000px) {
    .form-container {
        flex-direction: column;
        height: auto;
        /* ajuste la hauteur pour les petits écrans */
    }

    .logo-contact {
        width: 60%;
        margin-bottom: 20px;
        /* espace entre le logo et le formulaire */
    }

    .form-container form {
        width: 80%;
        /* formulaire prend toute la largeur */
        margin-left: 0;
        /* annule le décalage gauche */
    }
}