* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 15px;
}

/* ================================
   COULEURS CUISINIERS
================================ */
.cook-1 { background: #007aff !important; color: white !important; }
.cook-2 { background: #ff9f0a !important; color: white !important; }
.cook-3 { background: #34c759 !important; color: white !important; }
.cook-4 { background: #af52de !important; color: white !important; }
.cook-5 { background: #ff375f !important; color: white !important; }



/* ================================
   LOGIN
================================ */
#login-section {
    max-width: 360px;
    margin: 60px auto;
    padding: 32px 24px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.33);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#login-section h1 {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    color: #111;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#login-form input {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #d1d1d3;
    background: #fafafa;
    font-size: 16px;
    transition: all 0.2s ease;
}

#login-form input:hover {
    background: #fff;
    border-color: #bbb;
}

#login-form input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
}

#login-form button {
    padding: 14px;
    background: linear-gradient(135deg, #007aff, #0060d4);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#login-form button:hover {
    background: linear-gradient(135deg, #0a88ff, #0070e0);
}

#login-form button:active {
    transform: scale(0.98);
}


/* ================================
   HEADER
================================ */
#app-header {
    background: white;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid #e0e0e0;
}
#cook-name {
    padding: 0px 15px; 
    font-size: 1.3em;
}

#logout-btn {
    padding: 8px 14px;
    background: #e63946;
    color: white;
    border-radius: 10px;
}


/* ================================
   NAVIGATION
================================ */
#main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    padding: 8px 0;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
}

#main-nav button {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f0f0f2;
    font-weight: 500;
}

#main-nav button.active {
    background: #007aff;
    color: white;
}


/* ================================
   SWITCH MIDI / SOIR
================================ */
#mep-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

#mep-switch button {
    flex: 1;
    padding: 10px 0;
    border-radius: 12px;
    background: #e9e9eb;
    font-weight: 600;
}

#mep-switch button.active {
    background: #007aff;
    color: white;
}


/* ================================
   GROUPES MEP
================================ */
#mep-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.mep-group {
    padding: 8px 12px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    font-size: 14px;
}


/* ================================
   ITEMS MEP
================================ */
.mep-group-section {
    margin-bottom: 22px;
}

.mep-group-section h3 {
    margin-bottom: 8px;
    font-size: 17px;
}

.mep-items-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    cursor:pointer;
}

.mep-item {
    padding: 10px 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: .2s;
}

.mep-item:hover {
    transform: translateY(-2px);
}


/* ================================
   FORMULAIRE CRÉATION ITEM
================================ */
#mep-create-item {
    background: white;
    padding: 14px;
    border-radius: 14px;
    margin-top: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

#mep-create-item input,
#mep-create-item select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #d1d1d3;
    margin-bottom: 10px;
    background: #fafafa;
}

#mep-add-item-btn {
    width: 100%;
    padding: 12px;
    background: #007aff;
    color: white;
    border-radius: 10px;
}


/* ================================
   COMMANDES
================================ */
#order-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.order-group {
    padding: 8px 14px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.order-item {
    padding: 10px 12px;
    background: white;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* ============ FIX STYLE FORMULAIRE COMMANDES ============ */
#order-create-item {
    background: white;
    padding: 14px;
    border-radius: 14px;
    margin-top: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

#order-create-item input,
#order-create-item select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #d1d1d3;
    margin-bottom: 10px;
    background: #fafafa;
    font-size: 15px;
}

#order-add-item-btn {
    width: 100%;
    padding: 12px;
    background: #007aff;
    color: white;
    border-radius: 10px;
}

/* ================================
   MA LISTE
================================ */

#my-list-container {
    list-style: none;
    padding: 0;
    margin: 0;
}

#my-list-container li {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.mylist-cell {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 10px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 1rem;
    font-weight: 500;

    box-shadow:
        0 2px 4px rgba(0,0,0,0.05),
        0 1px 2px rgba(0,0,0,0.08);

    transition: transform 0.12s ease, background 0.2s ease;
}

.mylist-cell:active {
    transform: scale(0.97);
    background: #f5f5f7;
}

.mylist-cell.disabled {
    opacity: 0.55;
    pointer-events: none;
}

.mylist-label {
    color: #222;
}

/* Checkbox iPhone */
.mylist-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #d0d0d2;
    background: white;
    transition: all 0.2s ease;
}

.mylist-check.on {
    background: #34c759;
    border-color: #34c759;
    box-shadow: inset 0 0 0 3px white;
}

/* Quand une tâche est faite */
.my-list-item.done .mylist-label {
    color: #999;
    text-decoration: line-through;
}


/* commandes dans ma liste (grisé) */
.my-list-order {
    opacity: 0.6;
    pointer-events: none;
}

/* ================================
   ITEMS TERMINÉS
================================ */
.done {
    opacity: 0.55;
    text-decoration: line-through;
}

/* FIX CLICS — IMPORTANT */
#app-section {
    display:block;
    position: relative;
    z-index: 1;
}

#app-section-content {
    margin-top:30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#selection-date {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    font-size: 1.3em;
}

#selection-date > div {
    display: flex;
    gap:15px;
}

.view {
    border-radius: 7px;
    background:white;
    padding: 15px 30px;
    position: relative;
    z-index: 10;
    box-shadow: 0 6px 24px rgba(0,0,0,0.33);
}
/* ================================
   DRAWER - MA LISTE
================================ */
#mylist-drawer {
    position: fixed;
    top: 0;
    right: -100%;     /* caché par défaut */
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 14px rgba(0,0,0,0.1);

    padding: 20px;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    gap: 15px;

    transition: right 0.35s ease;
}

#mylist-drawer.open {
    right: 0;
}

#mylist-header {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 10px;
}

#mylist-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

/* On rend la vue principale légèrement grisée si drawer ouvert */
body.drawer-open {
    overflow: hidden;
}
body.drawer-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 9000;
}

/* Listes existantes */
#my-list-container {
    padding: 0;
    margin: 0;
}
/* ================================
   BOUTON FLOTTANT "MA LISTE"
================================ */
#mylist-open-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    
    width: 60px;
    height: 60px;

    border-radius: 20px; /* un carré arrondi façon iOS 17 */
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(14px);

    color: #007aff;
    font-size: 26px;
    font-weight: 600;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
    cursor: pointer;

    z-index: 9500;
    transition: all .25s ease;
}

#mylist-open-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
}
#mylist-open-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    
    width: 60px;
    height: 60px;

    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(14px);

    color: #007aff;
    font-size: 26px;
    font-weight: 600;

    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;

    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
    cursor: pointer;

    z-index: 9500;
    transition: all .25s ease;
}

#mylist-open-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
}


/* BADGE COMPTEUR */
#mylist-badge {
    position: absolute;
    top: -4px;
    right: -4px;

    min-width: 22px;
    height: 22px;

    background: #ff3b30;
    color: white;

    font-size: 13px;
    font-weight: 600;
    padding: 0 6px;

    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);

    display: none; /* masqué si compteur = 0 */
    align-items: center;
    justify-content: center;

    pointer-events: none;
}


.checkbox-field {
    display: flex;
    gap: 8px;
    margin: 6px 0;
    cursor: pointer;
    padding: 0 0 10px 10px;
}

.checkbox-field input[type="checkbox"] {
    width: 20px !important; /* fuck it*/
    margin:0 !important; /* fuck it*/
    height: 20px;
    accent-color: #ff4444; /* modern browsers */
    cursor: pointer;
}

.checkbox-field label {
    font-size: 15px;
    font-weight: 600;
    color: #d03434; /* slightly red because urgent */
    user-select: none;
    cursor: pointer;
}