html {
    background-color: var(--black);
    z-index: 1;
}

main {
    background-color: var(--black);
    height: 4600px;
    overflow: hidden;
}


.d1 {
    display: flex;
    justify-content: start;
    align-items: center;
    width: 100%;
    margin-bottom: 100px;

    .design1 {
    width: 900px;
    }
}

.d2 {
    display: flex;
    justify-content: end;
    width: 100%;
    position: relative;
    top: -520px;
    margin-left: 250px;

    .design2 {
        width: 900px;
    }
}

.design1,
.design2 {
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.5s ease;
    z-index: 2;
}

.block1 {
    position: relative;
    display: flex;
    justify-content: space-around;
    flex-direction: row;
    object-fit: contain;
    box-sizing: border-box;
    align-items: center;
    top: -320px;
    z-index: 4;

    img {
        border-radius: 50%;
        width: 500px;
    }

    p {
        font-family: var(--CDSB);
        color: whitesmoke;
        font-size: 1.3em;
    }
}

.block1 p {
    transform: translateY(20px);
    transition: transform 0.3s ease;

    .violet {
        color: blueviolet;
    }
}

.block2 {
    position: relative;
    top: -580px;
    height: 270vh;
    background-color: whitesmoke;
    z-index: 1;

    svg {
        width: 200vw;
        margin-top: -265px;
        margin-left: -767px;
        height: 100vh;
        z-index: 1;
    }

    .competences {
        position: relative;
        top: -650px;
        font-family: var(--CDSB);
        color: whitesmoke;
        margin-left: 80px;
        font-size: 6.5em;
        z-index: 4;
    }

    section {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        width: 70%;
        height: 200vh;
        position: relative;
        top: -300px;
        margin-left : 80px;

    }

    section > article {
        width: 100%;
        height: 500px;
        border: 3px solid black;
        border-radius: 6px;
        object-fit: contain;
        box-sizing: border-box;

        h1 {
            color: var(--black);
            font-family: var(--CDSB);
            font-size: 6em;
            margin-left: 25px;
            margin-top: 10px;
        }

        p {
            font-family: var(--CDSB);
            font-size: 1.3em;
            color: var(--black);
            margin-left: 25px;
            margin-top: 25px;

            .violet {
                color: blueviolet;
            }
        }

        img {
            position: relative;
            bottom: -50px;
            width: 100px;
            margin-left: 25px;

        }
    }

    section > .av {
        height: 680px;
    }
}

@media (max-width: 1283px) {

    main {
        height: auto; /* plus de hauteur fixe, laisse le contenu s'adapter */
        overflow: visible;
    }

    /* On masque les gros décors */
    .d1, .d2 {
        display: none;
    }

    /* Bloc présentation */
    .block1 {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        top: 0;
        margin: 40px 20px;
        text-align: center;
    }

    .block1 img {
        width: 220px; /* photo réduite */
        border-radius: 50%;
        margin-bottom: 20px;
    }

    .block1 p {
        font-size: 1em; /* texte plus petit */
        line-height: 1.6em;
        padding: 0 10px;
    }

    /* Bloc compétences */
    .block2 {
        position: relative;
        top: 0;
        height: auto;
        padding: 40px 15px;
    }

    .block2 svg {
        display: none; /* déco trop lourde pour mobile */
    }

    .competences {
        display: flex;
        justify-content: center;  /* centre horizontalement */
        align-items: center;      /* centre verticalement */
        text-align: center;

        font-size: clamp(3em, 6vw, 3.8em);
        font-weight: bold;

        margin: 40px auto 20px;   /* espace haut/bas + centré */
        height: 80px;             /* hauteur fixe pour bien centrer le texte */
        line-height: 1;           /* supprime le décalage vertical */
        white-space: nowrap;      /* pas de retour à la ligne */
    }

    .block2 .competences {
        text-align: center;
        position: relative;
        top: 0;
        margin: 0px auto 20px;
        font-size: 2.4em;
        display: block;
        color: black
    }

    .block2 section {
        width: 100%;
        height: auto;
        margin-left: 0;
        top: 0;
        gap: 40px;
    }

    .block2 section > article {
        width: 100%;
        height: auto;
        border: 2px solid black;
        border-radius: 6px;
        padding: 20px;
        margin-bottom: 30px;
        text-align: center;
    }

    .block2 section > article h1 {
        font-size: 1.8em; /* réduit de 6em → mobile */
        margin: 10px 0 15px;
    }

    .block2 section > article p {
        font-size: 0.95em;
        line-height: 1.6em;
        margin: 0 0 20px;
    }

    .block2 section > article img {
        width: 60px; /* icônes réduites */
        margin: 8px;
        bottom: 0;
    }

    /* Article audiovisuel (plus haut) */
    .block2 section > .av {
        height: auto;
    }

    p {
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: normal;
    }

    body {
        overflow-x: hidden;
    }

}
