* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

nav {
    background-color: #e65503;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo a {
    color: white;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 15px;
}

nav ul li a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.btn {
    background-color: #e65c00;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}

.btn:hover {
    background-color: #cc5200;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    margin-top: 40px;
    font-size: 13px;
}





/* Formulaires */
.form-section {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    text-align: center;
    color: #e65c00;
    margin-bottom: 25px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    background-color: #e65c00;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #cc5200;
}

.erreur {
    background-color: #ffe0e0;
    color: #cc0000;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
}

.lien {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.lien a {
    color: #e65503;
    text-decoration: none;
    font-weight: bold;
}








/* Commande */
.commande-section {
    padding: 40px 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.commande-section h2 {
    color: #e65c00;
    font-size: 28px;
    margin-bottom: 10px;
}

.bienvenue {
    margin-bottom: 25px;
    font-size: 15px;
    color: #555;
}

.quantite-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantite-control label {
    font-size: 14px;
    color: #444;
}

.input-quantite {
    width: 60px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

/* Récapitulatif */
.recapitulatif {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.recapitulatif h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

#total {
    font-size: 22px;
    font-weight: bold;
    color: #e65c00;
    margin-bottom: 20px;
}



/* Paiement */
.paiement-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.paiement-section h2 {
    color: #e65c00;
    font-size: 26px;
    margin-bottom: 25px;
}

/* Tableau récapitulatif */
.recap-commande {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recap-commande h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.table-commande {
    width: 100%;
    border-collapse: collapse;
}

.table-commande th,
.table-commande td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.table-commande th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #444;
}

.table-commande tfoot td {
    font-size: 16px;
    color: #e65c00;
    border-top: 2px solid #e65c00;
}

/* Modes de paiement */
.form-paiement {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-paiement h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.modes-paiement {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.mode-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.mode-card:hover {
    border-color: #e65c00;
}

.mode-card input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #e65c00;
}

.mode-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mode-icon {
    font-size: 24px;
}

.mode-nom {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Adresse livraison */
.adresse-livraison {
    background: #fff8f5;
    border-left: 4px solid #e65c00;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.adresse-livraison h3 {
    font-size: 15px;
    color: #e65c00;
    margin-bottom: 8px;
}

.adresse-livraison p {
    font-size: 14px;
    color: #555;
}






/* Suivi livraison */
.suivi-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.suivi-section h2 {
    color: #e65c00;
    font-size: 26px;
    margin-bottom: 10px;
}

/* Barre de progression */
.progression {
    background: white;
    border-radius: 10px;
    padding: 30px 20px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.etapes {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.etape {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.etape.active {
    opacity: 1;
}

.etape-icone {
    font-size: 28px;
    background: #f5f5f5;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
}

.etape.active .etape-icone {
    background: #fff3ec;
    border-color: #e65c00;
}

.etape p {
    font-size: 12px;
    text-align: center;
    color: #555;
    font-weight: bold;
}

.ligne-progression {
    flex: 1;
    height: 3px;
    background: #ddd;
    margin: 0 5px;
    margin-bottom: 30px;
}

.ligne-progression.active {
    background: #e65c00;
}

/* Détails suivi */
.details-suivi {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.statut-actuel,
.recap-plats,
.info-livraison {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.statut-actuel h3,
.recap-plats h3,
.info-livraison h3 {
    color: #333;
    font-size: 17px;
    margin-bottom: 15px;
}

.badge-statut {
    display: inline-block;
    background: #fff3ec;
    color: #e65c00;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 15px;
    border: 1px solid #e65c00;
}

.info-livraison p {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.info-livraison p strong {
    color: #333;
}



/* Badge distance restaurant */
.badge-distance {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.badge-distance.proche {
    background: #d4edda;
    color: #155724;
}

.badge-distance.moyen {
    background: #fff3cd;
    color: #856404;
}

.badge-distance.loin {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================================
   RESPONSIVE — adaptation à tous les types d'écran
   Breakpoints : 900px (tablette), 700px (mobile large), 480px (mobile)
   ============================================================ */

/* --- Logo --- */
.logo-img {
    width: 150px;
    max-width: 40vw;
    height: auto;
    display: block;
}

/* --- Menu hamburger (100% CSS, sans JS) --- */
.nav-toggle {
    display: none;
}

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 22px;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 2px;
}

@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        padding: 12px 20px;
    }

    .logo-img {
        width: 110px;
    }

    .nav-burger {
        display: flex;
    }

    nav ul {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-top: 12px;
    }

    .nav-toggle:checked~ul {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 12px 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }
}

/* --- Conteneurs généraux --- */
@media (max-width: 768px) {

    .container,
    .commande-section,
    .paiement-section,
    .suivi-section {
        padding: 0 15px;
        margin: 20px auto;
    }

    .form-section {
        width: auto;
        margin: 25px 15px;
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {

    .commande-section h2,
    .paiement-section h2,
    .suivi-section h2 {
        font-size: 21px;
    }

    .form-section h2 {
        font-size: 20px;
    }
}

/* --- Hero (accueil) --- */
@media (max-width: 480px) {
    .hero {
        padding: 25px 15px;
    }

    .hero h1 {
        font-size: 22px;
    }
}

/* --- Tableaux : scroll horizontal plutôt que colonnes écrasées --- */
@media (max-width: 700px) {

    .recap-commande,
    .recap-plats,
    .info-livraison,
    .statut-actuel,
    .commande-section {
        overflow-x: auto;
    }

    .table-commande {
        min-width: 480px;
    }
}

/* --- Barre de progression du suivi de commande --- */
@media (max-width: 600px) {
    .progression {
        padding: 20px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .etapes {
        min-width: 460px;
    }

    .etape-icone {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .etape p {
        font-size: 10px;
    }

    .ligne-progression {
        margin-bottom: 24px;
    }
}

/* --- Carte de suivi GPS (hauteur fixe en inline dans suivi.php) --- */
@media (max-width: 480px) {
    #carte-suivi {
        height: 280px !important;
    }
}

/* --- Formulaire paiement / inscription --- */
@media (max-width: 480px) {

    .form-paiement,
    .recap-commande,
    .recapitulatif {
        padding: 18px;
    }

    .mode-card {
        padding: 12px;
    }
}

/* --- Grilles de plats (déjà fluides via auto-fit, ajustement fin mobile) --- */
@media (max-width: 480px) {
    .plats-grid {
        grid-template-columns: 1fr;
    }
}
