body {
    font-family: Segoe UI, arial, sans-serif;
    margin: 0;
    background: #fafafa;
    font-size: 16px; /* Base font size for rem calculations */
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

header {
    background: #008000;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav li {
    margin: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    color: #f4f4f4;
    text-decoration: underline;
}

.cart-nav {
    position: relative;
    margin-left: 15px;
}

.cart-nav a {
    position: relative;
    display: inline-block;
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -12px;
    background: #ffcc00;
    color: #333;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
}

.nav-socials {
    display: flex;
    gap: 15px;
    margin-left: 20px;
    border-left: 1px solid rgba(255,255,255,0.3);
    padding-left: 20px;
}

.nav-socials a {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.nav-socials a:hover {
    transform: scale(1.2);
    color: #ffcc00;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 5%;
    background: #f9f9f9;
    gap: 50px;
    min-height: 80vh;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-text h2, .hero-title {
    font-size: 2.5rem;
    margin-bottom: 0;
    transition: transform 0.5s ease, color 0.5s ease;
}

.hero-title:hover {
    transform: scale(1.1);
    color: #2e8b57;
}

.hero-text p, .hero-subtitle {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    transition: transform 0.3s ease;
}

.hero-subtitle:hover {
    transform: translateX(0.5rem);
}

.hero-image {
    flex: 1;
    display: flex;
    max-width: 500px;
    overflow: hidden;
    height: 450px;
    width: 100%;
    position: relative;
    justify-content: flex-end;
    margin-left: 20px;
    border-radius: 20px;
}

.hero-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.hero-image:hover {
    cursor: grab;
}
.hero-image:active {
    cursor: grabbing;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-btns .btn {
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-primary {
    background: #2e8b57;
    color: white;
}

.btn-primary:hover {
    background: #236b43;
}

.btn-secondary {
    background: #8b0000;
    color: white;
}

.btn-secondary:hover {
    background: #a52a2a;
}

.menu {
    padding: 2rem;
    text-align: center;
}

.menu h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.menu-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
}

/* Style pour chaque carte de plat générée par le JS */
.menu-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #eee;
}

/* Effet au survol de la souris */
.menu-card:hover {
    transform: translateY(-5px);
}

/* Style de l'image du plat */
.menu-card img {
    width: 100%;
    height: 180px;
    object-fit: cover; /* Pour que l'image ne soit pas écrasée */
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Style du titre du plat */
.menu-card h3 {
    font-size: 1.2rem;
    color: #333;
    margin: 10px 0;
}

/* Style des boutons dans la carte */
.card-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.card-buttons button {
    flex: 1;
    padding: 8px 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

/* Bouton Commander (Style Momo) */
.card-buttons button:first-child {
    background-color: #2e8b57; /* Vert sombre */
    color: white;
}

/* Bouton Panier */
.card-buttons button:last-child {
    background-color: #f39c12; /* Orange */
    color: white;
}

/* Cette classe bloque le scroll */
.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.order-layout {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
   justify-content: space-between;
}

.order-visual {
    flex: 0.8;
    text-align: center;
}

.order-visual img {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.price-badge {
    margin-top: 10px;
    font-size: 1.1rem;
    color: #2e8b57;
    background: #f0fdf4;
    padding: 5px;
    border-radius: 5px;
}

.order-form-side {
    flex: 1.2;
}

.input-compact, .select-compact {
    width: 100%;
    padding: 8px !important;
    margin-bottom: 12px !important;
    font-size: 0.9rem !important;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.card {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.card h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.card-actions button {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background 0.3s, transform 0.2s;
}

/* Bouton Commander (Vert) */
.card-actions button:first-child {
    background-color: #2e8b57; /* Vert sombre */
    color: white;
}

.card-actions button:first-child:hover {
    background-color: #236b43;
    transform: scale(1.05);
}

/* Bouton Ajouter au Panier (Jaune/Orange) */
.card-actions button:last-child {
    background-color: #f39c12; /* Orange/Jaune */
    color: white;
}

.card-actions button:last-child:hover {
    background-color: #e67e22;
    transform: scale(1.05);
}

.card button {
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  border: none;
  background: #2e8b57;
  color: white;
  cursor: pointer;
  border-radius: 5px;
}

button {
    margin-top: 0.5rem;
    padding: 0.8rem 1.2rem;
    border: none;
    background: #8b0000;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

button:hover {
    background: #a52a2a;
}

.section-title {
    text-align: center;
    color: #008000;
    margin-top: 3rem;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.services-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.service-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    width: 380px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.service-icon {
    font-size: 2.5rem;
    color: #333;
    padding-right: 20px;
    margin-right: 20px;
    border-right: 1px solid #eee;
    min-width: 60px;
    text-align: center;
}

.service-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #000;
}

.service-info p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: #555;
}

#apropos {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #fff;
    border-top: 1px solid #eee;
    background: #fdfdfd;
}

#apropos p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

#affichage-prix-dynamique {
    padding: 10px 0;
    font-size: 1.1rem;
    text-align: center;
}

#step-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 50px;
    color: #2e8b57;
    margin-bottom: 20px;
    display: block;
}

#step-success h2 {
    color: #333;
    margin-bottom: 10px;
}

#step-success p {
    color: #666;
    font-size: 1.1rem;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: auto;
    margin-top: 100px;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}


/* Ajouter cette classe pour l'affichage */
.modal.show {
    display: flex;  /* On active flex seulement quand nécessaire */
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    z-index: 100;
    cursor: pointer;
}

/* Style des champs */
input, select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 8px 0 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    display: block;
}

label {
    display: block;
    text-align: left;
    font-weight: bold;
    margin-top: 10px;
    color: #333;
}

.btn-next, .btn-confirm { 
    background: #2e8b57; 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 5px; 
    cursor: pointer; 
    width: 100%; 
    font-weight: bold;
}

.btn-back { 
    background: #888; 
    color: white;
    flex: 1;
    max-width: 120px;  
}

.btn-confirm {
    background-color: #2e8b57;
    color: white;
    flex: 1;
    max-width: 200px;
}

/* Conteneur des options de paiement */
#section-choix-paiement {
    background: #fff;
    padding: 15px;
    border-top: 1px solid #eee;
    border-radius: 0 0 15px 15px;
}

.review-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Style des boutons Moncash/Natcash */
.btn-paiement-mobile {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    color: white;
}

.btn-paiement-mobile:active {
    transform: scale(0.95); /* Effet de pression sur mobile */
}

.moncash { background-color: #ff0000; }
.natcash { background-color: #25d366; }

.btn-back:hover { background-color: #666; }
.btn-confirm:hover { background-color: #246d44; }

.btn-group { 
    display: flex; 
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    padding: 0 10px; 
}

.btn-back, .btn-confirm {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.about-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #008000;
    color: #008000;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-secondary:hover {
    background-color: #008000;
    color: white;
}

.about {
    padding: 60px 10%;
    background-color: #fff;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: #333;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grille à deux colonnes */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 40px;
}

.about-text {
    max-width: 450px; 
    text-align: left;
}

/* Style des textes */
.about-text p, .about-description {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 35px;
    color: #555;
}

.about-actions {
    display: flex;
    gap: 15px;
}

/* Style de la colonne des icônes (Features) */
.about-features-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #ffffff;
    border-radius: 15px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-icon-box {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: #008000;
    font-size: 1.2rem;
    flex-shrink: 0; /* Empêche l'icône de s'écraser */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: #008000;
}

.feature-content {
    text-align: left;
}

.feature-content h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.feature-content p {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: #666;
}

.feature-item i {
    font-size: 1.5rem;
    color: #008000;
}

.feature-item h4 {
    margin: 0;
    color: #333;
}

#map-container iframe {
    width: 100%;
    min-height: 300px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-enhanced {
    margin: 0 auto;
    padding: 1.5rem;
    transition: all 0.5s ease;
    border-radius: 15px;
}

.about-enhanced:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: #ffffff;
}

/* --- CORRECTION CARROUSEL --- */
.hero-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-y: hidden;
}

.hero-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 100%; /* Force chaque image à prendre 100% pile */
    min-width: 100%;
    scroll-snap-align: start;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* --- CENTRAGE BOUTONS MOBILE --- */
@media (max-width: 768px) {
    .hero-btns {
        display: flex;
        justify-content: center; /* Centre les boutons horizontalement */
        width: 100%;
        gap: 15px;
    }
}

/* --- AFFICHAGE FLÈCHES AU SURVOL (PC UNIQUEMENT) --- */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    z-index: 10;
}

.carousel-arrow.left {
    left: 10px;
}

.carousel-arrow.right {
    right: 10px;
}

@media (min-width: 769px) {
    .carousel-arrow {
        display: none; /* Caché par défaut */
        opacity: 0.7;
        transition: opacity 0.3s;
    }
    .hero-image:hover .carousel-arrow {
        display: block; /* Apparaît au survol de la souris */
    }
}

/* Responsive : sur mobile, les cartes passent en colonne */
@media (max-width: 850px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
  .menu-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 5%;
    }
    .hero-image {
        max-width: 100%; /* Prend toute la largeur sur mobile */
    }
}

@media (max-width: 480px) {
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .service-card {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Affiche le burger sur mobile */
    }

    header {
        padding: 0.5rem 1rem;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .nav-list {
        display: none; /* Cache la liste par défaut */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 55px; /* Ajuste selon la hauteur de ton header */
        left: 0;
        background-color: #008000;
        text-align: center;
        padding: 10px 0;
        gap: 5px;
        z-index: 1000;
    }

    .nav-list li {
        margin: 0.5rem 0;
    }

    .nav-socials {
        border-top: 1px solid rgba(255,255,255,0.2);
        padding-top: 10px;
        margin-top: 5px;
        justify-content: left;
    }

    /* Classe qui sera ajoutée en JavaScript */
    .nav-list.active {
        display: flex;
    }

    nav li {
        margin: 1rem 0;
    }

    /* Optimisations pour mobile */
    .hero-btns .btn {
        padding: 1rem 2rem; /* Augmenter la taille des boutons pour faciliter le toucher */
        font-size: 1.1rem;
        min-height: 44px; /* Touch target minimum */
    }

    .card button {
        padding: 0.8rem 1.5rem; /* Boutons plus grands */
        font-size: 1rem;
        min-height: 44px;
    }

    .btn-secondary {
        padding: 0.8rem 1.5rem;
        min-height: 44px;
    }
}

@media (max-width: 600px) {
    .order-layout {
        flex-direction: column;
        align-items: center;
    }
    .order-visual img {
        max-width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .order-form-side {
        flex: 1;
    }
    .order-visual {
        flex: 0.7;
    }
    .order-visual img {
        max-width: 120px;
        height: 120px;
    }
    .modal-content {
        width: 95%;
        padding: 15px;
    }

    /* Optimisations supplémentaires pour très petits écrans */
    .hero-text h2 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .card h3 {
        font-size: 1rem;
    }
}