/* Styles personnalisés pour Claireo */

/* Drag and Drop pour les tâches */
.tasks-sortable {
    position: relative;
}

.task-item {
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.task-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.task-item.dragging {
    opacity: 0.5;
}

.task-item.drag-over-top {
    border-top: 3px solid #0ea5e9;
    padding-top: 5px;
}

.task-item.drag-over-bottom {
    border-bottom: 3px solid #0ea5e9;
    padding-bottom: 5px;
}

.task-item[draggable="true"]:hover {
    cursor: grab;
}

.task-item[draggable="true"]:active {
    cursor: grabbing;
}
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}

body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Correction pour éviter les problèmes d'affichage iOS */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    html {
        height: -webkit-fill-available;
    }
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Dropdown menu alignment */
.navbar .dropdown-menu {
    right: 0;
    left: auto;
    margin-right: 0;
}

/* Ensure dropdown doesn't go off screen */
@media (max-width: 576px) {
    .navbar .dropdown-menu {
        right: 0;
        left: 0;
        margin-right: 0;
        margin-left: 0;
        width: calc(100vw - 2rem);
        max-width: 300px;
    }
    
    .navbar-brand.d-md-none {
        font-size: 0.85rem !important;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.5rem;
    }
}

.view {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    border: none;
}

/* Task List */
.task-item {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.task-item:hover {
    background-color: #f8f9fa;
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-title {
    text-decoration: line-through;
}

.task-item.task-archived {
    opacity: 0.5;
    background-color: #f8f9fa;
}

.task-item.task-archived:hover {
    background-color: #e9ecef;
}

.priority-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.priority-high {
    background-color: #fee2e2;
    color: #991b1b;
}

.priority-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.priority-low {
    background-color: #d1fae5;
    color: #065f46;
}

/* Event Cards */
.event-card {
    border-left: 4px solid var(--primary-color);
}

.event-card.upcoming {
    border-left-color: var(--info-color);
}

.event-card.past {
    opacity: 0.7;
}

/* Project Cards */
.project-card-clickable {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.project-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: rgba(0, 0, 0, 0.02);
}

.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.project-progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.project-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

/* Cartes cliquables du dashboard */
.clickable-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.clickable-card:active {
    transform: translateY(-1px);
}

/* Cartes de services */
.service-card {
    border-radius: 16px;
    overflow: hidden;
    background: white;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.service-card:active {
    transform: translateY(-4px) scale(1.01);
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card .card-body {
    display: flex;
    flex-direction: column;
}

.service-card .card-title {
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.service-card .card-text {
    flex-grow: 1;
    line-height: 1.6;
    color: #4a5568;
}

.service-card .badge {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.service-card:hover .badge {
    transform: translateX(5px);
}

/* Responsive - Menu mobile amélioré */
@media (max-width: 768px) {
    .mobile-nav.col-lg-2 {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding: 0;
        margin: 0;
        border-top: 1px solid #e9ecef;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        height: auto;
    }
    
    .mobile-nav .list-group {
        flex-direction: row;
        display: flex;
        justify-content: space-around;
        align-items: center;
        margin: 0;
        margin-bottom: 0.5rem;
        border: none;
        background: transparent;
        padding: 0.5rem 0.1rem;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .mobile-nav .list-group-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: none;
        padding: 0.4rem 0.1rem;
        background: transparent;
        color: #6c757d;
        text-decoration: none;
        min-width: 0;
        transition: all 0.2s ease;
        border-radius: 6px;
        margin: 0;
        position: relative;
    }
    
    .mobile-nav .list-group-item:hover,
    .mobile-nav .list-group-item:focus,
    .mobile-nav .list-group-item:active {
        background: rgba(102, 126, 234, 0.1);
        color: var(--primary-color);
        text-decoration: none;
    }
    
    .mobile-nav .list-group-item.active {
        background: rgba(102, 126, 234, 0.15);
        color: var(--primary-color);
        font-weight: 600;
    }
    
    .mobile-nav .list-group-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 0 0 3px 3px;
    }
    
    .mobile-nav .list-group-item i {
        font-size: 1.4rem;
        margin-bottom: 0.15rem;
        display: block;
        line-height: 1;
    }
    
    .mobile-nav .list-group-item span {
        font-size: 0.7rem;
        text-align: center;
        line-height: 1.1;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    
    /* Pour les très petits écrans */
    @media (max-width: 360px) {
        .mobile-nav .list-group {
            padding: 0.45rem 0.08rem;
        }
        
        .mobile-nav .list-group-item {
            padding: 0.35rem 0.08rem;
        }
        
        .mobile-nav .list-group-item i {
            font-size: 1.3rem;
            margin-bottom: 0.12rem;
        }
        
        .mobile-nav .list-group-item span {
            font-size: 0.65rem;
        }
    }
    
    /* Marge importante pour éviter que le contenu soit caché par le menu */
    .col-lg-10 {
        margin-bottom: calc(55px + env(safe-area-inset-bottom));
        padding-bottom: 0;
    }
    
    /* S'assurer que le container-fluid a assez de marge */
    .container-fluid {
        padding-bottom: 0;
    }
    
    /* S'assurer que toutes les vues ont assez de marge */
    .view {
        padding-bottom: 0.5rem;
    }
    
    /* Ajuster la navbar en haut */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1030;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding-top: env(safe-area-inset-top);
    }
    
}

/* Desktop : réinitialiser le style mobile */
@media (min-width: 769px) {
    .mobile-nav.col-lg-2 {
        position: static;
        padding: 0;
        margin-bottom: 1rem;
        background: transparent;
        box-shadow: none;
        border: none;
        height: auto;
    }
    
    .mobile-nav .list-group {
        flex-direction: column;
        padding: 0;
    }
    
    .mobile-nav .list-group-item {
        flex: none;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        margin: 0;
        border: 1px solid rgba(0,0,0,.125);
        border-radius: 0.375rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-nav .list-group-item.active::before {
        display: none;
    }
    
    .mobile-nav .list-group-item i {
        font-size: 1rem;
        margin-bottom: 0;
        margin-right: 0.75rem;
    }
    
    .mobile-nav .list-group-item span {
        font-size: 1rem;
        text-align: left;
    }
    
    .col-lg-10 {
        margin-bottom: 0;
    }
}

/* Quick Add Button (Mobile) */
.quick-add-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    z-index: 999;
    display: none;
}

@media (max-width: 768px) {
    .quick-add-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Subtask Indentation */
.subtask {
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Notes Hierarchy */
.note-card {
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.note-card:hover {
    transform: translateX(5px);
    background-color: rgba(0, 0, 0, 0.02);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Titre de note cliquable */
.note-card .card-title[style*="cursor: pointer"] {
    color: #667eea;
    transition: color 0.2s;
}

.note-card .card-title[style*="cursor: pointer"]:hover {
    color: #5568d3;
    text-decoration: underline;
}

.note-card[style*="margin-left"] {
    border-left: 3px solid #e9ecef;
}

/* Folder notes (sujets) */
.note-card.note-folder {
    background-color: #fffbf0;
    border-left: 3px solid #ffc107 !important;
}

.note-card.note-folder:hover {
    background-color: #fff8e1;
}

/* Styles pour le contenu Markdown dans les notes */
.note-content-preview {
    line-height: 1.6;
}

.note-content-preview code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.note-content-preview pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
    margin: 10px 0;
    position: relative;
}

.note-content-preview pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.85em;
    line-height: 1.5;
}

/* Bouton de copie pour les blocs de code */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 0.75rem;
}

.note-content-preview pre:hover .code-copy-btn,
.code-copy-btn:hover {
    opacity: 1;
}

.code-copy-btn i {
    font-size: 0.9rem;
}

.note-content-preview h1,
.note-content-preview h2,
.note-content-preview h3,
.note-content-preview h4,
.note-content-preview h5,
.note-content-preview h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.note-content-preview p {
    margin-bottom: 0.75em;
}

.note-content-preview ul,
.note-content-preview ol {
    margin-left: 1.5em;
    margin-bottom: 0.75em;
}

.note-content-preview blockquote {
    border-left: 3px solid #667eea;
    padding-left: 1em;
    margin-left: 0;
    color: #6c757d;
    font-style: italic;
}

.note-content-preview table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.note-content-preview table th,
.note-content-preview table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: left;
}

.note-content-preview table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Images dans les notes - redimensionnement automatique */
.note-content-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Images dans la modal de visualisation */
#view-note-content img,
#view-note-content .note-content-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Styles pour FullCalendar - Design moderne
   ============================================ */

/* Container du calendrier style Apple */
#calendar {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

/* Vue mois - Container plus compact */
.fc-dayGridMonth-view {
    padding: 0.5rem 0 !important;
}

/* Header du calendrier - Style Apple */
.fc-header-toolbar {
    margin-bottom: 1.5rem !important;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.fc-toolbar-title {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    text-transform: capitalize;
    letter-spacing: -0.02em;
}

/* Boutons style Apple - Fins et élégants */
.fc-button {
    background: transparent !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.375rem 0.875rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    text-transform: capitalize !important;
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    color: #374151 !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.fc-button:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #1f2937 !important;
    transform: none !important;
}

.fc-button:active {
    background: #f3f4f6 !important;
    transform: scale(0.98) !important;
}

.fc-button-primary:not(:disabled):active,
.fc-button-primary:not(:disabled).fc-button-active {
    background: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.2) !important;
}

.fc-button-primary:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background: transparent !important;
}

/* Boutons de navigation (prev/next/today) */
.fc-button-group .fc-button {
    margin: 0 0.25rem !important;
}

.fc-button-group .fc-button:first-child {
    margin-left: 0 !important;
}

.fc-button-group .fc-button:last-child {
    margin-right: 0 !important;
}

/* Bouton "today" spécial */
.fc-today-button {
    font-weight: 500 !important;
}

/* Vue semaine - En-têtes de colonnes style Apple */
.fc-col-header-cell {
    background: #fafafa !important;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 0.75rem 0.5rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-transform: capitalize !important;
    font-size: 0.8125rem !important;
    letter-spacing: 0.01em !important;
}

/* Vue mois - En-têtes de colonnes plus compacts */
.fc-dayGridMonth-view .fc-col-header-cell {
    padding: 0.625rem 0.375rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Cellules du mois - Plus compactes */
.fc-dayGridMonth-view .fc-daygrid-day {
    min-height: 130px !important;
    position: relative;
}

/* Cellules sans événements - Plus hautes pour mettre en valeur les numéros */
.fc-dayGridMonth-view .fc-daygrid-day.no-events {
    min-height: 180px !important;
}

.fc-dayGridMonth-view .fc-daygrid-day-frame {
    padding: 0.25rem !important;
    position: relative;
}

.fc-dayGridMonth-view .fc-daygrid-day-number,
.fc-dayGridMonth-view .fc-daygrid-day-top .fc-daygrid-day-number {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.625rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
}

.fc-col-header-cell:first-child {
    border-top-left-radius: 0;
}

.fc-col-header-cell:last-child {
    border-top-right-radius: 0;
}

/* Cellules du calendrier style Apple */
.fc-daygrid-day,
.fc-timeGridDay-view .fc-daygrid-day,
.fc-timeGridWeek-view .fc-daygrid-day {
    border-color: #f3f4f6 !important;
    transition: background-color 0.15s ease !important;
}

.fc-daygrid-day:hover {
    background-color: #fafafa !important;
}

/* Cellules de jour cliquables dans la vue mois */
.fc-dayGridMonth-view .fc-daygrid-day {
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.fc-dayGridMonth-view .fc-daygrid-day:hover {
    background-color: rgba(102, 126, 234, 0.05) !important;
}

.fc-day-today {
    background-color: rgba(102, 126, 234, 0.03) !important;
}

.fc-day-today .fc-col-header-cell-cushion {
    color: #667eea !important;
    font-weight: 600 !important;
}

.fc-day-today .fc-daygrid-day-number {
    color: #667eea !important;
    font-weight: 600 !important;
    font-size: 0.625rem !important;
}

/* Numéro du jour en grand en arrière-plan */
.fc-day-number-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.15);
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.02em;
}

.fc-day-today .fc-day-number-large {
    color: rgba(102, 126, 234, 0.25);
}

/* Rendre plus pâle quand il y a des événements */
.fc-day-number-large.has-events {
    color: rgba(0, 0, 0, 0.10) !important;
}

.fc-day-today .fc-day-number-large.has-events {
    color: rgba(102, 126, 234, 0.18) !important;
}

/* Responsive : réduire la taille sur petits écrans */
@media (max-width: 768px) {
    .fc-day-number-large {
        font-size: 1.8rem;
    }
}

/* S'assurer que le contenu de la cellule est au-dessus du numéro */
.fc-daygrid-day-frame {
    position: relative;
    z-index: 1;
}

.fc-daygrid-day-number {
    position: relative;
    z-index: 2;
}

.fc-daygrid-day-events {
    position: relative;
    z-index: 2;
}

/* Masquer le numéro en haut à droite des cases */
.fc-daygrid-day-top {
    display: none !important;
}

/* Slots horaires (vue semaine/jour) style Apple - Plus compacts */
.fc-timegrid-slot {
    border-color: #f9fafb !important;
    height: 1.75rem !important; /* Réduit encore plus pour moins de hauteur (de 2.5rem à 1.75rem) */
}

/* Masquer les bordures des slots mineurs (30min) pour un rendu plus compact */
.fc-timegrid-slot-minor {
    border-color: transparent !important;
}

/* Vue semaine - Hauteur maximale pour éviter que ce soit trop haut */
.fc-timeGridWeek-view .fc-scroller {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

/* Vue jour - Hauteur maximale aussi */
.fc-timeGridDay-view .fc-scroller {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

/* Réduire l'espacement vertical général dans la vue semaine */
.fc-timeGridWeek-view .fc-timegrid-body {
    min-height: auto !important;
}

.fc-timegrid-slot-label {
    color: #9ca3af !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    padding-right: 0.75rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.fc-timegrid-now-indicator-line {
    border-color: #667eea !important;
    border-width: 1.5px !important;
    opacity: 0.8 !important;
}

.fc-timegrid-now-indicator-arrow {
    border-color: #667eea !important;
    opacity: 0.8 !important;
}

/* Événements style Apple - Fins et élégants */
.fc-event {
    border: none !important;
    border-radius: 6px !important;
    padding: 0.375rem 0.5rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    border-left: 3px solid currentColor !important;
}

/* Événements dans la vue mois - Plus compacts */
.fc-dayGridMonth-view .fc-event {
    padding: 0.25rem 0.375rem !important;
    font-size: 0.75rem !important;
    margin-bottom: 0.125rem !important;
    line-height: 1.3 !important;
}

.fc-dayGridMonth-view .fc-event-title {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

/* Lien "+X de plus" dans la vue mois */
.fc-dayGridMonth-view .fc-more-link {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: #667eea !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    transition: all 0.15s ease !important;
}

.fc-dayGridMonth-view .fc-more-link:hover {
    background: rgba(102, 126, 234, 0.1) !important;
    color: #5568d3 !important;
}

.fc-event:hover {
    transform: translateX(2px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    z-index: 10 !important;
}

.fc-event-title {
    font-weight: 500 !important;
    padding: 0.125rem 0 !important;
    line-height: 1.4 !important;
}

.fc-event-time {
    font-weight: 400 !important;
    opacity: 0.85 !important;
    font-size: 0.75rem !important;
}

/* Sélection de dates */
.fc-highlight {
    background: rgba(102, 126, 234, 0.1) !important;
    border-color: #667eea !important;
}

/* Vue liste - Plus compacte et moderne */
.fc-list-event:hover td {
    background-color: rgba(102, 126, 234, 0.05) !important;
}

.fc-list-event-title {
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

.fc-list-event-time {
    font-size: 0.8125rem !important;
    color: #6b7280 !important;
}

.fc-list-day-cushion {
    padding: 0.75rem 1rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.fc-list-event {
    padding: 0.625rem 1rem !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

/* Scrollbar personnalisée pour le calendrier */
.fc-scroller::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.fc-scroller::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.fc-scroller::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.fc-scroller::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    #calendar {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .fc-toolbar {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .fc-toolbar-title {
        font-size: 1.25rem !important;
        margin: 0.5rem 0 !important;
    }
    
    .fc-button {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }
    
    .fc-button-group {
        display: flex !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .fc-col-header-cell {
        padding: 0.75rem 0.25rem !important;
        font-size: 0.8rem !important;
    }
    
    .fc-event {
        font-size: 0.75rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .fc-timegrid-slot {
        height: 2.5rem !important;
    }
    
    .fc-timegrid-slot-label {
        font-size: 0.75rem !important;
    }
}

/* Styles pour les événements par thème - Style Apple subtil */
.event-modern {
    border-left: 3px solid currentColor !important;
    border-radius: 6px !important;
    font-size: 0.8125rem !important;
}

.event-theme-rdv {
    background: rgba(13, 110, 253, 0.12) !important;
    color: #0d6efd !important;
    border-left-color: #0d6efd !important;
}

.event-theme-anniversaire {
    background: rgba(255, 107, 107, 0.12) !important;
    color: #ff6b6b !important;
    border-left-color: #ff6b6b !important;
}

.event-theme-tache {
    background: rgba(255, 193, 7, 0.15) !important;
    color: #b8860b !important;
    border-left-color: #ffc107 !important;
}

.event-theme-tache .fc-event-title,
.event-theme-tache .fc-event-time {
    color: #b8860b !important;
}

.event-theme-autre {
    background: rgba(108, 117, 125, 0.12) !important;
    color: #6c757d !important;
    border-left-color: #6c757d !important;
}

/* Animation pour le chargement */
@keyframes calendarFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#calendar {
    animation: calendarFadeIn 0.4s ease-out;
}

