:root {
    --bs-primary: #2E7D32;     /* Vert forêt */
    --bs-secondary: #1B5E20;   /* Vert foncé */
    --accent-color: #81C784;   /* Vert clair */
    --light-green: #E8F5E9;    /* Vert très clair pour le fond */
    --panda-black: #2D2D2D;    /* Noir pour le panda */
    --panda-white: #FFFFFF;    /* Blanc pour le panda */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-height: 360px;      /* Hauteur de base pour desktop */
    --img-height: 200px;       /* Hauteur image pour desktop */
}

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    padding-top: 76px;
    background-color: var(--light-green);
    background: radial-gradient(circle at top right, var(--accent-color) 0%, transparent 60%),
                radial-gradient(circle at bottom left, var(--bs-primary) 0%, transparent 60%);
    overflow-x: hidden;    /* Empêche le défilement horizontal */
    width: 100%;
}

/* Navbar Styles */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid var(--glass-border);
}

.navbar-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.navbar-brand {
    padding: 0;
    margin: 0;
}

.nav-link {
    font-weight: 500;
    color: var(--bs-secondary);
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--bs-primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('photo/bamboo-bg.jpg') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.hero .display-4 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Menu Section */
.menu-section {
    padding-top: 2rem;
    perspective: 1000px;
}

.menu-section h2 {
    font-weight: 600;
    color: var(--bs-primary);
    margin-bottom: 2rem;
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: table;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    min-width: 200px;
}

.menu-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--bs-primary);
    box-shadow: 0 0 10px rgba(46, 125, 50, 0.2);
    transition: width 0.3s ease;
}

.menu-section h2:hover::after {
    width: 120px;
}

.menu-section h2:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.15);
}

.menu-section h2 {
    transition: all 0.3s ease;
}

/* Card Styles */
.card {
    height: var(--card-height);
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
    backdrop-filter: blur(5px);
    border-left: 4px solid var(--panda-black);
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    animation: fadeInCard 0.8s ease-out backwards;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                rgba(46, 125, 50, 0.2) 0%,
                rgba(129, 199, 132, 0.2) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.2);
    border-left-color: var(--bs-primary);
}

.card:hover::before {
    opacity: 0.05;
}

.menu-img {
    height: var(--img-height);
    width: 100%;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    padding: 0.75rem;
    background-color: white;
}

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: calc(var(--card-height) - var(--img-height));
    overflow: hidden;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}

.card-text {
    font-size: 0.9rem;
    color: #666;
    flex-grow: 1;
    margin-bottom: 0.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    color: var(--panda-black);
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: inline-block;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: auto;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.price::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--bs-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover .price {
    transform: translateY(-2px);
    background-color: var(--accent-color);
    color: var(--panda-black);
}

.card:hover .price::after {
    transform: scaleX(1);
}

/* Text Styles */
.text-danger {
    color: #d32f2f !important;
    font-weight: 500;
}

/* Grid Spacing */
.row {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.col-md-3, .col-md-4, .col-sm-6 {
    padding: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    :root {
        --card-height: 300px;  /* Plus compact sur mobile */
        --img-height: 150px;   /* Images plus petites sur mobile */
    }

    .hero {
        height: 70vh;         /* Plus grand sur mobile pour meilleur affichage */
    }
    
    .display-4 {
        font-size: 1.8rem;    /* Titre plus petit sur mobile */
    }
    
    .card {
        height: var(--card-height);
    }
    
    .card-body {
        height: calc(var(--card-height) - var(--img-height));
    }
    
    .menu-img {
        height: var(--img-height);
    }

    .navbar-logo {
        height: 40px;
    }

    /* Ajustement des marges sur mobile */
    .container-fluid, .container {
        overflow-x: hidden;
        max-width: 100vw;
        padding-left: 8px;
        padding-right: 8px;
        margin: 0;
    }

    /* Ajustement des espacements des cartes */
    .row {
        margin-right: -4px;
        margin-left: -4px;
        width: 100%;
    }

    .col-sm-6 {
        padding: 4px;
    }

    /* Ajustement du contenu des cartes */
    .card-body {
        padding: 0.75rem;
    }

    .card-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .card-text {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .price {
        font-size: 1rem;
        padding: 0.25rem 0.75rem;
    }

    /* Fix pour la navbar */
    .navbar {
        width: 100%;
        left: 0;
        right: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    /* Fix pour les sections */
    section {
        overflow-x: hidden;
        width: 100%;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 375px) {
    :root {
        --card-height: 280px;  /* Encore plus compact */
        --img-height: 140px;
    }

    .card-body {
        padding: 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .btn-hero {
        width: 80%;
        text-align: center;
        justify-content: center;
    }
}

/* Ajustements pour tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --card-height: 330px;
        --img-height: 170px;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Ajustement des horaires sur mobile */
@media (max-width: 768px) {
    .horaires {
        font-size: 0.8rem;
    }

    .horaires .jour {
        margin-bottom: 0.2rem;
    }

    .horaires .jour span {
        min-width: 70px;
    }

    .contact-card {
        padding: 1rem;
    }
}

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

.card {
    animation: fadeIn 0.6s ease-out;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Style pour les cartes sans image */
.no-image {
    background: linear-gradient(135deg,
                var(--panda-black) 0%,
                var(--bs-primary) 50%,
                var(--accent-color) 100%);
    background-size: 300% 300%;
    animation: gradientBG 15s ease infinite;
    height: var(--img-height);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    margin: 0.5rem;
    border-radius: 8px;
}

.no-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: shimmer 10s linear infinite;
}

@keyframes shimmer {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Navbar Enhancement */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Add Bamboo Leaf Pattern */
.menu-section::before {
    content: '🎋';
    position: fixed;
    font-size: 200px;
    right: -50px;
    bottom: -50px;
    opacity: 0.03;
    transform: rotate(-15deg);
    z-index: -1;
}

.menu-section::after {
    content: '🎋';
    position: fixed;
    font-size: 150px;
    left: -30px;
    top: 50%;
    opacity: 0.03;
    animation: float 10s ease infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-hero {
    position: relative;
    padding: 0.8rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform-style: preserve-3d;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        var(--bs-primary),
        var(--accent-color));
    opacity: 0.3;
    z-index: -1;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: white;
}

.btn-hero:hover::before {
    opacity: 0.5;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-hero:hover i {
    transform: scale(1.2);
}

/* Animation pour les boutons */
.hero-buttons a {
    animation: fadeInUp 0.6s ease backwards;
}

.hero-buttons a:nth-child(1) { animation-delay: 0.2s; }
.hero-buttons a:nth-child(2) { animation-delay: 0.4s; }
.hero-buttons a:nth-child(3) { animation-delay: 0.6s; }
.hero-buttons a:nth-child(4) { animation-delay: 0.8s; }

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-buttons {
        gap: 0.5rem;
    }
    
    .btn-hero {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Panda Animation */
.panda-animation {
    position: relative;
    height: 150px;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.panda-scene {
    position: relative;
    width: 200px;
    height: 150px;
    margin: 0 auto;
}

.panda {
    position: absolute;
    left: 40%;
    transform: translateX(-50%);
    font-size: 4rem;
    animation: pandaEating 3s ease-in-out infinite;
    z-index: 2;
}

.bamboo-stick {
    position: absolute;
    left: 60%;
    top: 20%;
    font-size: 3rem;
    animation: bambooBeingEaten 3s ease-in-out infinite;
    transform-origin: bottom;
    z-index: 1;
}

@keyframes pandaEating {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    25% {
        transform: translateX(-40%) scale(1.1) rotate(-5deg);
    }
    50% {
        transform: translateX(-45%) scale(1.1) rotate(5deg);
    }
    75% {
        transform: translateX(-40%) scale(1.1) rotate(-5deg);
    }
}

@keyframes bambooBeingEaten {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(-10deg) scale(0.8);
        opacity: 0.5;
    }
}

/* Button Emoji Style */
.btn-emoji {
    font-size: 1.4rem;
    display: inline-block;
    transform-origin: center;
    animation: emojiWiggle 3s ease-in-out infinite;
}

@keyframes emojiWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.btn-hero:hover .btn-emoji {
    animation: emojiBounce 0.5s ease infinite;
}

@keyframes emojiBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Ajustement responsive */
@media (max-width: 768px) {
    .panda-animation {
        height: 120px;
    }
    
    .panda {
        font-size: 3rem;
    }
    
    .bamboo-stick {
        font-size: 2.5rem;
    }
    
    .eating-effect span {
        font-size: 1.2rem;
    }
}

.eating-effect {
    position: absolute;
    left: 50%;
    top: 20%;
    z-index: 3;
}

.eating-effect span {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
}

.eating-effect span:nth-child(1) {
    animation: floatingEffect 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

.eating-effect span:nth-child(2) {
    animation: floatingEffect 3s ease-in-out infinite;
    animation-delay: 1s;
}

.eating-effect span:nth-child(3) {
    animation: floatingEffect 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes floatingEffect {
    0% {
        transform: translate(0, 0) rotate(0);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    100% {
        transform: translate(20px, -50px) rotate(360deg);
        opacity: 0;
    }
}

html {
    scroll-behavior: smooth;
}

/* Ajustement pour la position du scroll avec la navbar fixe */
#entrees, #plats, #desserts, #boissons {
    scroll-margin-top: 100px;
}

/* Contact Section */
.contact-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.contact-card {
    background: var(--panda-white);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border-left: 4px solid var(--panda-black);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--bs-primary);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: iconBounce 2s ease-in-out infinite;
}

.contact-card h3 {
    color: var(--panda-black);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--bs-secondary);
    margin-bottom: 0;
}

.contact-card a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--accent-color);
}

.order-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--light-green);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.order-link:hover {
    background: var(--accent-color);
    color: white !important;
    transform: translateY(-2px);
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-card {
        padding: 1.5rem;
    }
    
    .contact-icon {
        font-size: 2rem;
    }
}

.horaires {
    text-align: left;
    font-size: 0.9rem;
}

.horaires .jour {
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.horaires .jour span {
    font-weight: 600;
    color: var(--bs-primary);
    min-width: 85px;
}

/* Ajustement de la carte des horaires */
.contact-card:nth-child(2) {
    min-width: 280px;
}

/* Ajustement de la navbar sur mobile */
@media (max-width: 768px) {
    .navbar {
        width: 100%;
        left: 0;
        right: 0;
    }
}