:root {
    --app-radius: 0.625rem;
    --app-shadow: 0 0.125rem 0.75rem rgba(0, 0, 0, 0.07);
}

body {
    min-height: 100vh;
    background-color: #f4f6f8;
}

.app-navbar {
    background: #0d6efd !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.app-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.app-navbar .nav-link.active,
.app-navbar .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0.375rem;
}

.app-main {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.auth-card {
    border: none;
    border-radius: var(--app-radius);
}

.card {
    border: none;
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.page-header h1 {
    font-weight: 700;
}

.user-greeting {
    opacity: 0.85;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0d6efd;
    line-height: 1.2;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.concours-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    border-bottom-width: 1px;
}

.concours-details dt {
    color: #6c757d;
    font-weight: 500;
}

.view-toggle .btn {
    min-width: 7rem;
}

.calendar-card {
    overflow: hidden;
}

.calendar-nav {
    padding: 1rem 1.25rem;
}

.calendar-compact {
    display: flex;
    flex-direction: column;
}

.calendar-compact-day {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.calendar-compact-day:last-child {
    border-bottom: none;
}

.calendar-compact-day--today {
    background: #f0f6ff;
}

.calendar-compact-date {
    flex: 0 0 3.5rem;
    text-align: center;
    line-height: 1.2;
}

.calendar-compact-weekday {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.03em;
}

.calendar-compact-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

.calendar-compact-day--today .calendar-compact-number {
    color: #0d6efd;
}

.calendar-compact-month {
    display: block;
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: capitalize;
}

.calendar-compact-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.calendar-event {
    display: block;
    padding: 0.45rem 0.6rem;
    border-radius: 0.3rem;
    font-size: 0.82rem;
    line-height: 1.25;
    text-decoration: none;
    color: inherit;
    border-left: 3px solid transparent;
    background: #e7f1ff;
}

.calendar-event:hover {
    background: #d0e4ff;
    color: inherit;
}

.calendar-event--validee {
    border-left-color: #198754;
    background: #e8f5ee;
}

.calendar-event--validee:hover {
    background: #d1ebdc;
}

.calendar-event--reportee {
    border-left-color: #ffc107;
    background: #fff8e1;
}

.calendar-event--reportee:hover {
    background: #ffefb8;
}

.calendar-event--annulee {
    border-left-color: #dc3545;
    background: #fde8ea;
    opacity: 0.75;
    text-decoration: line-through;
}

.calendar-event--inscrit {
    box-shadow: inset 0 0 0 1px #198754;
    font-weight: 600;
}

.calendar-event-name {
    display: block;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-meta {
    display: block;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-inscrits {
    display: block;
    margin-top: 0.15rem;
    color: #495057;
    font-size: 0.75rem;
    line-height: 1.3;
}

.inscrits-badges {
    margin-top: 0.35rem;
}

.inscrits-badges .badge {
    font-weight: 500;
}

.calendar-legend {
    font-size: 0.85rem;
    color: #6c757d;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.15rem;
    display: inline-block;
}

.legend-dot--validee { background: #198754; }
.legend-dot--reportee { background: #ffc107; }
.legend-dot--annulee { background: #dc3545; }
.legend-dot--inscrit { background: #fff; box-shadow: inset 0 0 0 2px #198754; }

@media (max-width: 768px) {
    .calendar-compact-day {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .calendar-compact-date {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
        flex: none;
        text-align: left;
    }

    .calendar-compact-number {
        font-size: 1.15rem;
    }

    .calendar-compact-weekday,
    .calendar-compact-month {
        display: inline;
        font-size: 0.8rem;
    }

    .calendar-event {
        font-size: 0.78rem;
        padding: 0.35rem 0.5rem;
    }

    .calendar-nav .h5 {
        font-size: 1rem;
    }
}
