body {
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.top-nav a {
    margin-right: 8px;
}

table.calendar {
    border-collapse: collapse;
    width: 100%;
    font-size: 11px;
}

table.calendar th,
table.calendar td {
    border: 1px solid #ccc;
    padding: 2px 4px;
    vertical-align: top;
}

.row-total td.total-cell {
    background: #f5f5f5;
    font-weight: bold;
    text-align: right;
}

.cell-assignment {
    margin-bottom: 2px;
}

.vacation {
    background: #ffd0d0;
    font-weight: bold;
}

.holiday {
    background: #d0e0ff;
    font-weight: bold;
}

table.cell-table {
    width: 100%;
    border-collapse: collapse;
}

table.cell-table td {
    border: none;
    padding: 0;
    font-size: 11px;
    line-height: 1.2;
}

.cell-proj,
.cell-emp {
    text-align: left;
}

.cell-pct {
    text-align: right;
    white-space: nowrap;
}

.pct-cell:hover {
    cursor: pointer;
    background: #eef6ff;
}

/* Style d'une assignation dans une cellule du calendrier */
.assignment-block {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #f4f8ff;
    border: 1px solid #cdd8f0;
    border-radius: 6px;
    padding: 4px 6px;

    margin-bottom: 6px; /* ← plus joli */
    font-size: 10px;
    line-height: 1.2;

    gap: 7px;
}

/* Dernière assignation sans marge */
.assignment-block:last-child {
    margin-bottom: 0;
}

/* Colonne projet/ressource */
.assignment-name {
    font-weight: 600;
    /* color: #2a4d7a; */
    max-width: 70%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Colonne % */
.assignment-pct {
    font-weight: 700;
    /* color: #0d3c61; */
}

/* Cellules cliquables */
.pct-cell:hover {
    cursor: pointer;
    background: #eef6ff !important;
}

.assignment-add {
    display: flex;
    justify-content: center;
    align-items: center;

    background: #f0f0f0;
    border: 1px dashed #cccccc;
    color: #666;
    border-radius: 4px;

    padding: 0px 4px;
    margin-bottom: 6px;

    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.assignment-add:hover {
    background: #e6e6e6;
    border-color: #aaaaaa;
    color: #333;
}

.assignment-block.non-billable {
    background: #fff4c2;
    border-color: #e6d37a;
}

.calendar-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    position: relative;
}

/* Première colonne figée */
.calendar-table th.sticky-col,
.calendar-table td.sticky-col {
    position: sticky;
    left: 0;
    background: #ffffff;
    z-index: 5;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

/* Empêche l'écrasement lors du scroll */
.calendar-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: max-content;
}

.week-sep {
    border-right: 4px solid #ccc !important;
}

.assignment-container.collapsed .assignment-block:nth-child(n+6) {
    display:none;
}

.assignment-toggle {
    padding:2px 0;
    user-select:none;
}

.assignment-toggle:hover {
    text-decoration:underline;
}

.today-col {
    background-color:#b3483a !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 3px #ffecb5;
}

/* Fix Select2 Bootstrap5 sizing */
.select2-container .select2-selection {
    min-height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Fix large white box issue */
.select2-container {
    min-width: 25% !important;
}

/* Fix X button style */
.select2-selection__choice__remove {
    font-weight: bold;
    font-size: 0.8em;
    font-size: 0;
    color: #222 !important;
    border: none !important;
    border-right: none !important;
    box-shadow: none !important;
    margin: 0;
    padding: 0;
}

.select2-selection__choice {
    background-color: rgb(245, 246, 250) !important;
    border: none !important;
    color: rgb(0, 0, 0) !important;
    padding: 2px 6px !important;
    border-radius: .25rem !important;
}

/* Empêche le multi-select Select2 d'ajouter une nouvelle ligne */
.select2-selection--multiple {
    white-space: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

/* Empêche le textarea-like effect */
.select2-selection--multiple .select2-selection__rendered {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    gap: 4px;
}

/* Empêche le saut automatique de ligne */
.select2-selection__choice {
    white-space: nowrap !important;
}

/* Corrige la hauteur */
.select2-container--bootstrap-5 .select2-selection--multiple {
    min-height: calc(1.5rem + 2px) !important;
    height: auto !important;
    padding: .25rem .5rem !important;
}

/* Le champ de recherche reste sur la même ligne */
.select2-search--inline {
    display: inline-flex !important;
}

.select2-search__field {
    width: auto !important;
    min-width: 120px;
}

.fw-normal-reset {
    font-weight: normal !important;
    color: #72787e; /* gris pâle Bootstrap */
    font-style: italic;
  }

  .btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #f3f3f3;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-microsoft:hover {
    background-color: #e8e8e8;
    border-color: #c8c8c8;
}

.ms-logo {
    width: 20px;
    height: 20px;
}

/* Variante pour fonds pâles */
.assignment-tentative--dark {
    border: 1px dashed rgba(0,0,0, 0.8) !important;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(0,0,0,0.15),
        rgba(0,0,0,0.15) 6px,
        rgba(0,0,0,0) 6px,
        rgba(0,0,0,0) 12px
    ) !important;
}

/* Variante pour fonds foncés */
.assignment-tentative--light {
    border: 1px dashed rgba(255,255,255,0.8) !important;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.35),
        rgba(255,255,255,0.35) 6px,
        rgba(255,255,255,0) 6px,
        rgba(255,255,255,0) 12px
    ) !important;
}

/* Commun */
.assignment-tentative--dark,
.assignment-tentative--light {
    opacity: 0.8;
    border-radius: 4px;
}

.tentative-label {
    margin-left: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    border: 1px dashed #6c757d;
    border-radius: 6px;
    background-color: rgba(108,117,125,0.08);
    vertical-align: middle;
}

.calendar .weekend {
    background-color: #f2f2f2;
    color: #999;
}

.calendar th.weekend {
    background-color: #d5d5d5;
    color: #999;
}

.calendar .weekend .assignment {
    opacity: 0.9;
}

/* Survol doux des lignes de projets */
.table-hover tbody tr.project-row,
.table-hover tbody tr.employee-row {
    transition: background-color 0.5s ease-in-out;
}

.table-hover tbody tr.project-row td,
.table-hover tbody tr.employee-row td  {
    background-color: rgba(0, 0, 0, 0); /* */
}

.table-hover tbody tr.project-row:hover,
.table-hover tbody tr.employee-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr.project-row:hover td,
.table-hover tbody tr.employee-row:hover td {
    transition: background-color 0.5s ease-in-out;
}