/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Nouvelle Palette Verte */
    --primary-color: #017A3D;
    /* Vert foncé */
    --primary-light: #01A251;
    /* Vert clair/vif */
    --primary-dark: #005f2e;
    --accent-color: #FFC107;
    /* Jaune/Or pour les actions spéciales/étoiles */

    --background-color: #F8FBF9;
    /* Fond très légèrement vert/gris */
    --surface-color: #FFFFFF;
    /* Blanc pour les cards */

    --text-color: #2B2D42;
    --text-light: #6C757D;

    --white: #ffffff;
    --error: #FF5252;
    --success: #017A3D;

    --border-radius: 16px;
    /* Arrondis modernes */
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;

    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 10px 25px rgba(0, 122, 61, 0.15);

    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards Modernes */
.card {
    background: var(--surface-color);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

/* Forms - Styles modernes */
input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: #FAFAFA;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-light);
    outline: none;
    background: #FFF;
    box-shadow: 0 0 0 4px rgba(1, 162, 81, 0.1);
}

/* Boutons Modernes */
button {
    background: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(1, 122, 61, 0.3);
}

button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(1, 122, 61, 0.4);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background: #EDF2F7;
    /* Gris bleuté clair */
    color: var(--text-color);
    box-shadow: none;
}

button.secondary:hover {
    background: #E2E8F0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

button.delete {
    background: linear-gradient(135deg, #FF5252 0%, #FF1744 100%);
    box-shadow: 0 4px 15px rgba(255, 82, 82, 0.3);
}

/* Utility */
.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.error-msg {
    background: #FFEBEE;
    color: var(--error);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    border-left: 4px solid var(--error);
}

.success-msg {
    background: #E8F5E9;
    color: var(--success);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    border-left: 4px solid var(--success);
}

/* Login Page Modernisée */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #004D25 100%);
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: var(--border-radius-lg);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Admin Dashboard */
header {
    background: var(--surface-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .admin-layout {
        grid-template-columns: 280px 1fr;
    }
}

nav.card {
    padding: 0;
    overflow: hidden;
}

nav h3 {
    padding: 20px;
    margin: 0;
    background: var(--primary-color);
    color: white;
    font-size: 1.1rem;
}

nav ul li button {
    width: 100%;
    text-align: left;
    background: transparent;
    color: var(--text-color);
    box-shadow: none;
    border-radius: 0;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
}

nav ul li button:hover {
    background: #f0f9f4;
    color: var(--primary-color);
    padding-left: 25px;
    /* Petit effet de glissement */
}

/* Product List */
.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

.product-item:hover {
    background: #fafafa;
}

.product-item:last-child {
    border-bottom: none;
}

.product-actions button {
    margin-left: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 32px;
    border-radius: var(--border-radius-lg);
    max-width: 550px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideUp 0.3s ease;
}

.close {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    transition: var(--transition);
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

.cart-count {
    background: white;
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Day Pill Filters */
.day-pill {
    border: 1px solid #ddd;
    background: white;
    color: #555;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.day-pill:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

.day-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(1, 122, 61, 0.2);
}

/* Badge Statut */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-warning {
    background: #FFF3E0;
    color: #EF6C00;
}

.status-error {
    background: #FFEBEE;
    color: #C62828;
}

/* Simple Mode Adjustments */
body.simple-mode .cart-bar:not(#simpleReserveBar) {
    display: none !important;
}

body.simple-mode .product-card .add-btn,
body.simple-mode .product-card .qty-selector {
    display: none !important;
}

/* Ensure price IS visible in simple mode (user request) */
body.simple-mode .product-card .product-price {
    display: block !important;
}

body.simple-mode .product-card {
    cursor: pointer;
}

/* Day pill styling for simple reservation */
.day-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    color: #666;
}

.day-pill:hover:not(.active) {
    border-color: var(--primary-light);
    background: #f0f9f4;
}

.day-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}