.debut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(24px, 6vw, 70px) ;
    margin-bottom: clamp(24px, 5vw, 70px);
    border-bottom: 1px solid #DB6161;
}

img {
    height: clamp(180px, 25vw, 350px);
    border: 1px solid white;
    border-radius: clamp(12px, 2vw, 20px);
}

.intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: clamp(12px, 2vw, 20px);
    max-width: 900px;
}

h2 {
    margin-bottom: clamp(20px, 3vw, 40px);
    padding-bottom: 10px;
    position: relative;
    display: flex;
    justify-content: center;
    font-size: clamp(1.1rem, 3vw, 1.6rem)
}

h2::after {
    content: "";
    background-color: #DB6161;
    position: absolute;
    width: 100px;
    height: 2px;
    bottom: 0;
    left: -10;
}

p {
    margin-bottom: 10px;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
}

.boutons {
    display: flex;
    margin-top: 5%;
    gap : 50px;
}

.boutons a {
    padding: clamp(8px, 1.2vw, 10px) clamp(12px, 2vw, 20px);
    border-radius: 10px;
    background-color: #DB6161;
    transition: background-color 0.5s;
    font-size: clamp(0.85rem, 1.5vw, 1rem)
}

.boutons a:hover {
    background-color: #DB2D00;
}

.prj {
    padding-left: clamp(10px, 3vw, 30px);
    padding-right: clamp(10px, 3vw, 30px);
    margin-bottom: clamp(30px, 4vw, 50px);
}

.prj h2{
    margin-bottom: clamp(24px, 4vw, 50px);
}

.prj a:not(.cards a){
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-right: clamp(10px, 3vw, 35px);
    transition: color 0.5s;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
}

.prj a:not(.cards a):hover {
    color: #DB2D00;
}

.projets {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: clamp(30px, 5vw, 60px);
    justify-content: center;
}

.cards {
    position: relative;
    margin: clamp(4px, 1vw, 10px);;
}

.cards p {
    font-family: 'gravitas';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding-left: 10px;
    padding-right: 10px;
    height: 100%;
    background: #1F0802;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    display: flex;
    align-items: center;
    border-radius: clamp(12px, 2vw, 20px);
    font-size: clamp(0.78rem, 1.2vw, 1rem);
}

.cards:hover p,
.cards:focus-within p { /* Mise en forme de l'apparance du paragraphe lors du hover */
    opacity: 0.55;
}

.cards img {
    height: clamp(130px, 18vw, 215px);
    max-width: 100%;
    width: auto;
}

.photo {
    margin: clamp(4px, 1vw, 10px);
}

.photo img {
    height: clamp(130px, 18vw, 215px);
    cursor: pointer;
    width: auto;
    max-width: 100%;
    transition: opacity 0.2s ease;
}

.photo img:hover{
    opacity: 0.6;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;                        /* couvre tout l'écran */
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    display: flex;         /* on garde flex tout le temps */
    opacity: 0;
    pointer-events: none;  /* désactivé quand invisible */
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;             /* garde les proportions */
    border-radius: 4px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
    opacity: 0;
}

.lightbox.active img {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ── MOBILE (≤ 480px) ── */
@media (max-width: 480px) {
    .debut {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        margin-bottom: 50px;
    }

    .debut img {
        width: 100%;
        height: clamp(180px, 55vw, 350px);
        object-fit: cover;
    }

    .intro {
        min-width: unset; 
        width: 100%;
    }

    .projets {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0 10px clamp(30px, 5vw, 40px);
    }

    .cards img {
        width: 100%;
        object-fit: cover;
    }

    .photo img {
        width: 100%;
        object-fit: cover;
    }
}