/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    /* overflow, color and background are inherited properties: better to set on concerned elements */
}
* {
    margin: 0;
    padding: 0;
    font: inherit;
}
html {
    color-scheme: dark light;
}

/* Défilement fluide pour la navigation par ancres */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Padding pour les ancres (espace avant le contenu pour ne pas être caché par le menu sticky) */
html {
    scroll-padding-top: 1rem;
}

@media (width > 768px) {
    html {
        scroll-padding-top: 100px;
    }
}

body {
    min-height: 100vh;
}
img, picture, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
    font-style: italic; /* styling alt-text */
}

body {
    background-color: #55AF32;
}
.heroe {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo_centre_container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    width: 100px;
    height: 100px;
}
.logo_centre_container_inner {
    position: relative;
    width: 100%;
    height: 100%;
}
.logo_noir {
    z-index: 1;
    transform-origin: center center;
    /* Pas de transition ici - GSAP gère l'animation */
}
.logo_noir.in-menu {
    /* Le logo est inséré dans le placeholder et suit son layout flexbox */
    position: static;
    width: 80px;
    height: auto;
    margin: 0;
    padding: 0;
}

.logo_noir.in-menu.outside-content {
    /* Masquer le logo quand on scroll au-delà de la section .content */
    visibility: hidden;
    pointer-events: none;
}
.logo_centre_container {
    z-index: 2;
}
.logo_centre_container.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
.logo_centre,
.logo_blanc {
    position: absolute;
}
.logo_blanc {
    z-index: 2;
}

/* Navigation menu styles */
.menu-nav {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: relative;
    z-index: 5;
    width: 100%;
    transition: height 0.3s ease;
    list-style: none;
}
.menu-item {
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
    flex: 1;
    text-align: center;
}
.menu-item a {
    text-decoration: none;
    color: white;
}
.menu-item a:hover {
    color: #000000;
}
.logo-placeholder {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;

    z-index: 2;
    overflow: visible;
}

/* Style pour que le menu puisse devenir sticky */
.menu-nav.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    height: 100px;
}

/* Placeholder pour compenser la hauteur du menu sticky */
.menu-placeholder {
    height: 300px;
    display: none;
}
.menu-placeholder.active {
    display: block;
}

@media (width < 768px) {
    .menu-nav {
        flex-direction: column;
    }
    .menu-nav.sticky {
        height: auto;
    }
    .menu-item {
        margin-block: 0.2rem;
    }
    .logo_noir.in-menu {
        margin-block: 1.1rem;
    }
}

.content,
.about,
.services,
.achievements,
.contact {
    height: 100vh;
    color: white;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.content::before,
.about::before,
.services::before,
.achievements::before,
.contact::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}
.content::before {
    background-image: url(/static/images/soudeur.jpg);
}
.about::before {
    background-image: url(/static/images/eclats.jpg);
}
.services::before {
    background-image: url(/static/images/disqueuse.jpg);
}
.achievements::before {
    background-image: url(/static/images/realisations.jpg);
}
.contact::before {
    background-image: url(/static/images/soudure.webp);
}
.content > *,
.about > *,
.services > *,
.achievements > *,
.contact > * {
    position: relative;
    z-index: 1;
}
.content-text,
.about-text,
.services-text,
.achievements-text {
    font-size: 3rem;
    text-align: center;
    line-height: 1.6;
    padding-block-start: clamp(100px, 15vh, 300px);
    padding-inline: 15vw;
}
.services-list {
    list-style: none;
    text-transform: capitalize;
    font-size: 20px;
}

@media (width < 768px) {
    .content-text,
    .about-text,
    .services-text,
    .achievements-text {
        font-size: 1.7rem;
        padding-inline: 5vw;
    }
}

input,
button,
select,
textarea {
    font: inherit;
}
#contact-form-container {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}
.contact-form {
    width: 100vh;
    height: auto;
    margin: 0 auto;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
    "nom message"
    "email message"
    "privacy privacy"
    "submit submit";
    font-size: 1rem;
    line-height: 2rem;
    padding: 0;
}
.form-nom {
    grid-area: nom;
}
.form-email {
    grid-area: email;
}
.form-message {
    grid-area: message;
}
.form-privacy {
    grid-area: privacy;
}
.form-submit {
    grid-area: submit;
    display: flex;
    justify-content: center;
    align-items: center;
}
.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.form-group label{
    font-size: 24px;
}
.form-privacy {
    flex-direction: row-reverse;
    margin-inline: auto;
    gap: 12px;
    align-items: center;
    justify-content: center;
    
    > label {
        font-size: 16px;
    }
}
#id_privacy {
    width: unset;
}
.form-group input,
button {
    grid-row: 4;
    grid-column: 1 / -1;
    margin: 10px 0;
}
.form-group input {
    width: 80%;
}
.form-group input,
textarea {
    border-radius: 4px;
}
button {
    width: 20%;
    padding-block: 8px;
    font-size: 24px;
}
@media (width < 768px) {
    .contact-form {
        margin: 40vh auto 0 auto;
        grid-template-areas: 
            "nom nom"
            "email email"
            "message message"
            "privacy privacy"
            "submit submit";
        line-height: 1rem;
    }
    .form-group label {
        font-size: 16px;
    }
    .form-group input {
        margin: 0;
    }
    #id_votre_message {
        height: 20vh;
    }
}

#thank-you-modal {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    font-size: 2rem;
    color: white;
}
#close-modal {
    font: inherit;
    margin: 48px 0;
}
@media (width < 768px) {
    #thank-you-modal {
        margin-block-start: 10vh;
        font-size: 1rem;
    }
    #close-modal {
        width: 50%;
        margin: 10px 0;
    }
}

footer {
    width: 100%;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    font-size: 2rem;
}
footer ul {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-block: 2rem;
}
.footer-link {
    list-style: none;
    color: white;
}
.footer-link a,
.legal-link {
    text-decoration: none;
    color: white;
}
.footer-link a:hover,
.legal-link:hover {
    color: #000000;
}
@media (width < 768px) {
    footer {
        font-size: 1rem;
    }
    footer ul {
        flex-direction: column;
        margin-block: 1rem;
    }
    .form-submit button {
        padding-block: 4px;
        font-size: 20px;
    }
}