/* Calendar Styles */
.simple-calendar {
    width: 100%;
}

.simple-calendar .calendar-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

/* Navigation Buttons Container - Design 2025 */
.calendar-nav-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Base Button Style - Modern Glassmorphism */
.calendar-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* Previous Button - Subtle Gray */
.calendar-nav-btn-prev {
    color: #64748b;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
}

.calendar-nav-btn-prev:hover {
    color: #475569;
    background: rgba(255, 255, 255, 1);
    border-color: #cbd5e1;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.calendar-nav-btn-prev:active {
    transform: translateY(0);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Today Button - Primary Action with Gradient */
.calendar-nav-btn-today {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow:
        0 2px 6px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 0 rgba(59, 130, 246, 0);
    font-weight: 600;
}

.calendar-nav-btn-today:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow:
        0 4px 12px rgba(59, 130, 246, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.calendar-nav-btn-today:active {
    transform: translateY(-1px);
    box-shadow:
        0 2px 6px rgba(59, 130, 246, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Next Button - Subtle Gray (matching Previous) */
.calendar-nav-btn-next {
    color: #64748b;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
}

.calendar-nav-btn-next:hover {
    color: #475569;
    background: rgba(255, 255, 255, 1);
    border-color: #cbd5e1;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.calendar-nav-btn-next:active {
    transform: translateY(0);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Focus States - Accessibility */
.calendar-nav-btn:focus {
    outline: none;
}

.calendar-nav-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Calendar Title - Enhanced Typography */
.simple-calendar .calendar-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
    text-align: right;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .simple-calendar .calendar-heading {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .calendar-nav-buttons {
        width: 100%;
        justify-content: center;
    }

    .calendar-nav-btn {
        flex: 1;
        padding: 0.75rem 0.5rem;
    }

    .simple-calendar .calendar-title {
        width: 100%;
        text-align: center;
        font-size: 1.25rem;
    }
}

.simple-calendar table {
    @apply w-full table-fixed;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.simple-calendar th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.875rem 0.5rem;
    text-align: center;
    border: 2px solid #d1d5db;
    border-bottom-width: 2.5px;
}

.simple-calendar td {
    border: 2px solid #e5e7eb;
    vertical-align: top;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.simple-calendar td:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: inset 0 0 0 1px #cbd5e1;
}

.simple-calendar .day {
    height: 100%;
}

.simple-calendar .prev-month {
    background-color: #f9fafb;
    opacity: 0.7;
}

.simple-calendar .next-month {
    background-color: #f9fafb;
    opacity: 0.7;
}

.simple-calendar .today {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

/* Session Slot Styles */
.session-slot {
    font-size: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    background-color: #dbeafe;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.session-slot:hover {
    background-color: #bfdbfe;
}

.session-slot a {
    color: #1d4ed8;
    text-decoration: none;
    display: block;
}

.session-slot a:hover {
    color: #1e40af;
}

.session-slot .session-name {
    font-weight: 500;
}

.session-slot .session-time {
    color: #4b5563;
}

.session-slot .session-trainer {
    color: #6b7280;
    font-style: italic;
}

/* Calendar Container */
.calendar-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow:
        0 4px 6px -1px rgb(0 0 0 / 0.1),
        0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* Calendar Day */
.calendar-day {
    position: relative;
    min-height: 200px;
    padding: 0.875rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.calendar-day-number {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #4b5563;
    z-index: 1;
}

.calendar-day.today .calendar-day-number {
    color: #2563eb;
    background: #eff6ff;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.calendar-periods-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 0.25rem;
    min-height: 140px;
}

.calendar-period-block {
    flex: 1;
    min-height: 70px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.5rem;
}

/* Period Label (Matin/Après-midi) */
.calendar-period-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Period Divider */
.calendar-period-divider {
    position: relative;
    height: 2px;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-period-divider-line {
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        #d1d5db 20%,
        #d1d5db 80%,
        transparent
    );
}

/* Add Session Button */
.calendar-period-add-button {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 3rem;
}

.calendar-add-session-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    background-color: transparent;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.calendar-add-session-btn:hover {
    color: #2563eb;
    background-color: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.calendar-add-session-btn i {
    transition: transform 0.2s ease;
}

.calendar-add-session-btn:hover i {
    transform: scale(1.1);
}

/* Session Cards */
.calendar-session-card {
    display: block;
    padding: 0.875rem;
    margin-bottom: 0.625rem;
    border-radius: 0.5rem;
    border-left: 3px solid;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: #ffffff;
}

.calendar-session-card .font-semibold {
    font-size: 0.8125rem;
    line-height: 1.3;
    font-weight: 600;
}

.calendar-session-card .text-xs {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
}

/* Session Normal (Bleu) */
.calendar-session-normal {
    border-left-color: #3b82f6;
    background-color: #eff6ff;
}

.calendar-session-normal:hover {
    background-color: #dbeafe;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Session To Sign (Orange) */
.calendar-session-to-sign {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

.calendar-session-to-sign:hover {
    background-color: #fef3c7;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Session Signed (Vert) */
.calendar-session-signed {
    border-left-color: #10b981;
    background-color: #f0fdf4;
}

.calendar-session-signed:hover {
    background-color: #dcfce7;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Session Badges */
.calendar-session-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.calendar-session-badge-warning {
    background-color: #fde68a;
    color: #78350f;
}

.calendar-session-badge-success {
    background-color: #bbf7d0;
    color: #14532d;
}

.calendar-events {
    margin-top: 1.5rem;
}

.calendar-day.today {
    background-color: #eff6ff;
}

.calendar-day .day-number {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.calendar-day.today .day-number {
    color: #2563eb;
}
