html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    color: black;
    font-family: "Inter", sans-serif;
    font-weight: 100;
}

/* Pour masquer le h1 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

h2 {
    font-size: 2em;
    font-weight: 300;
    text-align: center;
    padding-top: 4%;
    color: #1d381d;
}

/* --------------------------- HEADER --------------------------- */

/* ------ MENU HAMBURGER ------ */
.menu-icon {
    position: fixed;
    top: 0px;
    right: 20px;
    cursor: pointer;
    z-index: 1001;
    background-color: transparent;
}

.menu-icon span {
    display: block;
    width: 30px;
    height: 4px;
    margin: 6px;
    background: #1d381d;
    transition: 0.3s;
}

.menu-icon:hover {
    background-color: transparent;
}

/* Menu caché par défaut */
#menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 150px;
    height: 100%;
    background: transparent;
    color: #1d381d;
    transition: right 0.3s ease;
    z-index: 1000;
}

#menu ul {
    list-style: none;
    padding: 60px 20px;
    text-align: right;
}

#menu li {
    margin: 20px 0;
}

#menu a {
    color: #1d381d;
    text-decoration: none;
    font-size: 18px;
    font-weight: 300;
}

#menu a:hover, .contact a:hover {
    color: #e84143;
    transition: color 1s;
}

/* Menu actif */
#menu.active {
    right: 0;
}

/* Animation du bouton en croix */
.menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-icon.active span:nth-child(2) {
    opacity: 0;
}

.menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ------ FLECHE DE SCROLL ------ */

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid black;
    border-right: 2px solid black;
    transform: rotate(45deg);
    animation: scrollAnim 1.5s infinite;
}

@keyframes scrollAnim {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-10px, -10px);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(45deg) translate(10px, 10px);
  }
}

/* --------------------------- ACCUEIL --------------------------- */

.accueil {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url(images/accueil_2.webp);
    background-size: cover;
}

.degrade {
    background: linear-gradient(155deg, #fccfa3,80%, transparent);
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
}

h1 {
    width: 100%;
    text-align: center;
}

h1 img {
    height: 200px;
    width: auto;
}

.artisan {
    position: absolute;
    width: 100%;
    text-align: center;
    bottom: 20%;
}

.artisan p {
    font-size: 1.2em;
    font-weight: 200;
}

/* --------------------------- A PROPOS --------------------------- */

.vision {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f6eade;
}

.textvision {
    display: grid;
    grid-template-columns: 1fr 1fr;  
    width: 80%;
    margin: auto;
    align-items: center;
    gap: 20px;
}

.textvision p {
    grid-column: 1/2;  
    font-family: "Roboto Serif", serif;
    line-height: 1.5;
    text-align: right;
    margin-bottom: 3%;
}

.textvision img {
    grid-column: 2/3;
    width: 100%;
}

/* --------------------------- SOLUTIONS --------------------------- */

.solutions {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 200%;
    background-color: #fccfa3;
}

.personnalisation {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 2fr 2fr;
    width: 90%;
    height: 50%;
    margin: auto;
    margin-top: 5%;
    align-items: center;
    gap: 20px;
    padding: 30px 30px 30px 30px;
    text-align: center;
}

h3 {
    font-weight: 400;
    color: #e84143;
}

.personnalisation p {
    font-family: "Roboto Serif", serif;
}

.grid-titre-1 {
    grid-column: 1/2;
    grid-row: 1/2;
}

.grid-img-1 {
    grid-column: 1/2;
    grid-row: 2/3;
    width: 100%;
    border-radius: 50%;
}

.grid-p1 {
    grid-column: 1/2;
    grid-row: 3/4;
}

.grid-titre-2 {
    grid-column: 2/3;
    grid-row: 1/2;
}

.grid-img-2 {
    grid-column: 2/3;
    grid-row: 2/3;
    width: 100%;
    border-radius: 50%;
}

.grid-p2 {
    grid-column: 2/3;
    grid-row: 3/4;
}

.grid-titre-3 {
    grid-column: 3/4;
    grid-row: 1/2;
}

.grid-img-3 {
    grid-column: 3/4;
    grid-row: 2/3;
    width: 100%;
    border-radius: 50%;
}

.grid-p3 {
    grid-column: 3/4;
    grid-row: 3/4;
}

.grid-titre-4 {
    grid-column: 4/5;
    grid-row: 1/2;
}

.grid-img-4 {
    grid-column: 4/5;
    grid-row: 2/3;
    width: 100%;
    border-radius: 50%;
}

.grid-p4 {
    grid-column: 4/5;
    grid-row: 3/4;
}

.grid-titre-5 {
    grid-column: 5/6;
    grid-row: 1/2;
}

.grid-img-5 {
    grid-column: 5/6;
    grid-row: 2/3;
    width: 100%;
    border-radius: 50%;
}

.grid-p5 {
    grid-column: 5/6;
    grid-row: 3/4;
}

/* --------------------------- CONTACT --------------------------- */

.contact {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 300%;
    background-color: #f6eade;
}

.contact p, .contact a {
    font-family: "Roboto Serif", serif;
    font-weight: 100;
}

.contact p {
    line-height: 1.5;
    text-align: center;
    margin-top: 50px;
}

.contact a {
    font-weight: 300;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: auto;
    margin-top: 50px;
}

label {
    margin-top: 10px;
}

input, textarea {
    font-family: "Roboto serif", serif;
    font-size: 1em;
    padding: 8px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #f6eade;
}

button {
    margin-top: 15px;
    padding: 10px;
    border: none;
    background: black;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 400;
    font-size: 1em;
}

button:hover {
    background: #333;
}

input:focus, textarea:focus {
    outline: none;
    border-color:#1d381d;
}

/* --------------------------- FOOTER --------------------------- */

footer {
    position: absolute;
    width: 100%;
    height: auto;
    top: 400%;
    background-color: #1d381d;
    color: #f6eade;
}

.d-foot {
    text-align: center;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.d-foot p, .d-foot a {
    font-family: "Roboto Serif", serif;
    font-weight: 100;
    font-size: 0.9em;
    color: #f6eade;
    line-height: 1.6;
}

.d-foot a:hover {
    color: #fccfa3;
    transition: color 0.3s;
}

.d-foot nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.d-foot nav a {
    font-weight: 300;
}

/* ---------------------------------------------- MEDIA QUERIES ------------------------------------------ */
@media screen and (max-width: 768px) {


    /* Réinitialisation positionnement absolu */
    .accueil, .vision, .solutions, .contact {
        position: relative;
        width: 100%;
        top: auto; /* annule les top: 100%, 200%... */
        min-height: 100dvh;
    }

    footer {
        position: relative;
        width: 100%;
        top: auto; /* annule les top: 100%, 200%... */
        height: auto;
    }

    h2 {
        font-size: 2.6em;
        padding-top: 35px;
    }

        /* --------------------------- HEADER --------------------------- */

    /* ------ MENU HAMBURGER ------ */

    .menu-icon {
        top: 20px;
    }

    /* Menu caché par défaut */
    #menu {
        width: 100%;
        background: #fccfa3;
        opacity: 0.9;
    }

    #menu ul {
        padding: 120px 40px;
    }

    #menu li {
        margin: 40px 0;
    }

    #menu a {
        font-size: 36px;
        font-weight: 300;
    }

    /* --------------------------- ACCUEIL --------------------------- */

    h1 {
        width: 100%;
        text-align: center;
    }

    h1 img {
        height: auto;
        max-width: 90%;
    }

    .construction {
        top: 20%;
    }

    .artisan {
        position: absolute;
        width: 100%;
        text-align: center;
        bottom: 20%;
    }

    .artisan p {
        font-size: 1.2em;
        font-weight: 200;
    }

    /* --------------------------- A PROPOS --------------------------- */

    .textvision {
        display: block; 
        width: 90%;
        margin-top: 70px;
        gap: 0px;
    }

    .textvision p {
        line-height: 1.5;
        text-align: center;
        margin-bottom: 5%;
    }

    .textvision img {
        margin-top: 50px;
        padding-bottom: 35px;
    }

    /* --------------------------- SOLUTIONS --------------------------- */

    .personnalisation {
        display: block;
        width: 90%;
        height: 50%;
        margin: auto;
        margin-top: 5%;
        align-items: center;
        gap: 20px;
        padding: 0;
        text-align: center;
    }

    h3 {
        font-weight: 300;
        margin: 70px 0 40px 0;
        font-size: 1.6em;
    }

    .personnalisation p {
        font-family: "Roboto Serif", serif;
    }

    .personnalisation img {
        margin-bottom: 20px;
    }

    .grid-p5 {
        padding-bottom: 35px;
    }

    /* --------------------------- CONTACT --------------------------- */

    .contact p {
        padding: 0 5% 0 5%;
    }

    form {
        width: 90%;
        margin-top: 10px;
        text-align: center;
    }

    label {
        margin-top: 10px;
    }

    .contact button {
        margin-bottom: 35px;
    }

    #form-message {
    margin-top: 35px;
    padding-bottom: 35px;
}

    /* --------------------------- FOOTER --------------------------- */

    .d-foot {
        padding: 40px 20px;
        gap: 18px;
        max-width: 90%;
    }

    .d-foot nav {
        flex-direction: column;
        gap: 10px;
    }

}