﻿/* ***** HEADER ***** */
header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: .3rem 1rem;
    background: var(--background-primaryOpacity);
    border-bottom: 1px solid var(--secondary-color);
    backdrop-filter: blur(.5rem);

    .menu {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;

        a.imgMenu {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            color: transparent;
            transition: none;
            padding: 0;
            border: none;
            border-radius: 5px;
            background: transparent;
            color: none;
            cursor: pointer;
            transition: background 0.3s ease, transform 0.2s ease;

            &:hover {
                background: none;
                transform: scale(1.05);
            }

            &:visited {
                color: none;
            }

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

            &:focus {
                outline: 0px solid transparent;
                outline-offset: none;
            }

            img {
                width: 12rem;
            }
        }

        .linkNav {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            gap: 1rem;

            a{
                span{
                    font-size: 1.3rem;
                    font-weight: 500;
                }
            }
            
            a.active{
                text-decoration: underline;
            }

        }

        .ctaButtons {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            padding: .1rem;
            gap: 1rem;

            a.connected.active{
                text-decoration: underline;
            }
        }
    }
}

/* ***** TOOLBAR ***** */
section.toolbar {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 12;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0rem 1rem;
    background: var(--background-primaryOpacity);
    backdrop-filter: blur(10px);
    border-top: .01rem solid var(--primary-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);

    .ctaButtons {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0rem;
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.2s ease;
        position: relative;
        
        .tab-button{
            font-size: 1rem;
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0rem;
            color: var(--text-primary);
            text-decoration: none;
            transition: all 0.2s ease;
            position: relative;
        }

        .tab-button.active{
            color: var(--primary-color);

            &::after {
                content: '';
                display: block;
                width: 100%;
                height: 3px;
                background-color: var(--primary-color);
                margin-top: 4px;
                border-radius: 0px;
            }
        }

        .tab-button:hover {
            color: var(--primary-color);

        }
    }
}

main{
    width: 100%;
}

/* ***** PAGE CONNEXION ***** */
.login,
.register{
    display: flex;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    margin: 5rem 0;

    .login-content,
    .register-content{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: .5rem;
        background-color: var(--background-primary);
        margin: 5% auto;
        padding: 2rem;
        border-radius: 15px;
        box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);

        .login-header,
        .register-header{
            margin-bottom: 1.5rem;
            text-align: center;
        
            h2 {
                color: var(--primary-color);
                margin-bottom: 0.5rem;
            }
        
            p {
                color: var(--text-secondary);
                font-size: 0.95rem;
            }
        }

        .login-body,
        .register-body{
            .form-group {
                margin-bottom: 1.2rem;
            }
            label {
                display: block;
                margin-bottom: 0.5rem;
                font-weight: 500;
            }
            input[type="email"],
            input[type="password"],
            input[type="text"] {
                width: 100%;
                padding: 12px 15px;
                border: 1px solid var(--primary-color);
                border-radius: 8px;
                background-color: var(--input-background);
                font-size: 1rem;
                transition: all 0.3s;
            }
            input:focus {
                border-color: var(--primary-color);
                box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
                outline: none;
            }

            .password-container {
                position: relative;

                .password-toggle {
                    position: absolute;
                    right: 15px;
                    top: 50%;
                    transform: translateY(-50%);
                    cursor: pointer;
                    color: var(--text-secondary);
                }
            }

            .form-footer {
                text-align: center;
                margin-top: 1rem;

                .forgot-password {
                    text-decoration: none;
                    font-size: 1rem;

                    &:hover {
                        text-decoration: underline;
                    }
                }
            }

            .separator {
                position: relative;
                text-align: center;
                margin: 1.5rem 0;

                &::before {
                    content: '';
                    position: absolute;
                    top: 50%;
                    left: 0;
                    width: 45%;
                    height: 1px;
                    background-color: var(--primary-color);
                }
                &::after {
                    content: '';
                    position: absolute;
                    top: 50%;
                    right: 0;
                    width: 45%;
                    height: 1px;
                    background-color: var(--primary-color);
                }

                span {
                    background-color: var(--background-color);
                    padding: 0 10px;
                    position: relative;
                    z-index: 1;
                    color: var(--text-secondary);
                }
            }

            .signup-link {
                text-align: center;
                margin-top: 1.5rem;
            }
        }
    }
}

/* ***** MODAL DE CONNEXION ***** */
#demoModal,
.modal {
    display: none;
    position: fixed;
    z-index: 1200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;

    .modal-content {
        background-color: var(--background-primary);
        margin: 5% auto;
        padding: 2rem;
        border-radius: 15px;
        box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
        width: 90%;
        max-width: 500px;
        position: relative;
        animation: modalFadeIn 0.3s ease-out;

        img.hero-image {
            position: absolute;
            bottom: 3rem;
            right: -2rem;
            width: 150px;
            height: 150px;
            transform: rotate(-15deg);
            z-index: 3;
        }

        #closeDemoModal,
        .close {
            position: absolute;
            right: 20px;
            top: 15px;
            font-size: 28px;
            font-weight: bold;
            color: var(--text-color);
            cursor: pointer;
            transition: all 0.2s;

            &:hover {
                color: var(--primary-color);
            }
        }

        

        .modal-header {
            display: flex;
            gap: 1rem;
            text-align: center;
        
            h2 {
                color: var(--primary-color);
                margin-bottom: 0.5rem;
            }
        
            p {
                color: var(--text-secondary);
                font-size: 0.95rem;
            }
        }

        .modal-header-connexion {
            display: flex;
            flex-direction: column;
            gap: .5rem;
            text-align: center;
        
            h2 {
                color: var(--primary-color);
                margin-bottom: 0.5rem;
            }
        
            p {
                color: var(--text-secondary);
                font-size: 0.95rem;
            }
        }

        .modal-body{
            #loginForm{
                display: flex;
                flex-direction: column;
                gap: .5rem;
                width: 90%;
            }
            .form-group {
                margin-bottom: 1.2rem;
            }
            label {
                display: block;
                margin-bottom: 0.5rem;
                font-weight: 500;
            }
            input[type="email"],
            input[type="password"] {
                width: 100%;
                padding: 12px 15px;
                border: 1px solid var(--primary-color);
                border-radius: 8px;
                background-color: var(--input-background);
                font-size: 1rem;
                transition: all 0.3s;
            }
            input:focus {
                border-color: var(--primary-color);
                box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
                outline: none;
            }

            .password-container {
                position: relative;

                .password-toggle {
                    position: absolute;
                    right: 15px;
                    top: 50%;
                    transform: translateY(-50%);
                    cursor: pointer;
                    color: var(--text-secondary);
                }
            }

            .form-footer {
                text-align: center;
                margin-top: 1rem;

                .forgot-password {
                    text-decoration: none;
                    font-size: 1rem;

                    &:hover {
                        text-decoration: underline;
                    }
                }
            }

            .separator {
                position: relative;
                text-align: center;
                margin: 1.5rem 0;

                &::before {
                    content: '';
                    position: absolute;
                    top: 50%;
                    left: 0;
                    width: 45%;
                    height: 1px;
                    background-color: var(--primary-color);
                }
                &::after {
                    content: '';
                    position: absolute;
                    top: 50%;
                    right: 0;
                    width: 45%;
                    height: 1px;
                    background-color: var(--primary-color);
                }

                span {
                    background-color: var(--background-color);
                    padding: 0 10px;
                    position: relative;
                    z-index: 1;
                    color: var(--text-secondary);
                }
            }

            .signup-link {
                text-align: center;
                margin-top: 1.5rem;
            }

            .modal-actions {
                display: flex;
                flex-direction: column;
                gap: 1rem;
                justify-content: center;
            }
        }
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 768px){
    #demoModal,
    .modal {
        .modal-content {
            img.hero-image {
                bottom: 8rem;
                right: 0;
                width: 100px;
                height: 100px;
            }
        }
    }
}

/* ***** MODAL DOWNGRADE ***** */
.downgrade-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.downgrade-option {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--background-secondary);
}

.downgrade-option:hover {
    border-color: var(--primary-color);
    background-color: var(--background-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.downgrade-option input[type="radio"] {
    margin-right: 1rem;
    margin-top: 0.2rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.downgrade-option input[type="radio"]:checked ~ .option-content {
    color: var(--primary-color);
}

.downgrade-option input[type="radio"]:checked ~ .option-content .option-header h4 {
    color: var(--primary-color);
}

.option-content {
    flex: 1;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.option-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.option-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.option-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.option-features li {
    padding: 0.3rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-features li i {
    font-size: 0.8rem;
}

/* Modal close button styling */
.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-color);
}

/* Breadcrumbs */
.breadcrumb-nav {
    margin: 1rem 0;
    padding: 0 2rem;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--background-secondary);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb-item span[aria-current="page"] {
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive breadcrumbs */
@media (max-width: 1023px) {
    .breadcrumb-nav {
        padding: 0 1rem;
    }
    
    .breadcrumb-list {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* ***** INTRODUCTION SECTION HERO PAGE ACCUEIL ***** */
.hero,
.seo-hero{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    padding-top: 7rem;
    height: 100%;
    background: url("../img/cuisine/cuisine2.svg"),
    url("../img/categories/categorie_16_1747401290.webp"),
    url("../img/categories/categorie_10_1747401137.webp"),
    url("../img/categories/categorie_11_1747401165.webp"),
    url("../img/categories/categorie_12_1747400842.webp"),
    url("../img/categories/categorie_1_1747401062.webp"),
    url("../img/categories/categorie_3_1747401029.webp"),
    url("../img/categories/categorie_6_1747401153.webp"),
    url("../img/categories/categorie_9_1747401270.webp");
    background-size: 10%;
    background-position: 
        50% 10%,  /* En haut au centre */
        90% 20%,  /* En haut � droite */
        10% 20%,  /* En haut � gauche */
        85% 50%,  /* � droite au milieu */
        15% 50%,  /* � gauche au milieu */
        75% 80%,  /* En bas � droite */
        25% 80%,  /* En bas � gauche */
        60% 90%,  /* En bas vers la droite */
        40% 90%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: all 0.3s ease-in-out;
    animation-name: heroBackgroundAnimation;
    animation-duration: 8s;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-fill-mode:both;

    .boxHero,
    .seo-hero-content{
        max-width: 900px;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: .5rem;
        gap: 1rem;
        padding: 2rem;
        background-color: var(--background-secondaryOpacity);
        transition: all 0.3s ease-in-out;

        .recipes-badges {
            display:flex; 
            justify-content:center; 
            align-items:center; 
            gap:.8rem; 
            flex-wrap:wrap; 
            margin-bottom:1.5rem;
            width: 100%;

            .badge {
                display: inline-flex;
                align-items: center;
                gap: 0.35rem;
                padding: 0.375rem 0.75rem;
                border-radius: 20px;
                font-size: 1rem;
                font-weight: 500;
                white-space: nowrap;
                transition: all 0.2s ease;
                cursor: help;
                
                i {
                    font-size: 0.9rem;
                }
                
                &:hover {
                    transform: translateY(-2px);
                    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
                }
            }
            
            .badge-popular {
                background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
                color: #121212;
                
                i {
                    color: #ff9800;
                }
            }
            
            .badge-taste {
                background: linear-gradient(135deg, #ff6b9d 0%, #ffa8c5 100%);
                    color: #e91e63;
                
                i {
                    color: #e91e63;
                }
            }
            
            .badge-tried {
                background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
                color: #fff;
                
                i {
                    color: #2e7d32;
                }
            }
            
            .badge-new {
                background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
                color: #FFFFFF;
                
                i {
                    color: #6a1b9a;
                }
            }
        }

        #formIngredients{
            background-color: var(--background-secondaryOpacity);
            padding: 2rem 1rem;
            border-radius: 1rem;

            #ingredients-container{
                display: flex;
                flex-direction: column;
                gap: .5rem;
                margin-bottom: 1rem;
                width: 100%;

                .ingredient-input-group{
                    position: relative;
                    width: 100%;

                    .autocomplete-items{
                        position: absolute;
                        border: 1px solid var(--primary-color);
                        border-top: none;
                        z-index: 999;
                        top: 100%;
                        left: 0;
                        right: 0;
                        max-height: 250px;
                        overflow-y: auto;
                        overflow-x: hidden;
                        background-color: var(--background-primary);
                        border-radius: 0 0 .5rem .5rem;
                        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
                        scrollbar-width: thin;
                        scrollbar-color: var(--primary-color) var(--background-secondary);
                        
                        &::-webkit-scrollbar {
                            width: 8px;
                        }
                        
                        &::-webkit-scrollbar-track {
                            background: var(--background-secondary);
                        }
                        
                        &::-webkit-scrollbar-thumb {
                            background: var(--primary-color);
                            border-radius: 4px;
                        }
                        
                        div{
                            padding: 12px 15px;
                            cursor: pointer;
                            color: var(--text-primary);
                            border-bottom: 1px solid var(--background-secondary);
                            transition: background-color 0.2s ease;
                            
                            &:hover{
                                background-color: var(--background-secondary);
                            }
                            
                            &:last-child {
                                border-bottom: none;
                            }
                            
                            &.autocomplete-active {
                                background-color: var(--primary-color);
                                color: white;
                            }
                        }
                    }
                }
            }

            .selected-ingredients{
                display: flex;
                flex-wrap: wrap;
                gap: .5rem;
                margin-bottom: 1rem;
                .ingredient-badge {
                    display: inline-flex;
                    align-items: center;
                    gap: 0.5rem;
                    padding: 0.5rem 1rem;
                    background-color: var(--primary-color);
                    color: white;
                    border-radius: 3rem;
                    font-size: 0.9rem;
                }

                .remove-ingredient, .remove-input {
                    background: none;
                    border: none;
                    color: white;
                    cursor: pointer;
                    padding: 0;
                    margin-left: 0.25rem;
                    font-size: 0.8rem;
                }

                .remove-input {
                    color: var(--primary-color);
                    position: absolute;
                    right: 10px;
                    top: 50%;
                    transform: translateY(-50%);
                }
            }
        }

        #guest-ingredients-finder {
            .recipes{
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                align-items: flex-start;
                width: 100%;
                padding: 1rem;
                gap: 2rem;

                .recipeBox{
                    position: relative;
                    width: 100%;
                    max-width: 290px;
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;
                    gap: .5rem;
                    padding: 0rem 1rem 1rem 1rem;
                    border-radius: .5rem;
                    background-color: var(--background-primary);
                    /* box-shadow: 0 0 12px var(--primary-color); */
                    overflow: hidden;
                    transition: all 0.3s ease-in-out;

                    h4{
                        font-size: 1.2rem;
                        text-align: center;
                    }

                    p{
                        font-size: .7rem;
                    }

                    &:hover {
                        transform: scale(1.05);
                        box-shadow: 1px 1px 0px var(--primary-color);
                    }

                    img {
                        width: 300px;
                        height: 200px;
                        object-fit: cover;
                        /* object-position: center; */
                        transition: all 0.3s ease-in-out;
                        &:hover {
                            transform: scale(1.1);
                        }
                    }

                    .recipe-meta {
                        display: flex;
                        flex-wrap: wrap;
                        gap: 0.75rem;
                        margin-bottom: 1rem;
                        font-size: 0.9rem;
                        position: absolute;
                        top: 0;
                        left: 0;
                        padding: .3rem;
                        margin: .3rem;
                        background: var(--background-primaryOpacity);
                        border-radius: .5rem;

                        span {
                            display: flex;
                            align-items: center;
                            font-size: .7rem;
                            gap: 0.25rem;

                            i {
                                color: var(--primary-color);
                            }
                        }

                        span.percentage-badge {
                            padding: .2rem .5rem;
                            border-radius: 3rem;
                            font-weight: bold;
                        }

                        .percentage-badge.complete {
                            background-color: var(--alert-success);
                            color: var(--text-success);
                        }

                        .percentage-badge.partial {
                            background: var(--secondary-color);
                            color: white;
                        }
                        
                        .missing-count {
                            /* padding: .2rem .5rem; */
                            font-weight: 600;
                            font-size: 0.7rem;
                            
                            i {
                                font-size: 0.7rem;
                                margin-right: 0.1rem;
                            }
                        }
                    }
                }

                .recipeBox.recipeBox-complete {
                    border: 2px solid;
                    border-color: var(--alert-success);

                    &:hover {
                        transform: scale(1.05);
                        box-shadow: 1px 1px 0px var(--alert-success);
                    }
                }

                .recipeBox.recipeBox-partial {
                    border: 2px solid;
                    border-color: var(--alert-warning);
                }

                .no-recipes {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    gap: 2rem;
                    text-align: center;
                    font-size: 1.2rem;
                    padding: 2rem;
                    color: var(--primary-color);
                    background-color: rgba(0, 0, 0, 0.05);
                    border-radius: 8px;
                }
            }
        }
    }
}

@keyframes heroBackgroundAnimation {
    0% {
        background-size: 9%;
        background-position: 
            50% 10%,  /* En haut au centre */
            90% 20%,  /* En haut � droite */
            10% 20%,  /* En haut � gauche */
            85% 50%,  /* � droite au milieu */
            15% 50%,  /* � gauche au milieu */

            75% 80%,  /* En bas � droite */
            25% 80%,  /* En bas � gauche */
            60% 90%,  /* En bas vers la droite */
            40% 90%;  /* En bas vers la gauche */
    }
    25% {
        background-size: 11%;
        background-position: 
            50% 12%,  /* En haut au centre */
            88% 22%,  /* En haut � droite */
            12% 18%,  /* En haut � gauche */
            87% 48%,  /* � droite au milieu */
            13% 52%,  /* � gauche au milieu */
            77% 78%,  /* En bas � droite */
            23% 82%,  /* En bas � gauche */
            62% 88%,  /* En bas vers la droite */
            38% 92%;  /* En bas vers la gauche */
    }
    50% {
        background-size: 10%;
        background-position: 
            50% 15%,  /* En haut au centre */
            92% 18%,  /* En haut � droite */
            8% 22%,   /* En haut � gauche */
            89% 52%,  /* � droite au milieu */
            11% 48%,  /* � gauche au milieu */
            79% 82%,  /* En bas � droite */
            21% 78%,  /* En bas � gauche */
            64% 92%,  /* En bas vers la droite */
            36% 88%;  /* En bas vers la gauche */
    }
    75% {
        background-size: 12%;
        background-position: 
            50% 13%,  /* En haut au centre */
            86% 24%,  /* En haut � droite */
            14% 16%,  /* En haut � gauche */
            83% 54%,  /* � droite au milieu */
            17% 46%,  /* � gauche au milieu */
            73% 84%,  /* En bas � droite */
            27% 76%,  /* En bas � gauche */
            58% 94%,  /* En bas vers la droite */
            42% 86%;  /* En bas vers la gauche */
    }
    100% {
        background-size: 9%;
        background-position: 
            50% 10%,  /* En haut au centre */
            90% 20%,  /* En haut � droite */
            10% 20%,  /* En haut � gauche */
            85% 50%,  /* � droite au milieu */
            15% 50%,  /* � gauche au milieu */
            75% 80%,  /* En bas � droite */
            25% 80%,  /* En bas � gauche */
            60% 90%,  /* En bas vers la droite */
            40% 90%;  /* En bas vers la gauche */
    }
}

body.logged-in .hero {
   padding-top: 0rem;
   height: auto;
}

/* Notice du formulaire */
.form-notice {
    /* background: var(--alert-warning); */
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--secondary-color);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;

    i {
        color: var(--secondary-color);
        font-size: 1.2rem;
        margin-top: 0.2rem;
    }

    p {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Section Probl�me vs Solution */
.problem-solution {
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: url("../img/cuisine/cuisine11.svg"),
    url("../img/legumes/legumes8.webp"),
    url("../img/legumes/legumes9.webp"),
    url("../img/legumes/legumes10.webp"),
    url("../img/legumes/legumes11.webp"),
    url("../img/legumes/legumes12.webp"),
    url("../img/legumes/legumes13.webp"),
    url("../img/legumes/legumes14.webp"),
    url("../img/legumes/legumes15.webp");

    background-size: 10%;
    background-position: 
        50% 10%,  /* En haut au centre */
        90% 20%,  /* En haut � droite */
        10% 20%,  /* En haut � gauche */
        85% 50%,  /* � droite au milieu */
        15% 50%,  /* � gauche au milieu */
        75% 80%,  /* En bas � droite */
        25% 80%,  /* En bas � gauche */
        60% 90%,  /* En bas vers la droite */
        40% 90%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    animation-name: heroBackgroundAnimation;
    animation-duration: 8s;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-fill-mode:both;

    .problem-solution-container {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        flex-wrap: wrap;
    }
}

.problem-box, .solution-box {
    flex: 1;
    min-width: 300px;
    background: var(--background-primaryOpacity);
    backdrop-filter: blur(.5rem);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;

    h3{
        color: var(--primary-color);
    }

    blockquote {
        font-style: italic;
        font-size: 1.1rem;
        color: var(--text-secondary);
        margin: 1.5rem 0;
        border-left: 3px solid var(--danger-color);
        padding-left: 1rem;
    }

    .problem-consequences, .solution-benefits {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1.5rem;

        .consequence, .benefit {
            padding: .5rem 1rem;
            border-radius: 3rem;
            font-size: 1.2rem;
            font-family: "milky";
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 2px;
            width: fit-content;
        }

        .consequence {
            background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
            color: #121212;
            text-shadow: var(--text-warning) 1px 1px 0px;
        }

        .benefit {
            background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
            color: #F9F9F9;
            text-shadow: var(--text-success) 1px 3px 0px;
        }

    }

    .problem-icon, .solution-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 1.5rem;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
    }

    .problem-icon {
        background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
        color: #121212;
    }

    .solution-icon {
        background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
        color: white;
    }
}

.problem-box:hover, .solution-box:hover {
    transform: translateY(-5px);
}

.solution-arrow {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;

    i {
        font-size: 3rem;
        animation: pulse 2s infinite;
    }
}

/* Section Avantages */
.advantages-section {
    padding: 4rem 2rem;
    background: url("../img/cuisine/cuisine7.svg"),
    url("../img/fruits/fruit2.webp"),
    url("../img/fruits/fruit3.webp"),
    url("../img/fruits/fruit4.webp"),
    url("../img/fruits/fruit5.webp"),
    url("../img/fruits/fruit6.webp"),
    url("../img/fruits/fruit7.webp"),
    url("../img/fruits/fruit8.webp"),
    url("../img/fruits/fruit9.webp");

    background-size: 10%;
    background-position: 
        50% 10%,  /* En haut au centre */
        90% 20%,  /* En haut � droite */
        10% 20%,  /* En haut � gauche */
        85% 50%,  /* � droite au milieu */
        15% 50%,  /* � gauche au milieu */
        75% 80%,  /* En bas � droite */
        25% 80%,  /* En bas � gauche */
        60% 90%,  /* En bas vers la droite */
        40% 90%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    animation-name: heroBackgroundAnimation;
    animation-duration: 8s;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-fill-mode:both;
}

.advantages-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.advantage-card {
    background: var(--background-primaryOpacity);
    backdrop-filter: blur(.5rem);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.advantage-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.advantage-icon.ecology {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
}

.advantage-icon.time {
    background: linear-gradient(135deg, var(--info-color), var(--info-color-dark));
}

.advantage-icon.alternative {
    background: linear-gradient(135deg, var(--warning-color), var(--warning-color-dark));
}

.advantage-icon.accessible {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.advantage-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.advantage-card p {
    color: var(--text-primary);
    line-height: 1.6;
}

/* Section � propos - Mission */
.about-mission {
    background: linear-gradient(135deg, var(--background-primary) 0%, var(--background-secondary) 100%);
    padding: 4rem 2rem;
    margin: 2rem 0;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.about-container h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.about-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.mission-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--background-primaryOpacity);
    backdrop-filter: blur(.5rem);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.mission-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Section Comment �a marche */
.how-it-works {
    padding: 4rem 2rem;
    background: var(--background-secondary);
    margin: 2rem 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.step-item {
    background: var(--background-primaryOpacity);
    backdrop-filter: blur(.5rem);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.step-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.step-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.step-item h4 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.step-item p {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
}

/* ***** SECTION HERO INGREDIENTS ***** */
.heroIngredients{
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    padding-top: 7rem;
    height: 100%;
    background: url("../img/cuisine/cuisine5.svg"),
    url("../img/categories/categorie_5_1747401201.webp"),
    url("../img/categories/categorie_6_1747401153.webp"),
    url("../img/categories/categorie_11_1747401165.webp"),
    url("../img/categories/categorie_12_1747400842.webp"),
    url("../img/categories/categorie_8_1747401112.webp"),
    url("../img/categories/categorie_15_1747401306.webp"),
    url("../img/categories/categorie_18_1747508823.webp"),
    url("../img/categories/categorie_13_1747401242.webp");
    background-size: 10%;
    background-position: 
        50% 10%,  /* En haut au centre */
        90% 20%,  /* En haut � droite */
        10% 20%,  /* En haut � gauche */
        85% 50%,  /* � droite au milieu */
        15% 50%,  /* � gauche au milieu */
        75% 80%,  /* En bas � droite */
        25% 80%,  /* En bas � gauche */
        60% 90%,  /* En bas vers la droite */
        40% 90%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: all 0.3s ease-in-out;
    animation-name: heroIngredientsBackgroundAnimation;
    animation-duration: 8s;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-fill-mode:both;

    .boxHeroIngredients{
        max-width: 900px;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        border-radius: .5rem;
        gap: 1rem;
        padding: 2rem;
        background-color: var(--background-primaryOpacity);
        transition: all 0.3s ease-in-out;

        h1{
            font-size: 3rem
        }

        h5{
            text-align: center;
        }
    }
}

@keyframes heroIngredientsBackgroundAnimation {
    0% {
        background-size: 9%;
        background-position: 
            50% 10%,  /* En haut au centre */
            90% 20%,  /* En haut � droite */
            10% 20%,  /* En haut � gauche */
            85% 50%,  /* � droite au milieu */
            15% 50%,  /* � gauche au milieu */
            75% 80%,  /* En bas � droite */
            25% 80%,  /* En bas � gauche */
            60% 90%,  /* En bas vers la droite */
            40% 90%;  /* En bas vers la gauche */
    }
    25% {
        background-size: 11%;
        background-position: 
            50% 12%,  /* En haut au centre */
            88% 22%,  /* En haut � droite */
            12% 18%,  /* En haut � gauche */
            87% 48%,  /* � droite au milieu */
            13% 52%,  /* � gauche au milieu */
            77% 78%,  /* En bas � droite */
            23% 82%,  /* En bas � gauche */
            62% 88%,  /* En bas vers la droite */
            38% 92%;  /* En bas vers la gauche */
    }
    50% {
        background-size: 10%;
        background-position: 
            50% 15%,  /* En haut au centre */
            92% 18%,  /* En haut � droite */
            8% 22%,   /* En haut � gauche */
            89% 52%,  /* � droite au milieu */
            11% 48%,  /* � gauche au milieu */
            79% 82%,  /* En bas � droite */
            21% 78%,  /* En bas � gauche */
            64% 92%,  /* En bas vers la droite */
            36% 88%;  /* En bas vers la gauche */
    }
    75% {
        background-size: 12%;
        background-position: 
            50% 13%,  /* En haut au centre */
            86% 24%,  /* En haut � droite */
            14% 16%,  /* En haut � gauche */
            83% 54%,  /* � droite au milieu */
            17% 46%,  /* � gauche au milieu */
            73% 84%,  /* En bas � droite */
            27% 76%,  /* En bas � gauche */
            58% 94%,  /* En bas vers la droite */
            42% 86%;  /* En bas vers la gauche */
    }
    100% {
        background-size: 9%;
        background-position: 
            50% 10%,  /* En haut au centre */
            90% 20%,  /* En haut � droite */
            10% 20%,  /* En haut � gauche */
            85% 50%,  /* � droite au milieu */
            15% 50%,  /* � gauche au milieu */
            75% 80%,  /* En bas � droite */
            25% 80%,  /* En bas � gauche */
            60% 90%,  /* En bas vers la droite */
            40% 90%;  /* En bas vers la gauche */
    }
}

body.logged-in .heroIngredients {
    height: auto;
    padding-top: 0rem;
}


/* ***** PAGE MONCOMPTE ***** */
.allListUsersFavorisAndIngredients, .settingsUser {
    margin: 0rem auto;
}

.allListUsersFavorisAndIngredients.tab-content,
.settingsUser.tab-content,
.user-statistics.tab-content,
.subscription-management.tab-content {
    display: none;
    padding: 2rem;
    margin-top: 4rem;
}

.allListUsersFavorisAndIngredients.tab-content.active {
    display: flex;
}

.settingsUser.tab-content.active {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.user-statistics.tab-content.active {
    display: block;
}

.subscription-management.tab-content.active {
    display: block;
}

.listUserRecipeFavoris, .listUserIngredientsPersonals, .account-info, .change-password, .delete-account, .subscription-info, .push-notifications-settings {
    background-color: var(--background-primary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    .subscription-active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

.allListUsersFavorisAndIngredients{
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;

    h2{
        font-size: 2rem;
        line-height: 1.2;
    }

    .listUserIngredientsPersonals{
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-height: 430px;
        min-height: 200px;
        padding: 1rem;
        gap: 1rem;


        .ingredients-list{
            margin: 1rem 0;
            overflow: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--primary-color) var(--background-secondary);

            .ingredient-tags{
                display: flex;
                flex-wrap: wrap;
                gap: .8rem;

                .ingredient-tag{
                    display: flex;
                    align-items: center;
                    background-color: var(--primary-color);
                    color: white;
                    padding: .2rem .5rem;
                    border-radius: 2rem;

                    span{
                        font-size: 0.8rem;
                    }

                    .inline-form{
                        display: inline;

                        button.remove-btn{
                            background: transparent;
                            border: none;
                            width: 24px;
                            height: 24px;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            cursor: pointer;
                            transition: all 0.2s ease;
                            padding: 0;

                            i {
                                color: white;
                                font-size: 1.1rem;
                                line-height: 0;
                            }

                            &:hover{
                                transform: rotate(90deg);
                            }
                        }
                    }
                }
            }
        }
    }

    .listUserRecipeFavoris{
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-height: 430px;
        min-height: 200px;
        padding: 1rem;
        gap: 1rem;

        .recipes{
            display: flex;
            flex-direction: column;
            width: 100%;
            gap: 1.5rem;
            padding: 1rem 0;
            overflow: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--primary-color) var(--background-secondary);

            .recipeBox{
                width: 100%;
                display: flex;
                flex-direction: row;
                justify-content: flex-start;
                align-items: center;
                border-bottom: 1px solid var(--primary-color);
                transition: transform .3s ease;

                img{
                    width: 48px;
                    height: 48px;
                    border-radius: 50%;
                }
                .recipe-meta{
                    width: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: flex-end;
                    padding: 0rem 1rem 0rem 0rem;

                    h6{
                        font-size: .9rem;
                        line-height: 0;
                        display: flex;
                        align-items: center;
                        gap: .3rem;

                        i {
                            line-height: 0;
                        }
                    }

                    span{
                        padding: .2rem .5rem;
                        border-radius: 3rem;
                    }

                    button{
                        #heart{
                            font-size: 1.5rem;
                        }
                    }
                }

                a{
                    font-size: 1.1rem;
                    width: 80%;
                    padding: .2rem .5rem;
                    text-align: center;
                    border-radius: 3rem;
                }

                a:hover{
                    transform: none;
                    rotate: none;
                }
            }
        }

        .empty-state{
            text-align: center;
            padding: 2rem 0;
            color: var(--text-secondary);
        }
    }
}

.settingsUser{
    h2 {
        width: 100%;
    }
    
    .account-info,
    .push-notifications-settings,
    .security-devices-section,
    .change-password,
    .delete-account {
        padding: 1.5rem;
        background: var(--background-primary);
        margin-bottom: 2rem;
        border-radius: 1rem;
    }

    .security-devices-section {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items:center;
        gap: 1rem;
        
        p{
            text-align: center;
        }
        h4 {
            color: var(--text-primary);
        }

        .devices-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            width: 100%;
        }

        .info-text {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.8rem;
            background: var(--background-secondary);
            border-radius: 0.5rem;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .devices-grid {
            display: grid;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .device-card {
            position: relative;
            padding: 1.5rem;
            background: var(--background-secondary);
            border: 2px solid transparent;
            border-radius: 0.8rem;
            transition: all 0.3s ease;
            display: flex;
            gap: 1rem;

            &:hover {
                border-color: var(--primary-color);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            }

            &.current-device {
                border-color: var(--success-color);
                background: linear-gradient(135deg, rgba(40, 167, 69, 0.05), rgba(40, 167, 69, 0.02));
            }

            .device-icon {
                font-size: 2.5rem;
                color: var(--primary-color);
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .device-info {
                flex: 1;

                .device-name {
                    font-size: 1.1rem;
                    font-weight: 600;
                    margin-bottom: 0.5rem;
                    display: flex;
                    align-items: center;
                    gap: 0.5rem;
                    flex-wrap: wrap;
                    margin-left: 0;

                    .current-badge {
                        font-size: 0.7rem;
                        padding: 0.2rem 0.6rem;
                        background: var(--success-color);
                        color: white;
                        border-radius: 1rem;
                        font-weight: 500;
                    }
                }

                .device-details {
                    display: flex;
                    flex-direction: column;
                    gap: 0.3rem;
                    font-size: 0.85rem;
                    color: var(--text-secondary);
                    margin-bottom: 0.5rem;

                    span {
                        display: flex;
                        align-items: center;
                        gap: 0.3rem;

                        i {
                            font-size: 0.75rem;
                        }
                    }
                }

                .device-ip {
                    font-size: 0.8rem;
                    color: var(--text-tertiary);
                    display: flex;
                    align-items: center;
                    gap: 0.3rem;
                }
            }

            .device-revoke-form {
                position: absolute;
                top: 1rem;
                right: 1rem;

                .btn-revoke {
                    background: transparent;
                    border: none;
                    color: var(--danger-color);
                    font-size: 1.3rem;
                    cursor: pointer;
                    padding: 0.3rem;
                    border-radius: 50%;
                    transition: all 0.3s ease;
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    &:hover {
                        background: rgba(220, 53, 69, 0.1);
                        transform: scale(1.1);
                    }
                }
            }
        }

        .logout-all-form {
            margin-top: 1rem;
        }

        .empty-state {
            text-align: center;
            padding: 2rem;
            color: var(--text-secondary);

            i {
                font-size: 3rem;
                margin-bottom: 1rem;
                opacity: 0.5;
            }
        }
    }

    .push-notifications-settings {
        h3 {
            margin-bottom: 0.5rem;
        }
    }

    .change-password{

        .form-settings{
            max-width: 500px;
        }

        .form-group{
            margin-bottom: 1.2rem;

            label{
                display: block;
                margin-bottom: 0.5rem;
                font-weight: 500;
            }

            input{
                width: 100%;
                padding: 0.8rem;
                border: 1px solid var(--primary-color, #ddd);
                border-radius: 4px;
                background-color: var(--background-color, #f9f9f9);
            }
        }
    }

    .delete-account{
        .warning-text{
            color: var(--danger-color);
            font-weight: 500;
            margin-bottom: 1rem;
        }
    }
}

.subscription-management {
    .subscription-free-card {
        background: var(--background-primary);
        padding: 1rem;
        border-left: 3px solid var(--primary-color);
        border-radius: 8px;
        display:flex;
        flex-direction: column;
        gap: 1rem;
    }

    .subscription-details-card {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;

        .subscription-header,
        .subscription-info-grid,
        .premium-benefits,
        .subscription-actions
        {
            background: var(--background-primary);
            padding: 1rem;
            border-left: 3px solid var(--primary-color);
            border-radius: 8px;
        }

        .subscription-header {
            height: fit-content;
        }

        .subscription-info-grid {
            display: flex;
            flex-direction: column;
            gap: 1rem;

            .info-item {
                display: flex;
                align-items: flex-start;
                justify-content: flex-start;
                gap: 1rem;
            }
        }

        .subscription-actions {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
    }

    .payment-history-table {
        overflow: auto;
        table {
            thead {
                tr {
                    th{
                        color: var(--background-primary);
                    }
                }
            }
        }

    }

    .alert.alert-info {
        background: var(--background-primary);
        padding: 1rem;
        border-radius: 1rem;
        border-left: 3px solid var(--text-info);
        margin-top: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* ***** SECTION LISTE DES INGREDIENTS ET LISTE DES RECETTES EN RAPPORT AUX INGREDIENTS PAGE RECETTES ***** */
.listeRecipesIngredients{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    height: 100%;

    .ingredients-list{
        max-width: 300px;
        display:flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        background-color: var(--background-primary);
        border-radius: 1rem;
        margin: .5rem;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        position: sticky;
        top: 100px;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) var(--background-secondary);
        
        &::-webkit-scrollbar {
            width: 8px;
        }
        
        &::-webkit-scrollbar-track {
            background: var(--background-secondary);
            border-radius: 10px;
        }
        
        &::-webkit-scrollbar-thumb {
            background: var(--primary-color);
            border-radius: 10px;
            
            &:hover {
                background: var(--secondary-color);
            }
        }

        .ingredient-tags{
            display:flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            align-items: center;
            gap: .3rem;

            span.ingredient-tag{
                padding: .2rem .5rem;
                border-radius: 3rem;
                background-color: var(--primary-color);
                color: white;
                font-size: .9rem;
                margin-right: .5rem;
                margin-bottom: .5rem;
            }
        }
    }

    .columnRecipe{
        display: flex;
        width: 100%;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        
        /* En-tête de section avec bannière info */
        .recipes-section-header {
            width: 100%;
            margin-bottom: 1rem;
            
            h4 {
                margin-bottom: 0.75rem;
            }
        }
        
        /* Bannière d'information */
        .info-banner {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.875rem 1.25rem;
            background: linear-gradient(135deg, #e8f4fd 0%, #f0f8ff 100%);
            border-left: 4px solid var(--primary-color);
            border-radius: 8px;
            font-size: 0.9rem;
            color: #2c5aa0;
            margin-bottom: 1rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            
            i {
                font-size: 1.25rem;
                color: var(--primary-color);
                flex-shrink: 0;
            }
            
            span {
                line-height: 1.5;
                
                strong {
                    color: var(--primary-color);
                    font-weight: 600;
                }
            }
        }
        
        .recipes{
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: flex-start;
            width: 100%;
            padding: 1rem;
            gap: 2rem;

            .recipeBox{
                position: relative;
                width: 100%;
                max-width: 290px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: .5rem;
                padding: 0rem 1rem 1rem 1rem;
                border-radius: .5rem;
                background-color: var(--background-primary);
                /* box-shadow: 0 0 12px var(--primary-color); */
                transition: all 0.3s ease-in-out;

                h4{
                    font-size: 1.2rem;
                    text-align: center;
                }

                p{
                    font-size: .7rem;
                }

                &:hover {
                    transform: scale(1.05);
                    box-shadow: 1px 1px 0px var(--primary-color);
                }

                img {
                    width: 300px;
                    height: 200px;
                    border-radius: .3rem;
                    object-fit: cover;
                    /* object-position: center; */
                    transition: all 0.3s ease-in-out;
                    &:hover {
                        transform: scale(1.1);
                    }
                }

                .recipe-favorite-indicator {
                    position: absolute;
                    top: -1rem;
                    right: -1rem;
                    width: 2rem;
                    height: 2rem;
                    border-radius: 50%;
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    z-index: 12;
                    transform: rotate(20deg);

                    i {
                        color: var(--primary-color);
                        font-size: 2rem;
                        line-height: 1;
                        filter: drop-shadow(0px 0px 15px rgb(255, 152, 0, 0.9));
                    }
                }

                .recipe-meta {
                    display: flex;
                    flex-wrap: wrap;
                    gap: 0.75rem;
                    margin-bottom: 1rem;
                    font-size: 0.9rem;
                    position: absolute;
                    top: 0;
                    left: 0;
                    padding: .3rem;
                    margin: .3rem;
                    background: var(--background-primaryOpacity);
                    border-radius: .5rem;

                    span {
                        display: flex;
                        align-items: center;
                        font-size: .7rem;
                        gap: 0.25rem;

                        i {
                            color: var(--primary-color);
                        }
                    }

                    span.percentage-badge {
                        padding: .2rem .5rem;
                        border-radius: 3rem;
                        font-weight: bold;
                    }

                    .percentage-badge.complete {
                        background-color: var(--alert-success);
                        color: var(--text-success);
                    }

                    .percentage-badge.partial {
                        background: var(--secondary-color);
                        color: white;
                    }
                    
                    .missing-count {
                        /* padding: .2rem .5rem; */
                        font-weight: 600;
                        font-size: 0.7rem;
                        
                        i {
                            font-size: 0.7rem;
                            margin-right: 0.1rem;
                        }
                    }

                    .recommendation-score-widget {
                        display: flex;
                        flex-direction: column;
                        gap: 0.45rem;
                        width: 100%;
                        margin-top: 0.15rem;

                        .recommendation-score-badge {
                            appearance: none;
                            border: 1px solid rgba(7, 59, 76, 0.25);
                            border-radius: 3rem;
                            display: inline-flex;
                            align-items: center;
                            gap: 0.35rem;
                            width: fit-content;
                            max-width: 100%;
                            padding: 0.25rem 0.6rem;
                            font-size: 0.9rem;
                            line-height: 1.2;
                            font-weight: 700;
                            cursor: pointer;
                            transition: transform 0.2s ease, box-shadow 0.2s ease;
                            background: #fff6d8;
                            color: #2f2a1b;

                            .score-value {
                                font-weight: 800;
                                font-size: 0.9rem;
                            }

                            .score-level {
                                padding: 0.08rem 0.35rem;
                                border-radius: 3rem;
                                background: rgba(0, 0, 0, 0.08);
                                font-size: 0.9rem;
                                letter-spacing: 0.02em;
                            }

                            .score-chevron {
                                transition: transform 0.2s ease;
                            }

                            i {
                                font-size: 0.9rem;
                            }

                            &:hover,
                            &:focus-visible {
                                transform: translateY(-1px);
                                box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
                            }
                        }

                        .recommendation-score-badge.level-excellent {
                            background: linear-gradient(135deg, #d9f99d 0%, #86efac 100%);
                            color: #14532d;
                        }

                        .recommendation-score-badge.level-tres-bon {
                            background: linear-gradient(135deg, #cffafe 0%, #93c5fd 100%);
                            color: #1e3a8a;
                        }

                        .recommendation-score-badge.level-bon {
                            background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
                            color: #78350f;
                        }

                        .recommendation-score-badge.level-moyen {
                            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
                            color: #7f1d1d;
                        }

                        .recommendation-score-badge.level-faible {
                            background: linear-gradient(135deg, #f3f4f6 0%, #d1d5db 100%);
                            color: #111827;
                        }

                        .recommendation-score-panel {
                            display: none;
                            width: 100%;
                            background: var(--background-primary);
                            border: .01rem solid var(--text-primary);
                            border-radius: 0.8rem;
                            padding: 0.7rem;
                            box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
                            backdrop-filter: blur(5px);
                            overflow-x: hidden;
                            overflow-y: scroll;
                            scrollbar-width: none;
                            height: 150px;
                            position: absolute;
                            top: 50%;
                            left: 50%;
                            transform: translateX(-50%);
                            

                            .score-panel-title {
                                font-family: 'milky';
                                color: var(--primary-color);
                                font-size: 1rem;
                                font-weight: 800;
                                margin: 0 0 0.25rem;
                            }

                            .score-panel-subtitle {
                                color: var(--primary-color);
                                font-size: .8rem;
                                margin-bottom: 0.55rem;
                            }

                            .score-breakdown-list {
                                list-style: none;
                                margin: 0;
                                padding: 0;
                                display: flex;
                                flex-direction: column;
                                gap: 0.55rem;
                            }

                            .score-breakdown-item {
                                display: flex;
                                flex-direction: column;
                                gap: 0.25rem;
                            }

                            .score-breakdown-head {
                                display: flex;
                                justify-content: space-between;
                                align-items: baseline;
                                gap: 0.5rem;
                                font-size: 0.66rem;
                            }

                            .score-breakdown-label {
                                color: var(--secondary-color);

                                strong {
                                    font-size: .66rem;
                                }
                            }

                            .score-breakdown-points {
                                color: var(--secondary-color);
                                font-weight: 800;
                                white-space: nowrap;
                            }

                            .score-breakdown-track {
                                width: 100%;
                                height: 5px;
                                background: var(--text-primary);
                                border-radius: 3rem;
                                overflow: hidden;
                            }

                            .score-breakdown-fill {
                                display: block;
                                height: 100%;
                                border-radius: inherit;
                                background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
                            }

                            .score-breakdown-detail {
                                font-size: 0.64rem;
                                color: var(--text-secondary);
                            }
                        }

                        &.is-open {
                            .recommendation-score-panel {
                                display: block;
                            }

                            .recommendation-score-badge .score-chevron {
                                transform: rotate(180deg);
                            }
                        }
                    }

                    @media (hover: hover) and (pointer: fine) {
                        .recommendation-score-widget:hover {
                            .recommendation-score-panel {
                                display: block;
                            }

                            .recommendation-score-badge .score-chevron {
                                transform: rotate(180deg);
                            }
                        }
                    }
                }
                
                /* Badges de recommandation */
                .recipe-badges {
                    display: flex;
                    flex-wrap: wrap;
                    gap: 0.5rem;
                    padding: 0.75rem;
                    width: 100%;
                    
                    .badge {
                        display: inline-flex;
                        align-items: center;
                        gap: 0.35rem;
                        padding: 0.375rem 0.75rem;
                        border-radius: 20px;
                        font-size: 0.75rem;
                        font-weight: 500;
                        white-space: nowrap;
                        transition: all 0.2s ease;
                        cursor: help;
                        
                        i {
                            font-size: 0.9rem;
                        }
                        
                        &:hover {
                            transform: translateY(-2px);
                            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
                        }
                    }
                    
                    .badge-popular {
                        background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
                        color: #121212;
                        
                        i {
                            color: #ff9800;
                        }
                    }
                    
                    .badge-taste {
                        background: linear-gradient(135deg, #ff6b9d 0%, #ffa8c5 100%);
                        color: #FFFFFF;
                        
                        i {
                            color: #e91e63;
                        }
                    }
                    
                    .badge-tried {
                        background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
                        color: #FFFFFF;
                        
                        i {
                            color: #2e7d32;
                        }
                    }
                    
                    .badge-new {
                        background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
                        color: #FFFFFF;
                        
                        i {
                            color: #6a1b9a;
                        }
                    }
                }
            }

            .recipeBox.recipeBox-complete {
                border: 2px solid;
                border-color: var(--alert-success);

                &:hover {
                    transform: scale(1.05);
                    box-shadow: 1px 1px 0px var(--alert-success);
                }
            }

            .recipeBox.recipeBox-partial {
                border: 2px solid;
                border-color: var(--alert-warning);
            }

            .no-recipes {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 2rem;
                text-align: center;
                font-size: 1.2rem;
                padding: 2rem;
                color: var(--primary-color);
                background-color: rgba(0, 0, 0, 0.05);
                border-radius: 8px;
            }
        }
    }

    .no-recipes {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }
}

/* ***** PAGINATION "VOIR PLUS" POUR RECETTES ADAPTÉES ***** */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    
    .btn-loadmore {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.875rem 1.75rem;
        background: linear-gradient(135deg, var(--primary-color) 0%, #2c3e50 100%);
        color: white;
        border: none;
        border-radius: 50px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        
        i {
            font-size: 1.1rem;
            transition: transform 0.3s ease;
        }
        
        &:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
            
            i {
                transform: rotate(180deg);
            }
        }
        
        &:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }
        
        &:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid rgba(0, 0, 0, 0.1);
        border-top-color: var(--primary-color);
        border-radius: 50%;
        animation: spinner-rotation 0.8s linear infinite;
    }
    
    @keyframes spinner-rotation {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }
    
    .error-message {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.25rem;
        background-color: #ffe6e6;
        color: #c0392b;
        border: 1px solid #e74c3c;
        border-radius: 8px;
        font-size: 0.9rem;
        
        i {
            font-size: 1.1rem;
        }
    }
}

/* Animation pour les nouvelles cartes chargées */
.recipeBox.loaded {
    animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* *****  SECTION UNE RECETTE PAGE RECETTE  ***** */
.oneRecipe{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    padding: 2rem 3rem;

    h3{
        text-transform: capitalize;
        margin-bottom: 1.5rem;
    }

    .recipeBox{
        position: relative;
        width: 100%;
        max-width: 900px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        border: 1px solid var(--primary-color);
        border-radius: .5rem;
        background-color: var(--background-primary);
        overflow: hidden;
        transition: all 0.3s ease-in-out;

        img {
            width: 100%;
            height: 300px;
            object-fit: cover;
            object-position: center;
        }

        .recipe-meta {
            position: absolute;
            width: 99%;
            top: 0;
            left: 0;
            margin: .2rem;
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            font-size: 0.9rem;
            background: var(--background-secondaryOpacity);
            border-radius: .5rem;
            padding: 1rem;

            span {
                display: flex;
                align-items: center;
                font-size: 1rem;
                gap: 0.25rem;

                i {
                    color: var(--primary-color);
                }
            }

            .meta-box {
                display: flex;
                align-items: center;
                gap: .5rem;

                button.favorite-btn{
                    display: flex;
                    align-items: center;
                    background: transparent;
                    gap: .5rem;
                    /* background-color: transparent; */
                    outline: none;
                    border: none;
                    cursor: pointer;
                    font-size: 1rem;
                    color: var(--primary-color);
                    transition: all 0.3s ease;

                    i {
                        font-size: 1rem;
                    }

                    &:hover {
                        color: var(--secondary-color);
                        transform: scale(1.2);
                    }
                }

                button.favorite-btn.is-active{
                    color: var(--secondary-color);
                    transition: all 0.3s ease-in-out;
                }
            }
        }

        .detailsBox{
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 100%;
            border-radius: .5rem;
            gap: .5rem;
            background-color: var(--background-primary);
            /* z-index: 3; */
            padding: 2rem;

            h4{
                font-size: 1.5rem;
                margin-bottom: 1rem;
                text-align: center;
                color: var(--primary-color);
            }

            p{
                font-size: .9rem;
                text-align: justify;
                line-height: 1.5;
                color: var(--text-secondary);
            }

            .etiquettes{
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                align-items: center;
                width: 100%;
                gap: .5rem;

                .badge{
                    line-height: 1.2;
                    text-align: center;
                    border-radius: 2rem;
                    padding: .5rem 1rem;
                    color: var(--text-primary);
                    font-size: .8rem;
                }
            }

            .instructions {
                padding: 0rem;
                .instruction-step {
                    display: flex;
                    flex-direction: row;
                    align-items: flex-start;
                    gap: .5rem;
                    margin-bottom: 0;
                    padding: 0;
                    background-color: transparent;
                    border-radius: 0;
                    border-left: none;
                    transition: none;
                    box-shadow: none;

                    &:hover {
                        background-color: transparent;
                        transform: none;
                        box-shadow: none;
                        border-left: none;
                    }

                    .step-number {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        min-width: 0%;
                        height: 0%;
                        background: transparent;
                        color: var(--text-primary);
                        border-radius: 0;
                        font-weight: bold;
                        font-size: 1rem;
                        flex-shrink: 0;
                        box-shadow: none;
                    }
                }
            }
        }
    }

    

    .ingredientsBox {
        ul{
            background: var(--background-primaryOpacity);
            padding: .2rem;
            border-radius: 1rem;
            width: fit-content;

            li.ingredient-disponible,
            li.ingredient-manquant,
            li.ingredient-non-disponible{
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 0.5rem;
                padding: .2rem .5rem;
                border-bottom: 1px solid var(--primary-color);
                border-radius: 3rem;
                width: fit-content;

                .ingredient-info{
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    gap: .5rem;

                    .ingredientNom {
                        color: var(--text-primary);
                        font-weight: bold;
                    }
                }

                .ingredientQuantite {
                    background-color: var(--secondary-color);
                    color: white;
                    padding: .2rem .5rem;
                    border-radius: 3rem;
                    margin-left: 1rem;
                }
            }

            li.ingredient-non-disponible{
                .ingredient-info{
                    .ingredientNom{
                        color: var(--text-primary);
                    }
                }
            }

            .ingredient-disponible{
                background-color: var(--alert-success);
                .ingredient-info{
                    .ingredientNom{
                        color: #121212 !important;
                    }
                }
                .fi-sr-check{
                    color: var(--text-success);
                }
            }

            .ingredient-manquant{
                background-color: var(--alert-warning);
                .ingredient-info{
                    .ingredientNom{
                        color: #121212 !important;
                    }
                }
                .fi-sr-cross{
                    color: var(--text-warning);
                }
            }
        }

        /* ***** CONTRÔLE DU NOMBRE DE PERSONNES ***** */
        .portions-control {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            padding: 1rem;
            margin-bottom: 1.5rem;
            background: var(--background-secondary);
            border-radius: 12px;
            border: 2px solid var(--primary-color);
            box-shadow: 0 4px 12px rgba(255, 127, 0, 0.1);
        }

        .portion-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: var(--primary-color);
            border: none;
            border-radius: .3rem;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(255, 127, 0, 0.3);
        }

        .portion-btn i {
            font-size: 1.2rem;
            line-height: 0;
            color: white;
        }

        .portion-btn:hover {
            background: var(--secondary-color);
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(255, 127, 0, 0.4);
        }

        .portion-btn:active {
            transform: scale(0.95);
        }

        .portion-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
            opacity: 0.5;
            box-shadow: none;
        }

        .portion-btn:disabled:hover {
            transform: none;
        }

        .portion-display {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-width: 100px;
        }

        .portion-number {
            font-size: 2rem;
            font-weight: bold;
            color: var(--primary-color);
            line-height: 1;
        }

        .portion-label {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-top: 0.25rem;
        }

        .legend{
            margin-top: 2rem;
            padding: 1rem;
            background-color: var(--background-primary);
            border-radius: .3rem;

            p{
                display: flex;
                align-items: center;
                margin: 1rem 0rem;

                i{
                    margin-right: .5rem;
                }
            }

            details{
                min-height: 20px;
                max-height: 200px;

                .unite{
                    height: 180px;
                    overflow-y: scroll;
                    scrollbar-width: none;

                    span{
                        background-color: #484848;
                        color: white;
                        border-radius: .5rem;
                        padding: .2rem .5rem;
                        margin-right: .2rem;
                    }
                }
            }
        }

        .info-ingredients{
            margin-top: 2rem;
            padding: 1rem;
            background-color: var(--background-primary);
            border-left: 3px solid var(--alert-info);
        }
    }
    
    /* Styles pour les instructions �tape par �tape */
    .instructions {
        width: 100%;
        margin-top: 2rem;
        padding: 0 2rem;
        
        h3 {
            color: var(--primary-color);
            margin-bottom: 2rem;
            font-size: 1.8rem;
            text-align: center;
            font-weight: 600;
        }
        
        .instruction-step {
            display: flex;
            align-items: flex-start;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
            padding: 1.5rem;
            background-color: var(--background-primary);
            border-radius: 0.8rem;
            border-left: 4px solid var(--primary-color);
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            
            &:hover {
                background-color: var(--background-secondary);
                transform: translateX(8px);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
                border-left-color: var(--secondary-color);
            }
            
            .step-number {
                display: flex;
                align-items: center;
                justify-content: center;
                min-width: 40px;
                height: 40px;
                background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
                color: white;
                border-radius: 50%;
                font-weight: bold;
                font-size: 1.1rem;
                flex-shrink: 0;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            }
            
            p {
                flex: 1;
                margin: 0;
                line-height: 1.8;
                color: var(--text-primary);
                text-align: justify;
                font-size: 1rem;
            }
        }
    }
}

/* ***** RECIPE ACTION BAR - Hero Controls (Desktop/Tablet/Mobile) ***** */
/* 🎯 Stratégie responsive : Desktop (pills sous hero) → Tablet (compact top) → Mobile (bottom sticky) */

.recipe-action-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.5rem 2rem;
    background: var(--background-primary);
    border-top: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

/* 🎨 Boutons Action - Style Pills/Chips Premium */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(255, 127, 0, 0.1);
}

.action-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.action-btn .action-label {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Effet hover glow */
.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.2;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 127, 0, 0.25);
}

.action-btn:hover i {
    transform: scale(1.15);
}

.action-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 127, 0, 0.2);
}

/* ❤️ État actif - Favoris */
.action-btn.favorite-btn {
    border: 2px solid var(--primary-color);

    &:hover {
        border: 2px solid var(--secondary-color);
        color: var(--secondary-color);
    }
}
.action-btn.favorite-btn.is-active {
    background: linear-gradient(135deg, #ff4757, #ff6348);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

.action-btn.favorite-btn.is-active:hover {
    color: white;
    background: linear-gradient(135deg, #ff6348, #ff7f50);
    transform: translateY(-3px) scale(1.02);
}

.action-btn.favorite-btn.is-active i {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

/* ✓ État actif - Tentée */
.action-btn.tried-btn.is-tried {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-color: #4CAF50;
    color: white;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.action-btn.tried-btn.is-tried:hover {
    color: white;
    transform: translateY(-3px) scale(1.02);
}

.action-btn.tried-btn.is-tried i {
    animation: checkPulse 0.5s ease;
}

@keyframes checkPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); }
}

/* 📄 PDF Button */
.action-btn.pdf-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* 📅 Calendar Button */
.action-btn.calendar-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

/* ***** TABLET RESPONSIVE (max-width: 1024px) ***** */
@media screen and (max-width: 1024px) {
    .recipe-action-bar {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .action-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .action-btn i {
        font-size: 1.1rem;
    }
    
    .action-btn .action-label {
        font-size: 0.85rem;
    }
}

/* ***** MOBILE RESPONSIVE - Bottom Sticky Bar (max-width: 768px) ***** */
@media screen and (max-width: 768px) {
    /* Bottom sticky bar - Zone de pouce optimale */
    .recipe-action-bar {
        position: fixed;
        top: 51px;
        left: 0;
        right: 0;
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 0;
        padding: 0.75rem 1rem;
        background: var(--background-primary);
        border-top: none;
        border-bottom: 2px solid var(--primary-color);
        border-radius: 0;
        margin: 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(20px);
    }
    
    /* Boutons mobile - Icônes seules, tap area large */
    .action-btn {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem;
        min-width: 60px;
        min-height: 60px;
        background: transparent;
        box-shadow: none;
    }
    
    .action-btn i {
        font-size: 1.5rem;
    }
    
    /* Masquer les labels sur mobile */
    .action-btn .action-label {
        display: none;
    }
    
    /* Feedback tactile amélioré */
    .action-btn:active {
        transform: scale(0.92);
        background: var(--background-secondary);
    }
    
    /* États actifs mobile */
    .action-btn.favorite-btn.is-active,
    .action-btn.tried-btn.is-tried {
        background: transparent;

        &:hover {
            background: var(--background-primary);
        }
    }

    .action-btn.favorite-btn.is-active {
        border: 2px solid var(--secondary-color);
    }
    
    .action-btn.favorite-btn.is-active i {
        color: var(--secondary-color);
    }
    
    .action-btn.tried-btn.is-tried i {
        color: #4CAF50;
    }
    
    /* Hover désactivé sur mobile (tactile) */
    .action-btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .action-btn:hover::before {
        width: 0;
        height: 0;
    }
    
    /* Contrôle des portions - Mobile */
    .portions-control {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .portion-btn {
        width: 36px;
        height: 36px;
    }
    
    .portion-btn i {
        font-size: 1rem;
    }
    
    .portion-display {
        min-width: 80px;
    }
    
    .portion-number {
        font-size: 1.5rem;
    }
    
    .portion-label {
        font-size: 0.75rem;
    }
}

/* ***** PETITS ÉCRANS - Ajustements supplémentaires (max-width: 480px) ***** */
@media screen and (max-width: 480px) {
    .action-btn {
        min-width: 50px;
        min-height: 50px;
        padding: 0.5rem;
    }
    
    .action-btn i {
        font-size: 1.3rem;
    }
    
    /* Contrôle des portions - Petits écrans */
    .portions-control {
        padding: 0.6rem;
        gap: 0.5rem;
    }
    
    .portion-btn {
        width: 32px;
        height: 32px;
    }
    
    .portion-btn i {
        font-size: 0.9rem;
    }
    
    .portion-display {
        min-width: 70px;
    }
    
    .portion-number {
        font-size: 1.3rem;
    }
    
    .portion-label {
        font-size: 0.7rem;
    }
}

/* *****  SECTION TOUTES LES RECETTES PAGE RECETTES  ***** */
.filterAllRecipes{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    min-width: 100%;
    gap: 1rem;
    padding: 2rem;
    border-top: .05rem solid var(--secondary-color);
    border-bottom: .05rem solid var(--secondary-color);

    aside.filterRecipes{
        max-width: 300px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        background-color: var(--background-primary);
        padding: 1.5rem;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        height: fit-content;

        .filterTitle{
            display: flex;
            flex-direction: column;

            h3{
                margin-bottom: 1.5rem;
                color: var(--primary-color);
                text-align: center;
                font-size: 1.7rem;
                line-height: 1.2;
            }
        }

        details{
            width: 100%;
            margin-top: 1rem;

            .groupCol{
                display: flex;
                flex-direction: column;
                justify-content: flex-start;
                align-items: flex-start;

                .filter-groupRow{
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;
                    align-items: flex-start;
                    gap: 1rem;
                }

                .filter-group{
                    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
                    padding-bottom: 1rem;

                    h4{

                        font-size: 1.3rem;
                        margin-bottom: 0.5rem;
                        color: var(--primary-color);
                    }

                    details.filter-options,
                    .filter-options{
                        display: flex;
                        flex-direction: column;
                        gap: .5rem;
                        cursor: pointer;
                        summary{
                            font-size: 0.7rem;
                        }
                        
                        label {
                            display: flex;
                            align-items: center;
                            gap: 0.2rem;
                            cursor: pointer;
                            font-size: 1rem;
                            transition: all 0.2s;

                            &:hover {
                                color: var(--primary-color);
                            }

                            .filter-checkbox {
                                accent-color: var(--primary-color);
                                width: 12px;
                                height: 12px;
                            }
                        }
                    }
                }
            }
        }
    }

    .allRecipes{
        flex: 1;
        max-width: 100%;

        h3{
            text-transform: capitalize;
        }

        .search-container{
            margin-bottom: 2rem;
            width: 100%;

            .inputBox{
                display: flex;
                align-items: center;
                border:  1px solid var(--primary-color);
                border-radius: .3rem;
                overflow: hidden;
                padding: .5rem;

                i{
                    color: var(--primary-color);
                    margin-right: 1rem;
                }

                input{
                    flex: 1;
                    border: none;
                    outline: none;
                    padding: .5rem 0;
                    font-size: 1rem;
                }
            }

            .search-btn{
                display: block;
                width: 100%;
                margin-top: 1rem;
                padding: 1rem;
                background: var(--button-color);
                color: white;
                border: none;
                border-radius: 3rem;
                cursor: pointer;
                transition: all .3s ease-in-out;

                &:hover{
                    scale: .97;
                    background: var(--button-color-hover);
                }
            }
        }

        .recipes{
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            align-items: flex-start;
            width: 100%;
            padding: 3rem;
            gap: 2rem;
            overflow-y: scroll;
            scrollbar-width: none;
            height: 600px;

            .recipeBox{
                position: relative;
                width: 100%;
                max-width: 290px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: .5rem;
                padding: 0rem 1rem 1rem 1rem;
                border-radius: .5rem;
                background-color: var(--background-primary);
                /* box-shadow: 0 0 12px var(--primary-color); */
                overflow: hidden;
                transition: all 0.3s ease-in-out;

                h4{
                    font-size: 1.2rem;
                }

                p{
                    font-size: .7rem;
                }
    
                &:hover {
                    transform: scale(1.05);
                    box-shadow: 1px 1px 0px var(--primary-color);
                }
    
                img {
                    width: 300px;
                    height: 200px;
                    object-fit: cover;
                    /* object-position: center; */
                    transition: all 0.3s ease-in-out;
                    &:hover {
                        transform: scale(1.1);
                    }
                }

                .recipe-meta {
                    display: flex;
                    flex-wrap: wrap;
                    gap: 0.75rem;
                    margin-bottom: 1rem;
                    font-size: 0.9rem;
                    position: absolute;
                    top: 0;
                    left: 0;
                    padding: .3rem;
                    margin: .3rem;
                    background: var(--background-secondaryOpacity);
                    border-radius: .5rem;

                    span {
                        display: flex;
                        align-items: center;
                        font-size: .7rem;
                        gap: 0.25rem;

                        i {
                            color: var(--primary-color);
                        }
                    }
                }
            }

            .no-results-message {
                grid-column: 1 / -1;
                text-align: center;
                font-size: 1.2rem;
                padding: 2rem;
                color: var(--primary-color);
                background-color: rgba(0, 0, 0, 0.05);
                border-radius: 8px;
            }
        }

        .pagination{
            width: 100%;
            display: flex;
            justify-content: center;
            margin: 2rem 0;

            .pagination-controls{
                display: flex;
                align-items: center;
                gap: .5rem;

                a.pagination-link{
                    padding: .5rem 1rem;
                    background-color: var(--primary-color);
                    color: white;
                    border-radius: .3rem;
                    text-decoration: none;
                    transition: background-color .2s ease-in-out;
                    &:hover{
                        background-color: var(--secondary-color);
                    }
                }

                span.pagination-info{
                    padding: .5rem;
                    font-weight: 500;
                }
            }
        }
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 3rem;
            border-radius: 10px;
            background-color: var(--background-secondary);
            margin: 2rem 0;

            i {
                font-size: 3rem;
                color: var(--primary-color);
                margin-bottom: 1rem;
            }

            h3 {
                margin-bottom: 1rem;
                color: var(--primary-color);
            }

        }
    }
}

.recipeBox.is-active{
    box-shadow: 0px 0px 300px -150px var(--secondary-color);
}
/* ***** SECTION FEATURES/FONCTIONNALITES PAGE ACCUEIL ***** */
.features {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 1rem;
    background: url("../img/cuisine/cuisine5.svg"),
    url("../img/dessert/dessert2.svg"),
    url("../img/dessert/dessert3.svg"),
    url("../img/dessert/dessert10.svg"),
    url("../img/dessert/dessert11.svg"),
    url("../img/dessert/dessert12.svg"),
    url("../img/dessert/dessert13.svg"),
    url("../img/dessert/dessert14.svg"),
    url("../img/dessert/dessert15.svg");

    background-size: 10%;
    background-position: 
        50% 10%,  /* En haut au centre */
        90% 20%,  /* En haut � droite */
        10% 20%,  /* En haut � gauche */
        85% 50%,  /* � droite au milieu */
        15% 50%,  /* � gauche au milieu */
        75% 80%,  /* En bas � droite */
        25% 80%,  /* En bas � gauche */
        60% 90%,  /* En bas vers la droite */
        40% 90%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    animation-name: heroBackgroundAnimation;
    animation-duration: 8s;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-fill-mode:both;

    .features-carousel {
        width: 100%;
        max-width: 900px;
        position: relative;
        overflow: hidden;
        margin: 0 auto;
        padding: 1.5rem 0;

        .features-carousel-container {
            display: flex;
            transition: transform 0.5s ease;
            width: 100%;
            gap: 1rem;
            padding: 1rem .5rem;

            .feature-slide {
                flex: 0 0 100%;
                padding: 2rem;
                background: var(--background-primaryOpacity);
                border-radius: 1rem;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
                text-align: center;
                transition: all 0.3s ease;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                min-height: 200px;
                border-left: 3px solid var(--primary-color);

                i {
                    font-size: 2.5rem;
                    color: var(--primary-color);
                    margin-bottom: 1rem;
                }

                strong {
                    display: block;
                    font-family: var(--font-titles-and-button);
                    font-size: 2rem;
                    margin-bottom: 1rem;
                    color: var(--primary-color);
                }

                p {
                    font-size: 1rem;
                    line-height: 1.5;
                }
            }
        }

        .carousel-nav {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-top: 1.5rem;

            .carousel-btn {
                background-color: var(--primary-color);
                color: white;
                border: none;
                width: 40px;
                height: 40px;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: all 0.3s ease;

                &:hover {
                    background-color: var(--secondary-color);
                    transform: scale(1.1);
                }
            }
        }

        .carousel-indicators {
            display: flex;
            gap: 0.5rem;
            justify-content: center;
            margin-top: 1rem;

            .indicator {
                width: 12px;
                height: 12px;
                border-radius: 50%;
                background-color: var(--text-secondary);
                cursor: pointer;
                transition: all 0.3s ease;
            }

            .indicator.active {
                background-color: var(--primary-color);
                transform: scale(1.2);
            }
        }
    }
}

/* *****  PAGE CONTACT  ***** */
.contact{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .7rem;
    padding-top: 5rem;
    padding-bottom: 5rem;

    .contact-container{
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 1rem;
        margin: 2rem;

        .contact-box{
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            width: 300px;
            height: 200px;
            padding: 1rem 2rem;
            background-color: var(--background-primary);
            border: none;
            border-radius: .3rem;
            box-shadow: 3px 3px 0px var(--primary-color);
            transition: all .3s ease-in-out;

            &:hover{
                box-shadow: 5px 2px 0px var(--secondary-color);
            }

            .contact-box-icon{
                i{
                    color: var(--primary-color);
                }
            }

            .contact-box-text{
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: .5rem;

                h4{
                    color: var(--primary-color);
                }

                p{
                    color: var(--text-primary);
                    text-align: center;
                }
            }
        }
    }
}

/* ***** SECTION PAGE DASHBOARD ADMINISTRATION ***** */
section.totalSection {
    .banner-dashboard {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        margin: 5rem auto;
        padding: 2rem 1rem;
        background-color: var(--background-primary);
        border-radius: 20px;
        box-shadow: 0px 0px 12px #12121246;
        gap: 2rem;

        a.box-dashboard {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-decoration: none;
            width: 300px;
            padding: 1rem 1rem;
            border: 1px solid #99999937;
            border-radius: .5rem;
            box-shadow: inset 0px 0px 0px #99999937;
            transition: all .3s ease-in-out;
            gap: .2rem;
            background: var(--primary-color);

            h3{
                transition: all .3s ease-in-out;
            }

            &:hover {
                box-shadow: 0px 0px 12px #12121246;
                transform: translateY(-5px);
                background: var(--button-color-hover);


                h3 {
                    color: #121212;
                }
            }

            h3 {
                font-size: 1.2rem;
                font-weight: 800;
                color: white;
                text-transform: capitalize;
            }

            p.numberItems {
                font-size: 1.3rem;
                font-weight: 300;
                color: white;
            }
        }
    }
}

/* SECTION SITELINKS */
section.sectionSiteLinks {
    margin-top: 7rem;
    width: 100%;
    height: 100%;
    background-color: var(--backgroundcolor);
    display: flex;
    flex-direction: column;
    place-content: center;
    gap: 3rem;

    .breadcrumb {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 5rem;
        padding: 2rem 1rem;
        border-radius: .5rem;
        box-shadow: 0px 0px 12px #12121216;

        .box-breadcrumb {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            gap: 2rem;

            a.crumb {
                color: var(--primary-color);
                text-decoration: none;
                font-size: 1.2rem;
                font-weight: 600;

                transition: all .2s ease-in-out;

                &:hover {
                    text-decoration: underline;
                }
            }
        }
    }
}

/* SECTION PAGE DASHBOARD */
section.sectionDashboard{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;

    .box-dashboard{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        width: 100%;
        max-width: 1200px;
        padding: 2rem 1rem;
        background-color: var(--background-color);
        border-radius: .5rem;
        box-shadow: 0px 0px 12px #12121216;
    }
}

/* SECTION PAGE ADMINISTRATEUR GESTION UTILISATEUR */
section.admin-section {
    padding: 50px 0;
    margin-top: 30px;

    .admin-container {
        width: 90%;
        max-width: 1200px;
        margin: 0 auto;

        .alert {
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 5px;
        }

        .alert-success {
            background-color: var(--background-success);
            border-color: var(--alert-success);
            color: var(--success-color);
        }

        .alert-danger {
            background-color: var(--background-error);
            border-color: var(--alert-error);
            color: var(--danger-color);
        }

        /* Tableau des utilisateurs */
        .admins-table-container,
        .users-table-container,
        .unites-table-container,
        .recipes-table-container,
        .ingredients-table-container,
        .etiquettes-table-container,
        .categories-table-container,
        .actions-container {
            margin-top: 3rem;

            #searchInput {
                width: 100%;
                padding: 10px;
                margin-bottom: 20px;
                border: 1px solid #ddd;
                border-radius: 4px;
                box-sizing: border-box;
            }
            .table-responsive {
                overflow-x: auto;
                overflow-y: auto;
                scrollbar-width: thin;
                scrollbar-color: var(--primary-color) var(--background-secondary); /* For Firefox */
                max-height: 600px;

                .admins-table,
                .users-table,
                .unites-table,
                .recipes-table,
                .ingredients-table,
                .etiquettes-table,
                .categories-table,
                .actions-table
                {
                    width: 100%;
                    border-collapse: collapse;
                    margin-bottom: 30px;
                    max-height: 600px;

                    th,
                    td {
                        padding: 12px 15px;
                        text-align: left;
                        border-bottom: 1px solid #ddd;
                    }

                    th {
                        background-color: var(--background-secondary);
                        color: var(--primary-color);
                        font-weight: bold;
                    }

                    td {
                        span.category-badge,
                        span.role-badge,
                        span.difficulty-badge{
                            padding: 4px 8px;
                            border-radius: 4px;
                            font-size: .9em;
                            font-weight: 500;
                            color: #fff;
                            display: inline-block;
                        }

                        span.role-badge.role-superadmin{
                            background-color: #dc3545;
                        }

                        span.role-badge.role-moderateur{
                            background-color: #fd7e14;
                        }

                        span.role-badge.role-editeur{
                            background-color: #6c757d;
                        }

                        .difficulty-facile {
                            background-color: #28a745;
                        }

                        .difficulty-moyenne {
                            background-color: #fd7e14;
                        }

                        .difficulty-difficile {
                            background-color: #dc3545;
                        }

                        .status-dropdown {
                            position: relative;
                            display: inline-block;

                            span.status-badge {
                                display: inline-block;
                                padding: 5px 10px;
                                border-radius: 20px;
                                font-size: 0.9em;
                                font-weight: 600;
                                cursor: pointer;
                            }

                            .status-badge.admin {
                                background-color: #6c5ce7;
                                color: white;
                            }

                            .status-badge.client {
                                background-color: #0984e3;
                                color: white;
                            }

                            .status-dropdown-content {
                                display: none;
                                position: absolute;
                                background-color: var(--backgroundcolor);
                                min-width: 160px;
                                box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
                                z-index: 1;
                                border-radius: 5px;
                                overflow: hidden;

                                .status-option {
                                    color: var(--primary-color);
                                    padding: 12px 16px;
                                    text-decoration: none;
                                    display: block;
                                    text-align: left;

                                    &:hover {
                                        background-color: var(--background-secondary);
                                    }

                                    &.admin {
                                        color: #6c5ce7;
                                    }

                                    &.client {
                                        color: #0984e3;
                                    }
                                }
                            }

                            &:hover {
                                .status-dropdown-content {
                                    display: block;
                                }
                            }
                        }

                        span.usage-badge{
                            padding: 2px 6px;
                            margin-right: 5px;
                            border-radius: 4px;
                            font-size: 0.8em;
                            font-weight: 500;
                            color: #fff;
                            display: inline-block;
                            background-color: #6c757d;
                        }

                        .color-preview-cell {
                            width: 30px;
                            height: 30px;
                            border-radius: 4px;
                            border: 1px solid #ddd;
                            margin: 0 auto;
                        }

                        img.thumbnail {
                            max-width: 80px;
                            max-height: 60px;
                            border-radius: 4px;
                        }
                    }

                    td.description-cell {
                        max-width: 250px;
                    }

                    td.actions {
                        white-space: nowrap;
                    }

                    tr:hover {
                        background-color: var(--background-secondary);
                    }
                }
                
            }
        }

        /* Formulaire d'�dition */
        .edit-form-container {
            background-color: var(--backgroundcolor);
            padding: 3rem;
            border-radius: 10px;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
            margin-bottom: 3rem;

            .radio-group {
                display: flex;
                gap: 15px;
            }

            .radio-item {
                display: flex;
                align-items: center;
                gap: 5px;
            }

            .form-actions {
                display: flex;
                justify-content: space-between;
                gap: 15px;
                margin-top: 20px;
            }
        }

        .form-section{
            margin-bottom: 30px;
            border: 1px solid #e3e3e3;
            padding: 20px;
            border-radius: 5px;
            background-color: var(--background-primary);

            h4{
                margin-top: 0;
                margin-bottom: 15px;
                border-bottom: 1px solid #ddd;
                padding-bottom: 10px;
            }

            .form-row.tags-container{
                display: flex;
                flex-wrap: wrap;
                gap: 10px;

                .tag-item{
                    background-color: var(--background-secondary);
                    padding: 5px 10px;
                    border-radius: 5px;
                    display: flex;
                    align-items: center;

                    input[type="checkbox"] {
                        margin-right: 5px;
                    }
                }
            }

            .ingredient-row {
                margin-bottom: 10px;
                padding-bottom: 10px;
                border-bottom: 1px dashed #ccc;

                .ingredient-actions {
                    display: flex;
                    align-items: flex-end;
                    margin-bottom: 0.5rem;
                }
            }

            #add-ingredient {
                margin-top: 10px;
            }

            .color-picker-container{
                display: flex;
                align-items: center;

                .color-picker{
                    width: 50px;
                    height: 40px;
                    padding: 0;
                    border: none;
                    background: none;
                    cursor: pointer;
                }

                .color-preview{
                    width: 30px;
                    height: 30px;
                    margin-left: 10px;
                    border-radius: 4px;
                    border: 1px solid #ddd;
                    display: inline-block;
                }
            }

            .current-image {
                margin-bottom: 10px;
            }
        }


    }
}

/* ***** FOOTER ***** */
footer{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    background-color: var(--background-primary);
    color: var(--text-secondary);

    .footer-content {
        width: 100%;
        max-width: 1200px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;

        p {
            text-align: center;
            font-size: 0.9rem;
        }

        .footer-links{
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 1rem;
        }

        .footer-social{
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1rem;
        }
    }
}

/* Animation pour le carousel */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour les slides du carousel */
.feature-slide {
    animation: fadeIn 0.5s ease forwards;
}

/* *****  MEDIA QUERIES  ***** */
/* Très grand écran */
@media screen and (max-width: 1300px){
    .oneRecipe{
         width: 100%;
        display: flex;
        flex-direction: column-reverse;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        padding: 2rem 3rem;

        .ingredientsBox {
            width: 100%;
            
            ul{
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                gap: .3rem;
            }
        }
    }
}
/* Grand �cran */
@media screen and (max-width: 1120px){
    .allListUsersFavorisAndIngredients {
        flex-wrap: wrap;
    }
}
/* Desktop Petit & tablette large */
@media screen and (max-width: 1023px){
    .heroIngredients{
        .boxHeroIngredients{
            width: 90%;
        }
    }

    .allListUsersFavorisAndIngredients {
        flex-direction: column;

        .listUsersFavoris, .listUsersIngredients{
            width: 100%;
        }
    }

    .listeRecipesIngredients{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        .ingredients-list{
            width: 90%;
            position: static;
            max-height: 300px;
            margin-bottom: 1rem;
        }

        .columnRecipe{
            align-items: center;
            justify-content: center;
            padding: 0rem .3rem;

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

                .recipeBox {
                    width: 65%;
                    max-width: none;
                }
            }
        }
    }
}

/* Mobile et Tablette */
@media screen and (max-width: 1023px){
    h1{
        font-size: 4rem;
    }
    h2{
        font-size: 3rem;
    }
    h3{
        font-size: 2.5rem;
    }
    h4{
        font-size: 2rem;
    }
    h5{
        font-size: 1.5rem;
    }

    .impact-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-connector {
        transform: rotate(90deg);
    }
    
    .problem-solution-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .solution-arrow {
        transform: rotate(90deg);
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .impact-section,
    .problem-solution,
    .advantages-section {
        padding: 2rem 1rem;
    }
    
    /* Instructions responsive */
    .oneRecipe .instructions {
        h3 {
            font-size: 1.5rem;
        }
        
        .instruction-step {
            flex-direction: row;
            gap: 0rem;
            padding: 0rem;
            
            .step-number {
                min-width: 32px;
                height: 32px;
                font-size: 0.95rem;
            }
            
            p {
                font-size: 0.95rem;
                line-height: 1.6;
            }
        }
    }

    .filterAllRecipes{
        flex-direction: column;

        aside.filterRecipes{
            max-width: 100%;
            width: 100%;

            .filterTitle{
                flex-direction: row;
                width: 100%;
            }
            details{
                .groupCol{
                    display: flex;
                    flex-direction: row;
                    justify-content: flex-start;
                    align-items: flex-start;
                }
            }
        }

        .allRecipes{
            flex: auto;

            .recipes{
                gap: 1rem;
                padding: .3rem;
                justify-content: space-evenly;
            }
        }
    }

    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
}

/* Mobile */
@media screen and (max-width: 576px){
    h1{
        font-size: 3rem;
    }
    h2{
        font-size: 2.5rem;
    }
    h3{
        font-size: 2rem;
    }
    h4{
        font-size: 1.5rem;
    }
    h5{
        font-size: 1.2rem;
    }

    header{
        .menu{
            a.imgMenu{
                img {
                    width: 5rem;
                }
            }
        }
    }
}

@media screen and (max-width: 440px){
    header{
        .menu{
            justify-content: space-between;
            gap: 0rem;
        }
    }

    /* Style hero uniquement quand l'utilisateur est connect� */
    body.logged-in .hero {
        padding-top: .5rem;
        .boxHero{
            padding: 0rem;
        }
    }

    .heroIngredients{
        h1 {
            margin-left: 0;
        }
    }

    .hero {
        h1 {
            margin-left: 0;
        }
    }

    .form-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-item {
        min-width: auto;
        padding: 1.5rem;
    }
    
    .problem-box, .solution-box {
        padding: 1.5rem;
    }
    
    .advantage-card {
        padding: 1.5rem;
    }

    .listeRecipesIngredients{
        .columnRecipe{
            .recipes {
                .recipeBox {
                    width: 100%;
                }
            }
        }
    }

    
    .allListUsersFavorisAndIngredients.tab-content {
        padding: 0rem;
    }
}
/* ***** FLASH MESSAGES ***** */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash-message {
    position: relative;
    padding: 15px 40px 15px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: slideIn 0.3s ease-out;
}

/* Types de messages */
.flash-message.alert-success {
    background-color: var(--alert-success);
    border-left: 4px solid var(--alert-success);
    color: var(--background-primary);

    .close-btn {
        color: var(--success-color);
    }
}

.flash-message.alert-error {
    background-color: var(--alert-error);
    border-left: 4px solid var(--alert-error);
    color: var(--background-primary);

    .close-btn {
        color: var(--danger-color);
    }
}

.flash-message.alert-info {
    background-color: var(--alert-info);
    border-left: 4px solid var(--alert-info);
    color: var(--background-primary);

    .close-btn {
        color: var(--info-color);
    }
}

.flash-message.alert-warning {
    background-color: var(--alert-warning);
    border-left: 4px solid var(--alert-warning);
    color: var(--background-primary);

    .close-btn {
        color: var(--warning-color);
    }
}

/* Bouton de fermeture */
.flash-message .close-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    transform: translateY(2%);
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    outline: none;
    outline-offset: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(450px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(450px);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 1023px) {
    .flash-messages {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .flash-message {
        font-size: 0.9rem;
        padding: 12px 35px 12px 12px;
    }
}

/* ============================================
   UX IMPROVEMENTS - INGREDIENTS MANAGER
   ============================================ */

.ingredients-manager {
    background: var(--background-primaryOpacity);
    backdrop-filter: blur(.5rem);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;

    img.hero-image {
        position: absolute;
        bottom: 25%;
        right: -2rem;
        width: 200px;
        height: 200px;
        transform: rotate(15deg);
        z-index: 3;
    }

    .ingredients-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        gap: .5rem;

        h4 {
            margin: 0;
            font-size: 1.5rem;
            color: var(--text-primary);
        }

        .ingredients-count {
            background: var(--primary-color);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-weight: 600;
            font-size: 0.9rem;
        }
    }

    .current-ingredients {
        min-height: 100px;
        max-height: 200px;
        overflow-y: auto;
        scroll-behavior: smooth;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) var(--background-secondary);
        padding: 1rem;
        background: var(--background-primary);
        border-radius: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: flex-start;
        margin-bottom: 1.5rem;
        
        /* Scrollbar personnalis�e pour Chrome/Safari */
        &::-webkit-scrollbar {
            width: 8px;
        }
        
        &::-webkit-scrollbar-track {
            background: var(--background-secondary);
            border-radius: 10px;
        }
        
        &::-webkit-scrollbar-thumb {
            background: var(--primary-color);
            border-radius: 10px;
            
            &:hover {
                background: var(--secondary-color);
            }
        }

        .empty-state {
            width: 100%;
            text-align: center;
            padding: 2rem;
            color: var(--text-secondary);

            i {
                font-size: 3rem;
                margin-bottom: 1rem;
                opacity: 0.5;
            }
        }

        .ingredient-tag {
            display: inline-flex;
            align-items: center;
            background: var(--primary-color);
            color: white;
            padding: 0.5rem;
            border-radius: 25px;
            font-size: .9rem;
            font-weight: 500;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            transition: all 0.2s ease;

            &:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            }

            .remove-ingredient {
                background: transparent;
                border: none;
                width: 24px;
                height: 24px;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: all 0.2s ease;
                padding: 0;

                &:hover {
                    transform: rotate(90deg);
                }

                i {
                    color: white;
                    font-size: 1.1rem;
                    line-height: 0;
                }
            }
        }
    }

    .current-ingredients.visitor {
        min-height: 100px;
        max-height: 100px;

        .empty-state {
            padding: 0;

            i {
                font-size: 1rem;
                margin-bottom: .5rem;
                opacity: 1;
            }
        }
    }

    .add-ingredient-form {
        margin-bottom: 1.5rem;

        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .ingredient-input-group {
            display: flex;
            gap: 1rem;
            position: relative;
            
            .autocomplete-items {
                position: absolute;
                border: 1px solid var(--primary-color);
                border-top: none;
                z-index: 9999;
                top: 100%;
                left: 0;
                right: 0;
                max-height: 250px;
                overflow-y: auto;
                overflow-x: hidden;
                background-color: var(--background-primary);
                border-radius: 0 0 .5rem .5rem;
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
                scrollbar-width: thin;
                scrollbar-color: var(--primary-color) var(--background-secondary);
                
                &::-webkit-scrollbar {
                    width: 8px;
                }
                
                &::-webkit-scrollbar-track {
                    background: var(--background-secondary);
                }
                
                &::-webkit-scrollbar-thumb {
                    background: var(--primary-color);
                    border-radius: 4px;
                }
                
                div {
                    padding: 12px 15px;
                    cursor: pointer;
                    color: var(--text-primary);
                    border-bottom: 1px solid var(--background-secondary);
                    transition: background-color 0.2s ease;
                    
                    &:hover {
                        background-color: var(--background-secondary);
                    }
                    
                    &:last-child {
                        border-bottom: none;
                    }
                    
                    &.autocomplete-active {
                        background-color: var(--primary-color);
                        color: white;
                    }
                    
                    strong {
                        color: var(--primary-color);
                    }
                }
            }

            .inputBox {
                flex: 1;
                position: relative;
                display: flex;
                align-items: center;
                border: 1px solid var(--primary-color);
                border-radius: 8px;
                padding: 0.75rem 1rem;
                background: var(--background-primary);
                
                i {
                    color: var(--primary-color);
                    margin-right: 0.75rem;
                    font-size: 1.2rem;
                }
                
                input[type="text"] {
                    flex: 1;
                    border: none;
                    outline: none;
                    background: transparent;
                    color: var(--text-primary);
                    font-size: 1rem;
                    
                    &::placeholder {
                        color: var(--text-secondary);
                        opacity: 0.7;
                    }
                }
                
                input[type="hidden"] {
                    display: none;
                }
            }
        }
    }

    .ingredients-actions {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .ingredients-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: .3rem 1rem;
        background: var(--info-bg);
        border-left: 4px solid var(--info-color);
        border-radius: 6px;

        i {
            font-size: 1.5rem;
            color: var(--info-color);
            line-height: 0;
        }

        p {
            margin: 0;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
    }
}
@media screen and (max-width: 768px){
    .ingredients-manager{
        img.hero-image {
            top: 1rem;
            bottom: 0;
            right: 0;
            width: 100px;
            height: 100px;
        }
    }
}
@media screen and (max-width: 440px){
    .ingredients-manager{
        .current-ingredients{
            span.ingredient-tag{
                font-size: .8rem;
            }
        }
    }
}

/* ============================================
   UX IMPROVEMENTS - RECIPES PAGE LAYOUT
   ============================================ */

/* En-t�te compact de la page recettes */
.recipes-page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 6rem 2rem 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border-color);

    .header-content {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;

        .header-description {
            color: var(--text-secondary);
            font-size: 1rem;
        }
    }
}

.recipes-page-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 6rem 2rem 5rem 2rem;
    margin: 0 auto;
}

/* SIDEBAR FILTRES - Panneau coulissant en bas pour tous les �crans */
.filters-sidebar {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% - 0px));
    max-height: 80vh;
    overflow-y: auto;
    background: var(--background-primaryOpacity);
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform 0.3s ease;

    /* Scrollbar styling */
    &::-webkit-scrollbar {
        width: 8px;
    }

    &::-webkit-scrollbar-track {
        background: var(--background-primary);
        border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;

        &:hover {
            background: var(--primary-hover);
        }
    }

    &.expanded {
        transform: translateX(-50%) translateY(0);
    }

    /* Indicateur visuel pour montrer que le panneau est cliquable */
    &::before {
        content: '';
        position: absolute;
        top: -30px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 5px;
        background: var(--primary-color);
        border-radius: 3px 3px 0 0;
        opacity: 0.8;
        transition: all 0.3s ease;
    }

    &:hover::before {
        opacity: 1;
        height: 8px;
        top: -33px;
    }

    &.expanded::before {
        opacity: 0;
    }

    .filters-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
        color: white;
        border-radius: 8px;
        cursor: pointer;
        position: relative;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;

        &:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        h3 {
            margin: 0;
            font-size: 1.3rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
    }

    &.expanded .filters-header::after {
        transform: translateY(-50%) rotate(180deg);
    }

    /* Am�lioration accessibilit� - Focus visible */
    .filters-header:focus-visible {
        outline: 3px solid var(--secondary-color);
        outline-offset: 3px;
    }

    .filter-checkbox:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
        border-radius: 3px;
    }

    .remove-filter:focus-visible {
        outline: 2px solid white;
        outline-offset: 2px;
        border-radius: 50%;
    }

    /* fieldset pour regroupement s�mantique */
    fieldset.filter-group {
        border: none;
        padding: 0;
        margin: 0;

        legend {
            padding: 0;
            margin: 0;
            
            h4 {
                margin: 0;
            }
        }
    }

    /* Navigation clavier - am�lioration du focus sur links */
    a:focus-visible, 
    button:focus-visible,
    input:focus-visible,
    details summary:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    /* Focus sur les cartes de recettes */
    .recipeBox:focus-within {
        box-shadow: 0 0 0 3px var(--primary-color);
        transform: scale(1.02);
    }

    /* Skip to content link pour navigation clavier */
    .skip-to-content {
        position: absolute;
        top: -100px;
        left: 0;
        background: var(--primary-color);
        color: white;
        padding: 0.75rem 1.5rem;
        z-index: 10000;
        text-decoration: none;
        border-radius: 0 0 8px 0;
        font-weight: 600;
        transition: top 0.3s ease;

        &:focus {
            top: 0;
        }
    }

    .filters-style {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        flex-wrap: wrap;
    }

    /* Containers flex pour les filtres */
    .filters-basic-container {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
    }

    .filters-advanced-container {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .active-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        min-height: 40px;

        .filter-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: var(--primary-color);
            color: white;
            padding: 0.4rem 0.8rem;
            border-radius: 3rem;
            font-size: .9rem;
            animation: fadeInScale 0.3s ease-out;

            .remove-filter {
                background: transparent;
                border: none;
                width: 18px;
                height: 18px;
                padding: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: all 0.2s ease;

                &:hover {
                    transform: rotate(90deg);
                }

                &:focus {
                    outline: none;
                }

                i {
                    color: white;
                    font-size: 1rem;
                }
            }
        }

        .no-filters {
            color: var(--text-secondary);
            font-size: 0.85rem;
            font-style: italic;
        }
    }

    .filter-group {
        margin-bottom: 1.5rem;

        h4 {
            margin-bottom: 0.75rem;
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .filter-options {
            display: flex;
            flex-direction: column;
        }

        .filter-label {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            padding: 0.1rem;
            border-radius: 6px;
            transition: background 0.2s ease;

            &:hover {
                background: var(--hover-bg);
            }

            input[type="checkbox"] {
                width: 12px;
                height: 12px;
                cursor: pointer;
            }

            span {
                font-size: 0.9rem;
                color: var(--text-primary);
            }

            .category-dot {
                width: 14px;
                height: 14px;
                border-radius: 50%;
                flex-shrink: 0;
            }
        }

        /* Accord?ons details/summary */
        &:is(details) {
            summary {
                display: flex;
                justify-content: space-between;
                align-items: center;
                cursor: pointer;
                padding: 0.5rem;
                border-radius: 6px;
                transition: background 0.2s ease;
                list-style: none;

                &:hover {
                    background: var(--hover-bg);
                }

                &::-webkit-details-marker {
                    display: none;
                }

                h4 {
                    margin: 0;
                }
            }
        }
    }
}

/* CONTENU PRINCIPAL */
.recipes-main,
.seo-section {
    flex: 1;
    
    .search-bar-with-results {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        margin-bottom: 2rem;
        flex-wrap: wrap;

        form {
            display: flex;
            gap: 1rem;

            .inputBox {
                display:flex;
                align-items: center;
                gap: 0.5rem;

                #search-input{
                    width: 100%;
                    max-width: 500px;
                    padding: 1rem 1.5rem;
                    border: 2px solid var(--primary-color);
                    border-radius: 3rem;
                    font-size: 1rem;
                    color: var(--text-primary);
                    background: var(--background-primary);
                    outline: none;
                    
                    &::placeholder {
                        color: var(--text-secondary);
                        opacity: 0.7;
                    }
                }
            }

            .search-btn {
                padding: 0.75rem 1.5rem;
                background: var(--button-color);
                color: white;
                border: none;
                border-radius: 3rem;
                cursor: pointer;
                font-weight: 600;
                transition: all 0.3s ease;

                &:hover {
                    background: var(--button-color-hover);
                    transform: translateY(-2px);
                    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
                }
            }
        }

        .results-count {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
            padding: 0.75rem 1.5rem;
            background: var(--background-secondary);
            border-radius: 8px;
            white-space: nowrap;

            #recipes-count {
                color: var(--primary-color);
                font-size: 1.3rem;
            }
        }
    }

    .recipes {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 2rem;

        .recipeBox{
            position: relative;
            width: 100%;
            max-width: 290px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: .5rem;
            padding: 0rem 1rem 1rem 1rem;
            border-radius: .5rem;
            background-color: var(--background-primary);
            /* box-shadow: 0 0 12px var(--primary-color); */
            transition: all 0.3s ease-in-out;

            h4{
                font-size: 1.2rem;
                text-align: center;
            }

            p{
                font-size: .7rem;
            }

            &:hover {
                transform: scale(1.05);
                box-shadow: 1px 1px 0px var(--primary-color);
            }

            img {
                width: 300px;
                height: 200px;
                object-fit: cover;
                /* object-position: center; */
                transition: all 0.3s ease-in-out;
                &:hover {
                    transform: scale(1.1);
                }
            }

            .recipe-favorite-indicator {
                    position: absolute;
                    top: -1rem;
                    right: -1rem;
                    width: 2rem;
                    height: 2rem;
                    border-radius: 50%;
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    z-index: 12;
                    transform: rotate(20deg);

                    i {
                        color: var(--primary-color);
                        font-size: 2rem;
                        line-height: 1;
                        filter: drop-shadow(0px 0px 15px rgb(255, 152, 0, 0.9));
                    }
                }

            .recipe-meta {
                display: flex;
                flex-wrap: wrap;
                gap: 0.75rem;
                margin-bottom: 1rem;
                font-size: 0.9rem;
                position: absolute;
                top: 0;
                left: 0;
                padding: .3rem;
                margin: .3rem;
                background: var(--background-secondaryOpacity);
                border-radius: .5rem;

                span {
                    display: flex;
                    align-items: center;
                    font-size: .7rem;
                    gap: 0.25rem;

                    i {
                        color: var(--primary-color);
                    }
                }
            }
        }
    }

    .empty-state,
    #no-results-message {
        text-align: center;
        padding: 4rem 2rem;
        background: var(--background-secondary);
        border-radius: 12px;

        i {
            font-size: 4rem;
            color: var(--text-secondary);
            opacity: 0.5;
            margin-bottom: 1rem;
        }

        h3 {
            font-size: 1.5rem;
            color: var(--text-primary);
            margin-bottom: 1rem;
        }

        p {
            color: var(--text-secondary);
            font-size: 1rem;
            line-height: 1.6;
        }
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1023px) {
    .recipes-page-header {
        padding: 1.5rem;

        .header-content h1 {
            font-size: 1.75rem;
        }
    }

    .recipes-page-layout {
        gap: 1.5rem;
        padding: 6rem 1.5rem 5rem 1.5rem;
    }

    .filters-sidebar {
        padding: 1rem;
    }
}

@media (max-width: 1023px) {
    .recipes-page-header {
        padding: 4.5rem 1rem 1rem 1rem;

        .header-content h1 {
            font-size: 1.5rem;
        }

        .header-description {
            font-size: 0.9rem;
        }
    }

    .recipes-page-layout {
        flex-direction: column;
        padding: 1rem 1rem 5rem 1rem;
    }

    .header-description {
            font-size: 0.9rem;
        }

    .recipes-page-layout {
        flex-direction: column;
        padding: 1rem 1rem 5rem 1rem;
    }

    .recipes-main .search-bar-with-results {
        flex-direction: column;
        align-items: stretch;

        form {
            flex-direction: column;
        }

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

    .ingredients-manager {
        width: 100%;
        padding: 1.5rem;

        .ingredients-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.5rem;
        }

        .add-ingredient-form .ingredient-input-group {
            flex-direction: column;
        }

        .ingredients-actions {
            flex-direction: column;
            width: fit-content;
        }
    }
}

        

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   MISSING INGREDIENTS DISPLAY
   ============================================ */

.missing-ingredients {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--warning-color);

    .label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
        font-size: 0.9rem;

        i {
            color: var(--warning-color);
            font-size: 1.1rem;
        }
    }

    .ingredients-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .missing-ingredient-tag {
        display: inline-block;
        background: var(--warning-bg);
        color: var(--warning-text);
        padding: 0.4rem 0.8rem;
        border-radius: 15px;
        font-size: 0.85rem;
        font-weight: 500;
        border: 1px solid var(--warning-border);
        transition: all 0.2s ease;

        &:hover {
            background: var(--warning-color);
            color: white;
            transform: translateY(-2px);
        }
    }
}

/* Adapter l'affichage sur les cartes recettes partielles */
.recipeBox-partial {
    .missing-ingredients {
        margin-top: auto;
    }
}

/* ***** ADMIN SIDEBAR (Layout Grid comme User) ***** */

/* Layout Grid Admin */
.admin-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    grid-template-rows: 1fr;
    min-height: calc(100vh - 60px);
    transition: grid-template-columns 0.3s ease-in-out;
}

.admin-layout.sidebar-collapsed {
    grid-template-columns: 0px 1fr;
}

.admin-content-wrapper {
    overflow-x: hidden;
    position: relative;
}

.admin-sidebar {
    background: var(--background-primaryOpacity);
    border-right: 1px solid var(--secondary-color);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    width: 350px;
    transition: width 0.3s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-secondary);
    position: relative;
}

.admin-layout.sidebar-collapsed .admin-sidebar {
    width: 0;
    border-right: none;
}

.admin-sidebar .sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 350px;
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Toggle Button Admin Sidebar */
.admin-sidebar .sidebar-toggle-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.admin-sidebar .sidebar-toggle-btn i {
    font-size: 1.2rem;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.admin-sidebar .sidebar-toggle-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.admin-sidebar .sidebar-toggle-btn:hover i {
    color: white;
    transform: rotate(90deg);
}

.admin-sidebar .sidebar-header {
    padding: 4rem 1rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-sidebar .sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar .sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.admin-sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.admin-sidebar .sidebar-link:hover {
    background: var(--hover-color);
    color: var(--primary-color);
    text-decoration: none;
}

.admin-sidebar .sidebar-link.active {
    background: var(--primary-color);
    color: white;
    border-left: 3px solid var(--secondary-color);
}

.admin-sidebar .sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.admin-sidebar .sidebar-link span:first-of-type {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar .sidebar-link .badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.admin-sidebar .sidebar-link:hover .badge {
    background: var(--secondary-color);
}

.admin-sidebar .sidebar-link.active .badge {
    background: var(--background-primary);
    color: var(--primary-color);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

.sidebar-section {
    padding: 0.5rem 1rem;
}

.sidebar-section small {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

/* Ajustement du contenu principal avec sidebar */
main.with-sidebar {
    padding: 2rem;
    padding-top: calc(60px + 2rem);
    min-height: calc(100vh - 60px);
}

/* Sections admin avec sidebar */
.admin-section,
.sectionSiteLinks {
    position: relative;
    z-index: 1;
}

/* Responsive sidebar Admin */
@media (max-width: 1023px) {
    /* Mobile et Tablette : sidebar plein ?cran comme user */
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-layout.sidebar-open {
        grid-template-columns: 100vw 0px;
    }
    
    .admin-sidebar {
        width: 100vw;
        transform: translateX(-100vw);
        position: fixed;
        top: 60px;
        left: 0;
        height: calc(100vh - 60px);
        z-index: 999;
    }
    
    .admin-layout.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }
    
    .admin-sidebar .sidebar-content {
        min-width: 100vw;
    }
    
    .admin-sidebar .sidebar-toggle-btn {
        display: none;
    }
    
    main.with-sidebar {
        padding: 1rem;
        padding-top: calc(60px + 1rem);
    }
}

/* En-t�te admin coh�rent */
.admin-header {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Tableau de s�curit� responsive */
.security-table-container {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.security-table-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.security-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.security-table thead {
    background: var(--background-secondary);
}

.security-table th,
.security-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.security-table th {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.security-table tr:hover {
    background: var(--background-secondary);
}

.security-table tr.high-risk {
    background: var(--background-error);
}

.security-table tr.medium-risk {
    background: var(--background-warning);
}

.security-table tr.low-risk {
    background: var(--background-success);
}

.security-table code {
    background: var(--background-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

.user-type-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.user-type-badge.admin {
    background: var(--primary-color);
    color: white;
}

.user-type-badge.user {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.failed-attempts {
    color: #f44336;
    font-weight: 700;
    font-size: 1.1rem;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.critical {
    background: var(--danger-color);
    color: white;
}

.status-badge.warning {
    background: var(--warning-color);
    color: white;
}

.status-badge.normal {
    background: var(--success-color);
    color: white;
}

/* Responsive pour petits ?crans */
@media (max-width: 1023px) {
    .table-responsive {
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .security-table {
        font-size: 0.85rem;
    }
    
    .security-table th,
    .security-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Overlay pour mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-background);
    z-index: 8;
}

.sidebar-overlay.active {
    display: block;
}

/* ***** PWA STYLES ***** */
.pwa-update-notification,
.network-status,
.cache-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--background-primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.pwa-update-notification.fade-out,
.network-status.fade-out,
.cache-notification.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.pwa-update-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pwa-update-content i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.pwa-update-notification button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.network-status {
    background: var(--background-primary);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
}

.network-status-success {
    border-left: 4px solid #51cf66;
}

.network-status-warning {
    border-left: 4px solid #ffa94d;
}

.network-status i {
    font-size: 1.2rem;
}

.connection-indicator.hidden {
    display: none;
}

/* Responsive PWA */
@media (max-width: 1023px) {
    .pwa-update-notification,
    .network-status,
    .cache-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .pwa-update-content {
        flex-direction: column;
        text-align: center;
    }

    /* Responsive page � propos */
    .about-mission,
    .how-it-works {
        padding: 2rem 1rem;
    }

    .about-container h2 {
        font-size: 2rem;
    }

    .mission-text {
        font-size: 1rem;
        padding: 1.5rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .step-item {
        padding: 2rem 1.5rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .step-item h4 {
        font-size: 1.2rem;
    }
}

/* ============================================
   PWA - OFFLINE & CACHE INDICATORS
   ============================================ */

/* Badge 'Offline disponible' sur les cartes de recettes */
.offline-available-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 5;
    animation: slideInBadge 0.3s ease-out;
}

.offline-available-badge i {
    font-size: 0.9rem;
}

@keyframes slideInBadge {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Bouton d'installation PWA */
.pwa-install-btn {
    position: fixed;
    bottom: 84px;
    right: 20px;
    width: fit-content;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 3rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

@media screen and (max-width: 1023px) {
    .pwa-install-btn {
        right: center;
        bottom: 80px;
    }
}

/* Instructions installation iOS */
.pwa-notification.ios-install {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 3rem;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    z-index: 10000;
    width: max-content;
    animation: slideUp 0.3s ease;
}

.pwa-notification.ios-install .notification-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
}

.pwa-notification.ios-install strong {
    font-family: 'milky';
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
    padding: 0;
}

.pwa-notification.ios-install p {
    margin: 0;
    padding: 0;
    color: white;
    font-size: 0.9rem;
    display: inline-block;
}

@keyframes slideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }
    to {
        bottom: 20px;
        opacity: 1;
    }
}


/* Prompt de demande de notifications */
.notification-prompt {
    position: fixed;
    bottom: 20px;
    right: -400px;
    max-width: 350px;
    background: var(--background-primaryOpacity);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-prompt.show {
    right: 20px;
}

.notification-prompt-content {
    padding: .5rem;
    position: relative;
}

.notification-prompt-content i {
    font-size: 3rem;
    color: var(--primary-color);
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.notification-prompt-content h4 {
    margin: 0 0 10px 0;
    text-align: center;
    color: var(--text-primary);
}

.notification-prompt-content p {
    margin: 0 0 20px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.5;
}

.prompt-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.prompt-buttons button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

@media (max-width: 1023px) {
    .notification-prompt {
        bottom: 100px;
        right: -100%;
        left: 10px;
    }
    
    .notification-prompt.show {
        right: 0;
        left: 10px;
    }

    .prompt-buttons button {
        font-size: 1rem;
    }
}

/* ***** STATISTIQUES UTILISATEUR ***** */
/* Styles pour l'onglet Statistiques */
.user-statistics {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.user-statistics h2 {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.favorite-category {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
    text-align: center;
}

.favorite-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.category-badge {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.category-badge small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Statistiques secondaires */
.stats-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stats-secondary .stat-item {
    background: var(--background-primary);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-secondary .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stats-secondary .stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stats-secondary .stat-item div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stats-secondary .stat-item strong {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stats-secondary .stat-item span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Badges d'accomplissement */
.achievement-badges {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.achievement-badges h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badges-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.badge-item {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.badge-item:hover {
    transform: translateY(-5px);
}

.badge-item.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #7a5d00;
}

.badge-item.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #505050;
}

.badge-item.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #e09c5f 100%);
    color: #5a3818;
}

.badge-item i {
    font-size: 2.5rem;
}

.badge-item span {
    font-weight: 600;
    font-size: 1.1rem;
}

.badge-item small {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Section des préférences */
.preferences-section {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.preferences-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preferences-section .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
}

.favorite-category-enhanced {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.category-main {
    display: flex;
    flex-direction: column;
}

.category-badge-large {
    padding: 1.5rem 2rem;
    border-radius: 12px;
    color: white;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.category-badge-large span {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-badge-large small {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
}

.category-distribution {
    display: flex;
    flex-direction: column;
}

.category-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.bar-label span {
    color: var(--text-primary);
}

.bar-label strong {
    color: var(--primary-color);
    font-weight: 600;
}

.bar-container {
    width: 100%;
    height: 8px;
    background: var(--background-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.top-ingredients {
    margin-top: 1.5rem;
}

.ingredient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.ingredient-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ingredient-badge i {
    font-size: 1.1rem;
}

.ingredient-badge small {
    opacity: 0.9;
}

/* Activité récente */
.recent-activity {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.recent-activity h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-left: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: absolute;
    left: -30px;
}

.activity-content {
    flex: 1;
    background: var(--background-secondary);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-content a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.activity-content a:hover {
    color: var(--primary-color);
}

.activity-content small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive pour les statistiques */
@media (max-width: 768px) {
    .favorite-category-enhanced {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .badges-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stats-secondary {
        grid-template-columns: 1fr;
    }
    
    .activity-timeline {
        padding-left: 1.5rem;
    }
    
    .activity-icon {
        left: -25px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* ===== SCORE CULINAIRE & STREAK ===== */
.score-culinaire-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color, #764ba2) 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.score-main {
    flex: 1;
    min-width: 250px;
}

.score-niveau {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.niveau-icon {
    font-size: 3rem;
    line-height: 1;
}

.niveau-info {
    display: flex;
    flex-direction: column;
}

.niveau-nom {
    font-size: 1.5rem;
    font-weight: 700;
}

.score-number {
    font-size: 1.1rem;
    opacity: 0.9;
}

.niveau-progression {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.niveau-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    overflow: hidden;
}

.niveau-progress-fill {
    height: 100%;
    background: #ffd700;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.niveau-progression small,
.niveau-max {
    font-size: 0.85rem;
    opacity: 0.85;
}

.streak-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    min-width: 200px;
}

.streak-flame {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.streak-flame.active {
    background: rgba(255, 165, 0, 0.3);
}

.streak-flame i {
    font-size: 1.8rem;
    color: rgba(255,255,255,0.5);
}

.streak-flame.active i {
    color: #ffd700;
}

.streak-count {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-label {
    font-size: 0.95rem;
    line-height: 1.3;
}

.ranking-display {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    font-size: 0.95rem;
}

.ranking-display i {
    font-size: 1.5rem;
    color: #ffd700;
}

/* ===== OBJECTIF MENSUEL ===== */
.objectif-section {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.objectif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.objectif-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-edit-objectif {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit-objectif:hover {
    background: var(--primary-color);
    color: white;
}

.objectif-bar {
    width: 100%;
    height: 20px;
    background: var(--background-secondary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.objectif-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #28a745);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.objectif-bar-fill.completed {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.objectif-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.objectif-count {
    font-weight: 600;
    color: var(--text-primary);
}

.objectif-percent {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.objectif-bravo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #28a745;
    text-align: center;
    margin-top: 0.5rem;
}

.objectif-edit-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--background-secondary);
}

.objectif-edit-form.hidden {
    display: none;
}

.objectif-form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.objectif-form-row label {
    font-weight: 500;
    color: var(--text-secondary);
}

.objectif-form-row input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid var(--background-secondary);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.cta-small {
    padding: 0.5rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-small:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ===== GRAPHIQUE MENSUEL ===== */
.activite-mensuelle-section {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.activite-mensuelle-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 200px;
    padding: 0 0.5rem;
}

.chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    gap: 0.5rem;
}

.chart-bar-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.chart-bar-wrapper {
    flex: 1;
    width: 100%;
    max-width: 60px;
    display: flex;
    align-items: flex-end;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.chart-bar-fill {
    width: 100%;
    background: linear-gradient(to top, var(--primary-color), var(--secondary-color, #764ba2));
    border-radius: 8px 8px 0 0;
    min-height: 4px;
    transition: height 0.8s ease;
}

.chart-bar-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

/* ===== HEATMAP CALENDRIER ===== */
.heatmap-section {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.heatmap-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.heatmap-grid {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.heatmap-labels {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-right: 0.25rem;
}

.heatmap-labels span {
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.heatmap-weeks {
    display: flex;
    gap: 3px;
}

.heatmap-week {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.heatmap-cell {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    transition: transform 0.2s ease;
}

.heatmap-cell:hover {
    transform: scale(1.4);
}

.heatmap-cell.empty {
    background: transparent;
}

.heatmap-cell.level-1 {
    background: var(--background-secondary);
}

.heatmap-cell.level-2 {
    background: #9be9a8;
}

.heatmap-cell.level-3 {
    background: #40c463;
}

.heatmap-cell.level-4 {
    background: #216e39;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1rem;
    justify-content: flex-end;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.heatmap-legend .heatmap-cell {
    cursor: default;
}

.heatmap-legend .heatmap-cell:hover {
    transform: none;
}

/* ===== SUGGESTIONS NON ESSAYÉES ===== */
.suggestions-section {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.suggestions-section h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestions-intro {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.suggestions-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.suggestion-card {
    background: var(--background-secondary);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.suggestion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.suggestion-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.suggestion-info {
    padding: 1rem;
}

.suggestion-info h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
}

.suggestion-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.suggestion-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===== CTA PREMIUM STATS ===== */
.premium-stats-cta {
    text-align: center;
    padding: 3rem 2rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 16px;
}

.premium-stats-cta-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, #764ba2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-stats-cta-icon i {
    font-size: 1.8rem;
    color: white;
}

.premium-stats-cta h3 {
    font-size: 1.4rem;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.premium-stats-cta p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.premium-stats-cta .cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, #764ba2));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premium-stats-cta .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ===== RESPONSIVE NOUVELLES SECTIONS ===== */
@media (max-width: 768px) {
    .score-culinaire-section {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .streak-display {
        width: 100%;
    }
    
    .chart-bars {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        gap: 0.75rem;
    }
    
    .chart-bar-col {
        flex-direction: row;
        height: auto;
        gap: 0.75rem;
    }
    
    .chart-bar-label {
        font-size: 0.8rem;
        min-width: 60px;
        text-align: right;
        order: -1;
    }
    
    .chart-bar-value {
        font-size: 0.85rem;
        min-width: 30px;
        text-align: left;
    }
    
    .chart-bar-wrapper {
        flex: 1;
        max-width: none;
        height: 24px;
        align-items: stretch;
        border-radius: 0 8px 8px 0;
    }
    
    .chart-bar-fill {
        height: 100% !important;
        width: auto;
        border-radius: 0 8px 8px 0;
        background: linear-gradient(to right, var(--primary-color), var(--secondary-color, #764ba2));
    }
    
    .suggestions-cards {
        grid-template-columns: 1fr;
    }
    
    .objectif-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .objectif-form-row input[type="number"] {
        width: 100%;
    }
}

.tried-recipes-section {
    background: var(--background-primary);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-height: 430px;
    min-height: 200px;
}

.tried-recipes-section .recipes {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
    padding: 1rem 0;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-secondary);
}

.tried-recipes-section .recipes .recipeBox {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid var(--primary-color);
    transition: transform .3s ease;
}

.tried-recipes-section .recipes .recipeBox img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.tried-recipes-section .recipes .recipeBox a {
    font-size: 1.1rem;
    width: 80%;
    padding: .2rem .5rem;
    text-align: center;
    border-radius: 3rem;
}

.tried-recipes-section .recipes .recipeBox a:hover {
    transform: none;
    rotate: none;
}

.tried-recipes-section .recipes .recipeBox .recipe-meta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ***** AUTH PAGES (connexion, inscription, forgot-password, reset-password, confirm-password, verify-2fa) ***** */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
}

.auth-content {
    background: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-header {
    padding: 40px 30px 30px;
    text-align: center;

    &.forgot-password {
        background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    }

    &.confirm-password {
        background: linear-gradient(135deg, #ffc10715 0%, #ff980015 100%);
    }

    &.verify-2fa {
        background: linear-gradient(135deg, #28a74515 0%, #20c99715 100%);
    }

    .icon-container {
        margin-bottom: 20px;
    }

    h2 {
        color: var(--text-primary);
        font-size: 28px;
        margin: 0 0 10px 0;
        font-weight: 600;
    }

    p {
        color: var(--text-secondary);
        font-size: 14px;
        margin: 0;
    }
}

.auth-body {
    padding: 30px;

    .form-group {
        margin-bottom: 20px;

        label {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 8px;

            i {
                font-size: 16px;
                color: var(--primary-color);
            }
        }
    }

    .password-container {
        position: relative;

        input {
            width: 100%;
            padding: 12px 45px 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s ease;

            &:focus {
                outline: none;
                border-color: var(--primary-color);
                box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            }
        }

        .password-toggle {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 5px;
            transition: color 0.3s ease;

            &:hover {
                color: var(--primary-color);
            }
        }
    }

    .code-input {
        width: 100%;
        padding: 16px 15px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 24px;
        font-weight: 600;
        text-align: center;
        letter-spacing: 8px;
        transition: all 0.3s ease;
        font-family: 'Courier New', monospace;

        &:focus {
            outline: none;
            border-color: #28a745;
            box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
        }
    }
}

.forgot-password-link {
    text-align: right;
    margin-bottom: 20px;
    margin-top: -5px;
}

.password-strength {
    margin-top: 10px;

    .strength-bar {
        height: 4px;
        background-color: #e0e0e0;
        border-radius: 2px;
        overflow: hidden;
        margin-bottom: 5px;
    }

    .strength-bar-fill {
        height: 100%;
        width: 0%;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .strength-text {
        font-size: 12px;
        font-weight: 500;
    }
}

.info-notice {
    background-color: #e7f6f8;
    border-left: 4px solid #17a2b8;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;

    i {
        font-size: 20px;
        color: #17a2b8;
    }

    p {
        margin: 0;
        color: #0c5460;
        font-size: 13px;
        line-height: 1.5;
    }
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;

    i {
        color: #17a2b8;
    }
}

/* ***** ERROR PAGES (403, 404, 500) ***** */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;

    &.error-403 {
        background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    }

    &.error-404 {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    }

    &.error-500 {
        background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
    }
}

.error-container {
    background: var(--background-primary);
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);

    .error-code {
        font-size: 8rem;
        font-weight: 900;
        color: white;
        line-height: 1;
        margin-bottom: 1rem;
    }

    .error-title {
        font-size: 2rem;
        color: white;
        margin-bottom: 1rem;
        font-weight: 700;
    }

    .error-description {
        font-size: 1.1rem;
        color: var(--text-secondary);
        margin-bottom: 2rem;
        line-height: 1.6;
    }

    .error-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ***** SUBSCRIPTION PAGES ***** */
.success-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.success-card {
    background: var(--background-primary);
    border-radius: 16px;
    padding: 3rem;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);

    .success-icon {
        font-size: 5rem;
        color: var(--success-color);
        margin-bottom: 1.5rem;
    }

    h1 {
        color: var(--primary-color);
        margin-bottom: 1rem;
        font-size: 2rem;
    }

    .success-message {
        font-size: 1.2rem;
        color: var(--text-secondary);
        margin-bottom: 2rem;
    }

    .success-details {
        background: var(--background-secondary);
        padding: 2rem;
        border-radius: 12px;
        margin: 2rem 0;

        p {
            margin-bottom: 1rem;
            font-weight: bold;
            color: var(--text-primary);
        }

        ul {
            list-style: none;
            padding: 0;
            text-align: left;

            li {
                padding: 0.5rem 0;
                display: flex;
                align-items: center;
                gap: 0.8rem;

                i.fi-sr-check {
                    color: var(--success-color);
                    font-size: 1.2rem;
                }
            }
        }
    }
}

/* ***** ADMIN PAGES ***** */

/* Admin Header */
.admin-header {
    margin-bottom: 30px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Dashboard Stats Cards */
.stat-card {
    background: var(--background-primary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;

    i {
        font-size: 2rem;
        color: white;
    }

    h3 {
        margin: 0;
        font-size: 2rem;
        color: var(--text-primary);
    }

    p {
        margin: 0;
        color: var(--text-secondary);
        font-size: 0.9rem;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;

        &.users { 
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
        }
        &.recipes{ 
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); 
        }
        &.tentees { 
            background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); 
        }
        &.temps {
            background: linear-gradient(135deg, #0984e3 0%, #1e88e5 100%);
        }
        &.favorites, &.favoris { 
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); 
        }
        &.ingredients { 
            background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); 
        }
    }

    .stat-content {
        h3 {
            margin: 0 0 0.5rem 0;
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .stat-number {
            font-size: 2rem;
            font-weight: bold;
            color: var(--text-primary);
            display: block;
        }

        small {
            color: var(--text-secondary);
            font-weight: 500;
        }
    }
}

/* Quick Stats Section */
.quick-stats {
    margin: 2rem 0;

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Webhooks Stats Section */
.webhooks-stats-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--background-primary);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);

    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .webhooks-stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .webhook-stat-card {
        background: var(--background-secondary);
        padding: 1.5rem;
        border-radius: 8px;
        text-align: center;

        &.success {
            background: var(--background-success);
        }

        &.failed {
            background: var(--background-error);
        }

        &.pending {
            background: var(--background-warning);
        }

        h3 {
            margin: 0 0 0.5rem 0;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .webhook-stat-number {
            font-size: 2rem;
            font-weight: bold;
            color: var(--text-primary);
        }

        small {
            display: block;
            margin-top: 0.5rem;
            font-size: 0.875rem;
            color: var(--text-secondary);
        }
    }

    .recent-webhooks {
        margin-top: 2rem;

        h3 {
            margin-bottom: 1rem;
        }
    }

    .webhooks-table {
        width: 100%;
        border-collapse: collapse;

        th {
            background: var(--background-secondary);
            padding: 0.75rem;
            text-align: left;
            font-weight: 600;
            border-bottom: 2px solid var(--border-color);
        }

        td {
            padding: 0.75rem;
            border-bottom: 1px solid var(--border-color);
        }

        .webhook-type {
            font-family: monospace;
            font-size: 0.875rem;
            background: var(--background-secondary);
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
        }

        .badge-webhook {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            font-weight: 500;
        }
    }
}

/* Subscriptions Stats Section */
.subscriptions-stats-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--background-primary);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);

    .section-header {
        margin-bottom: 1.5rem;
    }

    .subscription-stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .subscription-stat-card {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 1.5rem;
        border-radius: 8px;
        text-align: center;

        &.total {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }

        &.monthly {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        }

        &.yearly {
            background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
        }

        &.lifetime {
            background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
        }

        .stat-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        h3 {
            margin: 0 0 0.5rem 0;
            font-size: 0.9rem;
            opacity: 0.9;
        }

        .subscription-stat-number {
            font-size: 2.5rem;
            font-weight: bold;
        }

        small {
            display: block;
            margin-top: 0.5rem;
            font-size: 0.875rem;
            opacity: 0.8;
        }
    }

    .revenue-stats {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .revenue-card {
        background: var(--background-secondary);
        padding: 1.5rem;
        border-radius: 8px;
        text-align: center;

        &.mrr {
            background: linear-gradient(135deg, #667eea22 0%, #764ba222 100%);
        }

        &.arr {
            background: linear-gradient(135deg, #43e97b22 0%, #38f9d722 100%);
        }

        &.new {
            background: linear-gradient(135deg, #4facfe22 0%, #00f2fe22 100%);
        }

        &.canceled {
            background: linear-gradient(135deg, #f5576c22 0%, #f093fb22 100%);
        }

        h3 {
            margin: 0 0 0.5rem 0;
            font-size: 0.9rem;
            color: #6b7280;
        }

        .revenue-amount {
            font-size: 2rem;
            font-weight: bold;
            color: #1f2937;
        }
    }
}

/* Analytics Section */
.analytics-section {
    margin: 3rem 0;

    .analytics-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .analytics-card {
        background: var(--background-primary);
        border-radius: 12px;
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

        h3 {
            margin: 0 0 1.5rem 0;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
    }

    .recipe-item {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
}

/* Analytics Page */
.analytics-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;

    .analytics-header {
        text-align: center;
        margin-bottom: 3rem;

        h1 {
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }
    }

    .charts-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 2rem;
        margin-bottom: 3rem;

        .chart-container {
            background: var(--background-primary);
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

            h3 {
                margin: 0 0 1rem 0;
                color: var(--text-primary);
            }
        }
    }

    .tables-section {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        gap: 2rem;
    }

    .analytics-table {
        background: var(--background-primary);
        border-radius: 12px;
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

        h3 {
            margin: 0 0 1.5rem 0;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
    }

    .top-recipes-table {
        width: 100%;
        border-collapse: collapse;

        th,
        td {
            padding: 0.75rem;
            text-align: left;
            border-bottom: 1px solid #eee;
        }

        th {
            background-color: #f8f9fa;
            font-weight: 600;
        }

        .rank-badge {
            background: var(--warning-color);
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-weight: bold;
            font-size: 0.85rem;
        }

        .category-badge {
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.85rem;
        }

        .favorites-badge {
            color: var(--danger-color);
            font-weight: 500;
        }
    }

    .difficulty-stats {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        .difficulty-item {
            display: grid;
            grid-template-columns: 100px 1fr 80px;
            align-items: center;
            gap: 1rem;
        }

        .difficulty-badge {
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.85rem;
            font-weight: 500;
            text-align: center;

            &.difficulty-facile {
                background-color: #28a745;
                color: white;
            }

            &.difficulty-moyenne {
                background-color: #ffc107;
                color: #333;
            }

            &.difficulty-difficile {
                background-color: #dc3545;
                color: white;
            }
        }
    }
}

/* Admin Notifications */
.notification-form {
    .form-group {
        margin-bottom: 20px;

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--text-primary);
        }

        input,
        select,
        textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 1rem;
        }

        textarea {
            resize: vertical;
        }
    }

    .form-help {
        display: block;
        margin-top: 5px;
        font-size: 0.85rem;
        color: var(--text-secondary);
        font-style: italic;
    }

    .info-message {
        background: var(--background-info);
        color: var(--info-color);
        padding: 12px 15px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.9rem;
    }
}

.card {
    background: var(--background-primary);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Security Stats */
.security-stats-header {
    text-align: center;
    margin-bottom: 2rem;

    h2 {
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }
}

.security-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: var(--background-primary);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid var(--info-color);

    &.danger {
        border-left-color: var(--danger-color);
    }

    &.warning {
        border-left-color: var(--warning-color);
    }

    &.success {
        border-left-color: var(--success-color);
    }

    .stat-number {
        font-size: 2rem;
        font-weight: bold;
        color: var(--text-primary);
        display: block;
        margin-top: 0.5rem;
    }
}

.security-table-container {
    background: var(--background-primary);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);

    .security-table {
        width: 100%;
        border-collapse: collapse;

        th,
        td {
            padding: 0.75rem;
            text-align: left;
            border-bottom: 1px solid #eee;
        }

        th {
            background-color: #f8f9fa;
            font-weight: 600;
        }

        .high-risk {
            background-color: #ffeaea;
        }

        .medium-risk {
            background-color: #fff3cd;
        }

        .low-risk {
            background-color: #f8f9fa;
        }

        .user-type-badge {
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.85rem;
            font-weight: 500;
        }
    }
    padding: 0rem 1rem 0rem 0rem;
    gap: 0.5rem;
}

.tried-recipes-section .recipes .recipeBox .recipe-meta h6 {
    font-size: .9rem;
    line-height: 0;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.tried-recipes-section .recipes .recipeBox .recipe-meta h6 i {
    line-height: 0;
}

.tried-recipes-section .recipes .recipeBox .recipe-meta span {
    padding: .2rem .5rem;
    border-radius: 3rem;
}

.tried-badge {
    background: var(--success-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    color: #95a5a6;
    font-size: 1.1rem;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    color: #bdc3c7;
}

@media (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ***** BOUTON RECETTE TENT�E ***** */
.tried-btn {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);

    i {
        font-size: 1rem;
    }
}

.tried-btn:hover {
    color: var(--success-color);
    transform: scale(1.2);
    border: 2px solid var(--success-color);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.tried-btn.is-tried {
    background: linear-gradient(135deg, var(--success-color), #45a049);
    opacity: 0.8;
}

.tried-btn.is-tried i {
    color: #fff;
    font-size: 1rem;
}

/* Styles pour la page Pricing */
.pricing-hero {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    padding-top: 7rem;
    height: 100%;
    background: url("../img/cuisine/cuisine5.svg"),
    url("../img/categories/categorie_5_1747401201.webp"),
    url("../img/categories/categorie_6_1747401153.webp"),
    url("../img/categories/categorie_11_1747401165.webp"),
    url("../img/categories/categorie_12_1747400842.webp"),
    url("../img/categories/categorie_8_1747401112.webp"),
    url("../img/categories/categorie_15_1747401306.webp"),
    url("../img/categories/categorie_18_1747508823.webp"),
    url("../img/categories/categorie_13_1747401242.webp");
    background-size: 10%;
    background-position: 
        50% 10%,  /* En haut au centre */
        90% 20%,  /* En haut � droite */
        10% 20%,  /* En haut � gauche */
        85% 50%,  /* � droite au milieu */
        15% 50%,  /* � gauche au milieu */
        75% 80%,  /* En bas � droite */
        25% 80%,  /* En bas � gauche */
        60% 90%,  /* En bas vers la droite */
        40% 90%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: all 0.3s ease-in-out;
    animation-name: heroIngredientsBackgroundAnimation;
    animation-duration: 8s;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-fill-mode:both;
}

body.logged-in .pricing-hero {
    height: auto;
    padding-top: 0rem;
}

.pricing-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    color: var(--text-secondary);
    background: var(--background-primary);
    padding: 0.5rem 1rem;
    border-radius: 3rem;
}

.pricing-container {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background: url("../img/cuisine/cuisine5.svg"),
    url("../img/dessert/dessert4.svg"),
    url("../img/dessert/dessert5.svg"),
    url("../img/dessert/dessert6.svg"),
    url("../img/dessert/dessert7.svg"),
    url("../img/dessert/dessert8.svg"),
    url("../img/dessert/dessert9.svg"),
    url("../img/dessert/dessert16.svg"),
    url("../img/dessert/dessert17.svg");

    background-size: 10%;
    background-position: 
        50% 10%,  /* En haut au centre */
        90% 20%,  /* En haut � droite */
        10% 20%,  /* En haut � gauche */
        85% 50%,  /* � droite au milieu */
        15% 50%,  /* � gauche au milieu */
        75% 80%,  /* En bas � droite */
        25% 80%,  /* En bas � gauche */
        60% 90%,  /* En bas vers la droite */
        40% 90%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    animation-name: heroBackgroundAnimation;
    animation-duration: 8s;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-fill-mode:both;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    
}

.pricing-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: var(--background-primaryOpacity);
    backdrop-filter: blur(.5rem);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.pricing-card.best-value {
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.pricing-card.best-value:hover {
    transform: scale(1.05) translateY(-8px);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.plan-badge.best {
    background: var(--secondary-color);
    text-align: center;
}

.plan-badge.exclusive {
    background: linear-gradient(135deg, #FF6B6B, #FFD93D);
    text-align: center;
}

.pricing-card h2 {
    text-align: center;
    margin: 1.5rem 0 1rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.price {
    text-align: center;
    margin: 1.5rem 0;
}

.price .amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-primary);
}

.price .period {
    font-size: 1rem;
    color: var(--text-secondary);
}

.savings {
    text-align: center;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.features-list li {
    padding: 0.7rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
}

.features-list i.fi-sr-check {
    color: var(--success-color);
    font-size: 1.2rem;
}

.features-list i.fi-sr-star {
    color: #FFD700;
    font-size: 1.2rem;
}

.features-list li.disabled {
    color: var(--text-secondary);
    opacity: 0.6;
}

.features-list i.fi-sr-cross-small {
    color: #F44336;
}

.payment-info {
    display: block;
    text-align: center;
    margin-top: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* FAQ */
.pricing-faq {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 2rem;
}

.pricing-faq h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item {
    position: relative;
    background: var(--background-primary);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);

    img.hero-image {
        position: absolute;
        top: -4.5rem;
        bottom: 0rem;
        right: 50%;
        transform: translateX(50%);
        width: 100px;
        height: 100px;
        z-index: 3;
    }
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.7rem;
    text-transform: none;
}

.faq-item p {
    color: var(--text-primary);
    line-height: 1.6;
}

/* CTA Final */
.pricing-cta {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--background-secondary);
    border-radius: 12px;
    margin: 4rem 2rem;
}

.pricing-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.pricing-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1023px) {
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.best-value {
        transform: scale(1);
    }
    
    .pricing-hero h1 {
        font-size: 2rem;
    }
    
    .price .amount {
        font-size: 2.5rem;
    }
}
/* ========== PREMIUM BADGE ========== */
.premium-badge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5rem auto 0rem auto;
    padding: 1rem;
}

.premium-badge {
    display: inline-flex;
    width: fit-content;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.premium-badge.lifetime {
    background: linear-gradient(135deg, #9333EA 0%, #7C3AED 50%, #6366F1 100%);
    box-shadow: 0 4px 20px rgba(147, 51, 234, 0.4);
}

.canceling-badge {
    display: inline-flex;
    width: fit-content;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.canceling-badge i {
    font-size: 2rem;
    color: white;
}

.canceling-badge span {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #F59E0B;
}

.alert i {
    font-size: 1.2rem;
    color: #F59E0B;
}

.alert p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert strong {
    color: #F59E0B;
    font-weight: 600;
}

.premium-badge i {
    font-size: 2rem;
    color: white;
}

.premium-badge span {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.premium-badge small {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

/* ***** POPUP UPGRADE PREMIUM ***** */
.upgrade-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-background);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upgrade-modal-overlay.active {
    opacity: 1;
}

.upgrade-modal {
    background: var(--background-primaryOpacity);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.upgrade-modal-overlay.active .upgrade-modal {
    transform: scale(1);
}

.upgrade-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

.upgrade-modal-icon i {
    color: white;
}

.upgrade-modal h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.upgrade-modal p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.upgrade-modal-actions {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.8);
    }
}

/* ============================================
   ADMIN WEBHOOKS STYLES
   ============================================ */

.webhook-detail {
    background: var(--background-primary);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.detail-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-label {
    font-weight: 600;
    color: #4b5563;
}

.detail-value {
    color: var(--text-primary);
}

.detail-value code {
    background: var(--background-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.875rem;
}

.payload-section {
    margin-top: 2rem;
}

.payload-section h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.payload-section pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.5;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge.success {
    background: var(--background-success);
    color: var(--success-color);
}

.badge.failed {
    background: var(--background-error);
    color: var(--danger-color);
}

.badge.pending {
    background: var(--background-warning);
    color: var(--warning-color);
}

.back-btn {
    margin-bottom: 1.5rem;
}

.error-message {
    background: var(--background-error);
    border-left: 4px solid var(--danger-color);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Styles pour la liste des webhooks */
.webhooks-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--background-primary);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.stat-card.success .number { 
    color: #10b981; 
}

.stat-card.failed .number { 
    color: #ef4444; 
}

.stat-card.pending .number { 
    color: #f59e0b; 
}

.filters {
    background: var(--background-primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.filters .form-group {
    flex: 1;
}

.webhooks-table {
    background: var(--background-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.webhooks-table table {
    width: 100%;
    border-collapse: collapse;
}

.webhooks-table th {
    background: var(--background-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.webhooks-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.webhooks-table tr:hover {
    background: var(--background-tertiary);
}

.event-type {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-secondary);
}

.pagination a:hover {
    background: var(--background-secondary);
}

.pagination .current {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* ========================================
   USER NAVIGATION SYSTEM - Phase 2 REFACTORED
   Layout Grid Facebook-style (Sidebar | Main | Aside)
   ======================================== */

/* ***** LAYOUT GRID GLOBAL (Body) ***** */
body.logged-in {
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    .problem-solution {
        display: none;
    }

    .advantages-section {
        display: none;
    }

    .features {
        display: none;
    }
}

/* Page Layout Grid 3 colonnes */
.page-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    grid-template-rows: 1fr;
    min-height: calc(100vh - 51px);
    margin-top: 51px;
}

/* Layout avec aside filters (page /recettes desktop) */
.page-layout.with-aside-filters {
    grid-template-columns: 350px 1fr 350px;
}

/* Content Wrapper (contient main + bottom nav) */
.content-wrapper {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* ***** HEADER USER (Logged-in users) ***** */
.header-user {
    position: fixed;
    display: inline;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: 0rem 1rem;
    background: var(--background-primaryOpacity);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-user-container {
    height: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 1.5rem;
    gap: 2rem;
}

/* Partie gauche : Logo + Burger */
.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    display: flex;
    align-items: center;
    
    img {
        height: 50px;
        width: auto;
        transition: transform 0.2s ease;
    }
    
    &:hover img {
        transform: scale(1.05);
    }
}

/* Navigation centrale (Desktop/Tablette) */
.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
}

.header-nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    gap: .25rem;
    padding: 0rem 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    
    i {
        font-size: 1.2rem;
    }
    
    span {
        font-size: 0.95rem;
    }
    
    &:hover {
        color: var(--primary-color);
        text-decoration: none;
        transform: translateY(-2px);
    }
    
    &.active {
        color: var(--primary-color);
        
        &::after {
            content: '';
            position: absolute;
            bottom: 0px;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            height: 5px;
            background: var(--primary-color);
            border-radius: 3rem 3rem 0 0;
        }
    }
}

/* Partie droite (vide pour �quilibre - m?me largeur que left) */
.header-right {
    min-width: max-content;
    
    /* ?quilibrer avec la largeur de .header-left */
    &::after {
        content: '';
        display: inline-block;
        width: 140px; /* Logo (~100px) + gap (12px) + burger (~28px sur desktop cach?) */
    }
}

/* Burger Menu (Mobile uniquement) */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.5rem;
    cursor: pointer;
    
    span {
        width: 25px;
        background: var(--text-primary);
        height: 3px;
        transition: all 0.3s ease;
    }

    &:hover:not(:disabled) {
        box-shadow: none !important;
    }

    &:hover {
        box-shadow: none !important;
    }

    &:focus {
        outline: 0px solid var(--primary-color) !important;
        outline-offset: 0px !important;
    }
}

/* ***** SIDEBAR USER (Dans le flux Grid) ***** */
.sidebar-user {
    background: var(--background-primary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    width: 350px;
    transition: width 0.3s ease-in-out, transform 0.3s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-secondary);
    position: relative;
    
    &::-webkit-scrollbar {
        width: 6px;
    }
    
    &::-webkit-scrollbar-track {
        background: var(--background-secondary);
    }
    
    &::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 350px;
}

/* Header Sidebar - Infos utilisateur */
.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-primary);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    
    i {
        font-size: 1.5rem;
        color: white;
    }
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
    
    h3 {
        margin: 0;
        font-size: 1rem;
        color: var(--text-color);
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
    }
}

.sidebar-premium-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    font-weight: 600;
    margin-top: 0.25rem;
    white-space: nowrap;
}

.sidebar-user-plan {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Navigation Sidebar */
.sidebar-user .sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

/* Sections Accord�on */
.sidebar-section {
    margin-bottom: 0.5rem;
}

.sidebar-section-toggle {
    width: 90%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: var(--text-primary);
    
    i:first-child {
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }
    
    span {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .sidebar-arrow {
        font-size: 1rem;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }
    
    &:hover {
        background: transparent;
        color: var(--primary-color);
    }
    
    &.active {
        background: transparent;
        color: var(--primary-color);
        
        .sidebar-arrow {
            transform: rotate(180deg);
        }
    }
}

.sidebar-section-content {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    
    &.active {
        max-height: 500px;
    }
}

.sidebar-user .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 3rem;
    padding: 0.65rem 1rem 0.65rem 3rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;

    i {
        font-size: 1rem;
        text-align: center;
        flex-shrink: 0;
    }
    
    span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    &:hover {
        background: transparent;
        color: var(--primary-color);
        text-decoration: none;
    }
    
    &.active {
        background: var(--primary-color);
        color: white;
        font-weight: 600;
        
        &::before {
            content: '';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 2rem;
            height: 99%;
            background: var(--text-primary);
            border-radius: 0 3rem 3rem 0;
        }
    }
}

/* Theme toggle dans sidebar */
.sidebar-theme-toggle .sidebar-link {
    font-family: var(--font-titles-and-button);
    color: white;
    cursor: pointer;
    width: fit-content;
    padding: .5rem 1rem;
    margin-left: 2rem;

    &:hover {
        background: var(--button-color-hover);
        color: white;
    }
}

/* Footer Sidebar - D�connexion */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-primary);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: .5rem 1rem;
    background: var(--button-color);
    border: none;
    border-radius: 3rem;
    text-decoration: none;
    font-weight: 600;
    color: white;
    transition: all 0.2s ease;
    justify-content: center;
    
    i {
        font-size: 1.1rem;
    }
    
    span {
        white-space: nowrap;
    }
    
    &:hover {
        color: white;
        background: var(--button-color-hover);
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }
}

/* ***** MAIN CONTENT ***** */
.main-content {
    padding: 2rem;
    min-height: calc(100vh - 60px);
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* ***** ASIDE FILTERS (Page /recettes desktop) ***** */
.aside-filters {
    width: 350px;
    background: var(--background-primary);
    border-left: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-secondary);
    
    &::-webkit-scrollbar {
        width: 6px;
    }
    
    &::-webkit-scrollbar-track {
        background: var(--background-secondary);
    }
    
    &::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }
    
    h3 {
        margin-top: 0;
        margin-bottom: 1.5rem;
        color: var(--primary-color);
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* ***** BOTTOM NAVIGATION (Mobile uniquement) ***** */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--background-primary);
    border-top: 1px solid var(--border-color);
    z-index: 95;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    
    i {
        font-size: 1.2rem;
        transition: transform 0.2s ease;
    }
    
    span {
        font-size: 0.7rem;
        font-weight: 500;
    }
    
    &:hover {
        color: var(--primary-color);
        text-decoration: none;
        
        i {
            transform: scale(1.1);
        }
    }
    
    &.active {
        color: var(--primary-color);
        
        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            height: 3px;
            background: var(--primary-color);
            border-radius: 0px;
        }
        
        i {
            transform: scale(1.15);
        }
    }
}

/* ***** BOTTOM SHEET FILTERS (Mobile) ***** */
.bottom-sheet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
    
    &.active {
        display: block;
        opacity: 1;
    }
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: var(--background-primary);
    border-radius: 20px 20px 0 0;
    z-index: 201;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    
    &.active {
        transform: translateY(0);
    }
}

.bottom-sheet-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    &::before {
        content: '';
        position: absolute;
        top: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--border-color);
        border-radius: 2px;
    }
    
    h3 {
        margin: 0;
        font-size: 1.1rem;
        color: var(--primary-color);
        padding-top: 1rem;
    }
    
    button {
        background: transparent;
        border: none;
        font-size: 1.5rem;
        color: var(--text-color);
        cursor: pointer;
        padding: 0.5rem;
        
        &:hover {
            color: var(--error-color);
        }
    }
}

.bottom-sheet-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* ***** PROFIL TOOLBAR STICKY MOBILE/TABLETTE ***** */
@media (max-width: 1023px) {
    .toolbar {
        top: 51px !important;
        padding: 0rem !important;
        height: fit-content !important;
        z-index: 85 !important;
        background: var(--background-primary) !important;
        border-top: 0px !important;
        border-bottom: .01rem solid var(--primary-color) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
}


@media (max-width: 480px) {
    .toolbar {
        .ctaButtons {
            .tab-button {
                font-size: .8rem !important;
            }
        }
    }
}
/* ========================================
   RESPONSIVE - Desktop et Mobile/Tablette
   ======================================== */

/* Desktop (>1024px) - Configuration par d?faut */
@media (min-width: 1024px) {
    .header-nav {
        display: flex;
    }
    
    .burger-menu {
        display: none;
    }
    
    .page-layout {
        grid-template-columns: 350px 1fr;
        
        &.with-aside-filters {
            grid-template-columns: 350px 1fr 350px;
        }
    }
    
    /* Sidebar visible desktop */
    .sidebar-user {
        transform: none;
        position: relative;
        width: 350px;
        overflow-y: auto;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .main-content {
        padding-bottom: 2rem;
    }
}

/* Mobile et Tablette (=1023px) */
@media (max-width: 1023px) {
    /* Header mobile - Burger menu visible */
    .header-nav {
        display: none;
    }
    
    .header-right {
        display: none;
    }
    
    .burger-menu {
        display: flex;
    }
    
    /* Page layout sans sidebar par d�faut */
    .page-layout {
        grid-template-columns: 1fr;
        
        &.sidebar-open {
            grid-template-columns: 100vw 0px;
            overflow: hidden;
        }
    }
    
    /* Sidebar plein �cran mobile */
    .sidebar-user {
        width: 90vw;
        transform: translateX(-100vw);
        position: fixed;
        top: 51px;
        left: 0;
        height: 100%;
        z-index: 999;
        box-shadow: none;
    }
    
    .page-layout.sidebar-open .sidebar-user {
        transform: translateX(0);
    }
    
    .sidebar-content {
        min-width: 100vw;
    }
    
    /* Aside filters cach� (bottom sheet) */
    .aside-filters {
        display: none;
    }
    
    /* Bottom nav visible sur mobile */
    .bottom-nav {
        display: flex;
    }
    
    /* Main content avec espace bottom nav */
    .main-content {
        padding: 1rem 0rem;
        padding-bottom: calc(60px + 1rem);
        z-index: 1;
    }
    
    /* Ajuster padding header mobile */
    .header-user-container {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    /* Logo plus petit mobile */
    .header-logo img {
        height: 50px;
    }
    
    /* Body overflow control */
    body.sidebar-open {
        overflow: hidden;
    }
}


/* ============================================
   PAGINATION
   ============================================ */

/* Container de la pagination */
.pagination-container {
    width: 100%;
    max-width: 1400px;
    margin: 3rem auto 2rem;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Wrapper de la pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Boutons de pagination */
.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    background: var(--background-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    
    &:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    &:active {
        transform: translateY(0);
    }
    
    &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }
    
    i {
        font-size: 1rem;
    }
}

/* Bouton page active */
.pagination-page.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    pointer-events: none;
}

/* Boutons Pr�c�dent/Suivant */
.pagination-prev,
.pagination-next {
    font-weight: 700;
    padding: 0.5rem 1.5rem;
}

/* Conteneur des num�ros */
.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Ellipsis */
.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1;
    user-select: none;
}

/* �tat de chargement */
.pagination-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
    text-align: center;
    
    .spinner {
        width: 50px;
        height: 50px;
        border: 4px solid var(--border-color);
        border-top-color: var(--primary-color);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
    
    p {
        color: var(--text-secondary);
        font-size: 1.1rem;
        font-weight: 500;
        margin: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Global page loader */
html.app-page-loading,
body.has-global-loader {
    overflow: hidden;
}

.global-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.global-loader-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.global-loader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.35);
    backdrop-filter: blur(2px);
}

.global-loader-card {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0;
    background: var(--background-primaryOpacity);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.global-loader-spinner {
    width: 9rem;
    height: 9rem;
    display: inline-block;
    background-image: url("../img/cuisine/cuisine10.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
    transform-origin: 50% 65%;
    animation: app-loader-ingredient 1.15s ease-in-out infinite;
}

.global-loader-message {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

@keyframes app-loader-ingredient {
    0% {
        transform: translateY(0) rotate(-6deg) scale(0.95);
    }

    50% {
        transform: translateY(-5px) rotate(6deg) scale(1.05);
    }

    100% {
        transform: translateY(0) rotate(-6deg) scale(0.95);
    }
}

/* Skeletons pour chargements AJAX des cartes recettes */
.recipes .recipeBox.skeleton-card {
    pointer-events: none;
    cursor: wait;
    overflow: hidden;

    .skeleton-block {
        border-radius: 8px;
        background: linear-gradient(110deg, var(--background-secondary) 8%, var(--background-primary) 18%, var(--background-secondary) 33%);
        background-size: 200% 100%;
        animation: app-skeleton-shimmer 1.2s linear infinite;
    }

    .skeleton-image {
        width: 300px;
        height: 200px;
        border-radius: 8px;
    }

    .skeleton-meta {
        width: 88%;
        height: 24px;
    }

    .skeleton-title {
        width: 78%;
        height: 22px;
    }

    .skeleton-subtitle {
        width: 62%;
        height: 16px;
    }

    .skeleton-cta {
        width: 54%;
        height: 32px;
        border-radius: 24px;
    }
}

@keyframes app-skeleton-shimmer {
    to {
        background-position-x: -200%;
    }
}

.pagination-loader {
    p {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-loader-overlay,
    .global-loader-spinner,
    .recipes .recipeBox.skeleton-card .skeleton-block {
        animation: none !important;
        transition: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .global-loader-card {
        width: calc(100vw - 2rem);
        min-width: 0;
    }

    .recipes .recipeBox.skeleton-card {
        .skeleton-image {
            width: 100%;
            height: 180px;
        }
    }

    .pagination-container {
        margin: 2rem auto 1rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .pagination-prev,
    .pagination-next {
        padding: 0.4rem 1rem;
        
        span {
            display: none;
        }
    }
    
    .pagination-numbers {
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .pagination-prev i,
    .pagination-next i {
        font-size: 0.9rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD ADMIN — REFONTE COMPLÈTE
   ═══════════════════════════════════════════════════════════════════ */

/* --- Header Dashboard --- */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 2rem;
    margin-top: 7rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.dash-header__welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-header__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.dash-header__info h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.dash-header__role {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}
.dash-header__role--superadmin { background: rgba(255,255,255,0.3); }
.dash-header__role--moderateur { background: rgba(253,126,20,0.5); }

.dash-header__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* --- Boutons Dashboard --- */
.dash-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}
.dash-btn--primary {
    background: #fff;
    color: #667eea;
}
.dash-btn--primary:hover {
    background: #f0f0ff;
    transform: translateY(-1px);
}
.dash-btn--outline {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}
.dash-btn--outline:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}
.dash-btn--sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

/* --- Section Titles --- */
.dash-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

/* --- Compteurs Globaux --- */
.dash-counters {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dash-counters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.dash-counter {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}
.dash-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.dash-counter--recipes    { border-left-color: #f5576c; }
.dash-counter--categories { border-left-color: #667eea; }
.dash-counter--ingredients{ border-left-color: #43e97b; }
.dash-counter--tags       { border-left-color: #ffc107; }
.dash-counter--users      { border-left-color: #764ba2; }
.dash-counter--unites     { border-left-color: #00f2fe; }
.dash-counter--admins     { border-left-color: #fd7e14; }

.dash-counter__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}
.dash-counter--recipes    .dash-counter__icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
.dash-counter--categories .dash-counter__icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.dash-counter--ingredients .dash-counter__icon { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.dash-counter--tags       .dash-counter__icon { background: linear-gradient(135deg, #ffc107, #ff9800); }
.dash-counter--users      .dash-counter__icon { background: linear-gradient(135deg, #764ba2, #667eea); }
.dash-counter--unites     .dash-counter__icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.dash-counter--admins     .dash-counter__icon { background: linear-gradient(135deg, #fd7e14, #e74c3c); }

.dash-counter__number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    line-height: 1;
}
.dash-counter__label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- KPIs --- */
.dash-kpis {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dash-kpis__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.dash-kpi {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dash-kpi__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}
.dash-kpi__icon--users      { background: linear-gradient(135deg, #667eea, #764ba2); }
.dash-kpi__icon--recipes    { background: linear-gradient(135deg, #f093fb, #f5576c); }
.dash-kpi__icon--favorites  { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.dash-kpi__icon--ingredients{ background: linear-gradient(135deg, #43e97b, #38f9d7); }
.dash-kpi__icon--push       { background: linear-gradient(135deg, #ffc107, #ff9800); }
.dash-kpi__icon--time       { background: linear-gradient(135deg, #0984e3, #1e88e5); }

.dash-kpi__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-kpi__value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.dash-kpi__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.dash-kpi__trend {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}
.dash-kpi__trend--up {
    color: #10b981;
}
.dash-kpi__trend--down {
    color: #ef4444;
}

/* --- Revenue Section --- */
.dash-revenue {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--background-primary);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dash-revenue__plans {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-plan {
    text-align: center;
    padding: 1.25rem;
    border-radius: 12px;
    color: #fff;
}
.dash-plan--total    { background: linear-gradient(135deg, #f093fb, #f5576c); }
.dash-plan--monthly  { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.dash-plan--yearly   { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.dash-plan--lifetime { background: linear-gradient(135deg, #fa709a, #fee140); }

.dash-plan__emoji { font-size: 1.8rem; display: block; margin-bottom: 0.3rem; }
.dash-plan__count { font-size: 2rem; font-weight: 800; display: block; line-height: 1.2; }
.dash-plan__label { font-size: 0.85rem; opacity: 0.9; display: block; }
.dash-plan small  { font-size: 0.75rem; opacity: 0.75; }

.dash-revenue__kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.dash-rev-card {
    text-align: center;
    padding: 1.25rem;
    border-radius: 10px;
    background: var(--background-secondary);
}
.dash-rev-card--mrr      { background: linear-gradient(135deg, #667eea22, #764ba222); }
.dash-rev-card--arr      { background: linear-gradient(135deg, #43e97b22, #38f9d722); }
.dash-rev-card--new      { background: linear-gradient(135deg, #4facfe22, #00f2fe22); }
.dash-rev-card--canceled { background: linear-gradient(135deg, #f5576c22, #f093fb22); }

.dash-rev-card h3 { margin: 0 0 0.3rem; font-size: 0.85rem; color: var(--text-secondary); }
.dash-rev-card__amount { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); display: block; }
.dash-rev-card small { font-size: 0.78rem; color: var(--text-secondary); }

/* --- Webhooks Compact --- */
.dash-webhooks {
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 1.5rem 2rem;
    background: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dash-webhooks__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dash-webhooks__stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.dash-wh-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--background-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}
.dash-wh-badge__num { font-weight: 800; font-size: 1.1rem; }
.dash-wh-badge--success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.dash-wh-badge--failed  { background: rgba(239, 68, 68, 0.1);  color: #ef4444; }
.dash-wh-badge--pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.dash-wh-badge small { font-weight: 400; }

/* --- Table compacte --- */
.dash-table {
    width: 100%;
    border-collapse: collapse;
}
.dash-table th {
    background: var(--background-secondary);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid #eee;
}
.dash-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}
.dash-table--compact td { padding: 0.4rem 0.75rem; }
.dash-table code {
    font-family: monospace;
    font-size: 0.8rem;
    background: var(--background-secondary);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.dash-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.dash-status--success { background: rgba(16,185,129,0.1); color: #10b981; }
.dash-status--failed  { background: rgba(239,68,68,0.1);  color: #ef4444; }
.dash-status--pending { background: rgba(245,158,11,0.1); color: #f59e0b; }

/* --- Push Section --- */
.dash-push {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--background-primary);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dash-push__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dash-push__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dash-push-card {
    text-align: center;
    padding: 1.25rem;
    background: var(--background-secondary);
    border-radius: 10px;
}
.dash-push-card i {
    font-size: 1.5rem;
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}
.dash-push-card__value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
}
.dash-push-card__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.3rem;
}
.dash-push-card small {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.dash-progress {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}
.dash-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #43e97b, #38f9d7);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.dash-push__types {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}
.dash-push__types h3 {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
    color: var(--text-secondary);
}
.dash-push__types-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.dash-push-type {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    background: var(--background-secondary);
    font-size: 0.85rem;
}
.dash-push-type__count {
    font-weight: 700;
    color: #667eea;
}

/* --- Activity Section --- */
.dash-activity {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dash-activity__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* --- Generic Cards --- */
.dash-card {
    background: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.dash-card__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid #eee;
}

.dash-card__body {
    padding: 1rem 1.25rem;
}

/* Top Recipes Row */
.dash-recipe-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.dash-recipe-row:last-child { border-bottom: none; }

.dash-rank {
    font-weight: 800;
    font-size: 0.9rem;
    color: #667eea;
    min-width: 30px;
}

.dash-recipe-row__info {
    flex: 1;
    min-width: 0;
}
.dash-recipe-row__info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.dash-cat-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #fff;
    margin-top: 0.1rem;
}

.dash-recipe-row__fav {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Category Bar Row */
.dash-bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.dash-bar-row__label {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-bar-row__track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.dash-bar-row__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.dash-bar-row__value {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: right;
    color: var(--text-secondary);
}

/* Tag Cloud */
.dash-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.dash-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--background-secondary);
    border-radius: 9999px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
}
.dash-tag:hover {
    background: #667eea;
    color: #fff;
}
.dash-tag small { opacity: 0.6; }

/* User Row */
.dash-user-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.dash-user-row:last-child { border-bottom: none; }

.dash-user-row__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.dash-user-row__info strong {
    display: block;
    font-size: 0.9rem;
}
.dash-user-row__info small {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

/* --- Responsive Dashboard --- */
@media (max-width: 768px) {
    .dash-header {
        flex-direction: column;
        text-align: center;
        margin-top: 5rem;
    }
    .dash-header__welcome {
        flex-direction: column;
    }
    .dash-header__actions {
        justify-content: center;
    }
    .dash-counters__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-revenue__plans,
    .dash-revenue__kpis {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-activity__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dash-counters__grid {
        grid-template-columns: 1fr;
    }
    .dash-revenue__plans,
    .dash-revenue__kpis {
        grid-template-columns: 1fr;
    }
    .dash-kpis__grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   ANALYTICS PAGE — REFONTE COMPLÈTE
   ═══════════════════════════════════════════════════════════════════ */

.anl-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.anl-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.anl-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.anl-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* --- Overview Cards --- */
.anl-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.anl-overview__card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.anl-overview__card:hover {
    transform: translateY(-2px);
}
.anl-overview__card i {
    font-size: 1.5rem;
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}
.anl-overview__value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    line-height: 1.2;
}
.anl-overview__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Section Titles --- */
.anl-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.anl-hint {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
    padding: 0.6rem 0.8rem;
    background: light-dark(#f0f4ff, #1e293b);
    border-left: 3px solid #667eea;
    border-radius: 0 6px 6px 0;
}

.anl-chart-card .anl-hint,
.anl-card .anl-hint {
    margin: -0.25rem 0 0.75rem 0;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

/* --- Charts Grid --- */
.anl-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.anl-chart-card {
    background: var(--background-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.anl-chart-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* --- Performance Grid --- */
.anl-perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.anl-card {
    background: var(--background-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.anl-card h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.anl-card--wide {
    grid-column: span 2;
}

/* Difficulty Rows */
.anl-diff-row {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.anl-diff-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    color: #fff;
}
.anl-diff-badge--facile   { background: #10b981; }
.anl-diff-badge--moyenne  { background: #ffc107; color: #333; }
.anl-diff-badge--difficile{ background: #ef4444; }

.anl-diff-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.anl-diff-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.6s ease;
}
.anl-diff-count {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: right;
    color: var(--text-secondary);
}

/* Engagement Rows */
.anl-engage-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}
.anl-engage-row:last-child { border-bottom: none; }
.anl-engage-label { color: var(--text-primary); }
.anl-engage-value { color: var(--text-secondary); font-weight: 500; }

.anl-empty {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem 0;
}

/* Tags Grid */
.anl-tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}
.anl-tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--background-secondary);
    border-radius: 6px;
    font-size: 0.85rem;
}
.anl-tag-count {
    font-weight: 700;
    color: #667eea;
}

/* --- Tables Grid --- */
.anl-tables-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.anl-table {
    width: 100%;
    border-collapse: collapse;
}
.anl-table th {
    background: var(--background-secondary);
    padding: 0.7rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid #eee;
}
.anl-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
}
.anl-table tr:hover {
    background: var(--background-secondary);
}

.anl-rank {
    display: inline-block;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #fff;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.82rem;
}

.anl-cat-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #fff;
}

.anl-fav-badge {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.85rem;
}

/* User Row Analytics */
.anl-user-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.anl-user-row:last-child { border-bottom: none; }

.anl-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.anl-user-info strong {
    display: block;
    font-size: 0.9rem;
}
.anl-user-info small {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

/* --- Responsive Analytics --- */
@media (max-width: 900px) {
    .anl-charts-grid {
        grid-template-columns: 1fr;
    }
    .anl-tables-grid {
        grid-template-columns: 1fr;
    }
    .anl-card--wide {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .anl-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    .anl-perf-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   ANALYTICS — NOUVELLES SECTIONS (Funnel, Complétude, Cohortes…)
   ═══════════════════════════════════════════════════════════════════ */

/* --- Funnel d'engagement --- */
.anl-funnel-row {
    margin-bottom: 0.5rem;
}
.anl-funnel-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    min-width: 80px;
    transition: width 0.6s ease;
}
.anl-funnel-label {
    font-weight: 600;
}
.anl-funnel-value {
    font-weight: 700;
    white-space: nowrap;
}

/* --- Conversion & Opt-in header --- */
.anl-conversion-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}
.anl-conversion-rate {
    text-align: center;
}
.anl-big-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
}
.anl-big-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}
.anl-conversion-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Complétude des recettes --- */
.anl-completeness-row {
    display: grid;
    grid-template-columns: 150px 1fr 130px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.anl-completeness-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}
.anl-completeness-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.anl-completeness-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.anl-completeness-value {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: right;
    white-space: nowrap;
}

/* --- Churn premium --- */
.anl-churn-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr 50px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.anl-churn-row:last-child {
    border-bottom: none;
}
.anl-churn-plan {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.anl-churn-stats {
    display: flex;
    gap: 0.5rem;
}
.anl-churn-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}
.anl-churn-badge--active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.anl-churn-badge--canceled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.anl-churn-bar-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.anl-churn-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    border-radius: 3px;
    transition: width 0.6s ease;
}
.anl-churn-rate {
    font-weight: 800;
    font-size: 0.9rem;
    color: #ef4444;
    text-align: right;
}

/* --- Recettes orphelines --- */
.anl-orphan-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}
.anl-orphan-list {
    max-height: 320px;
    overflow-y: auto;
}
.anl-orphan-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
}
.anl-orphan-row:last-child {
    border-bottom: none;
}
.anl-orphan-name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.anl-orphan-date {
    color: var(--text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
}

/* --- Cohortes de rétention --- */
.anl-cohort-table th,
.anl-cohort-table td {
    text-align: center;
}
.anl-cohort-table td:first-child {
    text-align: left;
}
.anl-cohort-cell {
    background: rgba(102, 126, 234, calc(var(--cohort-opacity, 0) * 0.6));
    color: var(--text-primary);
    font-weight: 500;
}
.anl-cohort-cell small {
    display: block;
    font-size: 0.72rem;
    opacity: 0.7;
}

/* --- Responsive nouvelles sections --- */
@media (max-width: 768px) {
    .anl-completeness-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    .anl-churn-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .anl-conversion-header {
        flex-direction: column;
        text-align: center;
    }
    .anl-funnel-bar {
        font-size: 0.78rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ===================================================================
   PLANNING REPAS - Vue Semaine
   =================================================================== */

.planning-section {
    padding: 1rem 2rem 3rem;
    position: relative;
}

.planning-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* --- Overlay Premium (Free users) --- */
.planning-premium-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-primaryOpacity);
    backdrop-filter: blur(8px);
    border-radius: 16px;

    .planning-premium-content {
        text-align: center;
        padding: 3rem 2rem;
        max-width: 480px;
    }

    .planning-premium-icon {
        font-size: 4rem;
        display: block;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.6rem;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
    }

    p {
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .btn-premium-upgrade {
        display: inline-block;
        padding: 0.85rem 2.5rem;
        background: var(--button-color);
        color: white;
        border-radius: 50px;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.05rem;
        transition: transform 0.2s, box-shadow 0.2s;

        &:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(255, 91, 76, 0.35);
        }
    }
}

/* --- Free user : aperçu décoratif --- */
.planning-free-wrapper {
    position: relative;
    min-height: 500px;

    .planning-premium-overlay {
        position: absolute;
        inset: 0;
        z-index: 50;
    }

    .planning-preview-blur {
        filter: blur(4px);
        opacity: 0.5;
        pointer-events: none;
        user-select: none;
    }

    .planning-preview-placeholder {
        width: 100%;
        height: 48px;
        border-radius: 8px;
        background: linear-gradient(135deg, var(--background-secondary) 40%, var(--border-color) 100%);
        opacity: 0.6;
    }
}

/* --- Header du planning --- */
.planning-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.planning-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    line-height: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--background-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;

    i {
        font-size: 1.1rem;
    }

    &:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        transform: scale(1.05);
    }
}

.planning-title {
    text-align: center;
    min-width: 220px;

    h2 {
        font-size: 1.4rem;
        color: var(--text-primary);
        margin: 0;
    }

    .planning-dates {
        font-size: 0.9rem;
        color: var(--text-secondary);
    }
}

/* --- Grille desktop --- */
.planning-grid {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    background: var(--background-primary);
}

.planning-grid-header {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    min-width: min-content;
    border-bottom: 2px solid var(--border-color);
    background: var(--background-secondary);
}

.planning-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 0.75rem 0.5rem;
    border-left: 1px solid var(--border-color);

    .planning-day-name {
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--text-primary);
    }

    .planning-day-date {
        font-size: 0.78rem;
        color: var(--text-secondary);
    }

    &.is-today {
        background: var(--background-info);

        .planning-day-name {
            color: var(--primary-color);
        }
        .planning-day-date {
            color: white;
        }
    }
}

.planning-time-label {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0.5rem 0.3rem;
    min-width: 100px;

    .planning-meal-icon {
        font-size: 1.1rem;
    }

    .planning-meal-name {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-secondary);
        white-space: nowrap;
    }
}

.planning-grid-row {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    min-width: 900px;
    border-bottom: 1px solid var(--border-color-light);

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

.planning-cell {
    position: relative;
    min-height: 90px;
    border-left: 1px solid var(--border-color-light);
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    overflow: hidden;
    min-width: 140px;

    &.is-today {
        background: light-dark(color-mix(in srgb, var(--primary-color) 4%, transparent));
    }

    &:hover {
        background: var(--background-tertiary);
    }
}

/* --- Carte recette dans la grille --- */
.planning-recipe-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
    min-width: 0;
    padding: 0.3rem;
    border-radius: 10px;
    background: var(--background-secondary);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;

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

    &:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    &.is-completed {
        background: color-mix(in srgb, #4caf50 13%, var(--background-secondary));
        border: 1px solid color-mix(in srgb, #4caf50 55%, var(--border-color));
    }
}

.planning-recipe-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.planning-recipe-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.25rem;
    width: 100%;
    min-width: 0;
}

.planning-portions-badge {
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: 7px;
    left: 3px;
    gap: 0.2rem;
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.12rem 0.4rem;
    flex-shrink: 0;

    i{
        font-size: 0.7rem;
    }
}

.planning-recipe-badges {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    flex-shrink: 0;
    font-size: 0.6rem;
    line-height: 1;
    position: absolute;
    top: 7px;
    left: 35%;
    padding: .2rem;
    background: var(--background-primaryOpacity);
    border-radius: 2rem;
}

.planning-recipe-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;

    &:hover {
        color: var(--primary-color);
    }
}

.planning-recipe-note {
    width: fit-content;
    border: 1px solid var(--border-color);
    background: var(--background-primary);
    color: var(--text-secondary);
    border-radius: 3rem;
    font-size: .63rem;
    font-weight: 700;
    padding: .2rem .3rem;
    cursor: pointer;
    transition: all 0.2s;

    &:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
}

.planning-completed-btn {
    width: fit-content;
    border: 1px solid var(--border-color);
    background: var(--background-primary);
    color: var(--text-secondary);
    border-radius: 3rem;
    font-size: .63rem;
    font-weight: 700;
    padding: .2rem .3rem;
    cursor: pointer;
    transition: all 0.2s;

    &:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

    &.is-completed {
        border-color: #3b8f40;
        background: #dff2df;
        color: #25652b;
    }
}

.planning-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    padding: 1rem;
    border-radius: 50%;
    border: none;
    background: var(--danger-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    font-size: 0.65rem;

    .planning-recipe-card:hover & {
        opacity: 1;
    }

    &:hover {
        transform: scale(1.15);
    }
}

/* --- Bouton d'ajout dans cellule vide --- */
.planning-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    height: 100%;
    min-height: 60px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;

    i {
        font-size: 1rem;
    }

    &:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: color-mix(in srgb, var(--primary-color) 5%, transparent);
    }
}

/* --- Modal de planification --- */
.planning-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: planning-fadeIn 0.25s ease;
}

.planning-modal {
    background: var(--background-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: planning-slideUp 0.3s ease;
    overflow: hidden;
}

.planning-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);

    h3 {
        margin: 0;
        font-size: 1.15rem;
        color: var(--text-primary);
    }
}

.planning-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 1.5rem;
    border: none;
    background: var(--background-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;

    &:hover {
        background: var(--danger-color);
        color: white;
    }
}

.planning-modal-context {
    padding: 0.75rem 1.5rem;
    background: var(--background-secondary);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.planning-modal-search {
    padding: 1rem 1.5rem;

    .planning-search-wrapper {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        border: 2px solid var(--border-color);
        border-radius: 12px;
        background: var(--background-secondary);
        transition: border-color 0.2s;

        &:focus-within {
            border-color: var(--primary-color);
        }

        i {
            color: var(--text-secondary);
            font-size: 1rem;
        }

        input {
            flex: 1;
            border: none;
            background: transparent;
            color: var(--text-primary);
            font-size: 0.95rem;
            outline: none;

            &::placeholder {
                color: var(--text-secondary);
            }
        }
    }
}

.planning-modal-results {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem;
    max-height: 300px;
}

.planning-search-empty {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.planning-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;

    img {
        width: 50px;
        height: 40px;
        object-fit: cover;
        border-radius: 8px;
        flex-shrink: 0;
    }

    &:hover {
        background: var(--background-tertiary);
    }

    &.selected {
        background: color-mix(in srgb, var(--primary-color) 10%, transparent);
        border: 1px solid var(--primary-color);
    }
}

.planning-search-item-info {
    flex: 1;
    min-width: 0;

    .planning-search-item-name {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .planning-search-item-meta {
        font-size: 0.78rem;
        color: var(--text-secondary);
    }
}

.planning-search-item-fav {
    font-size: 0.75rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* --- Options (portions + notes + bouton confirmer) --- */
.planning-modal-options {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-secondary);
}

.planning-option-group {
    margin-bottom: 0.75rem;

    label {
        display: block;
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: 0.35rem;
    }

    input[type="text"] {
        width: 100%;
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--background-primary);
        color: var(--text-primary);
        font-size: 0.88rem;
        outline: none;
        transition: border-color 0.2s;

        &:focus {
            border-color: var(--primary-color);
        }
    }
}

.planning-portions-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;

    #planning-portions-value {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-primary);
        min-width: 24px;
        text-align: center;
    }
}

.planning-portion-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;

    &:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
}

.planning-confirm-btn {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 12px;
    background: var(--button-color);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;

    &:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(255, 91, 76, 0.3);
    }

    &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
}

/* --- Animations --- */
@keyframes planning-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes planning-slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Responsive : tablette --- */
@media (max-width: 1024px) {
    .planning-section {
        padding: 1rem;
    }

    .planning-grid-header,
    .planning-grid-row {
        grid-template-columns: 110px repeat(7, 1fr);
        min-width: 860px;
    }

    .planning-grid-header {
        min-width: min-content;
    }

    .planning-time-label {
        min-width: 110px;
        padding: 0.4rem 0.5rem;

        .planning-meal-name {
            font-size: 0.72rem;
        }
    }

    .planning-portions-badge,
    .planning-completed-btn {
        font-size: 0.6rem;
    }
}

/* --- Responsive : mobile --- */
@media (max-width: 768px) {
    .planning-section {
        padding: 0.5rem;
        padding-bottom: 80px;
    }

    .planning-grid {
        border-radius: 12px;
    }

    .planning-grid-row {
        min-width: 780px;
    }

    .planning-header {
        gap: 0.75rem;

        .planning-title h2 {
            font-size: 1.15rem;
        }

        .planning-dates {
            font-size: 0.8rem;
        }
    }

    .planning-nav-btn {
        width: 36px;
        height: 36px;
    }

    .planning-modal {
        width: 95%;
        max-height: 85vh;
    }

    .planning-cell {
        min-height: 78px;
        padding: 0.3rem;
    }

    .planning-add-btn {
        min-height: 52px;
        border-width: 1px;
        font-size: 0.78rem;
    }

    .planning-recipe-card img {
        height: 44px;
    }

    .planning-recipe-note {
        font-size: 0.62rem;
    }
}

/* ============================================
   COLLECTIONS — Listes de recettes thématiques
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;

    &[style*="display: flex"],
    &.active {
        display: flex;
    }

    .modal-content {
        background: var(--background-primaryOpacity);
        border-radius: 16px;
        padding: 2rem;
        width: 90%;
        position: relative;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        animation: planning-slideUp 0.3s ease;
    }

    .modal-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        font-family: var(--font-body);
        background: var(--background-primaryOpacity);
        color: var(--text-primary);
        font-size: 2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;

        &:hover {
            color: var(--primary-color);
            border: 1px solid var(--primary-color);
        }
    }
}

.collections-section {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.collections-container {
    width: 100%;
}

/* --- Header --- */
.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;

    h1 {
        font-size: 1.8rem;
    }
}

.btn-create-collection {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ff5b4c;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;

    &:hover {
        background: #e5453b;
    }
}

/* --- Empty state --- */
.collections-empty {
    text-align: center;
    padding: 4rem 2rem;

    .collections-empty-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
    }

    h3 {
        font-size: 1.4rem;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }

    p {
        color: var(--text-secondary);
        margin-bottom: 2rem;
    }
}

.btn-create-collection-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #ff5b4c;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;

    &:hover {
        background: #e5453b;
    }
}

/* --- Grid --- */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.collection-card {
    display: block;
    width: auto;
    background: var(--background-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s;

    &:hover {
        text-decoration: none;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }
}

/* Card preview thumbnails */
.collection-card-preview {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: light-dark(#f5f5f5, #2a2a2a);
}

.collection-thumbnails {
    display: grid;
    width: 100%;
    height: 100%;

    &.count-1 {
        grid-template-columns: 1fr;
    }
    &.count-2 {
        grid-template-columns: 1fr 1fr;
    }
    &.count-3,
    &.count-4 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    img {
        width: 100%;
        height: 50%;
        object-fit: cover;
        object-position: center;
    }
}

.collection-no-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff5b4c, #FF9800);
}

.collection-big-emoji {
    display: block !important;
    font-size: 3rem;
}

/* Card info */
.collection-card-info {
    padding: 0.75rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.collection-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;

    .collection-emoji {
        font-size: 1.3rem;
        flex-shrink: 0;
    }

    h3 {
        font-size: 1rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
    }
}

.collection-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collection-card-count {
    font-size: 0.8rem;
    color: light-dark(#888, #999);
}

.collection-badge-public,
.collection-badge-private {
    font-size: 0.85rem;
}

/* --- FREE preview (blurred) --- */
.collections-free-wrapper {
    position: relative;

    .collections-premium-overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 10;
        display: flex;
        justify-content: center;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(2px);
    }

    .collections-premium-content {
        text-align: center;
        padding: 2rem;
        max-width: 420px;

            .btn-premium-upgrade {
            display: inline-block;
            padding: 0.85rem 2.5rem;
            background: var(--button-color);
            color: white;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 700;
            font-size: 1.05rem;
            transition: transform 0.2s, box-shadow 0.2s;

            &:hover {
                transform: translateY(-2px);
                box-shadow: 0 8px 24px rgba(255, 91, 76, 0.35);
            }
        }
    }

    .collections-premium-icon {
        font-size: 3rem;
        display: block;
        margin-bottom: 1rem;
    }

    .collections-preview-blur {
        filter: blur(4px);
        pointer-events: none;
        user-select: none;
        opacity: 0.5;
    }
}

.collection-card-placeholder {
    background: light-dark(#f0f0f0, #2a2a2a);
    border-radius: 16px;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    .placeholder-emoji { font-size: 2rem; }
    .placeholder-text { width: 60%; height: 12px; border-radius: 6px; background: light-dark(#ddd, #444); }
    .placeholder-count { width: 30%; height: 10px; border-radius: 5px; background: light-dark(#e5e5e5, #3a3a3a); }
}

@media screen and (max-width: 1024px) {
    .collection-card-title {
        .collection-emoji {
            display: inline !important;
        }
    }

    .collection-card-meta {
        .collection-card-count {
            display: inline !important;
        }
        .collection-badge-private,
        .collection-badge-public {
            display: inline !important;
        }
    }
}

/* ============================================
   COLLECTION DETAIL — show.php
   ============================================ */

.collection-detail-section {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.collection-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: light-dark(#666, #aaa);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;

    &:hover {
        color: #ff5b4c;
    }
}

.collection-detail-title {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;

    .collection-detail-emoji {
        font-size: 3rem;
        line-height: 1;
    }

    h1 {
        font-size: 1.8rem;
        margin: 0;
    }

    .collection-detail-desc {
        font-size: 0.95rem;
        margin: 0.3rem 0;
    }

    .collection-detail-count {
        font-size: 0.85rem;
    }
}

/* Actions bar */
.collection-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid light-dark(#eee, #333);
}

.collection-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1px solid light-dark(#ddd, #444);
    background: var(--primary-color);
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all .2s;

    &:hover {
        border-color: #ff5b4c;
    }

    &.collection-action-danger:hover {
        background: none;
        border-color: #ef4444;
        color: #ef4444;
    }
}

/* Recipes grid (detail) */
.collection-recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.collection-recipe-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: light-dark(#fff, #1e1e1e);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform .2s, box-shadow .2s;

    &:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
}

.collection-recipe-link {
    text-decoration: none;
    color: inherit;
    display: block;
    background: var(--background-primary);
    width: 100%;

    &:hover {
        text-decoration: none;
    }
}

.collection-recipe-image {
    width: 100%;
    height: 160px;
    overflow: hidden;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .3s;
    }

    &:hover img {
        transform: scale(1.05);
    }
}

.collection-recipe-info {
    padding: 0.75rem 1rem 1rem;

    h4 {
        font-size: 0.95rem;
        font-weight: 600;
        margin: 0 0 0.4rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.collection-recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);

    span {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
    }
}

.collection-recipe-category {
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.collection-recipe-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 1rem;
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;

    .collection-recipe-card:hover & {
        opacity: 1;
    }
}

/* Empty recipes */
.collection-empty-recipes {
    text-align: center;
    padding: 4rem 2rem;

    .collection-empty-icon {
        font-size: 3.5rem;
        margin-bottom: 1rem;
    }

    h3 {
        color: light-dark(#333, #f0f0f0);
        margin-bottom: 0.5rem;
    }

    p {
        color: light-dark(#666, #aaa);
        margin-bottom: 2rem;
    }
}

/* --- Share modal --- */
.modal-share-content {
    max-width: 480px;

    h2 {
        margin-bottom: 1.5rem;
    }
}

.share-link-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;

    input {
        flex: 1;
        padding: 0.6rem 1rem;
        border: 1px solid light-dark(#ddd, #444);
        border-radius: 8px;
        background: light-dark(#f8f8f8, #2a2a2a);
        color: light-dark(#333, #f0f0f0);
        font-size: 0.85rem;
    }
}

.btn-copy-share {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 1rem;
    border: 1px solid #ff5b4c;
    border-radius: 8px;
    background: transparent;
    color: #ff5b4c;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all .2s;

    &:hover {
        background: #ff5b4c;
        color: #fff;
    }
}

.share-social-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity .2s;

    &:hover { opacity: 0.85; }
    &.share-whatsapp { background: #25D366; }
    &.share-facebook { background: #1877F2; }
    &.share-twitter { background: #1DA1F2; }
    &.share-native { background: #ff5b4c; }
}

/* ============================================
   MODALE — Ajout à une collection (recipe page)
   ============================================ */

.modal-add-collection {
    max-width: 420px;

    h2 {
        margin-bottom: 1rem;
        font-size: 1.3rem;
    }
}

.collections-list-for-recipe {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.collection-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 3rem;
    transition: background .15s;
    margin-bottom: .2rem;

    &:hover {
        background: var(--background-primaryOpacity);
    }

    &.in-collection {
        background: var(--background-primaryOpacity);
    }
}

.collection-list-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.collection-list-name {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 1rem;
    border: 2px solid light-dark(#ddd, #555);
    background: transparent;
    color: light-dark(#999, #666);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;

    &.active {
        border-color: #10b981;
        background: #10b981;
        color: #fff;
    }

    &:not(.active):hover {
        border-color: #ff5b4c;
        color: #ff5b4c;
    }
}

.collections-empty-msg {
    text-align: center;
    color: light-dark(#888, #999);
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.collections-create-inline {
    border-top: 1px solid light-dark(#eee, #333);
    padding-top: 0.75rem;
}

.btn-create-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.7rem;
    border-radius: 10px;
    background: var(--button-color);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all .2s ease-in-out;

    &:hover {
        background: var(--button-color-hover);
        transition: all 0.2s ease-in-out;
    }
}

.inline-create-form {
    padding: 0.75rem 0;

    input {
        width: 100%;
        padding: 0.6rem 1rem;
        border: 1px solid var(--primary-color);
        border-radius: 8px;
        background: var(--background-primary);
        color: var(--text-primary);
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        box-sizing: border-box;
    }
}

.inline-create-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-cancel-inline {
    padding: 0.5rem 1rem;
    border: 1px solid light-dark(#ddd, #444);
    border-radius: 8px;
    background: transparent;
    color: light-dark(#666, #aaa);
    cursor: pointer;
}

.btn-confirm-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--button-color);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;

    &:hover {
        background: var(--button-color-hover);
    }
}

/* --- Emoji picker --- */
.emoji-picker-wrapper {
    position: relative;
    display: inline-block;
}

.emoji-picker-btn {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    border: 2px solid light-dark(#ddd, #444);
    border-radius: 12px;
    background: light-dark(#f8f8f8, #2a2a2a);
    cursor: pointer;
    transition: border-color .2s;

    &:hover {
        border-color: #ff5b4c;
    }
}

.emoji-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 0.75rem;
    background: light-dark(#fff, #1e1e1e);
    border: 1px solid light-dark(#ddd, #444);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
}

.emoji-option {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s;

    &:hover {
        background: light-dark(#f0f0f0, #333);
    }
}

/* --- Modal collection form --- */
.modal-collection-form {
    max-width: 460px;

    .form-group {
        margin-bottom: 1rem;

        label {
            display: block;
            font-size: 0.85rem;
            font-weight: 600;
            color: light-dark(#555, #ccc);
            margin-bottom: 0.4rem;
        }

        input[type="text"],
        textarea {
            width: 100%;
            padding: 0.6rem 1rem;
            border: 1px solid light-dark(#ddd, #444);
            border-radius: 8px;
            background: light-dark(#fff, #2a2a2a);
            color: light-dark(#333, #f0f0f0);
            font-size: 0.9rem;
            box-sizing: border-box;
        }

        textarea {
            resize: vertical;
        }
    }

    .form-actions {
        display: flex;
        gap: 0.75rem;
        justify-content: flex-end;
        margin-top: 1.5rem;
    }

    .btn-cancel {
        padding: 0.6rem 1.25rem;
        border: 1px solid light-dark(#ddd, #444);
        border-radius: 8px;
        background: transparent;
        color: light-dark(#666, #aaa);
        cursor: pointer;
    }
}

/* ============================================
   PUBLIC COLLECTION PAGE
   ============================================ */

.public-collection-page {
    background: light-dark(#fafafa, #111);
    min-height: 100vh;
}

.public-collection-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid light-dark(#eee, #333);
    background: light-dark(#fff, #1a1a1a);
}

.public-collection-logo img {
    height: 32px;
}

.public-collection-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.public-collection-hero {
    text-align: center;
    padding: 3rem 1rem 2rem;

    .public-collection-emoji {
        font-size: 4rem;
        display: block;
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 2rem;
        color: light-dark(#333, #f0f0f0);
        margin: 0 0 0.5rem;
    }

    .public-collection-desc {
        color: light-dark(#666, #aaa);
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .public-collection-meta {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        color: light-dark(#999, #777);
        font-size: 0.9rem;
    }
}

.public-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    padding: 2rem 0;
}

.public-recipe-card {
    display: block;
    background: light-dark(#fff, #1e1e1e);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform .2s;

    &:hover {
        transform: translateY(-2px);
    }
}

.public-recipe-image {
    height: 160px;
    overflow: hidden;

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

.public-recipe-info {
    padding: 0.75rem 1rem;

    h3 {
        font-size: 0.95rem;
        margin: 0 0 0.3rem;
        color: light-dark(#333, #f0f0f0);
    }
}

.public-recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: light-dark(#888, #999);

    span {
        display: inline-flex;
        align-items: center;
        gap: 0.2rem;
    }
}

.public-collection-cta {
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid light-dark(#eee, #333);

    h2 {
        font-size: 1.4rem;
        color: light-dark(#333, #f0f0f0);
        margin-bottom: 0.5rem;
    }

    p {
        color: light-dark(#666, #aaa);
        margin-bottom: 1.5rem;
    }
}

.btn-primary-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: #ff5b4c;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s;

    &:hover {
        background: #e5453b;
    }
}

.public-collection-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: light-dark(#999, #666);
    font-size: 0.85rem;

    a {
        color: #ff5b4c;
        text-decoration: none;
    }
}

.public-collection-empty {
    text-align: center;
    padding: 3rem;
    color: light-dark(#888, #999);
}

/* ============================================
   COLLECTIONS — Responsive
   ============================================ */

@media (max-width: 768px) {
    .collections-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;

        h1 {
            font-size: 1.4rem;
        }
    }

    .collections-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .collection-card-preview {
        height: 120px;
    }

    .collection-detail-title {
        .collection-detail-emoji {
            font-size: 2rem;
        }

        h1 {
            font-size: 1.4rem;
        }
    }

    .collection-actions-bar {
        gap: 0.5rem;
    }

    .collection-action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .collection-recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .collection-recipe-image {
        height: 120px;
    }

    .collection-recipe-info h4 {
        font-size: 0.85rem;
    }

    .collection-recipe-meta {
        font-size: 0.75rem;
        span {
            display: block !important;
        }
    }

    .collection-recipe-category {
        font-size: 0.7rem;
    }

    .collection-recipe-remove {
        opacity: 1;
    }

    .public-collection-hero h1 {
        font-size: 1.5rem;
    }

    .public-collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* ==============================================
   PAGES SEO (/que-cuisiner, /ingredient, /recettes-avec)
   ============================================== */

/* Hero SEO */
.seo-hero {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    padding-top: 7rem;
    height: auto;
    background: url("../img/cuisine/cuisine5.svg"),
        url("../img/cuisine/cuisine3.svg");
    background-size: 30%;
    background-position:
        0% 30%,  /* En bas vers la droite */
        100% 30%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: all 0.3s ease-in-out;
    animation: none;
}
.seo-hero-content {
    justify-content: center !important;
    align-items: center !important;
}
.seo-hero h1 {
    font-size: 5rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}
.seo-hero-subtitle {
    text-align: center;
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}
.seo-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-primary-seo {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: #fff;
    color: #667eea;
    border-radius: 2rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary-seo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.btn-secondary-seo {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-secondary-seo:hover {
    background: rgba(255,255,255,0.3);
}

/* Sections SEO */
.seo-section {
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;

    .results-count {
        color: var(--secondary-color);
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
}
.seo-section-desc {
    margin-bottom: 1.25rem;
    text-align: center;
}
.seo-section-alt {
    border-radius: 1rem;
    margin: 1rem auto;
}

/* Grille ingrédients (chips) */
.seo-ingredients-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.seo-ingredient-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #edf2f7;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    border: 1px solid #e2e8f0;
    &:hover {
        background: var(--primary-color);
        color: #fff;
        text-decoration: none;
        transform: translateY(-1px);
        border-color: #667eea;
    }
}
.seo-ingredient-chip:hover .seo-chip-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.seo-chip-count {
    background: #cbd5e0;
    color: #4a5568;
    padding: 0.1rem 0.45rem;
    border-radius: 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

/* Grille catégories */
.seo-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}
.seo-category-card {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--background-primary);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.15s, box-shadow 0.15s;
}
.seo-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-decoration: none;
}

/* Steps "Comment ça marche" */
.seo-how-it-works {
    text-align: center;
}
.seo-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.seo-step {
    padding: 1.5rem;
    background: var(--background-primary);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.seo-step-number {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--button-color);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}
.seo-step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
}
.seo-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Header ingrédient P1/P2 */
.seo-ingredient-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    padding-top: 7rem;
    height: auto;
    background: url("../img/cuisine/cuisine6.svg"), var(--background-primary);
    background-size: 30%;
    background-position:
        100% 20%;  /* En bas vers la gauche */
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: all 0.3s ease-in-out;
    animation: none;
}

.seo-ingredient-header h1 {
    font-size: 5rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}
.seo-ingredient-count {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.seo-ingredient-intro {
    text-align: center;
    font-size: 1rem;
    max-width: 700px;
    line-height: 1.6;
}
.seo-inline-link {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.seo-inline-link:hover {
    color: #5a67d8;
}

/* Section vide */
.seo-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #718096;
}
.seo-empty p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* FAQ / Contenu SEO */
.seo-faq {
    margin-top: 1rem;
}
.seo-faq-content {
    line-height: 1.7;
    font-size: 0.98rem;

    p{
        text-align: center;
    }
}
.seo-faq-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Guide ingrédient — contenu enrichi P1 */
.seo-ingredient-guide {
    margin-top: 0.5rem;
}
.seo-ingredient-guide h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}
.seo-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.seo-guide-block {
    border-radius: 1rem;
    padding: 1.5rem;
    line-height: 1.7;
    font-size: 0.96rem;
    color: #121212;
    transition: box-shadow 0.2s ease;

    p{
        color: #121212;
        text-align: justify;
        margin: 0;
    }

    &:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    }

    h3 {
        color: var(--primary-color);
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
    }
}

.seo-guide-block.seo-guide-description {
    background: #e3f2fd;
    &:hover {
        box-shadow: 0 4px 16px var(--text-info);
    }
}
.seo-guide-block.seo-guide-conseils {
    background: #d1fae5;
        &:hover {
            box-shadow: 0 4px 16px var(--text-success);
        }
}
.seo-guide-block.seo-guide-astuces {
    background: #fef3c7;
        &:hover {
            box-shadow: 0 4px 16px var(--text-warning);
        }
}
.seo-guide-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color, #5a67d8);
}

/* Responsive SEO pages */
@media (max-width: 768px) {
    .seo-hero {
        padding: 2rem 1rem;
    }
    .seo-hero h1 {
        font-size: 1.6rem;
    }
    .seo-hero-subtitle {
        font-size: 1rem;
    }
    .seo-section h2 {
        font-size: 1.3rem;
    }
    .seo-ingredient-header h1 {
        font-size: 1.5rem;
    }
    .seo-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        .seo-cat-name {
            display: inline !important;
        }
    }
    .seo-chip-count {
        display: inline !important;
    }
    .seo-steps-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal recherche recette pour collection */
.collection-search-item {
    position: relative;
}

.collection-search-item.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.collection-search-state {
    font-size: 0.72rem;
    font-weight: 600;
    color: light-dark(#6b7280, #9ca3af);
    margin-left: 0.5rem;
    white-space: nowrap;
}

.collection-search-state.collection-search-state-add {
    color: #ff5b4c;
}

/* ===== Onboarding ===== */
body.onboarding-open {
    overflow: hidden;
}

body.onboarding-guided-open {
    overflow: auto;
}

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.onboarding-overlay.onboarding-overlay-guided {
    background: transparent;
    pointer-events: none;
    padding: 0;
}

.onboarding-modal {
    width: min(680px, 100%);
    border-radius: 1rem;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    position: relative;
}

.onboarding-overlay.onboarding-overlay-guided .onboarding-modal {
    width: min(360px, calc(100vw - 24px));
    padding: 0.9rem;
    border-radius: 0.8rem;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
    pointer-events: auto;
}

.onboarding-modal.onboarding-modal-anchored {
    position: fixed;
    margin: 0;
    z-index: 12001;
    max-width: calc(100vw - 24px);
}

.onboarding-close {
    position: absolute;
    top: 0.4rem;
    right: 0.7rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.onboarding-overlay.onboarding-overlay-guided .onboarding-close {
    top: 0.25rem;
    right: 0.45rem;
    font-size: 1.45rem;
}

.onboarding-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .3rem;
    justify-content: flex-start;
}

.onboarding-overlay.onboarding-overlay-guided .onboarding-head {
    margin-bottom: 0.45rem;
}

.onboarding-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
}

.onboarding-body h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.onboarding-body p {
    color: var(--text-secondary);
    line-height: 1.2;
}

.onboarding-overlay.onboarding-overlay-guided .onboarding-body p {
    font-size: 0.7rem;
}

.onboarding-hint {
    margin-top: 0.45rem;
    font-size: 0.86rem;
    color: var(--primary-color);
    font-weight: 600;
}

.onboarding-progress {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.onboarding-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.onboarding-overlay.onboarding-overlay-guided .onboarding-actions {
    margin-top: 0.75rem;
    gap: 0.45rem;
}

.onboarding-actions .btn-primary,
.onboarding-actions .btn-secondary {
    min-height: 2.5rem;
    border: none;
    border-radius: 0.6rem;
    padding: 0.6rem 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.onboarding-overlay.onboarding-overlay-guided .onboarding-actions .btn-primary,
.onboarding-overlay.onboarding-overlay-guided .onboarding-actions .btn-secondary {
    min-height: 2.2rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
}

.onboarding-actions .btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.onboarding-actions .btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.onboarding-step-list {
    margin: 0.3rem 0 0.9rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.35rem;
}

.onboarding-step-list li {
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: var(--background-secondaryOpacity);
}

.onboarding-step-list li.done {
    border-color: var(--alert-success);
    color: var(--text-success);
}

.onboarding-step-list li.current {
    border-color: var(--primary-color);
    color: var(--text-primary);
    background: var(--background-primaryOpacity);
}

.onboarding-target-active {
    position: relative;
    z-index: 12002 !important;
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 4px;
    box-shadow: 0 0 0 8px rgba(255, 91, 76, 0.18);
    border-radius: 0.6rem;
}

@media (max-width: 768px) {
    .onboarding-modal {
        padding: 1rem;
    }

    .onboarding-actions {
        justify-content: stretch;
    }

    .onboarding-actions .btn-primary,
    .onboarding-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
}