@font-face {
    font-family: 'BaiJamjuree';
    src: url('/fonts/BaiJamjuree-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    /* ExtraLight */
    font-style: normal;
}

@font-face {
    font-family: 'BaiJamjuree';
    src: url('/fonts/BaiJamjuree-Regular.ttf') format('truetype');
    font-weight: 400;
    /* Regular */
    font-style: normal;
}

@font-face {
    font-family: 'BaiJamjuree';
    src: url('/fonts/BaiJamjuree-Medium.ttf') format('truetype');
    font-weight: 500;
    /* Medium */
    font-style: normal;
}

@font-face {
    font-family: 'BaiJamjuree';
    src: url('/fonts/BaiJamjuree-SemiBold.ttf') format('truetype');
    font-weight: 600;
    /* SemiBold */
    font-style: normal;
}

/*Reset CSS*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--black);
}

:root {
    --black: #35405A;
    --grey-50: rgba(53, 64, 90, 0.54);
    --grey-20: rgba(53, 64, 90, 0.22);
    --background: #F1F3F9;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: always;
    font-family: 'BaiJamjuree', sans-serif;
    font-size: 16px;
}

/*Classes utilitaires : */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.align-center {
    align-items: center
}

.g-8 {
    gap: 8px;
}

.g-16 {
    gap: 16px;
}

.g-24 {
    gap: 24px;
}

.text-start {
    text-align: start;
}

.text-center {
    text-align: center;
}

.text-end {
    text-align: end;
}

.text-semi {
    font-weight: 600;
}

.m-center {
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

.margin-auto {
    margin: auto;
}

.small-screen-only {
    display: none !important;
}

.small-screen-only-flex {
    display: none !important;
}

.small-screen-hidden {
    /* visible par défaut sur grand écran */
}

@media (max-width: 1024px) {
    .small-screen-only {
        display: block !important;
    }

    .small-screen-hidden {
        display: none !important;
    }

    .small-screen-only-flex {
        display: flex !important;
    }
}

/*Début mise en page ----------------------------------------*/
main {
    max-width: 1400px;
    margin: 100px auto 40px auto;
    padding: 0 16px;
    overflow: hidden;
}

#Hero {
    display: flex;
    flex-direction: column;

    &>.wrapper {
        display: flex;
        gap: 56px;

        &>div:first-child {
            width: 40%;
        }

        &>.info-container {
            width: 60%;
            display: flex;
            flex-direction: column;
            gap: 40px;

            & .wrapper {
                display: flex;
                flex-direction: column;
                gap: 40px;
            }
        }
    }

    #Photos-informations {
        margin-top: 48px;

        &>div {
            flex: 1;

            & img {
                width: 100%;
                border-radius: 8px;
                object-fit: cover;
                cursor: pointer;
            }
        }
    }

    & .carousel-container {
        max-width: 560px;

        & .vehicleSwiper {
            width: 100%;
            height: 420px;
            margin-bottom: 10px;
            border-radius: 8px;

            & .swiper-slide {
                background: #fff;
                display: flex;
                justify-content: center;
                align-items: center;
                cursor: pointer;

                & img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    border-radius: 8px;
                }
            }
        }

        & .vehicleThumbsSwiper {
            height: 80px;
            box-sizing: border-box;
            padding: 10px 0;

            & .swiper-slide {
                width: 80px;
                height: 60px;
                opacity: 0.4;
                cursor: pointer;
                border-radius: 4px;
                overflow: hidden;

                & img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }

            & .swiper-slide-thumb-active {
                opacity: 1;
                border: 2px solid var(--black);
            }
        }
    }
}

#Recapitulatif-chiffrages {
    table {
        & tr {
            border-bottom: 1px solid var(--grey-50);

            &:last-child {
                border-bottom: none;
            }
        }
    }
}

#Pneumatiques {
    & .row {
        display: flex;
        gap: 40px;
        align-items: center;
        flex-wrap: wrap;

        &>div {
            flex: 1;
            min-width: 180px;
        }

        &:nth-of-type(2) {
            margin-top: 32px;
            margin-bottom: 32px;
        }
    }

    & table {

        & td,
        th {
            border: 1px solid black;
            padding: 4px;
        }
    }
}

#dommageEquLightboxModal,
#dommageIntLightboxModal,
#dommageLightboxModal {
    & .dommage-lightbox-content {
        width: 95%;
        max-width: 1400px;
        height: 90vh;
        display: flex;
        gap: 30px;

        & .dommage-lightbox-left {
            flex: 1;
            min-width: 0;
            display: flex;
            align-items: center;

            & .dommageEquLightboxSwiper,
            & .dommageIntLightboxSwiper,
            & .dommageLightboxSwiper {
                width: 100%;
                height: 80vh;
                background-color: black;
                border-radius: 16px;

                & .swiper-slide {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    border-radius: 16px;

                    & img {
                        max-width: 100%;
                        max-height: 100%;
                        object-fit: contain;
                    }
                }
            }
        }

        & .dommage-lightbox-right {
            width: 30%;
            overflow-y: auto;
            display: flex;
            align-items: center;
            max-width: 340px;

            & .dommage-lightbox-info {
                display: flex;
                flex-direction: column;
                gap: 20px;
                width: 100%;

                h3,
                span {
                    color: white;
                }

                & .dommage-lightbox-details {
                    display: flex;
                    flex-direction: column;

                    & .detail-row {
                        display: flex;
                        justify-content: space-between;
                        padding: 8px 0;
                        border-bottom: 1px solid rgba(255, 255, 255, 0.25);

                        /* Animation de slide from top - même vitesse que le menu */
                        transform: translateY(-20px);
                        opacity: 0;
                        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

                        /* État visible */
                        &.slide-in {
                            transform: translateY(0);
                            opacity: 1;
                        }

                        &:last-child {
                            border-bottom: none;
                        }

                        &.total {
                            padding: 12px 0;
                            margin-top: 5px;

                            & .label,
                            & .value {
                                font-size: 16px;
                                font-weight: 700;
                                color: white;
                            }
                        }
                    }
                }
            }
        }
    }
}

#infoPhotosLightboxModal {
    & .info-photo-container {
        background-color: black;
        display: flex;
        justify-content: center;
        border-radius: 16px;

        & .info-photo-title {
            position: absolute;
            bottom: 10px;
            color: white;
            z-index: 10000;
        }
    }
}

#Equipements-optionnel {
    width: 60%;
    flex: unset;
    gap: 16px;
}

#Synthese {
    width: 100%;
    flex: unset;

    & .synthese-content {
        display: flex;
        flex-direction: column;
        gap: 20px;

        & .synthese-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;

            & .line {
                flex: 1;
                border-bottom: 2px dashed var(--grey-20);
                height: 4px;
            }

            & span:first-child {
                white-space: nowrap;
            }

            & span:last-child {
                white-space: nowrap;
            }
        }

        & .synthese-total {
            padding: 12px 0;
            margin-top: 8px;

            & span {
                font-size: 18px;
                font-weight: 600;
            }
        }
    }
}

/*Composants -----------------------*/
.infos-grid {
    /*max-width: 560px;*/
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    grid-template-rows: repeat(3, auto);
    grid-column-gap: 40px;
    grid-row-gap: 16px;

    & .group {
        display: flex;
        flex-direction: column;
        flex: 0 0 calc(33.33% - 40px);
        gap: 4px;

        & span {
            font-weight: 500;
            font-size: 1rem;
            color: var(--black);
        }
    }

    &.layout-2col {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 22px;
    }
}

.grid-row-3 {
    grid-row: span 3;
}

.card {
    padding: 20px;
    border-radius: 16px;
    background-color: white;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scroll-margin-top: 100px;
}

.photos-vignette-horizontal {
    aspect-ratio: 16/9;
    border-radius: 8px;
    object-fit: cover;
}

table {
    border-collapse: collapse;

    & td {
        padding: 8px 0;
    }

    & th {
        font-weight: 600;
    }

    & td {
        & span {
            font-size: 1rem;
        }
    }
}

.total-separator {
    max-width: 66%;
    min-width: 66%;
    margin: 0 auto;
    border: none;
    border-top: 2px solid var(--grey-20);
}

.separator {
    border: none;
    border-top: 2px solid var(--grey-50);
}

.separator-lite {
    border: none;
    border-top: 2px solid var(--grey-20);
}

.section-wrapper {
    margin: 48px 0;
    display: flex;
    gap: 24px;

    &>section {
        flex: 1;
    }
}

.section-margin {
    margin-top: 48px;
}

#Menu-burger {
    background-color: white;
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: rgba(0, 0, 0, 0.1) 0 10px 50px;
    z-index: 1000;

    & .main-row {
        display: flex;
        justify-content: space-between;
        padding: 16px;
        align-items: center;

        & h3 {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
        }

        & .menu-button {
            cursor: pointer;
        }
    }

    & .link-list {
        max-height: 0;
        overflow: hidden;
        flex-direction: column;
        gap: 8px;
        padding: 0 16px;
        opacity: 0;
        transform: translateY(-10px);
        transition:
            max-height 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
            opacity 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
            transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
            padding 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);

        & a {
            padding: 12px;
            text-align: center;
            opacity: 0;
            transform: translateY(-5px);
            transition:
                transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
        }

        &.show {
            display: flex;
            max-height: 620px;
            opacity: 1;
            transform: translateY(0);
            padding: 0 16px 32px 16px;

            & a {
                transform: translateY(0);
                opacity: 1;

                /* Animation en cascade pour l'ouverture */
                &:nth-child(1) {
                    transition-delay: 0.03s;
                }

                &:nth-child(2) {
                    transition-delay: 0.06s;
                }

                &:nth-child(3) {
                    transition-delay: 0.09s;
                }

                &:nth-child(4) {
                    transition-delay: 0.12s;
                }

                &:nth-child(5) {
                    transition-delay: 0.15s;
                }

                &:nth-child(6) {
                    transition-delay: 0.18s;
                }

                &:nth-child(7) {
                    transition-delay: 0.21s;
                }

                &:nth-child(8) {
                    transition-delay: 0.24s;
                }

                &:nth-child(9) {
                    transition-delay: 0.27s;
                }

                &:nth-child(10) {
                    transition-delay: 0.3s;
                }
            }
        }

        /* État de fermeture - les liens disparaissent immédiatement */
        &.closing {
            display: flex;

            & a {
                opacity: 0;
                transform: translateY(-5px);
                transition: none;
            }
        }
    }
}

.dommage-table {
    height: 100%;
    /* ou une hauteur spécifique */

    & h3 {
        margin-bottom: 12px;
    }

    &>.dommage-content {
        display: flex;
        gap: 24px;

        & .photo-cell {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            position: relative;
            width: 60%;

            & img {
                width: 100%;
                height: 240px;
                border-radius: 8px;
                object-fit: cover;
                cursor: pointer;
                transition: opacity 0.3s;

                &:hover {
                    opacity: 0.8;
                }
            }
        }

        & .info-cell {
            width: 40%;
            vertical-align: top;

            & .details-table {
                display: flex;
                flex-direction: column;
                gap: 20px;

                & .detail-row {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    gap: 10px;

                    & .line {
                        flex: 1;
                        border-bottom: 2px dashed var(--grey-20);
                        height: 4px;
                    }
                }
            }
        }

        & .cloison {
            width: 1px;
            align-self: stretch;
            background-color: #d1d5db;
            margin: 8px 0;
        }

        &.row-format {
            flex-direction: column;
            gap: 4px;
        }
    }
}

.swiper-button-next {
    right: 10px !important;
    left: auto !important;
}

.swiper-button-prev {
    left: 10px !important;
    right: auto !important;
}

.swiper-button-next,
.swiper-button-prev {
    color: black;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;

    & svg {
        width: 24px !important;
        height: 24px !important;
        fill: none !important;
        object-fit: unset !important;
        transform-origin: unset !important;
    }
}

.swiper-pagination-bullet-active {
    background: white !important;
}

.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.90);
    overflow: hidden;
    backdrop-filter: blur(5px);

    &.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    & .lightbox-close {
        position: absolute;
        top: 20px;
        right: 40px;
        cursor: pointer;
        z-index: 10000;
        transition: 0.3s;
        background: white;
        height: 48px;
        width: 48px;
        border-radius: 100%;
        display: flex;
        justify-content: center;
        align-items: center;

        &:hover {
            color: #ccc;
        }
    }

    & .lightbox-content {
        width: 90%;
        max-width: 1200px;
        height: 90vh;
        position: relative;
    }

    & .lightboxSwiper {
        width: 100%;
        height: 100%;

        & .swiper-slide {
            display: flex;
            justify-content: center;
            align-items: center;
            background: transparent;

            & img {
                max-width: 100%;
                max-height: 100%;
                object-fit: contain;
            }
        }
    }

    & .swiper-slide img {
        margin: 0 auto;
        display: block;
    }
}

.btn-click-effect {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);

    &:active {
        transform: scale(0.95);
    }
}

#BackToTop {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background-color: white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: rgba(0, 0, 0, 0.18) 0 10px 50px;
    cursor: pointer;
    z-index: 1000;
}

ul {
    margin-left: 24px;
}

@media (max-width: 1024px) {
    #Hero {
        background-color: unset;
        padding: 0;

        & .wrapper {
            flex-direction: column;

            &>div:first-child,
            &>div:last-child {
                width: 100%;
                margin: 0 auto;
                gap: 24px;
            }

            &>.info-container {
                & .wrapper {
                    background-color: white;
                    border-radius: 16px;
                    padding: 12px;

                    & #Photos-informations-rs {
                        display: flex !important;
                        flex-wrap: wrap;
                        justify-content: center;

                        >div {
                            width: calc(50% - 12px);
                        }
                    }
                }

                & .infos-grid {
                    gap: 24px 48px;

                    & .group {

                        & span,
                        & label {
                            white-space: nowrap;
                        }
                    }
                }
            }
        }
    }

    #Recapitulatif-chiffrages-rs {
        & .container {
            display: flex;
            flex-direction: column;
            gap: 48px;

            & .wrapper {
                &>div {
                    gap: 20px;
                }

                & h3 {
                    font-weight: 600;
                    margin-bottom: 10px;
                }

                & .row {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    gap: 8px;

                    & .line {
                        flex: 1;
                        border-bottom: 2px dashed var(--grey-20);
                        height: 4px;
                    }
                }

                .total-separator {
                    margin: 8px auto;
                }
            }

            & .separator:last-child {
                display: none;
            }
        }
    }

    .dommage-table {
        &>.dommage-content {
            flex-direction: column-reverse;

            & .cloison {
                display: none;
            }

            & .photo-cell {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
                gap: 10px;
                position: relative;
                width: 100%;
                justify-items: center;

                & img {
                    height: 320px;
                    max-width: 390px;
                }
            }

            & .info-cell {
                width: 100%;

                & .details-table {
                    & .detail-row {
                        gap: 8px;
                        align-items: center;

                        & .line {
                            flex: 1;
                            border-bottom: 2px dashed var(--grey-20);
                        }
                    }
                }
            }
        }
    }

    .section-wrapper {
        flex-direction: column;
        gap: 48px;
    }

    #Synthese,
    #Equipements-optionnel {
        width: 100%;
    }

    .infos-grid {
        &.layout-2col {
            grid-template-columns: repeat(1, 1fr);
        }
    }
}

@media (max-width: 920px) {
    #dommageLightboxModal {
        & .dommage-lightbox-content {
            height: 100vh;
            flex-direction: column;
            padding: 32px;
            overflow-y: scroll;
            width: 100%;

            & .dommage-lightbox-left {
                & .dommageLightboxSwiper {
                    height: 60vh;
                    min-height: 480px;
                }
            }

            & .dommage-lightbox-right {
                width: 50%;
                max-width: unset;
                margin: 0 auto;
                overflow: unset;
            }
        }
    }
}

@media (max-width: 880px) {
    .section-wrapper {
        flex-direction: column;
        gap: 48px;
    }

    #Equipements-optionnel {
        gap: 12px;

        & table {
            & tr {
                display: flex;
                flex-direction: column;
            }

            & td {
                display: block;
                width: 100%;
            }
        }
    }
}

@media (max-width: 620px) {
    body {
        font-size: 14px;
    }

    main {
        padding: 0 12px;
    }

    #Hero {
        & .wrapper {

            &>div:first-child,
            &>div:last-child {
                gap: 8px;
            }

            .info-container .infos-grid {
                gap: 20px 12px;
            }

            &>.info-container {
                & .wrapper {
                    & #Photos-informations-rs {
                        &>div {
                            width: 100%;
                        }
                    }
                }
            }
        }

        & .carousel-container {
            & .vehicleSwiper {
                height: 280px;
            }
        }
    }
}

.description_table * {
    border: none !important;
}

.infos_grid_line {
    grid-template: none;

    & .group {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        margin: 0 0 0 0;
        padding: 0 0 3px 0;
        border-bottom: 1px solid var(--grey-20);

        &.no-border {
            border-bottom: none;
        }
    }
}

.justify-between {
    justify-content: space-between;
}

.infos_grid_line_inline {
    display: flex;
    max-width: 100%;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

.infos_grid_line_inline .group {
    flex: 1;
}

.photo_comm_container {
    display: flex;
    flex-wrap: wrap;
    gap: 1%;
}

.photo_comm_item {
    width: calc(100% / 3 - 2% / 3);
    border: 1px solid var(--grey-20);
    margin-bottom: 1%;
    padding: 5px;
    border-radius: 5px;
    overflow: hidden;
}

.photo_comm_item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.flex-1 {
    flex: 1 !important;
}

.damage-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Arial", sans-serif;
    font-size: 14px;

    & th {
        border: 1px solid #beb7b7;
    }

    & td {
        border: 1px solid #beb7b7;
        padding: 4px 6px;
        text-align: left;
        vertical-align: top;
    }

    & thead {
        background-color: var(--background);
    }

    & th {
        font-weight: bold;
        text-align: center;
        vertical-align: middle;
        font-size: 12px;
    }

    & .text-center {
        text-align: center;
    }
}

.total-table {
    max-width: 400px;
    margin-left: auto;
    font-size: 14px;

    & .container {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    & .row {
        gap: 32px;
        display: flex;
        justify-content: space-between;
    }

    & hr {
        border: none;
        border-top: 2px solid var(--grey-20);
        margin: 8px 0;
    }
}

#Hero {
    & .carousel-container {
        & .vehicleSwiper {
            & .swiper-slide {
                & img {
                    width: 100%;
                    height: 100%;
                    object-fit: contain;
                    border-radius: 8px;
                }
            }
        }
    }
}

.textNormalize {
    text-transform: lowercase;
}

.textNormalize::first-letter {
    text-transform: uppercase;
}

.text-right {
    text-align: right !important;
}

.photo-cell-chiffre {
    grid-template-columns: repeat(5, 1fr) !important;
    width: 100% !important;
}

#Info-vehicule {
    & img {
        cursor: pointer;
    }
}

.custom_immat_compteur_vin_container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.custom_immat_compteur_vin_container .swiper-slide {
    width: 32%;
}

.custom_immat_compteur_vin_container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.full_line_photo_cell {
    width: 100% !important;
    grid-template-columns: repeat(5, 1fr) !important;
}

.opt_moba_container .swiper-slide {
    width: 24% !important;
}

.table_rp_chiffre_pneumatiques th {
    background-color: var(--black);
    color: white;
}

.info-photo-clickable {
    width: 100% !important;
    aspect-ratio: 2 / 1.5;
    border-radius: 6px;
}

.invisible_t_table {
    border-left: 1px solid transparent !important;
    border-bottom: 1px solid transparent !important;
    background-color: transparent !important;
}

.pcGroupLigne50 {
    max-width: calc(50% - 20px);
}