/* Couleurs et fond général */
body.intra-body {
    background-color: #1f3455; /* bleu fond */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Conteneur principal de la page */
.page-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}

/* Bandeau du haut */
.intra-topbar {
    background-color: #1f3455;
    color: #ffffff;
}

.intra-topbar-title {
    font-size: 2rem;
    font-weight: 700;
}

/* Barre de navigation */
.intra-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #d0d0d0;
}

.intra-navbar .nav-link {
    color: #333333;
    font-weight: 500;
    padding-left: 1rem;
    padding-right: 1rem;
}

.intra-navbar .nav-link:hover,
.intra-navbar .nav-link:focus,
.intra-navbar .nav-link.active {
    color: #007bff;
}

/* Cartes de contenu */
.intra-content-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.intra-content-card .card-body {
    padding: 0;
}

/* Cartes de la colonne de droite */
.intra-sidebar-card {
    border-radius: 0;
    border: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.intra-sidebar-card .card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

/* Footer */
.intra-footer {
    color: #ffffff;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Petites aides */
h1.page-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

/* Style des niveaux de sous-menu */
.dropdown-item.submenu-level-2 {
    font-weight: 500;
}

/* Niveau 3 : légèrement décalé + couleur */
.dropdown-item.submenu-level-3 {
    padding-left: 25px !important;
    color: #444;
    font-style: italic;
}

/* Niveau 4 : encore plus décalé */
.dropdown-item.submenu-level-4 {
    padding-left: 40px !important;
    color: #666;
    font-style: italic;
}


/* Niveau 3 : légère réduction de taille */
.dropdown-item.submenu-level-3 {
    font-size: 0.90rem !important;
    padding-left: 26px !important;
    color: #444;
    font-style: italic;
}

/* Niveau 4 et suivants (au cas où) */
.dropdown-item.submenu-level-4,
.dropdown-item.submenu-level-5 {
    font-size: 0.85rem !important;
    padding-left: 34px !important;
    color: #555;
    font-style: italic;
}
/* Forcer la scrollbar verticale pour éviter les décalages de page */
html { overflow-y: scroll; }

/* ============================================================
   CALENDRIER SIDEBAR
   ============================================================ */

/* ---- Carte calendrier ---- */
.intra-calendar-card {
    overflow: hidden;
}
.intra-calendar-card .card-header {
    background: linear-gradient(135deg, #1f3455 0%, #2a4a7a 100%);
    border-bottom: none;
    padding: 0.6rem 0.75rem;
}
.intra-calendar-card .card-header .cal-month-title {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.intra-calendar-card .card-header a.cal-nav {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    font-size: 0.85rem;
}
.intra-calendar-card .card-header a.cal-nav:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}
.intra-calendar-card .card-body {
    padding: 0.6rem 0.6rem 0.75rem;
}

/* ---- Grille ---- */
.intra-cal-table {
    border-collapse: separate;
    border-spacing: 2px;
    table-layout: fixed;
    width: 100%;
}
.intra-cal-table thead th {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #9aa5b8;
    padding: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.intra-cal-table thead th.cal-th-weekend {
    color: #c8cdd6;
}

/* Cellule jour */
.intra-cal-day {
    text-align: center;
    vertical-align: middle;
    padding: 0;
    cursor: default;
    border-radius: 6px;
    transition: background 0.12s;
    height: 34px;
    position: relative;
}
.intra-cal-day:hover:not(.cal-today) {
    background: #eef2ff;
}

/* Contenu interne de chaque jour : flex colonne */
.cal-day-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 34px;
    gap: 2px;
    padding: 2px 0;
}

.cal-day-num {
    font-size: 0.78rem;
    line-height: 1;
    color: #2d3748;
    font-weight: 500;
}
.cal-weekend .cal-day-num {
    color: #b0b8c8;
    font-weight: 400;
}

/* Jour actuel */
.cal-today .cal-day-inner {
    background: #1f3455;
    border-radius: 6px;
}
.cal-today .cal-day-num {
    color: #fff;
    font-weight: 700;
}

/* ---- Pastilles ---- */
.cal-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    min-height: 8px;
}
.cal-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.cal-dot-extra {
    font-size: 0.55rem;
    color: #8a93a8;
    line-height: 1;
    font-weight: 600;
}

/* ---- Légende ---- */
.cal-legend {
    border-top: 1px solid #edf0f5;
    padding-top: 8px;
    margin-top: 4px;
}
.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    cursor: default;
}
.cal-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.cal-legend-label {
    font-size: 0.76rem;
    color: #3d4a5c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* ---- Popover calendrier ---- */
.cal-has-events {
    cursor: pointer;
}
.cal-popover .popover-body {
    font-size: 0.78rem;
    padding: 8px 10px;
    min-width: 160px;
    max-width: 240px;
    color: #2d3748;
    line-height: 1.5;
}
.cal-popover .popover-header {
    display: none;
}
.cal-popover.bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after,
.cal-popover.bs-popover-start > .popover-arrow::after {
    border-left-color: #fff;
}

/* ---- Contenu interne du popover calendrier ---- */
.cal-pop-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 3px 0;
}
.cal-pop-row + .cal-pop-row {
    border-top: 1px solid #f0f0f0;
}
.cal-pop-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.cal-pop-text {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.3;
}
.cal-pop-time {
    font-size: 0.72rem;
    color: #6b7fa3;
    font-weight: 400;
}
.cal-pop-desc {
    font-size: 0.72rem;
    color: #8a93a8;
    font-weight: 400;
    margin-top: 1px;
}
