/* ============================================================
   Thème : Bistronomie Raffinée
   Palette : Lait d'Avoine, Terre Cuite, Anthracite Profond
============================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tenor+Sans&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    font-family: 'Tenor Sans', sans-serif;
    margin: 0;
    min-height: 100vh;
    background-image: url("images/fond_bois.webp");
    background-repeat: no-repeat repeat;
    background-attachment: fixed;
    background-size: 100% 60%;
    color: #1a1a1a;
    padding: 20px 15px;
    display: flex;
    justify-content: center;
    text-align: center;
    overflow-x: hidden;
    letter-spacing: 0.02em;
}


.overlay-open {
    overflow: hidden;
}

.page {
    position: relative;
    background-color: #fff;
    background-repeat: round;
    background-size: 40% 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.65)), url("images/pattern_page.png");
    width: min(750px, 100%);
    border-radius: 4px;
    padding: 60px 20px;
    border: 1px solid #e0dbd0;
    margin-bottom: 140px;
    box-shadow: 0px 2px 38px rgba(0, 0, 0, 0.2);
}

/* --- TYPOGRAPHIE --- */
.logo-text {
    font-family: 'Tenor Sans', sans-serif;
    text-transform: uppercase;
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    font-weight: 400;
    color: #a67c52;
    letter-spacing: 0.2em;
}

h1 {
    margin: 15px 0 60px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    color: #777;
    text-transform: lowercase;
    position: relative;
    display: inline-block;
}

    h1::after {
        content: "";
        position: absolute;
        bottom: -10px;
        left: 25%;
        width: 50%;
        height: 1px;
        background-color: #e0dbd0;
    }

h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 2.2rem;
    color: #a67c52;
    margin-top: 50px;
    margin-bottom: 30px;
}

/* --- NAVIGATION --- */
#navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    flex-direction: column;
    align-items: center;
}

    #navigation button {
        background: none;
        border: none;
        padding: 10px 15px;
        color: #444;
        text-transform: uppercase;
        font-family: 'Tenor Sans', sans-serif;
        font-size: 1.1rem;
        font-weight: 500;
        letter-spacing: 0.1em;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        width: fit-content;
    }

        #navigation button:hover,
        #navigation button.active {
            color: #c06c4c;
        }

        #navigation button::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 2px;
            background-color: #c06c4c;
            transition: all 0.4s ease;
        }

        #navigation button:hover::after,
        #navigation button.active::after {
            width: 100%;
            left: 0;
        }

/* --- CARTES MENU --- */
.category-group {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 60px;
    min-height: 150px;
    transition: all 0.5s ease;
}

.card {
    background: transparent !important;
    width: 100%;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #f0eee9;
    display: flex;
    align-items: center;
    padding: 25px 0;
    transition: background 0.3s ease;
    position: relative;
    z-index: 2;
}

    .card img {
        width: 90px;
        height: 90px;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 50%;
        margin-left: 10px;
        margin-right: 25px;
        border: 1px solid #f0eee9;
    }

    .card h3 {
        margin: 0 0 5px;
        color: #1a1a1a;
        font-family: 'Tenor Sans', sans-serif;
        font-size: 1.2rem;
    }

    .card .price-tag {
        color: #b05635;
        font-weight: 600;
    }

/* --- ZOOM DETAIL (CORRIGÉ) --- */
#dish-detail {
    position: fixed;
    inset: 0;
    background-color: #fff;
    background-repeat: round;
    background-size: 20% 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)), url("images/pattern_page.png");
    z-index: 1500;
    display: none;
    flex-direction: column;
}

    #dish-detail.active {
        display: flex;
        animation: fadeInAnimation 0.4s ease;
    }

    /* CADRE DORÉ LUMINEUX IMAGE ZOOM */
    #dish-detail .zoom-container {
        position: relative;
        padding: 40px;
        overflow: hidden;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

.zoom-image {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 15px;
    border: 4px solid #c5a059;
    box-shadow: 0 0 20px 3px rgba(197, 160, 89, 0.5), 0 0 40px 10px rgba(255, 248, 225, 0.2);
    position: relative;
    z-index: 1;
}

/* REFLET DIAGONAL ZOOM */
#dish-detail .zoom-container::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(-45deg);
}

#dish-detail.animate-zoom-shine .zoom-container::after {
    animation: shineDiagonal 2s ease-in-out forwards;
}

@keyframes shineDiagonal {
    0% {
        opacity: 0;
        transform: translate(-150%, -150%) rotate(-45deg);
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(50%, 50%) rotate(-45deg);
    }
}

/* --- TRAITS DORÉS FLÈCHES (MENU) --- */
.category-group::before,
.category-group::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px; /* Ton réglage actuel */
    z-index: 1;
    clip-path: polygon(50% 0%, 100% 30px, 100% calc(100% - 30px), 50% 100%, 0% calc(100% - 30px), 0% 30px);
    background-color: #c5a059;
    box-shadow: 0 0 15px 2px rgba(197, 160, 89, 0.6), 0 0 35px 8px rgba(255, 248, 225, 0.25);
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0) 100%);
    background-size: 100% 250px;
    background-repeat: no-repeat;
    background-position: 0 -300px;
}

.category-group::before {
    left: 25px;
}

.category-group::after {
    right: 25px;
}

.animate-shine::before,
.animate-shine::after {
    animation: shinePass 1.8s ease-in-out forwards;
}

@keyframes shinePass {
    0% {
        background-position: 0 -300px;
    }

    100% {
        background-position: 0 calc(100% + 300px);
    }
}

/* --- BOUTON RETOUR --- */
#back-button {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    width: min(280px, 85%);
    background: #fff;
    color: #c06c4c !important;
    padding: 16px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2000;
    border: 2px solid #c06c4c;
}

/* --- RESPONSIVE --- */
@media (max-width: 720px) {
    .page {
        padding: 30px 10px;
        border: none;
    }

    .category-group {
        padding: 30px 35px;
    }

        .category-group::before {
            left: 10px;
        }

        .category-group::after {
            right: 10px;
        }

    .card img {
        width: 75px;
        height: 75px;
    }
}

/* --- ANIMATIONS SYSTÈME --- */
@keyframes fadeInAnimation {
    from {
        opacity: 0.4;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader svg {
    width: 50px;
    height: 50px;
    animation: rotateLoader 2s linear infinite;
}

@keyframes rotateLoader {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.stroke-animation {
    fill: none;
    stroke: #c06c4c;
    stroke-width: 3;
    stroke-dasharray: 120;
    animation: dash 1.4s linear infinite;
}

@keyframes dash {
    0% {
        stroke-dashoffset: 126;
    }

    50% {
        stroke-dashoffset: 30;
    }

    100% {
        stroke-dashoffset: 126;
    }
}
/* Conteneur principal */
.background-ticker {
    position: fixed;
    /* On centre parfaitement le conteneur */
    top: 50%;
    left: 50%;
    
    /* On utilise vmin pour que la taille soit basée sur la plus grande dimension */
    /* 300vmin garantit que même en tournant à 30°, on couvre tout */
    width: 300vmin; 
    height: 300vmin;
    
    z-index: -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    
    /* Centrage + Rotation */
    transform: translate(-50%, -50%) rotate(-30deg);
    
    pointer-events: none;
    user-select: none;
    overflow: hidden;
    opacity: 0.2;
}

/* Ligne qui défile */
.ticker-line {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    animation: scrollLeft 40s linear infinite;
}

    .ticker-line span {
        font-size: 1rem;
        font-weight: bold;
        letter-spacing: 2px;
        background: linear-gradient( 120deg, #888 25%, #fff 50%, #888 75% );
        background-size: 200% auto;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        animation: shineEffect 6s linear infinite;
    }

/* --- ANIMATIONS --- */

/* Défilement vers la gauche */
@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.33%);
    }
    /* On recule d'une partie du texte */
}
