/* === 🎯 Styles mobiles CupMyRun — version finale propre === */

/* ---- Structure globale ---- */
body {
    background-color: #111;
    color: #fff;
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ---- Header et logo ---- */
header {
    width: 100%;
    background: #000;
    color: #ff6600;
    padding: 0.6rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255,165,0,0.2);
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.logo-img {
    height: 90px;
    width: auto;
}

/* ---- Navigation visible en permanence ---- */
nav {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 0.8rem;
    width: 100%;
    margin-top: 0.4rem;
}

    nav a {
        color: #ff6600;
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
        padding: 0.25rem 0.5rem;
        border-radius: 6px;
        transition: background 0.3s ease, color 0.3s ease;
    }

        nav a:hover,
        nav a.active {
            color: #fff;
            background: rgba(255,255,255,0.1);
        }

/* ---- Supprime l'ancien menu burger ---- */
.menu-toggle {
    display: none !important;
}

/* ---- Conteneurs généraux ---- */
.container, .product-page, .form-box, .product-info {
    flex-direction: column;
    padding: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
    box-sizing: border-box;
}

h1, h2, h3 {
    font-size: 1.4rem;
    text-align: center;
    color: #ff6600;
}

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

/* ---- Formulaires ---- */
input, select, textarea, button {
    width: 100%;
    font-size: 1rem;
    padding: 0.9rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    box-sizing: border-box;
}

    input:focus, select:focus, textarea:focus {
        border-color: #ff6600;
        outline: none;
        box-shadow: 0 0 0 3px rgba(255,165,0,0.2);
    }

/* ---- Boutons ---- */
button, .btn, .btn-cta {
    width: 100%;
    font-size: 1rem;
    padding: 1rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #ff6600, #ff8800);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

    button:hover, .btn:hover, .btn-cta:hover {
        background: linear-gradient(135deg, #e65c00, #ff6600);
        transform: translateY(-2px);
    }

/* ---- Images ---- */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ---- Footer ---- */
footer {
    background: #000;
    color: #999;
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
    border-top: 1px solid #333;
}

    footer a {
        color: #ff6600;
        text-decoration: none;
    }

        footer a:hover {
            color: #fff;
        }

/* ---- Page produit ---- */
.product-page {
    align-items: center;
    justify-content: flex-start;
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(255,165,0,0.15);
    margin: 0;
    padding: 1rem;
}

.product-image {
    width: 100%;
    text-align: center;
}

    .product-image img {
        max-width: 85%;
        margin: 0 auto;
    }

.product-info {
    width: 95%;
    margin: 1rem auto;
    background: #fff;
    color: #222;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    padding: 1.5rem;
}

    .product-info h2,
    .product-info p,
    .product-info label,
    .product-info legend {
        text-align: center;
    }

/* ---- Panier (tableau) ---- */
.cart-table-wrapper {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.2rem;
}

.cart-table {
    width: max-content;
    min-width: 750px;
    border-collapse: collapse;
    color: #222;
    font-size: 0.95rem;
}

    .cart-table th,
    .cart-table td {
        white-space: nowrap;
        padding: 0.8rem 1rem;
        text-align: center;
        border-bottom: 1px solid #ddd;
    }

    .cart-table th {
        background: #ff6600;
        color: #fff;
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 1;
    }

/* ---- Résumé panier ---- */
.cart-summary {
    width: 100%;
    max-width: 700px;
    margin: 1.5rem auto;
    background: #fff;
    color: #222;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

    .cart-summary hr {
        border: 1px solid #eee;
        margin: 0.8rem 0;
    }

    .cart-summary strong {
        color: #ff6600;
    }

/* ---- Tableau compte (Mes commandes) ---- */
.account-orders-wrapper {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    margin: 1rem auto;
    padding: 0.5rem;
}

.account-orders-table {
    margin: 0 auto;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: #222;
    min-width: 650px;
    width: max-content;
    text-align: center;
}

    .account-orders-table th,
    .account-orders-table td {
        padding: 0.7rem 1rem;
        border-bottom: 1px solid #ddd;
        white-space: nowrap;
    }

    .account-orders-table th {
        background: #ff6600;
        color: #fff;
        font-weight: 600;
    }

/* ---- Ajustements visuels ---- */
main {
    padding: 0;
}

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

/* ---- Animations ---- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Responsive ajustements ---- */
@media screen and (max-width: 768px) {
    .product-info, .form-box {
        padding: 1rem;
    }

    h1, h2, h3 {
        font-size: 1.3rem;
    }

    nav a {
        font-size: 0.85rem;
        padding: 0.2rem 0.4rem;
    }

    .cart-table th, .cart-table td {
        font-size: 0.9rem;
    }

    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .logo-img {
        height: 80px;
    }

    nav a {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
}

/* === 📱 Optimisation espacement sur la page d'accueil (home.html) === */
@media screen and (max-width: 768px) {
    .hero {
        padding: 2.5rem 1rem;
    }

        .hero h1 {
            font-size: 1.7rem;
            margin-bottom: 0.6rem;
            line-height: 1.3;
        }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        color: #ccc;
    }

    .steps {
        gap: 1rem;
        margin: 1rem 0;
    }

    .step-text p {
        font-size: 0.9rem;
        color: #ddd;
    }

    .btn-cta {
        margin-top: 1.2rem;
        padding: 0.9rem 1.2rem;
        font-size: 1rem;
    }

    .cta-section {
        padding: 2.5rem 1rem;
        margin: 1rem 0;
    }

        .cta-section h2 {
            font-size: 1.4rem;
            margin-bottom: 1rem;
        }

    section {
        margin-bottom: 1.5rem !important;
    }

    main {
        padding: 0.5rem;
    }
}

/* === 🧡 Correction finale espace avant/après CupMyRun PNG === */
@media (max-width: 768px) {
    .concept-section {
        display: flex;
        flex-direction: column;
        gap: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important; /* 🔥 supprime l’espace après */
        padding: 0 !important;
    }

    .concept-text {
        flex: 0 0 auto !important; /* 🔥 empêche la hauteur imposée */
        width: 100%;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

        .concept-text p {
            margin-bottom: 0 !important; /* 🔥 retire la marge basse du texte */
        }

    .concept-image {
        margin: 0 !important;
        padding: 0 !important;
    }

        .concept-image img {
            display: block;
            max-width: 85%;
            height: auto;
            margin: 0 auto !important;
        }

    .cta-section {
        margin-top: 0.5rem !important; /* petit espace visuel harmonieux */
    }
}
/* === 🧾 Correction texte À propos sur mobile === */
@media screen and (max-width: 768px) {
    .about-us-section p {
        text-align: left !important; /* empêche les espacements irréguliers */
        text-justify: auto !important;
        hyphens: none !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
        line-height: 1.6 !important; /* lisibilité mobile */
    }

    .about-us-section {
        padding: 2rem 1rem !important;
    }

        .about-us-section h2 {
            font-size: 1.6rem !important;
        }
}
