﻿html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #f8f6f2;
}

/* ---------------- TITRES ---------------- */
.main-title, .main-title-flex {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
    text-align: center;
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 0.02em;
    padding: 1.1rem 0 0.7rem 0;
    margin: 0;
    border-bottom: 1px solid #eceae6;
    box-shadow: 0 4px 14px 0 rgba(100,90,80,0.11), 0 1px 0 #eceae6;
}

.main-title-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 68px;
}

/* Container principal sous le header */
.layout-container {
    display: flex;
    width: 100%;
}

.main-title-left,
.main-title-right {
    flex: 0 0 280px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.main-title-center {
    flex: 1 1 0;
    text-align: center;
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 0.02em;
    margin: 0;
    font-family: 'Noto Sans JP', 'Segoe UI', 'Arial', sans-serif;
    justify-content: center;
    align-items: center;
    display: flex;
}

@media (max-width: 600px) {
    .main-title-left, .main-title-right {
        flex: 0 0 80px;
    }

    .main-title-center {
        font-size: 1.3rem;
    }
}

/* ---------------- COLONNE JAPONAIS ---------------- */
.japan-column {
    position: sticky;
    top: 80px;
    min-width: 90px;
    max-width: 140px;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 100;
}

.japan-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #212529;
    font-family: 'Noto Sans JP', 'Yu Mincho', 'Meiryo', serif;
    font-weight: 400;
    font-size: calc((100vh - 110px) / 13);
    line-height: 1.05;
    white-space: nowrap;
    text-align: center;
    user-select: none;
    pointer-events: auto;
    text-shadow: 0 2px 10px rgba(255,255,255,0.9), 0 1px 2px #eceae6;
}

@media (max-width: 1200px) {
    .japan-column {
        min-width: 70px;
    }
}

@media (max-width: 992px) {
    .japan-column {
        position: static;
        width: 100vw;
        max-width: none;
        min-width: 0;
        height: auto;
        justify-content: flex-start;
        align-items: flex-start;
        top: 0;
        left: 0;
    }

    .japan-vertical {
        writing-mode: initial;
        text-orientation: initial;
        font-size: 1.7rem;
        text-align: left;
        margin-top: 1.2rem;
        margin-bottom: 0.8rem;
    }
}

/* ---------------- PRODUITS ---------------- */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 600;
    font-family: 'Poppins', 'Noto Sans JP', 'Segoe UI', sans-serif;
    color: #2a2b2e;
}

.btn-group.flex-wrap {
    flex-wrap: wrap;
}

.product-col {
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
}

@media (min-width: 1500px) {
    .product-col {
        flex: 0 0 calc((100% - 4rem) / 3);
        max-width: calc((100% - 4rem) / 3);
    }
}

@media (max-width: 860px) {
    .product-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.onigiri-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px 0 rgba(100,90,80,0.07);
    border: 1px solid #eceae6;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 170px;
    transition: box-shadow .15s;
    padding: 1.2rem 2rem;
    width: 100%;
    min-width: 0;
}

    .onigiri-card .btn {
        cursor: pointer;
    }

    .onigiri-card:hover {
        box-shadow: 0 8px 28px 0 rgba(100,90,80,0.14);
    }

.onigiri-img {
    max-width: 140px;
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 15px;
    margin-right: 2rem;
    background: #eceae6;
    flex-shrink: 0;
}

.onigiri-info {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
}

.onigiri-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    word-break: break-word;
}

.onigiri-desc {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 1.3rem;
    word-break: break-word;
}

.onigiri-price {
    font-size: 1.4rem;
    font-weight: 500;
    color: #212529;
    margin-top: auto;
    font-family: 'Noto Sans JP', sans-serif;
}

@media (max-width: 600px) {
    .onigiri-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1rem;
    }

    .onigiri-img {
        margin: 0 0 0.8rem 0;
    }
}

/* ---------------- CART-FAB ---------------- */
.cart-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 4000;
    background: #20c997;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    box-shadow: 0 2px 10px 0 rgba(100,90,80,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}

    .cart-fab:hover {
        background: #17a589;
    }

.cart-fab-icon {
    position: relative;
    color: #fff;
    font-size: 2rem;
}

.cart-fab-count {
    position: absolute;
    top: -7px;
    right: -10px;
    background: #dc3545;
    color: #fff;
    border-radius: 20px;
    padding: 2px 7px;
    font-size: 1rem;
    font-weight: 700;
}

.product-badge {
    position: absolute;
    top: -7px;
    right: -10px;
    background: #20c997;
    color: #fff;
    border-radius: 20px;
    padding: 2px 6px;
    font-size: 0.9rem;
    font-weight: 700;
}

@media (min-width: 1200px) {
    .cart-fab {
        display: none !important;
    }
}

.cart-anim {
    animation: popcart 0.4s;
}

@keyframes popcart {
    0% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ---------------- QTY BTN ---------------- */
.qty-btn:active {
    transform: scale(0.95);
}

.qty-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0d6efd44;
}

/* ---------------- USER INFO & ADMIN BTN ---------------- */
.user-info {
    font-size: 0.98rem;
    font-weight: 400;
    padding: 0.35rem 0.85rem 0.35rem 0.65rem;
    border-radius: 16px;
    background: #f8f6f2;
    color: #222;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 4px 0 rgba(200,180,160,0.08);
}

.header-btn {
    border-radius: 50%;
    padding: 0.38rem 0.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, color .14s;
    box-shadow: 0 1px 5px 0 rgba(0,0,0,0.08);
    width: 38px;
    height: 38px;
    border: 1px solid #eceae6;
    background: transparent; 
    color: inherit; 
}

.header-btn-success {
    background: #fff;
    color: #198754;
}

    .header-btn-success:hover,
    .header-btn-success:focus {
        background: #198754;
        color: #fff;
    }

.header-btn-danger {
    background: #fff;
    color: #dc3545;
}

    .header-btn-danger:hover,
    .header-btn-danger:focus {
        background: #dc3545;
        color: #fff;
    }

.header-btn-primary {
    background: #fff;
    color: #0d6efd;
}

    .header-btn-primary:hover,
    .header-btn-primary:focus {
        background: #0d6efd;
        color: #fff;
    }
/* ---- FULLCALENDAR : Correction des soulignements et du padding ---- */

/* Enlève les soulignements sur les noms de colonnes */
.fc-theme-bootstrap5 th, .fc-theme-bootstrap5 .fc-col-header-cell-cushion {
    border-bottom: none !important;
    text-decoration: none !important;
    padding: 12px 0 10px 0 !important;
    background: transparent;
    font-weight: 600;
    font-size: 1.13rem;
    color: #425caa;
}
/* Enlève les soulignements dans les cellules */
.fc-theme-bootstrap5 td, .fc-theme-bootstrap5 .fc-daygrid-day-frame {
    border-bottom: none !important;
    text-decoration: none !important;
    padding: 13px 0 11px 0 !important;
    background: transparent;
}
/* Padding général sur le calendrier */
#calendar {
    padding: 18px 18px 8px 18px !important;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(44,60,84,0.08);
    margin-bottom: 8px !important; /* réduit l’espace sous le calendrier */
}
/* Rendu plus "démo" sur les events */
.fc-event {
    border: none !important;
    border-radius: 7px !important;
    box-shadow: 0 2px 8px 0 rgba(40,42,49,0.10);
    margin-bottom: 2px;
    padding: 3px 8px !important;
    font-size: 1.08rem !important;
}

.fc-theme-bootstrap5 .fc-scrollgrid,
.fc-theme-bootstrap5 .fc-scrollgrid-section {
    border-radius: 12px;
    background: #fff;
}

.fc-theme-bootstrap5 .fc-daygrid-day-number {
    padding: 0.11rem 0.44rem !important;
    font-size: 1.08rem !important;
    color: #343b50 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.fc-theme-bootstrap5 .fc-day-today {
    background: #e5ecf8 !important;
    border-radius: 7px !important;
    box-shadow: 0 0 2px #0d6efd20;
}

.fc-theme-bootstrap5 .fc-daygrid-day.fc-day-today {
    border-radius: 9px !important;
}

.fc-theme-bootstrap5 .fc-daygrid-day {
    background: #fff !important;
    transition: background .16s;
}
/* Désactive le soulignement sur les liens du calendrier FullCalendar */
#calendar a,
.fc-theme-bootstrap5 a,
.fc-theme-bootstrap5 .fc-daygrid-day-number,
.fc-theme-bootstrap5 .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion {
    text-decoration: none !important;
    color: inherit !important;
}

#calendar a {
    outline: none;
}

.fc-event-bubble {
    display: flex;
    align-items: center;
    gap: 7px;
    border-radius: 7px;
    padding: 6px 13px 6px 13px;
    font-size: 1rem;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(13,110,253,0.09);
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.fc-event-title {
    flex: 1 1 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    display: inline-block;
}

.fc-event-hour {
    font-size: 0.93em;
    opacity: 0.8;
    margin-right: 4px;
    flex-shrink: 0;
}

.fc-event,
.fc-event-main {
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
}

/* ------ FLOATING ACTION BUTTON (Nouvelle livraison) ------ */
.fab-add-delivery {
    position: fixed;
    bottom: 32px;
    right: 28px;
    width: 60px;
    height: 60px;
    z-index: 4010; /* + haut que le calendrier */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14), 0 1.5px 5px rgba(44,100,200,0.10);
    transition: background 0.19s, color 0.19s, transform 0.13s;
    cursor: pointer;
    padding: 0;
}

    .fab-add-delivery:focus,
    .fab-add-delivery:hover {
        background: #198754; /* Passe au vert à l’hover, tu peux changer pour #0b5ed7 si tu veux juste bleu foncé */
        color: #fff;
        outline: none;
        transform: scale(1.09);
    }

@media (max-width: 700px) {
    .fab-add-delivery {
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
        right: 11px;
        bottom: 11px;
    }
}

.color-modal-overlay {
    position: fixed;
    z-index: 6000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30,30,36,0.23);
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-modal-dialog {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 22px rgba(0,0,0,0.13), 0 1.5px 5px rgba(44,100,200,0.07);
    padding: 2.3rem 2.2rem 1.4rem 2.2rem;
    min-width: 320px;
    max-width: 94vw;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: popinColor .21s;
}

@keyframes popinColor {
    0% {
        transform: scale(0.88);
    }

    80% {
        transform: scale(1.04);
    }

    100% {
        transform: scale(1);
    }
}

.color-modal-title {
    font-size: 1.14rem;
    font-weight: 600;
    margin-bottom: 1.3rem;
    text-align: center;
    color: #222b;
}

.color-modal-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.7rem;
}

.color-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #7a7e89;
    cursor: pointer;
    transition: color .14s;
    z-index: 20;
}

    .color-modal-close:hover {
        color: #dc3545;
    }

#colorModalInput.form-control-color {
    min-width: 80px;
    min-height: 80px;
    max-width: 120px;
    max-height: 120px;
    border-radius: 12px;
    border: none;
    background: #f8f6f2;
    box-shadow: 0 1.5px 7px #e1e7f3;
    margin: 0 auto 0.5rem auto;
    cursor: pointer;
    padding: 0;
}

.fc-event-bubble, .fc-event, .fc-daygrid-event {
    cursor: pointer !important;
}

.table td, .table th {
    vertical-align: middle;
    /* Optionnel : padding plus large pour respirer */
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.onigiri-badge {
    display: inline-block;
    padding: 0.40em 0.85em;
    font-size: 0.96em;
    font-weight: 600;
    border-radius: 12px;
    line-height: 1.25;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    min-width: 92px;
    text-align: center;
    letter-spacing: 0.01em;
    transition: background 0.13s, color 0.13s;
    margin-bottom: 1px;
    box-shadow: 0 1px 3px #dadada20;
}
.validation-message {
    color: #dc3545; /* Rouge Bootstrap, mais tu peux choisir autre chose */
    font-size: 0.97rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    display: block;
}
.validation-message {
    color: #e74c3c;
    font-weight: 500;
}
.tooltip.show {
    opacity: 1 !important;
}

.tooltip-inner {
    background-color: #f3f3f8 !important;
    color: #23232e !important;
    border-radius: 7px;
    box-shadow: 0 4px 16px #ddd4;
    font-weight: 500;
    font-size: 1.01em;
    padding: 0.5em 1.1em;
    border: 1px solid #e7e7ec;
}

.tooltip-arrow {
    color: #f3f3f8 !important;
}
.btn-fab {
    min-width: 50px;
    min-height: 50px;
    border-radius: 30px !important;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.16);
    transition: background .2s;
}
.calendar-legend {
    font-size: 1rem;
}

    .calendar-legend .btn {
        border: none;
        box-shadow: none;
    }


.toast.fade {
    transition: opacity 0.5s linear;
}
.toast.fade-out {
    opacity: 0 !important;
    transition: opacity 0.5s;
}
.legend-dot {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-right: 5px;
    border: 2.5px solid #fff;
    box-shadow: 0 1.5px 5px rgba(30,30,30,0.09);
    cursor: pointer;
    vertical-align: middle;
    transition: box-shadow .15s;
}

    .legend-dot:hover,
    .legend-dot:focus {
        box-shadow: 0 0 0 3px #20c99755;
        outline: none;
    }

.btn-xs {
    padding: 0;
    font-size: .85em;
    border-radius: .2rem;
    height: 22px;
    min-width: 22px;
}

.header-separator-bar {
    display: inline-block;
    width: 2px;
    height: 36px;
    background: #e4e7ed;
    margin: 0 0.9rem;
    border-radius: 1.5px;
    vertical-align: middle;
}
.page-link {
    cursor: pointer;
}
.page-item.disabled .page-link {
    cursor: not-allowed;
}

/* ---- Modal produit ---- */
.product-card {
    cursor: pointer;
}

.product-modal-body {
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .product-modal-body::-webkit-scrollbar {
        display: none;
}

    .product-modal-body img {
        display: block;
        width: 100%;
    }

.product-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 5;
}

.product-modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
}

/* ---------------- CART BAR ---------------- */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(32, 201, 151, 0.82);
    color: #fff;
    padding: 0.7rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transform: translateY(100%);
    transition: transform 0.3s;
    box-shadow: 0 -4px 14px 0 rgba(100,90,80,0.11), 0 -1px 0 #eceae6;
    animation: cartBarSlide 0.4s ease forwards;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    z-index: 3000;
}

.cart-bar-info {
    font-size: 1.1rem;
    font-weight: 600;
}

.cart-bar-action {
    font-weight: 500;
    font-size: 0.95rem;
}

.cart-bar.show {
    transform: translateY(0);
}

@keyframes cartBarSlide {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cart-item-controls {
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.cart-item-price {
    min-width: 65px;
    text-align: right;
}

.products-list,
.cart-container {
    padding-bottom: 5rem;
}

/* ---------------- ADMIN FAB MENU ---------------- */
.admin-fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 4020;
}

.admin-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #0d6efd;
    color: #fff;
    font-size: 1.7rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14), 0 1.5px 5px rgba(44,100,200,0.10);
    transition: background .2s, transform .15s;
}

    .admin-fab:hover {
        background: #198754;
        transform: scale(1.08);
    }

.admin-fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-fab-item {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #0d6efd;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, color .18s;
}

    .admin-fab-item:hover {
        background: #0d6efd;
        color: #fff;
    }

.fab-tooltip {
    z-index: 4050;
}

/* Couche grise affichée derrière le menu admin */
.admin-fab-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(33, 33, 33, 0.35);
    z-index: 4015;
}

/* Éditeur HTML */
.ql-container
{
    height:auto !important;
}
