/* ========================================= */
/* 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%;
}

main.home {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    padding: 140px 24px 48px;
}

main.home .home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

main.home .home-logo {
    width: min(320px, 70vw);
    height: auto;
    display: block;
    transform-origin: center;
    will-change: transform, filter;
    animation: floatIn 1.2s ease-out forwards;
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-6px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter:
            drop-shadow(0 0 8px rgba(121, 214, 74, 0.75))
            drop-shadow(0 0 18px rgba(121, 214, 74, 0.35));
    }
}

main.home .home-welcome {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green-light);
}

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: flex;
    align-items: center;
    justify-content: center;

    min-height: calc(
        100vh - var(--header-height) - var(--footer-height)
    );

    padding: 30px;
}

main.home::before {
    content: "";

    position: absolute;

    width: min(70vw, 800px);
    aspect-ratio: 1;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(121, 214, 74, 0.14),
        rgba(121, 214, 74, 0.03) 45%,
        transparent 70%
    );

    filter: blur(10px);

    animation: pulseHalo 4s ease-in-out infinite;
}

.home > img {
    position: relative;

    display: block;

    width: auto;
    height: auto;

    max-width: min(85vw, 850px);
    max-height: calc(
        100vh - var(--header-height) - var(--footer-height) - 50px
    );

    object-fit: contain;

    filter:
        drop-shadow(0 20px 28px rgba(0, 0, 0, 0.55))
        drop-shadow(0 0 15px rgba(121, 214, 74, 0.2));

    animation: logoEntrance 0.9s ease-out both;
}

.home > img:hover {
    filter:
        drop-shadow(0 22px 32px rgba(0, 0, 0, 0.65))
        drop-shadow(0 0 24px rgba(121, 214, 74, 0.42));
}

@keyframes logoEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.88);
    }

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

@keyframes pulseHalo {
    0%,
    100% {
        opacity: 0.65;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}


/* ========================================= */
/* 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 {
        padding: 20px;
    }

    .home > img {
        max-width: 95vw;
        max-height: calc(
            100vh - var(--header-height) - var(--footer-height) - 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;
    }
}


/* ========================================= */
/* 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;
    }
}
