:root {
    --main-color: rgb(248, 198, 188);
    --main-color-20: rgba(248, 198, 188, 0.2);
    --main-dark-color: rgb(235, 158, 143);
    --secondary-color: rgb(109, 118, 143);
    --secondary-dark-color: rgb(85, 94, 117);
    --black-color: rgb(0, 0, 0);
    
    --header-height: 50px;
    --footer-height: 60px;

    /* On redéfinit quelques tokens de Fluent UI pour nos boutons */
    /* Ici on choisit d'utiliser nos couleurs comme couleur d'accent */
    --accent-fill-rest: var(--main-dark-color) !important;
    --accent-fill-hover: var(--main-color) !important;
    --accent-fill-active: var(--main-color) !important;
    --accent-foreground-rest: var(--black-color) !important;
    --accent-stroke-control-rest: var(--main-dark-color) !important;
    --accent-stroke-control-hover: var(--main-dark-color) !important;
    --accent-stroke-control-active: var(--main-dark-color) !important;
    
    /* Pour un style neutre, on peut utiliser nos couleurs secondaires */
    --neutral-foreground-rest: var(--secondary-color) !important;
    --neutral-foreground-hover: var(--secondary-dark-color) !important;
}


.container{
    height: calc(94dvh - (var(--header-height) + var(--footer-height)));
    padding: 1.25rem;
}

.container > div{
    height: 100%;
}

.flex{
    display: flex !important;
}

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

.flex-row{
    flex-direction: row !important;
}

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

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

.align-center{
    align-items: center !important;
}

.justify-center{
    justify-content: center !important;
}

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

.no-wrap{
    flex-wrap: nowrap !important;
}

.basis-1{
    flex-basis: 10% !important;
}

.basis-2{
    flex-basis: 20% !important;
}

.basis-3{
    flex-basis: 30% !important;
}

.basis-4{
    flex-basis: 40% !important;
}

.basis-5{
    flex-basis: 50% !important;
}

.basis-6{
    flex-basis: 60% !important;
}

.basis-7{
    flex-basis: 70% !important;
}

.basis-8{
    flex-basis: 80% !important;
}

.basis-9{
    flex-basis: 90% !important;
}

.basis-10{
    flex-basis: 100% !important;
}


.basis-auto{
    flex-basis: auto !important;
}

.p-0\.5{
    padding: 0.125rem !important;
}

.pt-1{
    padding-top: 1rem !important;
}

.px-1{
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.m-0{
    margin: 0 !important;
}

.mt-1{
    margin-top: 0.5rem;
}
.mt-2{
    margin-top: 1rem;
}

.mx-auto{
    margin-left: auto;
    margin-right: auto;
}


.row-gap-0\.5{
    row-gap: 0.5rem !important;
}

.row-gap-1{
    row-gap: 1rem !important;
}

.col-gap-0\.5{
    column-gap: 0.5rem !important;
}

.col-gap-1{
    column-gap: 1rem !important;
}

.w-full{
    width: 100% !important;
}

.w-svw{
    width: 100vw !important;
}

.h-50px{
    height: 50px !important;
}

.loader {
    background-color: #e0e0e0;
    overflow: hidden;
    position: relative;
}

.loader:before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
    );
    position: absolute;
    top: 0;
    left: -100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.line {
    width: 100%;
    height: 15px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 0px;
    overflow: hidden;
    position: relative;
}

.line:before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
    );
    position: absolute;
    top: 0;
    left: -100%;
    animation: loading 1.5s infinite;
}


/*recipes*/
/* Recipes List Container */
.recipes-list {
}

/* Recipe Card */
.recipe-card {
    height: 100px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 123, 131, 0.2);
}

/* Recipe Image */
.recipe-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Recipe Content */
.recipe-content {
    padding: 15px;
}

/* Recipe Title */
.recipe-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    color: var(--secondary-dark-color);
    margin: 0;
}

/* Recipe Description */
.recipe-description {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    color: var(--secondary-dark-color);
    margin-top: 10px;
    overflow: hidden;          /* Masque le contenu qui déborde */
    text-overflow: ellipsis;   /* Ajoute "..." */
    display: -webkit-box;      /* Nécessaire pour WebKit (Chrome, Edge, Safari) */
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;     /* Limite à 2 lignes dans les navigateurs WebKit */

    display: block;            /* Pour le support Firefox */
    line-height: 1.5;          /* Hauteur d'une ligne */
    max-height: calc(1.5em * 2); /* Limite à 2 lignes */
    white-space: normal;       /* Permet les retours à la ligne */
}

/* Responsive Design */
@media (max-width: 768px) {
    .recipes-list {
        font-size: 0.8em;
    }
    
    .recipe-description {
        font-size: 0.7em;
    }
    
    .recipe-card {
        max-width: 100%;
    }
}

/* shopping list */
/* Shopping List Container */
.shopping-list-container{
    height: 80svh;
    overflow-x: auto;
}

.shopping-list{
    max-width: 800px;
    margin: 0 auto;
}

/* Shopping Item */
.shopping-list-item {
    align-items: center;
    background: #ffffff;
    border-left: 5px solid var(--main-dark-color); /* Ligne de couleur pour rappeler la charte graphique */
    padding: 0 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.shopping-list-item:hover {
    background: #f0f8f8; /* Couleur d'arrière-plan plus claire au survol pour un effet visuel doux */
    box-shadow: 0 8px 16px rgba(0, 123, 131, 0.2);
}

/* Item Quantity */
.shopping-quantity {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: bold;
    color: var(--secondary-dark-color);
}

/* Item Name */
.shopping-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    color: var(--secondary-color);
    flex-grow: 2;
    margin: 0 15px;
}

/* Item Unit */
.shopping-unit {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .shopping-list {
        padding: 10px;
    }
    
    .item-name {
        margin: 0;
    }

    .shopping-list-item {
        font-size: 0.8em;
    }
}

.scrollable-content {
    flex: 1; 
    overflow-y: auto;
}

/* Item Checkbox */
.item-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--secondary-color); 
    cursor: pointer;
}

.overflow-y-auto{
    overflow-y: auto;
}