:root {
    --primary-color: #D95B99;
    --primary-hover: #d38baf;
    --primary-color-background: rgba(20, 20, 20, 0.9);
    --text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    --transition: all 0.3s ease;
    --box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    --border-radius: 10px;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll; /* Assurez-vous que le défilement est activé */
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

/* Main Container */
.container {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* Mobile Navbar */
.mobile-navbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgb(9, 9, 9);
    padding: 10px 15px;
    z-index: 1000;
    -webkit-box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    justify-content: space-between;
    align-items: center;
}

.nav-icon {
    width: 40px;
    height: 30px;
    cursor: pointer;
    color: #D95B99;
}

/* Left Background Section */
.background_left {
    flex: 1;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 20px;
    min-width: 300px;
    position: relative;
    transition: transform 0.3s ease;
    z-index: 999;
}

.background_left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(9, 9, 9);
}

.close-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #D95B99;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Additional Info Styles */
.additional-info {
    padding: 20px;
    color: white;
    display: none;
}

.additional-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.additional-info p {
    margin-bottom: 15px;
    font-size: 14px;
}

.logo, .réseaus_links {
    position: relative;
    z-index: 1;
    width: 100%;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
    padding: 10px;
}

.réseaus_links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px 0;
}

.réseaus_links a img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}

.réseaus_links a:hover img {
    transform: scale(1.1);
}

/* Food Items List */
.list_imgs {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    transition: transform 0.3s ease;
}

/* Food Item Styling */
.img_food {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
    min-height: 160px;
    padding: 0 20px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    -webkit-box-shadow: var(--box-shadow);
    box-shadow: var(--box-shadow);
}

.content-wrapper:nth-child(even) {
    background-color: #F2F2F2;
}

.content-wrapper:nth-child(odd) {
    background-color: #fefdfd;
}

.content-wrapper:hover {
    transform: scale(1);
}

.food_title {
    flex: 1;
    padding: 15px;
    z-index: 2;
    position: relative;
}

.food_title h3 {
    font-family: "ropa-sans-arabic", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    color: #D1D1D1;
    text-transform: uppercase;
    letter-spacing: 2%;
}

.food_title h1 {
    font-family: 'Anton', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #000;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2%;
}

/* Image Container */
.image {
    width: auto;
    transform: translateX(-40px);
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: right;
    z-index: 1;
}

.image img {
    max-height: 150px;
    width: 100%;
    object-fit: contain;
    transition: var(--transition);
    transform: scale(1);
}

/* Food Icon */
.food_icon {
    width: 50px;
    height: 50px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    flex-shrink: 0;
    flex-grow: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: black;
}

.food_icon:hover {
    transform: scale(1.1);
}

.food_icon svg {
    width: 22px;
    height: 22px;
    fill: #f1f1f1;
}

.food_icon:hover svg {
    fill: var(--primary-color);
}

.food_icon:focus svg {
    fill: var(--primary-color) !important;
}

/* Gradient Overlay */
.img_food::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    z-index: 1;
}

/* Food Content */
.food-content {
    padding: 20px;
    background-color: #f5f5f5;
    width: 100%;
    z-index: 1000;
    -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: none;
    position: relative;
}

/* Expanded state */
.img_food.expanded {
    height: auto;
    min-height: 160px;
    z-index: 5;
    position: relative;
}

.img_food.expanded .food-content {
    display: block;
}

.img_food.expanded .content-wrapper {
    margin-top: 60px;
}

.img_food.expanded .food_icon svg {
    transform: rotate(90deg);
}

.food-content {
    overscroll-behavior-y: contain; /* Empêche le scroll "trop loin" */
}

.food-content::-webkit-scrollbar {
    width: 6px;
}

.food-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/***************************************************/
/* Responsive Design */
@media (max-width: 1415px) {
    .image img {
        transform: scale(0.8);
    }
    .sousTitle, .Title {
        font-size: 30px !important;
        width: 100%;
    }

    /* Styles spécifiques pour Safari */
    @supports (-webkit-overflow-scrolling: touch) {
        .image img {
            transform: scale(0.85); /* Ajustement pour Safari */
        }
    }
}

@media (max-width: 770px) {
    .background_left {
        position: fixed;
        left: 0;
        width: 400px;
        height: 100vw;
        transform: translateX(-100%);
    }
    .background_left.active {
        transform: translateX(0);
        transform: translateY(10px);
        width: 100%;
        height: 100%;
        max-width: 200px;
        max-height: 100vmax;
        overflow-y: scroll;
        overflow-x: hidden;
    }
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .list_imgs {
        margin-left: 0;
        width: 100%;
    }

    .logo {
        max-width: 40%;
        max-height: 40%;
    }
    .logo_image {
        width: 100%;
        height: 100%;
    }
    #réseaus_linko {
        transform: translateY(-30px);
    }

    #réseaus_linko a {
        max-width: 100%;
        max-height: 100%;
    }
    #réseaus_linko a img {
        max-height: 40px;
        max-width: 40px;
    }

    .additional-info {
        display: block !important;
        transform: translateY(-50px);
    }
    #réseaus_link {
        margin-right: 40px;
    }

    .close-icon {
        display: block !important;
    }

    .footer {
        display: none;
    }

    /* Styles spécifiques pour Safari */
    @supports (-webkit-overflow-scrolling: touch) {
        .background_left {
            width: 100%; /* Ajustement pour Safari */
        }
    }
}

/* Touch Devices */
@media (hover: none) {
    .food_icon, .réseaus_links a img {
        transform: scale(1.1) !important;
    }
}

@media (max-width: 800px) {
    .image {
        right: 100px;
    }

    .img_food {
        height: 120px !important;
        max-height: 120px !important;
    }

    .image img {
        max-height: 70px;
        transform: scale(1.4);
    }

    .food_icon {
        width: 35px;
        height: 35px;
    }

    .food_icon svg {
        width: 18px;
        height: 18px;
    }

    .logo {
        width: 100%;
        max-width: 100px;
        height: 100px;
        margin-right: 50px;
    }
    .logo .logo_image {
        width: 100%;
    }

    .réseaus_links {
        width: 100%;
        max-width: 250px;
        margin-right: 50px;
        gap: 5px;
    }
    .réseaus_links a {
        width: 30px;
        height: 30px;
        margin-left: 5px;
    }
    .réseaus_links a img {
        width: 100%;
        height: 100%;
    }

    .additional-info h1 {
        font-size: 10px;
    }
    .additional-info {
        transform: translateY(-70px)!important;
    }

    /* Styles spécifiques pour Safari */
    @supports (-webkit-overflow-scrolling: touch) {
        .image {
            right: 50px; /* Ajustement pour Safari */
        }

        .img_food {
            height: auto; /* Permettre à l'élément de s'ajuster */
            max-height: none; /* Supprimer la limite de hauteur */
        }
    }
}

@media (max-width: 480px) {
    .cards-container {
        grid-template-columns: 1fr;
    }

    .img_food {
        height: 80px !important;
        max-height: 80px !important;
    }

    .sousTitle {
        font-size: 20px !important;
        width: 100%;
    }

    .Title {
        font-size: 22px !important;
        width: 100%;
    }

    /* Additional Info Styles */
    .additional-info {
        padding: 20px;
        color: white;
        display: none;
    }

    .additional-info h3 {
        margin-bottom: 10px;
        font-size: 18px;
    }

    .additional-info p {
        margin-bottom: 15px;
        font-size: 14px;
    }
}

@media (max-width: 350px) {
    .cards-container {
        grid-template-columns: 1fr;
    }

    .img_food {
        height: 80px !important;
        max-height: 80px !important;
    }

    .sousTitle {
        font-size: 15px !important;
        width: 100%;
    }

    .Title {
        font-size: 18px !important;
        width: 100%;
    }

    /* Additional Info Styles */
    .additional-info {
        padding: 20px;
        color: white;
        display: none;
    }

    .additional-info h3 {
        margin-bottom: 10px;
        font-size: 18px;
    }

    .additional-info p {
        margin-bottom: 15px;
        font-size: 14px;
    }
}

/* Min */
@media (min-width: 1000px) {
    .container {
        flex-direction: row;
    }

    .background_left {
        min-height: 100vh;
        width: 30%;
        min-width: 200px;
        transform: translateX(0);
        position: relative;
    }

    .mobile-navbar {
        display: none;
        visibility: hidden;
    }

    .list_imgs {
        width: 70%;
        max-height: 100vh;
    }

    .img_food {
        height: 150px !important;
        min-height: 200px;
    }

    .food_title h3 {
        font-size: 25px !important;
    }

    .food_title h1 {
        font-size: 27px !important;
    }

    .image {
        right: 100px;
    }

    .image img {
        max-height: 180px;
    }

    .food_icon svg {
        width: 30px;
        height: 30px;
    }
    .close-icon {
        display: none;
    }

    /* Styles spécifiques pour Safari */
    @supports (-webkit-overflow-scrolling: touch) {
        .image img {
            max-height: 150px; /* Ajustement pour Safari */
        }
    }
}

@media (min-width: 769px) {
    .container {
        flex-direction: row;
    }

    .background_left {
        min-height: 100vh;
        width: 30%;
        min-width: 200px;
        transform: translateX(0);
        position: relative;
    }

    .mobile-navbar {
        display: none;
        visibility: hidden;
    }

    .list_imgs {
        width: 70%;
        max-height: 100vh;
    }

    .img_food {
        height: 100px !important;
        min-height: 200px;
    }

    .food_title h3 {
        font-size: 20px !important;
    }

    .food_title h1 {
        font-size: 22px !important;
    }

    .image {
        right: 100px;
    }

    .image img {
        max-height: 180px;
    }

    .food_icon {
        width: 60px;
        height: 60px;
    }

    .food_icon svg {
        width: 30px;
        height: 30px;
    }
    .close-icon {
        display: none;
    }

    /* Styles spécifiques pour Safari */
    @supports (-webkit-overflow-scrolling: touch) {
        .food_icon {
            width: 50px; /* Ajustement pour Safari */
        }
    }
}

@media (min-width: 600px) {
    .food_icon {
        width: 40px;
        min-width: 30px;
        height: 40px;
        min-height: 30px;
    }

    .food_icon svg {
        width: 18px;
        height: 18px;
        min-width: 14px;
        min-height: 14px;
    }

    #réseaus_linko a {
        width: 30px;
        height: 30px;
        min-width: 20px;
        min-height: 20px;
        margin-left: 2px;
    }
    #réseaus_linko a img {
        width: 100%;
        height: 100%;
    }
    #réseaus_linko {
        padding: 10px;
        margin-right: 10px;
    }
    .additional-info {
        transform: translateY(2px);
    }

    /* Styles spécifiques pour Safari */
    @supports (-webkit-overflow-scrolling: touch) {
        .additional-info {
            padding: 15px; /* Ajustement pour Safari */
        }
    }
}
