.month {
    display: block;
}

.month-header {
    
    display: flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertical */

    height: 40px;
    background: #ddd;
    border: 1px solid #999;
    box-sizing: border-box;
    text-align: center;
}

.month-body {
    display: block;
}

.weeks-row {
    display: flex;
    height: 40px;
}

.totals-row {
    display: flex;
    height: 40px;
}

.table-3x2 {
    display: grid;
    grid-template-columns: 80px 80px 80px;
    grid-template-rows: 40px 40px ;
}

.week-header {
    flex-shrink: 0;
    height: 40px;
    background: #eee;
    border: 1px solid #999;
    box-sizing: border-box;

    display: flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertical */
}

.total-header {
    flex-shrink: 0;
    height: 40px;
    background: #eee;
    border: 1px solid #999;
    box-sizing: border-box;
    text-align: center;
}

.body-row {
    display: flex;
    height: 40px;
}

.month_total{
    flex-shrink: 0;
    width: 33px;
    height: 40px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.cell {
    flex-shrink: 0;
    width: 33px;
    height: 40px;
    border: 1px solid #bbb;
    box-sizing: border-box;
    font-size: 10px;
}

.cell {
    position: relative;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

/* Bandeau gauche */
/* =========================================
   SIDEBAR
   ========================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 280px;
    height: 100vh;

    background: #f8fafc;
    border-right: 1px solid #e2e8f0;

    z-index: 1000;

    transition: transform 0.3s ease;

    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.04);
}


/* =========================================
   CONTENU
   ========================================= */

.sidebar-content {
    padding: 28px 20px;

    height: 100%;

    overflow-y: auto;
}


/* =========================================
   TITRE
   ========================================= */

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 28px;
}

.sidebar-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #e0ecff;

    font-size: 20px;
}

.sidebar-title h2 {
    margin: 0;

    font-size: 20px;
    font-weight: 700;

    color: #172033;
}

.sidebar-subtitle {
    display: block;

    margin-top: 3px;

    font-size: 12px;

    color: #94a3b8;
}


/* =========================================
   STATISTIQUES
   ========================================= */

.stats-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 0px;

    margin-bottom: 15px;
}

.stat-card {
    position: relative;

    padding: 14px;

    min-height: 80px;

    border-radius: 14px;

    background: white;

    border: 1px solid #e2e8f0;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);

    overflow: hidden;
}

.stat-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 10px;
    height: 100%;
}

.stat-card.classic::before {
    background: orange;
}

.stat-card.rbnb::before {
    background: yellow;
}

.stat-card.total-card {
    grid-column: 1 / -1;

    background: #172033;
    border-color: #172033;
}

.stat-card.total-card::before {
    background: #3b82f6;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;

    color: #64748b;

    margin-bottom: 5px;
}

.total-card .stat-label {
    color: #94a3b8;
}

.stat-value {
    font-size: 25px;
    font-weight: 700;

    color: #172033;
}

.total-card .stat-value {
    color: white;
}


/* =========================================
   SECTION
   ========================================= */

.sidebar-section {
    margin-bottom: 22px;
}

.sidebar-section label {
    display: block;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 700;

    color: #64748b;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* =========================================
   SELECT
   ========================================= */

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "⌄";

    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-50%);

    color: #64748b;

    pointer-events: none;
}

#year {
    width: 100%;

    padding: 12px 40px 12px 14px;

    border: 1px solid #dbe2ea;
    border-radius: 10px;

    background: white;

    color: #172033;

    font-size: 14px;
    font-weight: 600;

    outline: none;

    cursor: pointer;

    appearance: none;

    transition: border 0.2s, box-shadow 0.2s;
}

#year:hover {
    border-color: #94a3b8;
}

#year:focus {
    border-color: #3b82f6;

    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}


/* =========================================
   BOUTONS
   ========================================= */

.sidebar-actions {
    display: flex;
    flex-direction: column;

    gap: 10px;

    margin-bottom: 20px;
}

.sidebar-button {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 12px 15px;

    border: none;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.sidebar-button span {
    font-size: 18px;
}

.sidebar-button:hover {
    transform: translateY(-1px);
}

.sidebar-button:active {
    transform: translateY(0);
}


/* Ajouter contrat */

.sidebar-button.primary {
    background: #2563eb;

    color: white;

    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.sidebar-button.primary:hover {
    background: #1d4ed8;

    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.25);
}


/* Excel */

.sidebar-button.excel {
    background: #e8f7ef;

    color: #16804a;
}

.sidebar-button.excel:hover {
    background: #d8f2e3;
}


/* =========================================
   INFO
   ========================================= */

.info {
    padding: 14px;

    min-height: 40px;

    border-radius: 10px;

    background: white;

    border: 1px solid #e2e8f0;

    color: #64748b;

    font-size: 13px;
}


/* =========================================
   BOUTON FERMER SIDEBAR
   ========================================= */

.toggle-button {
    position: absolute;

    top: 15px;
    right: -40px;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 0 8px 8px 0;

    background: #2563eb;

    color: white;

    font-size: 24px;

    cursor: pointer;

    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1);

    transition: background 0.2s;
}

.toggle-button:hover {
    background: #1d4ed8;
}
/* Calendrier */
.calendar {
    margin-left: 280px;

    min-height: 100vh;

    padding: 20px;

    overflow-x: auto;
    overflow-y: auto;

    transition: margin-left 0.3s ease;
}

/* Scrollbar horizontale fixe en bas de l'écran */
#fixed-horizontal-scroll {
    position: fixed;
    bottom: 0;
    left: 280px;
    right: 0;
    height: 18px;

    overflow-x: auto;
    overflow-y: hidden;

    z-index: 9999;
    background: #f5f5f5;
}

#scroll-content {
    height: 1px;
    width: 0;
}

/* Sidebar repliée */
.sidebar.collapsed {
    transform: translateX(-280px);
}

/* Calendrier prend toute la largeur quand la sidebar est fermée */
.calendar.expanded {
    margin-left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 22px;
}

.button {
  
    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}


.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;

    margin-bottom: 25px;
}

.sidebar-section label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.sidebar-section select {
    width: 100%;

    padding: 10px 12px;

    border: 1px solid #ccc;
    border-radius: 6px;

    background: white;

    font-size: 15px;

    cursor: pointer;
}

.info {
    padding: 15px;

    background: white;

    border: 1px solid #ddd;
    border-radius: 8px;
}

.info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.info p {
    margin: 0;

    color: #666;
    font-size: 14px;
}

.cell.reserved:hover::after {
    content: attr(data-tooltip);

    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);

    background: black;
    color: white;

    padding: 5px 8px;
    border-radius: 4px;

    white-space: pre-line;
    z-index: 9999;

    font-size: 12px;
    width: 150px;  
}

.month {
    margin-bottom: 20px;
}

.named {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000;
}

.name {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000;
}

.void{
    border: 1px solid white;
    background-color: white;

}

.total_RBNB{
  background-color: yellow;
}

.total{
  background-color: orange;
}

.cell.reserved {
    border-left: none;
    border-right: none;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color :#ccc;
}

.cell.reserved.start {

    background-color :green;
}

.cell.reserved.end {

    background-color :red;
}

.cell.reserved.start.end {
    position: relative;
    background: none;
    padding: 0;
    overflow: hidden;
}

.cell.reserved.start.end::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: red;
}

.cell.reserved.start.end::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: green;
}

.cell.app {

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
 
}

.shift {
    margin-left: 33px;
}

