/* ==========================================
   RESTOCOMMANDES
   STYLE GLOBAL ET PAGE COMMERCIALE
   ========================================== */
:root {
    --primary: #173c4b;
    --primary-dark: #102d3a;
    --accent: #f59e0b;
    --success: #087d73;
    --success-dark: #06665f;
    --background: #f4f7fb;
    --surface: #ffffff;
    --text: #1c2937;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 16px;
    --shadow: 0 6px 24px rgba(20, 45, 65, 0.07);
}
/* ==========================================
   1. STYLES GENERAUX
   ========================================== */
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font: 16px/1.6 system-ui, Arial, sans-serif;
}
a {
    color: var(--success);
}
p {
    line-height: 1.7;
}
h1, h2, h3 {
    line-height: 1.25;
}
h1 {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -.7px;
    margin: .2rem 0 1.2rem;
    color: var(--primary);
}
h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 1.5rem 0 1rem;
}
h3 {
    margin: .2rem 0;
    color: var(--primary);
}
.eyebrow {
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .8rem;
    color: var(--success);
    font-weight: 800;
}
/* ==========================================
   2. EN-TETE
   ========================================== */
header {
    background: linear-gradient(
        120deg,
        var(--primary-dark),
        var(--primary)
    );
    color: white;
    padding: 1.2rem max(
        1rem,
        calc((100vw - 1080px) / 2)
    );
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
}
header a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.3px;
}
header a:hover {
    color: #f7b955;
}
header span {
    opacity: .85;
    font-size: .9rem;
}
/* ==========================================
   3. CONTENU PRINCIPAL
   ========================================== */
main {
    max-width: 1080px;
    margin: auto;
    padding: 3rem 1rem 5rem;
}
section {
    margin-top: 2rem;
}
.between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
/* ==========================================
   4. CARTES
   ========================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(250px, 1fr)
    );
    gap: 1.25rem;
}
.card {
    background: var(--surface);
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 30px rgba(20, 45, 65, .10);
}
.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
}
.item p {
    color: var(--muted);
    margin: .25rem 0;
}
/* ==========================================
   5. BOUTONS
   ========================================== */
.btn,
button {
    display: inline-block;
    background: var(--success);
    color: white;
    border: 0;
    padding: .8rem 1.2rem;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition:
        background .2s ease,
        transform .2s ease;
}
.btn:hover,
button:hover {
    background: var(--success-dark);
    color: white;
    transform: translateY(-1px);
}
.btn:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
button:disabled,
.btn:disabled {
    background: #cbd5e1;
    color: #475569;
    cursor: not-allowed;
    transform: none;
}
.secondary {
    background: #e5f1ef;
    color: #14584f;
}
.secondary:hover {
    background: #d1e8e4;
    color: #14584f;
}
/* ==========================================
   6. FORMULAIRES
   ========================================== */
input,
select,
textarea {
    display: block;
    width: 100%;
    padding: .75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    color: var(--text);
    font: inherit;
    margin: .3rem 0 .9rem;
}
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--success);
    outline-offset: 1px;
}
.item input {
    max-width: 80px;
}
.inline-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 1rem;
}
.inline-form label {
    flex: 1;
    min-width: 140px;
}
.inline-form button {
    margin-bottom: .9rem;
}
/* ==========================================
   7. MESSAGES ET NOTIFICATIONS
   ========================================== */
.notice {
    padding: 1rem 1.2rem;
    border-radius: 10px;
    background: #e4f3eb;
    border-left: 4px solid #16a34a;
    margin: 1rem 0;
}
.notice.error {
    background: #fff0e8;
    border-left-color: #ef4444;
}
/* ==========================================
   8. PRODUITS
   ========================================== */
.product-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #edf2f7;
}
.badge-available {
    display: inline-block;
    color: #166534;
    background: #dcfce7;
    border-radius: 30px;
    padding: .3rem .7rem;
    font-size: .8rem;
    font-weight: 700;
}
.badge-unavailable {
    display: inline-block;
    color: #92400e;
    background: #fef3c7;
    border-radius: 30px;
    padding: .3rem .7rem;
    font-size: .8rem;
    font-weight: 700;
}
/* ==========================================
   9. PAGE D'ACCUEIL - HERO
   ========================================== */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 3rem 0 5rem;
    margin-top: 0;
}
.hero-content h1 {
    font-size: clamp(2.3rem, 4.5vw, 4rem);
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin: 1.2rem 0;
}
.hero-content h1 span {
    display: block;
    color: var(--success);
}
.hero-content > p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 550px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}
.hero-actions .btn {
    padding: 1rem 1.4rem;
}
.hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .85rem;
    color: #475569;
}
/* ==========================================
   10. GRANDE PHOTOGRAPHIE
   ========================================== */
.hero-visual {
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 20px 50px rgba(20, 45, 65, .18);
    background: #dce6eb;
    min-height: 320px;
}
.hero-visual img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
}
/* ==========================================
   11. SECTIONS COMMERCIALES
   ========================================== */
.landing-section {
    padding: 3rem 0;
}
.section-heading {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 3rem;
}
.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: -.7px;
}
.section-heading p {
    color: var(--muted);
    font-size: 1.05rem;
}
/* ==========================================
   12. FONCTIONNALITES
   ========================================== */
.feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.feature-card {
    padding: 2rem;
}
.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-size: 1.2rem;
}
.feature-card p {
    color: var(--muted);
}
/* ==========================================
   13. TYPES D'ETABLISSEMENTS
   ========================================== */
.establishment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.establishment-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.establishment-icon {
    display: block;
    font-size: 2.8rem;
    margin-bottom: 1rem;
}
.establishment-card p {
    color: var(--muted);
}
/* ==========================================
   14. APPEL A DEMONSTRATION
   ========================================== */
.demo-section {
    text-align: center;
    padding: 4rem 2rem;
    margin: 3rem 0;
    background: linear-gradient(
        120deg,
        #102d3a,
        #173c4b
    );
    color: white;
    border-radius: 24px;
    box-shadow:
        0 16px 40px rgba(20, 45, 65, .15);
}
.demo-section h2 {
    color: white;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    max-width: 650px;
    margin: 1rem auto;
}
.demo-section p {
    color: #d6e5eb;
    max-width: 650px;
    margin: 1rem auto;
}
.demo-section .eyebrow {
    color: #f7b955;
}
/* ==========================================
   15. PIED DE PAGE
   ========================================== */
footer {
    text-align: center;
    color: var(--muted);
    padding: 2rem 1rem;
    font-size: .9rem;
}
/* ==========================================
   16. TABLETTES
   ========================================== */
@media (max-width: 850px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-visual img {
        height: 320px;
    }
    .establishment-grid {
        grid-template-columns: 1fr;
    }
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* ==========================================
   17. SMARTPHONES
   ========================================== */
@media (max-width: 600px) {
    header {
        padding: 1rem;
    }
    header span {
        display: none;
    }
    main {
        padding: 1.5rem 1rem 3rem;
    }
    .between {
        flex-direction: column;
        align-items: stretch;
    }
    .cards {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 1.2rem;
    }
    .hero {
        padding: 1rem 0 3rem;
    }
    .hero-content h1 {
        font-size: 2.3rem;
    }
    .hero-visual {
        min-height: 240px;
    }
    .hero-visual img {
        height: 240px;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .feature-grid,
    .establishment-grid {
        grid-template-columns: 1fr;
    }
    .landing-section {
        padding: 2rem 0;
    }
    .section-heading {
        margin-bottom: 2rem;
    }
    .demo-section {
        padding: 3rem 1.2rem;
    }
    .btn,
    button {
        min-height: 44px;
    }
}
/* ==========================================
   18. ACCESSIBILITE
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================
   19. ECRAN CUISINE : DEUX COLONNES
   ========================================== */
.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}
.kitchen-column {
    min-width: 0;
    height: min(75vh, 850px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    border-radius: 12px;
    scrollbar-gutter: stable;
}
.kitchen-column .card {
    width: 100%;
}
.kitchen-column .between {
    flex-direction: row;
    align-items: center;
}
.kitchen-column h2 {
    font-size: clamp(1rem, 1.8vw, 1.4rem);
}
/* Deux colonnes maintenues sur petits ecrans :
   defilement horizontal de l'ensemble si necessaire. */
@media (max-width: 700px) {
    .kitchen-grid {
        grid-template-columns: repeat(2, minmax(320px, 1fr));
        overflow-x: auto;
        gap: 12px;
    }
    .kitchen-column {
        height: 70vh;
        padding: 6px;
    }
}

/* ==========================================
   20. FORMULAIRES SERVEUR SUR SMARTPHONE
   ========================================== */
@media (max-width: 600px) {
    /* Nouvelle commande : plat a gauche, quantite a droite */
    #nouvelle-commande form .between,
    #commandes-servies form .between {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
    }

    #nouvelle-commande form .between label,
    #commandes-servies form .between label {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 14px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    #nouvelle-commande form .between input[type="number"] {
        flex: 0 0 60px;
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        margin: 0;
        padding: 8px 4px;
        text-align: center;
    }

    /* Commandes servies : garder - quantite + sur la meme ligne */
    #commandes-servies form .between > div {
        flex-shrink: 0;
    }

    #commandes-servies form .between button {
        min-width: 34px;
        min-height: 40px;
        padding: 6px 8px;
    }

    #commandes-servies form .between input[type="number"] {
        width: 44px !important;
        min-width: 44px;
        max-width: 44px;
        padding: 6px 2px;
        text-align: center;
        margin: 0;
    }
}
