:root {
    --primary: #2e7d32; /* Vert Nature */
    --secondary: #1976d2; /* Bleu Sport */
    --dark: #333;
    --light: #f4f4f4;
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background-color: var(--light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
}

.nav-links a:hover { 
    color: var(--primary); 
}


.logo-cap {
    width: 140px;
    height: auto;
}

/* Dashboard */
.grid-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* Tableau d'inventaire */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.inventory-table th {
    background-color: #2e7d32;
    color: white;
    padding: 15px;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.inventory-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #cacaca;
    color: #333;
}

.inventory-table tr:hover {
    background-color: #f9f9f9;
}

/* Badge Tableau */
.badge-category {
    background: #e8f5e9;
    color: #1b5e20;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-etat {
    font-style: italic;
    color: #666;
}

/* Badge Rouge/Orange Tableau */

/* Etat Mauvais (Rouge) */
.row-critical {
    background-color: #ffbbc6 !important; 
}
.row-critical td {
    color: #b71c1c !important;
}

/* Etat Moyen (Orange) */
.row-warning {
    background-color: #ffedd2 !important; /* Orange très clair */
}
.row-warning td {
    color: #e65100 !important; /* Texte orange foncé/marron pour le contraste */
}

/* Style commun pour les états signalés */
.row-critical .status-etat, .row-warning .status-etat {
    font-weight: bold;
    text-transform: uppercase;
}

/* Filtre Tableau */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: bold;
    font-size: 0.9rem;
    color: #444;
}

.filter-group input, .filter-group select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-group input:focus {
    border-color: #2e7d32;
    outline: none;
    box-shadow: 0 0 5px rgba(46, 125, 50, 0.2);
}

/* Bouton Ajouter Principal */
.btn-add-main {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #218839;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-add-main:hover { 
    background-color: #218838; 
}

/* section bouton Ajouter / Gérer */
.actions-wrapper {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    align-items: center;
}


.actions-wrapper .btn-add-main {
    margin-top: 0;
    width: auto;
}

/* cColonne Actions & Boutons */

.inventory-table td.col-actions {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    width: 80px;
}

.action-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.btn-icon {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1.2rem;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    text-decoration: none;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* Fenêtre Pop-up (Modale) */
.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.6); 
    z-index: 9999; 
    justify-content: center; 
    align-items: center;
}

/* Conteneur de la Modale */
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 550px; /* Largeur confortable */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group-modal {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Labels et Inputs */
.form-group-modal label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.form-group-modal input, 
.form-group-modal select, 
.form-group-modal textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group-modal input:focus {
    border-color: #007bff;
}

/* Cas particulier du commentaire (pleine largeur) */
.full-width {
    width: 100%;
    margin-bottom: 15px;
}

/* Boutons */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-delete {
    padding: 8px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-delete:hover { 
    background: #28a745; 
}

.btn-cancel { 
    padding: 10px 15px; 
    background: #ddd; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer; 
}

.btn-submit { 
    padding: 10px 15px; 
    background: #28a745; 
    color: white; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer; 
}



/* PAGE AGENDA / LOCATION */

.agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.agenda-column {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #ddd;
}

.column-header {
    background: var(--primary);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.column-content {
    padding: 15px;
    min-height: 200px;
}

.reservation-card {
    background: #e3f2fd;
    border-left: 4px solid var(--secondary);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.no-res {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 20px;
}

.gantt-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #ddd;
}

.gantt-container {
    overflow-x: auto; 
    display: flex;
    flex-direction: column;
}

.gantt-header, .gantt-row {
    display: flex;
    width: fit-content;
}

.gantt-label-column {
    width: 180px;
    flex-shrink: 0;
    background: #f8f9fa;
    padding: 15px;
    border-right: 2px solid var(--primary);
    position: sticky;
    left: 0;
    z-index: 20;
    border-bottom: 1px solid #eee;
}

.gantt-time-slots {
    display: flex;
    position: relative;
    width: 1000px;
}

.time-slot-head, .time-slot-cell {
    width: 100px;
    min-width: 100px;
    flex-shrink: 0;
    box-sizing: border-box;
    border-right: 1px solid #eee;
    text-align: center;
}

.time-slot-head {
    padding: 15px 0;
    background: #f8f9fa;
    font-weight: bold;
    color: #666;
    border-bottom: 2px solid var(--primary);
}

.time-slot-cell {
    height: 60px;
    background-image: linear-gradient(to right, #f9f9f9 1px, transparent 1px);
}

.gantt-row:hover .gantt-label-column { 
    background: #e9ecef; 
}

.gantt-row:hover { 
    background: #fdfdfd; 
}

.gantt-bar {
    position: absolute;
    top: 10px;
    height: 40px;
    background: rgba(40, 167, 69, 0.85);
    color: white;
    border-radius: 4px;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    border: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5px;
    overflow: hidden;
}

.bar-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.bar-client {
    font-weight: bold;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-time {
    font-size: 0.7rem;
    opacity: 0.9;
    white-space: nowrap;
}

.time-slot-cell {
    width: 100px;
    height: 60px;
    flex-shrink: 0;
    border-right: 1px solid #e2e2e2;
    box-sizing: border-box;
}
/* blocs de réservation */
.reservation-block {
    position: absolute;
    left: 5px;
    right: 5px;
    background: rgba(25, 118, 210, 0.15);
    border-left: 4px solid var(--secondary);
    border-radius: 4px;
    padding: 5px;
    font-size: 0.8rem;
    overflow: hidden;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.reservation-block:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 20;
    background-color: rgba(40, 167, 69, 0.3);
}

.no-booking {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: #999;
    font-style: italic;
}

.reservation-block strong {
    display: block;
    color: #155724;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 2px;
}

.date-selector input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: inherit;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-arrows {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-date-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    min-width: 250px;
    text-align: center;
}

.btn-nav {
    text-decoration: none;
    color: #28a745;
    font-weight: bold;
    padding: 8px 15px;
    border: 1px solid #28a745;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-nav:hover {
    background: #28a745;
    color: white;
}

.nav-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.date-picker-form input[type="date"] {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
}



/* Footer */
.main-footer {
    margin-top: 50px;
    padding: 20px 0;
    background: var(--dark);
    color: white;
    text-align: center;
}

