/* ===== STYLES PERSONNALISÉS ===== */

/* Forcer le navigateur à ignorer le thème système */
html {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    html:not(.dark) {
        color-scheme: light;
    }
}

.white-bag {
    background-color: white;
}

/* Icônes Remix */
:where([class^="ri-"])::before {
    content: "\f3c2";
}

body {
    font-family: 'Poppins', sans-serif;
}

/* Slider Hero */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Testimonials */
.testimonial-slider {
    overflow: hidden;
}

.testimonial-slide {
    transition: transform 0.5s ease;
}

/* Scroll personnalisé */
.category-scroll {
    overflow-x: auto;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.search-input:focus {
    outline: none;
}

/* Checkbox personnalisé */
.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #FF6B35;
    border-color: #FF6B35;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Switch personnalisé */
.custom-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: #FF6B35;
}

input:checked + .switch-slider:before {
    transform: translateX(24px);
}

/* Étoiles de notation */
.star-rating {
    display: inline-flex;
    font-size: 1.25rem;
    color: #FFD700;
}

/* Animations cartes */
.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-item:hover {
    transform: scale(1.05);
}

/* Spinner */
#loadingSpinner {
    transition: opacity 0.5s ease;
}

#loadingSpinner.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Input number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Badges et notifications */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ce1212;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.low-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffcc00;
    color: #333;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.delivery-time {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 14px;
}

.rating-stars {
    color: #FFD700;
}

/* Progress bar */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e0e0e0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #ce1212;
    transition: width 0.5s ease;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Font Pacifico */
.font-pacifico {
    font-family: 'Pacifico', cursive;
}

/* Menu mobile */
.mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.open {
    max-height: 500px;
}

/* Order Tracker */
#orderTrackerHandle {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#orderTrackerWidget {
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#orderTrackerWidget:active {
    box-shadow: 0 20px 45px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

#orderTrackerBody {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 500px;
    opacity: 1;
}

#orderTrackerBody.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Scrollbar personnalisée */
#orderTrackerContent::-webkit-scrollbar {
    width: 4px;
}

#orderTrackerContent::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

#orderTrackerContent::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

#orderTrackerContent::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation pour le badge */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#orderCountBadge {
    animation: pulse 2s infinite;
}

/* Styles supplémentaires pour garantir la visibilité du bouton */
#openOrderTracker {
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10000 !important;
}

/* Garantir que le bouton est toujours visible sur mobile */
@media (max-width: 768px) {
    #openOrderTracker {
        width: 50px !important;
        height: 50px !important;
        bottom: 80px !important;
        right: 20px !important;
        left: auto !important;
        top: auto !important;
    }
    
    body > *:not(#openOrderTracker) {
        z-index: auto !important;
    }
}

/* ===== STYLES PERSONNALISÉS ===== */

/* ===== COULEURS PERSONNALISÉES ===== */
.bg-black-custom {
    background-color: #000000;
}

/* Icônes Remix */
:where([class^="ri-"])::before {
    content: "\f3c2";
}

.z-modal {
    z-index: 9999;
}

.z-header {
    z-index: 1111;
}