/* ========== Importation des polices ========== */
@font-face {
    font-family: 'Borel';
    src: url('fonts/Borel-Regular.ttf');
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Regular.ttf');
}

@font-face {
    font-family: 'Geist';
    src: url('fonts/Geist-VariableFont_wght.ttf');
}

/* ========== Global Styles ========== */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    color: #425EA2;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #6495ED;
    display: flex;
    flex-direction: column;
    position: relative; /* Nécessaire pour que ::before utilise position:absolute */
    overflow: hidden;
    min-height: 100vh; /* Assure que le body occupe toute la hauteur de la fenêtre */
    cursor: url('3D/curseur.png'), auto;
}

body::before {
    content: "";
    position: absolute;
    background-image: url('3D/fond contact.png');
    background-size: 70%, auto ;
    background-repeat: no-repeat;
    background-position: left bottom; /* Toujours en bas à gauche */
    left : 1%;
    z-index: -1; /* Derrière le contenu */
    display: block; /* Forcer son affichage */
    width: 100%; /* Largeur pour test */
    height: 65%; /* Hauteur pour test */
}


h1, h2, h3 {
    font-family: Borel, sans-serif; /* Ou une autre police pour les titres */
}

/* ========== Header ========== */
header {
    background-color: rgba(0, 0, 0, 0);
    color: #F5F5F5;
    padding: 20px;
    text-align: center;
    height: 10vh; /* Hauteur proportionnelle à la taille de la fenêtre */
    flex-shrink: 0; /* Empêche le rétrécissement */
}

/* ========== Section Formulaire ========== */
section {
    flex-grow: 1; /* Section prend l'espace restant */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

form {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

label {
    display: block;
    margin-bottom: 10px;
    font-family: Borel, sans-serif;
    font-size: 1rem;
    font-weight: bold;
    color: #425EA2;
    text-align: left;
    width: 100%;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 25px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: 2px solid #425EA2;
    border: 1px solid #2b3e7a;
    background-color: #f9f9f9;
}

textarea {
    resize: vertical;
}

button[type="submit"] {
    background-color: #425EA2;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    text-align: center;
}

button[type="submit"]:hover {
    background-color: #2b3e7a;
}

button[type="submit"]:active {
    background-color: #1a2750;
    transform: scale(0.98);
}

/* Footer */
footer {
    font-family: 'Borel', sans-serif;
    color: #F5F5F5;
    text-align: center;
    padding-top: 10px;
    height: 10vh;
    font-size: 1rem;
    margin-top: auto; /* Pousse le footer en bas */
    width: 100%;
}

.footer-image {
    display: none; /* Cache par défaut */
    max-width: 100%;
    height: auto;
    margin: 10px auto 0;
    transform: translateY(-90%);
}

/* ========== Media Queries ========== */

/* Petits écrans (mobiles en portrait) */
@media (max-width: 600px) {
    body::before {
        display: none; /* Masque complètement l'image de fond */
    }

    form {
        width: 80%; /* Occupe la majorité de l'écran sans toucher les bords */
        box-shadow: none; /* Supprime les ombres pour un look plus simple */
        padding: 15px; /* Réduit l'espace intérieur */
        border-radius: 8px; /* Adapte légèrement les coins arrondis */
    }

    body {
        font-size: 1.5rem; /* Texte légèrement réduit */
    }

    button[type="submit"] {
        font-size: 1rem; /* Bouton adapté à la taille du texte */
        padding: 12px;
    }

   textarea {
        height: 250px; /* Réduit la hauteur par défaut */
    }

    footer {
        font-size: 0.85rem; /* Réduit la taille du texte */
        text-align: center; /* Centrage du texte */
        white-space: normal; /* Permet le passage à la ligne */
        line-height: 1.4; /* Espacement entre les lignes */
    }
}

/* Écrans moyens (tablettes) */

    @media (max-width: 600px) {
        
    header {
    flex-shrink: 0;
    width: 100%;
    text-align: center; /* Centre le texte */
    padding: 10px 0; /* Ajoute un peu d'espace */
    font-size: 1.5rem;
   
    }
    
    body {
        font-size: 1.5rem;
    }

    form {
        max-width: 400px; /* Réduire légèrement la taille du formulaire */
    }

    body::before {
        width: 400px;
        height: 400px;
    }
    footer {
        font-size: 0.85rem; /* Réduit la taille du texte */
        text-align: center; /* Centrage du texte */
        white-space: normal; /* Permet le passage à la ligne */
        line-height: 1.4; /* Espacement entre les lignes */
        margin-top: auto ;
        width: 100%;
        flex-shrink: 0;
        padding: 0;
    }
}

 @media (min-width: 1024px) {
    body::before {
        width: 50%; /* Augmente la taille sur les grands écrans */
        bottom: -15%; /* Ajuste le décalage pour garder un bon effet visuel */
    }
}
