.aps-agenda {
    --aps-red: #c70f46;
    --aps-red-dark: #9f0c39;
    --aps-dark: #060b14;
    --aps-muted: #667085;
    --aps-card: #ffffff;
    --aps-border: #e5e7eb;
    --aps-soft: #f2f4f7;

    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 18px;
    font-family: inherit;
    color: var(--aps-dark);
    box-sizing: border-box;
}

.aps-agenda * {
    box-sizing: border-box;
}

.aps-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.aps-kicker {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
    color: var(--aps-red);
    font-size: .78rem;
}

.aps-hero h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: .95;
    margin: 0;
}

.aps-subtitle {
    color: var(--aps-muted);
    margin: 14px 0 0;
    font-size: 1.05rem;
}

.aps-btn {
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: .18s transform, .18s background;
    background: #ffffff;
    color: var(--aps-dark);
}

.aps-btn:hover {
    transform: translateY(-1px);
}

.aps-btn-primary {
    background: var(--aps-red);
    color: #ffffff !important;
    box-shadow: 0 12px 30px rgba(199, 15, 70, .25);
}

.aps-btn-primary:hover {
    background: var(--aps-red-dark);
}

.aps-btn-ghost {
    background: var(--aps-soft);
    color: var(--aps-dark);
}

.aps-calendar-card {
    background: var(--aps-card);
    border: 1px solid var(--aps-border);
    border-radius: 28px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .06);
    max-width: 100%;
    overflow: hidden;
}

.aps-alert {
    border-radius: 18px;
    padding: 14px 18px;
    margin: 0 0 18px;
    font-weight: 700;
}

.aps-alert-success {
    background: #ecfdf3;
    color: #027a48;
}

.aps-alert-error {
    background: #fff1f3;
    color: #c01048;
}

.aps-alert-info {
    background: #eff8ff;
    color: #175cd3;
}

/* FullCalendar */

.fc {
    width: 100%;
    max-width: 100%;
    font-size: .96rem;

    --fc-button-text-color: #ffffff;
    --fc-button-bg-color: var(--aps-dark);
    --fc-button-border-color: var(--aps-dark);
    --fc-button-hover-bg-color: var(--aps-red);
    --fc-button-hover-border-color: var(--aps-red);
    --fc-button-active-bg-color: var(--aps-red);
    --fc-button-active-border-color: var(--aps-red);
}

.fc .fc-toolbar {
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.fc .fc-button,
.fc .fc-button-primary,
.fc button {
    border-radius: 999px !important;
    border: 0 !important;
    background: var(--aps-dark) !important;
    color: #ffffff !important;
    padding: .65em 1em !important;
    font-weight: 800 !important;
    box-shadow: none !important;
}

.fc .fc-button span,
.fc .fc-button-primary span,
.fc button span {
    color: #ffffff !important;
}

.fc .fc-button:hover,
.fc .fc-button-primary:hover {
    background: var(--aps-red) !important;
    color: #ffffff !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--aps-red) !important;
    color: #ffffff !important;
}

.fc .fc-toolbar-title {
    text-transform: capitalize;
    font-size: 1.5rem !important;
    font-weight: 900;
    color: var(--aps-dark);
}

.fc .fc-col-header-cell {
    background: #ffffff;
    font-weight: 900;
}

.fc .fc-daygrid-day {
    background: #ffffff;
}

.fc .fc-daygrid-day-number {
    color: var(--aps-dark);
    font-weight: 800;
    text-decoration: none;
}

.fc .fc-day-today {
    background: #fff8fb !important;
}

.fc-event {
    border: 0 !important;
    background: var(--aps-red) !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 3px 6px !important;
    cursor: pointer;
}

.fc-event *,
.fc-event-title,
.fc-event-time {
    color: #ffffff !important;
}

/* Anti-débordement FullCalendar */

.aps-calendar-card,
.aps-calendar-card .fc,
.aps-calendar-card .fc-view-harness,
.aps-calendar-card .fc-view,
.aps-calendar-card .fc-scrollgrid,
.aps-calendar-card .fc-scrollgrid table,
.aps-calendar-card table {
    max-width: 100% !important;
}

.fc table {
    width: 100% !important;
    table-layout: fixed !important;
}

.fc col {
    width: 14.285714% !important;
}

/* Fenêtre modale */

.aps-dialog {
    border: 0;
    border-radius: 28px;
    padding: 0;
    max-width: 620px;
    width: calc(100% - 30px);
    box-shadow: 0 24px 80px rgba(15, 23, 42, .25);
}

.aps-dialog::backdrop {
    background: rgba(2, 6, 23, .52);
    backdrop-filter: blur(3px);
}

.aps-dialog-inner {
    padding: 28px;
    position: relative;
}

.aps-dialog h3 {
    margin: 0 0 6px;
    font-size: 1.8rem;
}

.aps-form-note {
    margin: 0 0 20px;
    color: var(--aps-muted);
}

.aps-dialog label {
    display: block;
    font-weight: 800;
    margin: 13px 0 0;
}

.aps-dialog input,
.aps-dialog textarea,
.aps-dialog select {
    width: 100%;
    margin-top: 7px;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: #ffffff;
    color: var(--aps-dark);
}

.aps-dialog textarea {
    min-height: 120px;
    resize: vertical;
}

.aps-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.aps-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.aps-close {
    position: absolute;
    right: 18px;
    top: 16px;
    border: 0;
    background: var(--aps-soft);
    color: var(--aps-dark);
    border-radius: 999px;
    width: 38px;
    height: 38px;
    font-size: 24px;
    cursor: pointer;
}

.aps-hp {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

/* Mobile */

@media (max-width: 700px) {
    .aps-agenda {
        width: 100%;
        max-width: 100%;
        padding: 20px 8px;
        overflow-x: hidden;
    }

    .aps-hero {
        display: block;
        margin-bottom: 20px;
    }

    .aps-hero h2 {
        font-size: 2.25rem;
    }

    .aps-subtitle {
        font-size: .95rem;
    }

    .aps-btn-primary {
        margin-top: 18px;
        width: 100%;
    }

    .aps-calendar-card {
        width: 100%;
        max-width: 100%;
        padding: 8px;
        border-radius: 18px;
        overflow: hidden;
    }

    .fc,
    .fc-view-harness,
    .fc-view,
    .fc-scrollgrid,
    .fc-scrollgrid table,
    .fc table {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .fc {
        font-size: .72rem !important;
    }

    .fc .fc-toolbar {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 18px !important;
    }

    .fc .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        max-width: 100% !important;
    }

    .fc .fc-toolbar-title {
        font-size: 1.35rem !important;
        text-align: center;
    }

    .fc .fc-button,
    .fc .fc-button-primary,
    .fc button {
        padding: .48em .62em !important;
        font-size: .72rem !important;
    }

    .fc .fc-col-header-cell-cushion {
        font-size: .65rem !important;
        padding: 4px 0 !important;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 48px !important;
        padding: 0 !important;
    }

    .fc .fc-daygrid-day-number {
        font-size: .68rem !important;
        padding: 3px !important;
    }

    .fc .fc-daygrid-day-events {
        margin: 0 !important;
        padding: 0 1px !important;
    }

    .fc-event {
        font-size: .58rem !important;
        line-height: 1.1 !important;
        padding: 1px 2px !important;
        border-radius: 5px !important;
    }

    .aps-grid-2 {
        grid-template-columns: 1fr;
    }

    .aps-dialog-inner {
        padding: 22px;
    }

    .aps-dialog-actions {
        flex-direction: column-reverse;
    }

    .aps-dialog-actions .aps-btn {
        width: 100%;
    }
}