/* Variables de base pour le thème Solarium */
:root {
    --solarium-background: #f0f2f5;
    --solarium-card-bg: rgba(255, 255, 255, 0.45);
    --solarium-sidebar-bg: rgba(255, 255, 255, 0.35);
    --solarium-primary: #4872fa;
    --solarium-primary-hover: #3c61e6;
    --solarium-success: #34c759;
    --solarium-danger: #ff3b30;
    --solarium-warning: #ffcc00;
    --solarium-info: #5ac8fa;
    --solarium-text: #1d1d1f;
    --solarium-text-light: #6e6e73;
    --solarium-border: rgba(255, 255, 255, 0.4);
    --solarium-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    --solarium-card-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    
    /* Variables responsives */
    --sidebar-width: 250px;
    --sidebar-width-collapsed: 60px;
    --content-padding: 20px;
    --mobile-content-padding: 12px;
    --card-border-radius: 12px;
    --btn-border-radius: 10px;
}

/* Définition globale de la police et base HTML */
html {
    height: 100%;
    font-size: 16px;
}

body {
    font-family: 'Nunito', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    font-size: 0.95rem;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

body:not(.custom-background) {
    background-image: url('../../images/fonds/pro.jpg');
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    line-height: 1.4;
}

/* Boutons - Style global cohérent pour tous les boutons */
.btn {
    font-family: 'Nunito', sans-serif;
    border-radius: var(--btn-border-radius);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 0.5rem 1rem;
    font-weight: 500;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

/* Effet d'enfoncement au survol pour tous les boutons */
.btn:hover {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Effet d'enfoncement plus prononcé au clic */
.btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) inset;
}

/* Style pour les boutons primaires */
.btn-primary {
    background-color: var(--solarium-primary);
    border-color: var(--solarium-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--solarium-primary-hover);
    border-color: var(--solarium-primary-hover);
}

/* Style pour les boutons outline */
.btn-outline-primary {
    border-color: var(--solarium-primary);
    color: var(--solarium-primary);
}

.btn-outline-primary:hover {
    background-color: rgba(72, 114, 250, 0.08);
    color: var(--solarium-primary);
    border-color: var(--solarium-primary);
}

.btn-outline-secondary:hover {
    background-color: rgba(108, 117, 125, 0.08);
    color: #6c757d;
}

.btn-outline-success:hover {
    background-color: rgba(52, 199, 89, 0.08);
    color: var(--solarium-success);
}

.btn-outline-danger:hover {
    background-color: rgba(255, 59, 48, 0.08);
    color: var(--solarium-danger);
}

.btn-outline-warning:hover {
    background-color: rgba(255, 204, 0, 0.08);
    color: var(--solarium-warning);
}

.btn-outline-info:hover {
    background-color: rgba(90, 200, 250, 0.08);
    color: var(--solarium-info);
}

/* Style pour les boutons actifs */
.btn.active {
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
}

/* Style pour les boutons dans les groupes */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--btn-border-radius);
    border-bottom-left-radius: var(--btn-border-radius);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--btn-border-radius);
    border-bottom-right-radius: var(--btn-border-radius);
}

/* Style pour les boutons de taille réduite */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Effets spéciaux pour la consultation */
.btn-consultation {
    background-color: #8edd8e;
    color: #212529;
    border-color: #7dcc7d;
}

.btn-consultation:hover {
    background-color: #7dcc7d;
    color: #212529;
    border-color: #6cbb6c;
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Désactiver les animations de survol pour les boutons désactivés */
.btn:disabled, .btn.disabled {
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Effet Glassmorphism pour tous les éléments */
.card, .sidebar, .modal-content, .widget, .info-box, 
.dashboard-card, .quick-access-card, .stats-card, .task-card,
.consultationForm, .consultationTab, .calendar-container,
.login-container, .table-responsive {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--card-border-radius);
    border: 1px solid rgba(209, 213, 219, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Layout principal */
.content {
    background: transparent;
    margin-left: calc(var(--sidebar-width) + 20px);
    padding: var(--content-padding);
    transition: margin-left 0.3s ease, padding 0.3s ease;
    border-radius: var(--card-border-radius);
    min-height: calc(100vh - 40px);
}

/* Hover effects pour les éléments interactifs */
.card:hover, .stats-card:hover, .task-card:hover,
.widget:hover, .info-box:hover, .dashboard-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

/* Headers and footers */
.card-header, .modal-header, .widget-header {
    background-color: rgba(245, 245, 247, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 1.25rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 20px 0;
    border-radius: 0%;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar h4 {
    color: var(--solarium-text);
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0 20px;
    margin-bottom: 5px;
}

.sidebar .text-light {
    color: var(--solarium-text) !important;
}

.sidebar nav {
    margin-top: 20px;
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sidebar nav a {
    font-weight: 500;
    border-radius: var(--card-border-radius);
    padding: 0.75rem 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    margin: 8px 0;
    transition: all 0.3s ease;
    color: var(--solarium-text);
    display: flex;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sidebar nav a:hover {
    background-color: rgba(72, 114, 250, 0.08);
    color: var(--solarium-primary);
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar nav a.active {
    background-color: rgba(72, 114, 250, 0.2);
    border: 1px solid rgba(72, 114, 250, 0.4);
    color: var(--solarium-primary);
    font-weight: 600;
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
}

.sidebar nav a:last-child {
    margin-top: auto;
    color: var(--solarium-danger);
}

.sidebar nav a:last-child:hover {
    background-color: rgba(255, 59, 48, 0.1);
}

/* Sous-menu décalé pour la consultation */
.sidebar nav a.sidebar-submenu {
    margin-left: 20px !important;
    padding-left: 2.5rem !important;
    font-size: 0.9rem !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-left: 3px solid rgba(72, 114, 250, 0.3) !important;
    position: relative !important;
}

.sidebar nav a.sidebar-submenu::before {
    content: "└──   " !important;
    position: absolute !important;
    left: 0.5rem !important;
    color: rgba(72, 114, 250, 0.6) !important;
    font-size: 0.8rem !important;
}

.sidebar nav a.sidebar-submenu:hover {
    background-color: rgba(72, 114, 250, 0.06) !important;
    border-left-color: rgba(72, 114, 250, 0.6) !important;
}

.sidebar nav a.sidebar-submenu.active {
    background-color: rgba(72, 114, 250, 0.15) !important;
    border-left-color: var(--solarium-primary) !important;
}

.close-sidebar {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--solarium-text);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    z-index: 2;
}

/* Hamburger menu toggle */
.hamburger-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 900;
    background-color: var(--solarium-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    justify-content: center;
    align-items: center;
}

/* Overlay for mobile menu */
.overlay {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.overlay.show {
    display: block;
}

/* Onglets de navigation */
.nav-tabs {
    padding-bottom: 20px;
    --bs-nav-tabs-border-width: 0;
    --bs-nav-tabs-border-color: transparent;
    border-bottom: none;
}

.nav-tabs .nav-link {
    font-weight: 500;
    border-radius: var(--card-border-radius);
    padding: 0.75rem 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    margin-right: 5px;
    transition: all 0.3s ease;
    color: var(--solarium-text);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-tabs .nav-link:hover {
    background-color: rgba(72, 114, 250, 0.08);
    color: var(--solarium-primary);
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link.active {
    background-color: rgba(72, 114, 250, 0.2);
    border: 1px solid rgba(72, 114, 250, 0.4);
    color: var(--solarium-primary);
    font-weight: 600;
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
}

.nav-tabs .nav-link.disabled {
    color: #adb5bd;
    pointer-events: none;
    cursor: default;
    opacity: 0.65;
}

.consultationTab {
    border-radius: var(--card-border-radius);
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.consultationTab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.consultationTab .nav-link {
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.2s ease;
}

.consultationTab .nav-link.active {
    background-color: #4285f4;
    color: white;
    border-color: #4285f4;
}

.consultationTab .nav-link:not(.active):hover {
    background-color: rgba(66, 133, 244, 0.1);
}

/* Formulaires */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px;
    border: none;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: transparent;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 3px rgba(72, 114, 250, 0.25);
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Styles des patients */
.patient-info {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: var(--card-border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

.patient-card {
    cursor: pointer;
    transition: all 0.2s;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.patient-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.patient-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.patient-row:hover {
    background-color: rgba(66, 133, 244, 0.05);
}

/* Assistant IA */
.ai-assistant-box {
    border: 1px solid #e0e0e0;
    border-radius: var(--card-border-radius);
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Utilitaires */
.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    background-color: rgba(0,0,0,0.03);
}

/* Statistiques et cartes */
.stat-card {
    border-radius: var(--card-border-radius);
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    height: 100%;
}

.stat-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.stats-icon {
    font-size: 2.5rem;
    opacity: 0.8;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-left: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
    transition: all 0.3s ease;
}

.stats-card:hover .stats-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.bg-primary {
    background-color: var(--solarium-primary) !important;
}

.bg-success {
    background-color: var(--solarium-success) !important;
}

.bg-info {
    background-color: var(--solarium-info) !important;
}

/* Styles de tableau */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th {
    background-color: rgba(245, 245, 247, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem;
}

.table td {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    vertical-align: middle;
    padding: 0.75rem;
}

.table-hover tbody tr:hover td {
    background-color: rgba(72, 114, 250, 0.05);
}

#recap table tbody tr {
    transition: background-color 0.2s;
    cursor: pointer;
}

#recap table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Formulaire de consultation */
.consultationForm {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--card-border-radius);
    padding: 25px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.consultationForm label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #495057;
}

/* Calendrier - Styles communs */
.calendar-container {
    position: relative;
    overflow: auto;
    max-height: 70vh;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--card-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.calendar thead {
    position: sticky;
    top: 0;
    z-index: 11;
    background-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar thead th {
    background-color: rgba(248, 249, 250, 0.7);
    position: sticky;
    top: 0;
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: center;
}

.calendar thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 12;
    background-color: rgba(248, 249, 250, 0.7);
}

.calendar .time-slot {
    position: sticky;
    left: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 5;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    width: 60px;
    text-align: center;
    font-size: 12px;
    color: #555;
    border: 1px solid #dee2e6;
}

.calendar td {
    border: 1px solid #dee2e6;
    padding: 0;
    vertical-align: top;
    height: 30px;
    position: relative;
    background-color: rgba(255, 255, 255, 0.5);
}

/* Styles pour cellule du jour courant */
.today, .calendar td.today {
    background-color: rgba(232, 240, 254, 0.7);
}

/* Style pour les heures de travail/hors travail */
.calendar td.work-hour {
    background-color: rgba(255, 255, 255, 0.7);
}

.calendar td.non-work-hour {
    background-color: rgba(249, 249, 249, 0.7);
}

/* Styles pour les types de rendez-vous */
.appointment-consultation, .month-appointment.appointment-consultation {
    background-color: #0078d4;
    border-left: 3px solid #005a9e;
}

.appointment-urgent, .month-appointment.appointment-urgent {
    background-color: #d13438;
    border-left: 3px solid #a4262c;
}

.appointment-suivi, .month-appointment.appointment-suivi {
    background-color: #498205;
    border-left: 3px solid #386204;
}

.appointment-controle, .month-appointment.appointment-controle {
    background-color: #8764b8;
    border-left: 3px solid #6b4f9b;
}

.appointment-autre, .month-appointment.appointment-autre {
    background-color: #ca5010;
    border-left: 3px solid #a74109;
}

/* Style pour la cellule de rendez-vous */
.calendar .appointment-slot {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 3px;
    z-index: 10;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    cursor: pointer;
    color: #fff;
}

.calendar .appointment-slot:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

.calendar .appointment-slot.highlight {
    box-shadow: 0 0 8px rgba(0, 120, 212, 0.7);
    z-index: 15;
}

/* Contenu du rendez-vous */
.appointment-content {
    padding: 3px 5px;
    font-size: 12px;
    overflow: hidden;
}

.appointment-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.appointment-time {
    font-size: 11px;
    opacity: 0.9;
}

.appointment-details {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.9);
}

/* Indicateur de chevauchement */
.overlapping-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    background-color: #ffc107;
    color: #212529;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Vue mensuelle du calendrier */
.month-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.month-calendar .day-header {
    background-color: rgba(248, 249, 250, 0.7);
    padding: 8px 5px;
    text-align: center;
    font-weight: 500;
    border-bottom: 1px solid #dee2e6;
}

.month-calendar .day-cell {
    min-height: 120px;
    border: 1px solid #dee2e6;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.month-calendar .day-cell:hover {
    background-color: rgba(248, 249, 252, 0.8);
    cursor: pointer;
}

.month-calendar .day-cell.other-month {
    background-color: rgba(248, 249, 250, 0.7);
    opacity: 0.7;
}

.month-calendar .day-cell.today {
    background-color: rgba(232, 244, 255, 0.7);
    border: 2px solid #0d6efd;
}

.month-calendar .day-number {
    font-weight: bold;
    padding: 2px 4px;
    margin-bottom: 5px;
    display: inline-block;
    border-radius: 50%;
    min-width: 24px;
    text-align: center;
}

.month-calendar .day-cell.today .day-number {
    background-color: #0d6efd;
    color: white;
}

.month-calendar .day-appointments {
    max-height: 90px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.month-calendar .day-appointments::-webkit-scrollbar {
    width: 5px;
}

.month-calendar .day-appointments::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.month-appointment {
    margin-bottom: 3px;
    padding: 3px 6px;
    font-size: 11px;
    border-radius: 3px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.month-appointment:hover {
    transform: translateX(3px);
}

/* Vue jour du calendrier */
.day-calendar td {
    height: 40px;
}

.day-calendar .time-slot {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    font-size: 0.85rem;
}

.day-calendar td:not(.time-slot) {
    width: calc(100% - 60px);
}

/* Sélecteur de vue */
.view-selector .btn-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.view-selector .btn {
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.view-selector .btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
    font-weight: 500;
}

/* Bouton de consultation */
#consultation-access-container {
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
}

#goToConsultationBtn {
    transition: all 0.3s ease;
    font-weight: 500;
}

#goToConsultationBtn:hover {
    background-color: #0dcaf0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Navigation dans le calendrier */
.week-navigation {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Thème Solarium */
.theme-solarium .background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(120deg, rgba(210, 215, 230, 0.4) 0%, rgba(230, 230, 235, 0.7) 100%);
}

.theme-solarium .glass-shape {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    filter: blur(50px);
}

.theme-solarium .glass-shape-1 {
    top: 20%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: rgba(72, 114, 250, 0.15);
}

.theme-solarium .glass-shape-2 {
    bottom: 10%;
    right: 15%;
    width: 350px;
    height: 350px;
    background: rgba(52, 199, 89, 0.1);
}

.theme-solarium .glass-shape-3 {
    top: 40%;
    right: 25%;
    width: 250px;
    height: 250px;
    background: rgba(255, 59, 48, 0.1);
}

/* Login page */
body.login-page {
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    max-width: 400px;
    width: 90%;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--solarium-border);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 auto;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo img {
    max-height: 80px;
    width: auto;
}

/* Tâches */
.task-card {
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 1rem;
    margin-bottom: 1rem;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.priority-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

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

.task-actions {
    display: flex;
    gap: 5px;
}

.completed {
    opacity: 0.7;
    text-decoration: line-through;
}

.due-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.overdue {
    color: #dc3545;
    font-weight: bold;
}

/* Modals */
.modal-content {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.modal-header {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    background-color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-body {
    background-color: rgba(255, 255, 255, 0.7);
}

.modal-footer {
    background-color: rgba(248, 249, 250, 0.7);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-header .btn-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
}

/* Fonds d'écran personnalisés */
.background-preview {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    position: relative;
    /* Ajout de propriétés pour uniformiser les dimensions */
    aspect-ratio: 16/9;
    object-fit: cover;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.background-preview.active {
    border-color: #0d6efd;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.5);
}

.background-preview.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.background-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.background-label {
    margin-top: 5px;
    font-size: 0.9rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Classes utilitaires */
.active-theme {
    border: 2px solid #4872fa !important;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(72, 114, 250, 0.2) !important;
}

.glass-effect {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.float-effect:hover {
    animation: float 3s ease-in-out infinite;
}

/* Media queries optimisées pour le responsive */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 220px;
    }

    .content {
        margin-left: calc(var(--sidebar-width) + 5px);
        padding: var(--mobile-content-padding);
        border-radius: 0;
    }
    
    html {
        font-size: 15px;
    }
    
    .card-header, .modal-header {
        padding: 0.75rem 1rem;
    }
    
    /* Suppression de la règle redondante pour les boutons */
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 768px) {
    :root {
        --mobile-content-padding: 10px;
        --card-border-radius: 10px;
        --btn-border-radius: 8px;
    }
    
    html {
        font-size: 14px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
        width: 80%;
        max-width: 300px;
        background: white;
        opacity: 80%;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .close-sidebar {
        display: block;
    }
    
    .hamburger-toggle {
        display: flex;
    }

    .decalage-titres {
        margin-left: 50px;
    }
    
    .calendar-container {
        max-height: 80vh;
        overflow-x: auto;
    }
    
    .calendar .appointment-slot {
        left: 1px;
        right: 1px;
    }
    
    .appointment-content {
        padding: 2px 3px;
        font-size: 10px;
    }
    
    .month-calendar {
        display: block;
        overflow-x: auto;
    }
    
    .month-calendar .day-cell {
        min-height: 80px;
    }
    
    .view-selector .btn {
        padding: 6px 10px;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .task-card {
        padding: 0.75rem;
    }
    
    /* Conserver uniquement les styles uniques pour les boutons d'action */
    .task-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .consultationForm {
        padding: 1rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        
    }
    
    .row > [class*="col-"] {
        padding: 0.5rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .theme-solarium .glass-shape {
        opacity: 0.7;
        transform: scale(0.8);
    }
}

@media (max-width: 768px) {
    :root {
        --mobile-content-padding: 8px;
        --card-border-radius: 8px;
    }
    
    html {
        font-size: 13px;
    }
    
    .sidebar {
        width: 85%;
        background: white;
        opacity: 80%;
    }
    
    .sidebar nav a {
        padding: 10px 12px;
        background: white;
        opacity: 80%;
    }
    
    .content {
        margin-left: 5px;
        padding: var(--mobile-content-padding);
        border-radius: 0;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .calendar thead th, .calendar .time-slot {
        font-size: 10px;
        padding: 5px;
    }
    
    .appointment-title, .appointment-details {
        font-size: 9px;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-body, .modal-footer {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.875rem;
    }
    
    .form-control, .form-select {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Optimisation pour les écrans tactiles */
    .btn, .nav-link, .form-control, .task-card, .patient-card {
        min-height: 44px; /* Taille minimale pour une cible tactile */
    }
    
    .btn-sm, .nav-link.btn-sm {
        min-height: 38px;
    }
    
    /* Ajustement pour les interfaces de formulaires denses */
    .form-group {
        margin-bottom: 0.75rem;
    }
}

/* Optimisations pour l'orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        padding-top: 10px;
    }
    
    .sidebar nav {
        margin-top: 10px;
    }
    
    .sidebar nav a {
        padding: 8px 12px;
        margin: 4px 0;
    }
    
    .calendar-container {
        max-height: 85vh;
    }
    
    .login-container {
        padding: 20px;
        margin: 10px auto;
    }
}

/* Optimisations d'accessibilité pour les contrastes */
@media (prefers-contrast: more) {
    :root {
        --solarium-text: #000000;
        --solarium-text-light: #333333;
    }
    
    .btn, .nav-link {
        border-width: 2px;
    }
    
    .form-control, .form-select {
        box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 2px 3px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(0, 0, 0, 0.2);
    }
}

/* Optimisations pour réduire les animations sur batterie faible */
@media (prefers-reduced-motion), (prefers-reduced-data) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .float-animation, .float-effect:hover {
        animation: none !important;
    }
    
    .card:hover, .stats-card:hover, .task-card:hover,
    .widget:hover, .info-box:hover, .dashboard-card:hover {
        transform: none;
    }
}

/* Styles pour les fonds d'écran personnalisés */
body.custom-background {
    background-color: transparent !important;
    position: relative;
    z-index: 0;
}

/* S'assurer que le contenu reste bien visible */
/* body.custom-background .content {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    backdrop-filter: blur(5px);
} */

/* Adaptation pour le mode sombre */
body.dark-mode.custom-background .content {
    background-color: rgba(33, 37, 41, 0.7);
}

/* S'assurer que les éléments de thème ne cachent pas le fond d'écran */
body.custom-background .background-gradient,
body.custom-background .glass-shape {
    display: none !important;
}

/* Styles pour les cellules d'actions fixes */
.actions-column, .actions-cell {
    position: sticky !important;
    right: 0;
    background-color: rgb(236, 238, 246) !important;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.15); /* Ombre plus prononcée à gauche */
    z-index: 10;
    min-width: 120px;
    text-align: center;
}

.actions-column {
    z-index: 11;
    /* Ajouter une bordure gauche pour accentuer la séparation */
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.actions-cell {
    /* Ajouter une bordure gauche pour accentuer la séparation */
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

/* Suppression des espaces entre les boutons d'action */
.actions-cell .btn-group {
    display: flex;
    gap: 0; /* Suppression du gap entre les boutons */
}

.actions-cell .btn {
    margin: 0; /* Suppression des marges */
    border-radius: 0; /* Enlever les coins arrondis entre les boutons */
}

.actions-cell .btn:first-child {
    border-top-left-radius: var(--btn-border-radius);
    border-bottom-left-radius: var(--btn-border-radius);
}

.actions-cell .btn:last-child {
    border-top-right-radius: var(--btn-border-radius);
    border-bottom-right-radius: var(--btn-border-radius);
}

.table-responsive {
    overflow-x: auto;
    position: relative;
}

#patients-table {
    position: relative;
}

/* Assurer que les boutons d'actions restent visibles sur mobile */
@media (max-width: 768px) {
    .actions-cell .btn-group {
        display: flex;
        flex-direction: row;
        gap: 0; /* Suppression du gap entre les boutons */
        justify-content: center;
    }
    
    /* Styles spécifiques pour les boutons d'action uniquement */
    .actions-cell .btn {
        padding: 0.3rem 0.5rem;
        margin: 0; /* Suppression des marges */
    }
    
    .actions-column, .actions-cell {
        min-width: 105px; /* Ajusté pour les boutons sans espaces */
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    
    /* Réduire la taille des icônes pour économiser de l'espace */
    .actions-cell .btn i {
        font-size: 0.8rem;
    }
}
