@media (max-width: 768px) {
    .grid-accueil {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .grid-accueil .image {
        order: 0;
    }

    .grid-accueil .texte {
        order: 1;
        padding: 1.5rem; /* un peu plus compact sur mobile */
    }




    .container p {
        font-size: 1rem;
        line-height: 1.6;
        text-align: left;
        padding: 0 1rem;
    }

    .bouton-milieu {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .formulaire {
        padding: 1.5rem 1rem;
        display: flex;
        justify-content: center;
    }

    .formulaire form {
        width: 100%;
        max-width: 100%;
    }

    .formulaire input[type="text"],
    .formulaire input[type="email"],
    .formulaire textarea {
        width: 100%;
        box-sizing: border-box;
        font-size: 1rem;
    }

    .formulaire input[type="submit"] {
        font-size: 1rem;
    }



    .grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .projet {
        width: 90%;
        max-width: 400px;
    }

    .projet img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 10px;
    }

    .theme-titre {
        text-align: center;
        margin-top: 2rem;
        font-size: 1.5rem;
    }

    .filtres {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .filtre-btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}


body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: linear-gradient(300deg,#562d8f,#2b2d30,#2b2d30,#6f3301);
    background-size: 240% 240%;
    animation: gradient-animation 16s ease infinite;
}

@keyframes gradient-animation {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}


.fond_page {
    margin: 0 auto;
    padding: 0 5rem; /* un peu d'espace même sur les petits écrans */

}

p, h1, h2, h3, h4, h5, h6, ul, li {
    color: white;
}

p, li, .footer div:nth-of-type(2) {
    font-family: Helvetica, sans-serif;
}

h1, h2, h3, h4, h5, h6, ul strong, .btn, .footer div:nth-of-type(1), .header, .intro {
    font-family: Consolas, sans-serif;
}


h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}



.bandeau_titre {
    margin: 0;
    padding: 1rem;
    background-color: #1E1E1E;
    display: flex;
    justify-content: center;
}

.bandeau_titre h1 {
    color: #ff963f;
    text-shadow: #ff7400 1px 0 10px;
}

.bouton-milieu {
    display: flex;
    justify-content: center;
}

.section {
    padding-bottom: 1rem;
    width: 95%;
    max-width: none;
    margin: 0 auto;
}

/* DÉBUT HEADER FOOTER */

.header {
    position: sticky;
    z-index: 999;
    top: 0;
    background-color: #1E1E1E;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px #3e3e3e;
}

.header img {
    margin-left: 3em;
}

.header-flex {
    background-color: #1E1E1E;
    display: flex;
    justify-content: space-between;
    padding: 2em 2em;
    font-size: larger;
}
.header-flex nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: white;
    transition: text-shadow 0.3s ease, color 0.3s ease;
}

.header-flex nav a:hover {
    color: #9c54ff;
    text-shadow: #753bc4 1px 0 10px;
}

.footer {
    color: white;
    background: #232323;
    text-align: center;
    padding: 1em;
    text-decoration: none;
}

.footer a {
    color: grey;
}

/* FIN HEADER FOOTER */



/* DÉBUT PAGE RÉALISATIONS */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #9c54ff;
    box-shadow: 0 0 5px 2px #9c54ff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    margin: 0.5rem;
}

.btn:hover {
    background-color: #753bc4;
    box-shadow: 0 0 5px 2px #753bc4;
    transform: translateY(-2px);
}

.btn-margin {
    margin-bottom: 2em;
}

.theme-titre {
    text-align: center;
    margin: 3rem auto 1.5rem;
    color: #ff963f;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.projet {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.projet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Supprimer l'effet de zoom */
.projet:hover {
    transform: none;
}

/* Wrapper pour placer overlay par-dessus */
.projet-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* L'image dans le cadre */
.projet-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* Overlay grisé caché par défaut */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

/* Texte au centre */
.projet-nom {
    color: white;
    font-size: 1.2rem;
    text-align: center;
    padding: 0 1rem;
}

/* Afficher overlay au hover */
.projet-wrapper:hover .overlay {
    opacity: 1;
}



.container, .container-acc{
    max-width: 100%; /* prend toute la largeur */
    margin: 0 auto;
    padding: 2rem 2rem; /* un peu de marge intérieure */
}

.container-acc p {
    text-align: center;
}

.filtres {
    text-align: center;
}

.filtre-btn {
    padding: 0.5rem 1rem;
    margin-top: 1.5em;
    border: none;
    background-color: #63aeff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filtre-btn:hover {
    background-color: #1e8bff;
}

/* FIN PAGE RÉALISATIONS */




/* DÉBUT PAGE PROJETS */

.projet-flex {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.projet-flex.reverse {
    flex-direction: row-reverse;
}

.projet-image {
    flex: 1 1 50%;
    max-width: 50%;
}

.projet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* coupe verticalement si nécessaire */
    border-radius: 8px;
    display: block;
}

.projet-texte {
    flex: 1 1 50%;
    max-width: 50%;
    font-size: 1.1rem;
    padding: 1rem;
    color: #333;
}

.media-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.projet-vid {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.projet-vid:hover {
    transform: scale(1.02);
    cursor: pointer;
}

.projet-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Vidéo responsive centrée */
.video-container {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    position: relative;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}



/* FIN PAGE PROJETS */





/* DÉBUT PAGE ME CONTACTER */

.formulaire {
    max-width: 700px; /* plus étroit que .container */
    margin: 0 auto 2em auto;
    padding: 0 1rem;
}

.formulaire form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Premier champ (prénom) */
.formulaire input:nth-of-type(1) {
    grid-column: 1;
}

/* Deuxième champ (nom) */
.formulaire input:nth-of-type(2) {
    grid-column: 2;
}

/* Troisième champ (email) sur toute la ligne */
.formulaire input:nth-of-type(3) {
    grid-column: 1 / -1;
}

/* Quatrième champ (objet) sur toute la ligne */
.formulaire input:nth-of-type(4) {
    grid-column: 1 / -1;
}

/* Textarea sur toute la ligne */
.formulaire textarea {
    grid-column: 1 / -1;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    min-height: 150px;
}

.formulaire input[type="text"],
.formulaire textarea {
    padding: 0.7rem 0.75rem;
    font-size: 1rem;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    outline: none; /* retire la bordure bleue par défaut */
    transition: background-color 0.2s ease;
}

.formulaire input[type="text"]:focus,
.formulaire textarea:focus {
    background-color: #e0e0e0;
}

/* Bouton envoyer aligné à gauche */
.formulaire input[type="submit"] {
    grid-column: 1; /* tout à gauche */
    justify-self: start; /* alignement à gauche */
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #28A745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.formulaire input[type="submit"]:hover {
    background-color: #146927;
}



/* FIN PAGE ME CONTACTER */






/* DÉBUT PAGE À PROPOS */

.grid-competences {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.grid-competences h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ff963f;
}

.grid-competences ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.grid-competences li {
    margin-bottom: 0.5rem;
}

.grid-competences li strong {
    color: #63aeff;
}

.main-apropos {
    padding: 3rem 6vw;
    max-width: 1000px;
    margin: 0 auto;
}

.main-apropos p {
    margin: 2rem 0;
    line-height: 1.8;
    font-size: 1.1rem;
}


/* FIN PAGE À PROPOS */

.ligne-orange {
    height: 10px;
    width: 60%;
    background-color: #ff7400;
    border: none;
    margin: 2rem auto; /* centre horizontalement et ajoute un peu d’espace */
    display: block;
    border-radius: 5px;
}

.ligne-violette {
    height: 10px;
    width: 60%;
    background-color: #753bc4;
    border: none;
    margin: 2rem auto; /* centre horizontalement et ajoute un peu d’espace */
    display: block;
    border-radius: 5px;
}





/* Animation fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Pour appliquer à tous les enfants progressivement */
.fade-in-delay {
    opacity: 0;
}

.fade-in-delay:nth-child(1) {
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.1s;
}
.fade-in-delay:nth-child(2) {
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.2s;
}
.fade-in-delay:nth-child(3) {
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.3s;
}
.fade-in-delay:nth-child(4) {
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.4s;
}

/* Ajoute plus de nth-child si besoin */
