/* Style détail référence modernisé */
main {
    height: calc(100dvh - -2px);
}

/* Fallback pour les navigateurs qui ne supportent pas dvh */
@supports not (height: 100dvh) {
    main {
        height: calc(100vh - -2px);
    }
}

h1#references-title {
    color: dodgerblue;
    margin-bottom: 30px;
    font-size: 2.5em;
    border-bottom: 2px solid dodgerblue;
    padding-bottom: 10px;
    line-height: 1.6;
    text-align: left;
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
}

a {
    color: dodgerblue;
}

.mainSection {
    display: flex;
    align-items: center; /* Vertically center items */
    margin-left: 2%;
    margin-right: 2%;
    gap: 2%;
    margin-top: -20px;
}

p {
    font-family: 'Inter', sans-serif;
}

article {
    flex-grow: 0;
    flex-shrink: 0;
}

.grid1 {
    flex: 0 0 50%;
    display: flex;
    justify-content: center; 
    align-items: center; 
}

.grid2 {
    flex: 0 0 45%;
    text-align: justify;
}

.info-container {
    max-width: 80%;
    word-wrap: break-word;
    white-space: normal;
}

.info-container h2 {
    margin-bottom: 20px;
}

.info-container .desc {
    font-family: Arial, Helvetica, sans-serif;
    margin-bottom: 20px;
}

.info-container div {
    display: flex;
    justify-content: initial;
    margin-bottom: 10px;
}

.info-container div p:first-child {
    min-width: 200px;
    flex-shrink: 0;
    color: #888888;
}

.info-container div p:last-child {
    flex-grow: 1;
    white-space: normal;
}

/* SLIDER IMAGE */
.slider {
    width: 800px;
    height: 493.83px;
    overflow: hidden;
}

.slides {
    width: 500%;
    height: 500px;
    display: flex;
}

.slides input {
    display: none;
}

.slide {
    width: 20%;
    transition: 1.1s;
    display: flex;
    justify-content: center; /* Center image within slide */
    align-items: center; /* Center image vertically */
}

.slide img {
    width: 800px;
    height: 500px;
    object-fit: contain;
    transition: 0.5s;
}

.navigation-manual {
    position: absolute;
    width: 800px;
    margin-top: -45px;
    display: flex;
    justify-content: center;
    position: sticky;
}

.manual-btn {
    border: 2px solid #ffffff;
    border-radius: 10px;
    padding: 5px;
    cursor: pointer;
    transition: 1s;
}

.manual-btn:not(:last-child) {
    margin-right: 40px;
}

.manual-btn:hover {
    background: #ffffff;
}

.checked {
    background: #ffffff;
}

.scrolled {
    overflow: scroll;
    height: calc(100dvh - 114px);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Fallback pour compatibilité */
@supports not (height: 100dvh) {
    .scrolled {
        height: calc(100vh - 114px);
    }
}

@media (min-width:1500px) {
    .mainSection {
        margin-top: 20px;
    }
}

@media (min-width: 1300px) {
    .grid2 {
        flex: 0 0 48%;
        margin-right: 5%;
    }
}

@media (max-width: 1500px) {
    .slide img {
        width: 600px;
        height: 375px;
        object-fit: contain;
    }

    .slider {
        width: 600px;
    }

    .navigation-manual {
        margin-left: -100px;
        margin-top: -104px;
    }
}

.title {
    margin-top: 10px; 
    margin-bottom: 15px; 
    width: 100%;
    text-align: center;
}

@media (min-width: 1301px) {
    .title {
        display: none; /* Hide the standalone title since it's inside .grid2 */
    }
    .info-container h2 {
        margin-bottom: 20px;
        text-align: left;
    }
}

@media (max-width: 1300px) {
    .infos p {
        text-align: left;
    }
    .info-container h2 {
        display: none; /* Hide the h2 in .grid2 */
    }

    .title {
        margin-top: 55px; /* Adjust spacing */
        margin-bottom: -35px;
        width: 100%;
    }
    .justify {
        display: flex;
        justify-content: center;
    }

    .infos {
        text-align: justify;
    }

    .mainSection {
        margin-top: -40px;
        flex-direction: column;
        align-items: center;
    }

    .grid1, .grid2 {
        flex: 0 0 auto;
        width: 100%;
    }

    .info-container {
        max-width: 100%;
        text-align: center;
    }

    .slide img {
        width: 600px;
        height: 370.37px;
        object-fit: contain;
    }

    .slider {
        margin-left: 0;
        width: 800px;
        height: 480.5px;
    }

    .navigation-manual {
        margin-left: 0px;
        margin-top: -100px;
    }
    
    /* Pour les écrans moyens, utilisation de dvh */
    .scrolled {
        height: calc(100dvh - 114px);
    }
}

@media (max-width: 768px) {
    /* Pour les petits écrans, utilisation de svh */
    .scrolled {
        height: calc(100svh - 114px);
    }
    
    main {
        height: calc(100svh - -2px);
    }
}

@media (min-width: 1021px) {
    /* Pour les grands écrans, utilisation de lvh */
    .scrolled {
        height: calc(100lvh - 114px);
    }
    
    main {
        height: calc(100lvh - -2px);
    }
}

@media (max-width: 650px) {
    h1#references-title {
        font-size: 2em;
    }

    .title {
        margin-top: 165px; /* Adjust spacing */
        margin-bottom: -124px;
        width: 100%;
    }

    .mainSection {
        margin-top: -140px;
    }

    .grid2 {
        margin-top: -100px;
    }

    .info-container {
        max-width: 100%;
        /* padding: 0 10px; */
    }

    .slide img {
        width: 325px;
        height: 203.125px;
        object-fit: contain;
    }

    .slider {
        width: 325px;
    }

    .navigation-manual {
        margin-left: -238px;
        margin-top: -174px;
    }
}

.slogan {
    position: absolute;
    bottom: 3px;
}

.pb {
    padding-bottom: 4px;
    display: flex;
    justify-content: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}


@media (max-height:700px) {
    .slogan {
        margin-top: 20px !important;
        position: relative;
        bottom: 0;
    }
}