/* ========================================= */
/* POLICES                                   */
/* ========================================= */

@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&display=swap");


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

:root {
    --green: #79d64a;
    --green-light: #9bf36c;
    --green-dark: #3f9328;

    --black: #080b0d;
    --dark: #101518;
    --dark-light: #192126;

    --white: #ffffff;
    --gray: #cbd2d6;

    --header-height: 96px;
    --footer-height: 64px;
}


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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    font-family: "Oswald", Arial, Helvetica, sans-serif;

    color: var(--white);
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(121, 214, 74, 0.08),
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(255, 255, 255, 0.04),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #080b0d 0%,
            #11181c 50%,
            #090d0f 100%
        );

    overflow-x: hidden;
}

body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    background-image:
        repeating-linear-gradient(
            115deg,
            transparent 0,
            transparent 90px,
            rgba(255, 255, 255, 0.018) 91px,
            transparent 92px
        ),
        repeating-linear-gradient(
            25deg,
            transparent 0,
            transparent 130px,
            rgba(121, 214, 74, 0.015) 131px,
            transparent 132px
        );

    opacity: 0.8;

    z-index: -1;
}

img {
    max-width: 100%;
}

button,
a {
    font: inherit;
}


/* ========================================= */
/* HEADER                                    */
/* ========================================= */

.site-header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: var(--header-height);

    display: flex;
    align-items: center;

    padding: 0 48px;

    background:
        linear-gradient(
            110deg,
            rgba(255, 255, 255, 0.035),
            transparent 30%
        ),
        linear-gradient(
            to bottom,
            rgba(25, 33, 38, 0.98),
            rgba(8, 11, 13, 0.98)
        );

    border-bottom: 1px solid rgba(121, 214, 74, 0.3);

    box-shadow:
        0 6px 25px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.04) inset;

    backdrop-filter: blur(10px);

    z-index: 1000;
}

.site-header::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        repeating-linear-gradient(
            110deg,
            transparent 0,
            transparent 75px,
            rgba(255, 255, 255, 0.025) 76px,
            transparent 77px
        );

    opacity: 0.8;
}


/* ========================================= */
/* LOGO                                      */
/* ========================================= */

.logo {
    position: relative;

    display: flex;
    align-items: center;

    flex-shrink: 0;

    text-decoration: none;

    z-index: 2;
}

.logo img {
    display: block;

    width: auto;
    height: 78px;

    border-radius: 8px;

    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.logo:hover img {
    transform: rotate(-2.5deg) scale(1.07);

    filter:
        drop-shadow(0 0 8px rgba(121, 214, 74, 0.75))
        drop-shadow(0 0 18px rgba(121, 214, 74, 0.35));
}


/* ========================================= */
/* NAVIGATION                                */
/* ========================================= */

.main-navigation {
    position: relative;

    flex: 1;

    display: flex;
    justify-content: center;

    z-index: 2;
}

.main-navigation ul {
    display: flex;
    align-items: center;

    gap: 54px;

    list-style: none;
}

.main-navigation a {
    position: relative;

    display: inline-block;

    padding: 14px 2px;

    color: var(--white);

    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;

    text-decoration: none;

    transition:
        color 0.25s ease,
        text-shadow 0.25s ease;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--green-light);

    text-shadow: 0 0 10px rgba(121, 214, 74, 0.45);
}

.main-navigation a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 6px;

    width: 100%;
    height: 3px;

    border-radius: 10px;

    background: linear-gradient(
        to right,
        var(--green-dark),
        var(--green-light)
    );

    box-shadow: 0 0 8px rgba(121, 214, 74, 0.55);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    transform: scaleX(1);
}


/* ========================================= */
/* BOUTON HAMBURGER                          */
/* ========================================= */

.menu-toggle {
    display: none;

    position: relative;

    width: 46px;
    height: 42px;

    padding: 9px;

    border: 1px solid rgba(121, 214, 74, 0.45);
    border-radius: 8px;

    background: rgba(255, 255, 255, 0.04);

    cursor: pointer;

    z-index: 3;
}

.menu-toggle span {
    display: block;

    width: 100%;
    height: 3px;

    margin: 5px 0;

    border-radius: 4px;

    background: var(--white);

    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        background 0.3s ease;
}

.menu-toggle:hover span {
    background: var(--green-light);
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* ========================================= */
/* CONTENU PRINCIPAL                         */
/* ========================================= */

main {
    flex: 1;

    width: 100%;

    margin-top: var(--header-height);

    padding: 56px 40px;
}

main:not(.home) {
    width: min(1100px, calc(100% - 40px));

    margin-right: auto;
    margin-left: auto;
}

main h1 {
    position: relative;

    display: inline-block;

    margin-bottom: 32px;
    padding-bottom: 12px;

    color: var(--white);

    font-size: clamp(38px, 5vw, 58px);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

main h1::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 70%;
    height: 4px;

    border-radius: 10px;

    background: linear-gradient(
        to right,
        var(--green),
        transparent
    );
}

main p {
    margin-bottom: 20px;

    color: var(--gray);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.75;
}


/* ========================================= */
/* PAGE D'ACCUEIL                            */
/* ========================================= */

main.home {
    position: relative;

    display: block;

    width: 100%;
    min-height: 0;

    margin-top: var(--header-height);

    padding: 25px 30px 10px;

    text-align: center;
}

.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    text-align: center;
}

.home-logo {
    display: block;

    width: auto;
    height: auto;

    /*max-width: min(900px, 88vw);*/
    max-width: min(300px, 70vw);
    max-height: 56vh;

    margin: 0 auto 8px;

    object-fit: contain;

    transform-origin: center;

    filter:
        drop-shadow(0 18px 28px rgba(0, 0, 0, 0.5));

    animation: homeLogoEntrance 0.85s ease-out both;

    transition:
        transform 0.3s ease,
        filter 0.3s ease;
}

.home-logo:hover {
    transform: scale(1.015);

    filter:
        drop-shadow(0 20px 32px rgba(0, 0, 0, 0.55))
        drop-shadow(0 0 12px rgba(121, 214, 74, 0.15));
}

@keyframes homeLogoEntrance {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.home-welcome {
    margin: 0 !important;

    color: var(--white);

    font-family: "Oswald", Arial, Helvetica, sans-serif;
    font-size: clamp(21px, 2.8vw, 32px);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.04em;

    text-align: center;
}

.home-welcome:last-child {
    margin-top: 2px !important;

    color: var(--green-light);

    font-size: clamp(26px, 3.7vw, 42px);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    text-shadow:
        0 0 16px rgba(121, 214, 74, 0.16);
}

/* News immédiatement sous le bloc d'accueil.
   La sélectivité volontairement supérieure à .home-news
   permet de conserver cet espacement même si news.css est chargé après. */
.home + .home-news {
    width: min(1100px, calc(100% - 40px));
    margin: 12px auto 45px;
}

.home + .home-news h2 {
    margin-top: 0;
}


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

.site-footer {
    position: relative;

    flex-shrink: 0;

    width: 100%;
    min-height: var(--footer-height);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px 20px;

    color: var(--gray);

    background:
        linear-gradient(
            to bottom,
            rgba(14, 19, 22, 0.98),
            rgba(5, 7, 8, 0.98)
        );

    border-top: 3px solid var(--green-dark);

    box-shadow:
        0 -5px 20px rgba(0, 0, 0, 0.32),
        0 -1px 10px rgba(121, 214, 74, 0.08);

    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
}


/* ========================================= */
/* TABLETTE                                  */
/* ========================================= */

@media screen and (max-width: 900px) {
    .site-header {
        padding: 0 28px;
    }

    .main-navigation ul {
        gap: 30px;
    }

    .main-navigation a {
        font-size: 18px;
    }

    .logo img {
        height: 70px;
    }
}


/* ========================================= */
/* MOBILE                                    */
/* ========================================= */

@media screen and (max-width: 700px) {
    :root {
        --header-height: 82px;
    }

    .site-header {
        justify-content: space-between;

        height: var(--header-height);

        padding: 0 18px;
    }

    .logo img {
        height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: absolute;

        top: var(--header-height);
        left: 0;

        width: 100%;

        display: block;

        max-height: 0;

        overflow: hidden;

        background:
            linear-gradient(
                to bottom,
                rgba(15, 20, 23, 0.99),
                rgba(6, 9, 10, 0.99)
            );

        border-bottom: 1px solid rgba(121, 214, 74, 0.35);

        box-shadow: 0 14px 25px rgba(0, 0, 0, 0.55);

        transition:
            max-height 0.4s ease,
            padding 0.4s ease;
    }

    .main-navigation.open {
        max-height: 600px;

        padding: 14px 0 20px;
    }

    .main-navigation ul {
        flex-direction: column;

        gap: 0;
    }

    .main-navigation li {
        width: 100%;
    }

    .main-navigation a {
        display: block;

        width: 100%;

        padding: 15px 24px;

        font-size: 19px;
        text-align: center;
    }

    .main-navigation a::after {
        left: 35%;
        bottom: 8px;

        width: 30%;
    }

    main {
        padding: 38px 20px;
    }

    main:not(.home) {
        width: 100%;
    }

    main.home {
        min-height: 0;
        padding: 20px 15px 8px;
    }

    .home-hero {
        width: 100%;
    }

    .home-logo {
        max-width: 94vw;
        max-height: 48vh;
        margin-bottom: 7px;
    }

    .home-welcome {
        font-size: clamp(18px, 5vw, 24px);
    }

    .home-welcome:last-child {
        font-size: clamp(22px, 6.5vw, 31px);
    }

    .home + .home-news {
        width: calc(100% - 30px);
        margin-top: 8px;
        margin-bottom: 35px;
    }
}


/* ========================================= */
/* PETITS ECRANS                             */
/* ========================================= */

@media screen and (max-width: 430px) {
    .site-header {
        padding: 0 13px;
    }

    .logo img {
        height: 58px;
    }

    main h1 {
        font-size: 34px;
    }

    main p {
        font-size: 16px;
    }

    .home-logo {
        max-width: 96vw;
        max-height: 43vh;
    }

    .home-welcome {
        line-height: 1.2;
    }

    .home + .home-news {
        margin-top: 6px;
    }
}


/* ========================================= */
/* ACCESSIBILITE                             */
/* ========================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}

.justify {      
    text-align: justify;
}