/* --- IMPORT DE LA POLICE MODERNE --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- VARIABLES DE COULEURS --- */
:root {
    --primary: #2e7d32;      /* Vert sombre élégant */
    --primary-light: #4caf50; /* Vert vif */
    --bg-color: #f0f2f5;     /* Gris très doux pour le fond */
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --danger: #d32f2f;
    --danger-light: #ffebee;
}

/* --- BASE --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* --- HEADER ET NAVIGATION --- */
header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 10px;
    vertical-align: middle;
    font-weight: 500;
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

nav button {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

nav button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

nav button.active {
    background-color: white;
    color: var(--primary);
    border-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

nav button.btn-danger {
    border-color: rgba(255, 200, 200, 0.5);
    color: #ffcccc;
}

nav button.btn-danger:hover {
    background-color: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* --- STRUCTURE PRINCIPALE --- */
main {
    padding: 25px 20px;
    max-width: 1000px; /* Un peu plus large pour les tableaux */
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* --- CARTES (CARDS) --- */
.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card h2, .card h3 {
    margin-top: 0;
    color: var(--primary);
    font-weight: 600;
}

.stat-card ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.stat-card li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.stat-card li:last-child {
    border-bottom: none;
}

/* --- FORMULAIRES --- */
.form-group {
    margin-bottom: 20px;
}

.form-group.row {
    display: flex;
    gap: 20px;
}

.form-group.row > div {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f9fafb;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
    background-color: white;
}

/* --- BOUTONS --- */
.btn-primary {
    background-color: var(--primary-light);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- GRILLE BOISSONS (BAR) --- */
.drinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.btn-drink {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-drink:hover {
    border-color: var(--primary-light);
    background: #f1f8f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.btn-drink:active {
    transform: scale(0.95);
}

/* --- TABLEAUX --- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    background-color: #f8f9fa;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 12px 10px;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

tbody tr:hover {
    background-color: #fcfcfc;
}

/* --- PLANNING VISUEL --- */
.planning-table th, .planning-table td {
    border: 1px solid #eaeaea;
    text-align: center;
    height: 45px;
    padding: 2px;
    min-width: 50px;
}

.planning-table td.cell-room {
    text-align: left;
    font-weight: 600;
    background-color: #fdfdfd;
    padding: 0 15px;
    width: 140px;
    color: var(--text-muted);
}

.planning-table td.cell-weekend {
    background-color: #f9f9f9;
}

.resa-bar {
    background-color: var(--primary-light);
    color: white;
    font-size: 12px;
    font-weight: 500;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.resa-bar.resa-start { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.resa-bar.resa-end { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.resa-bar.resa-pending { background-color: #ff9800; }

/* --- GESTION DE L'IMPRESSION (FACTURES PDF) --- */
.print-only {
    display: none;
}

@media print {
    body * { visibility: hidden; }
    body { background-color: white; }
    #invoiceTemplate, #invoiceTemplate * { visibility: visible; }
    #invoiceTemplate {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
    }
}