/* =====================================
   FULLCALENDAR CUSTOM THEME
   Responsive + Dark Mode + Mobile App
===================================== */

body {
    font-family: 'Nunito', sans-serif;
    background: #F3F5F9;
}

/* =====================
   TOOLBAR
===================== */
.fc .fc-toolbar {
    align-items: center;
}

.fc .fc-toolbar-title {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
    color: #002147;
}

.fc .fc-button {
    box-shadow: none !important;
}

.fc .fc-button-primary {
    background: #002147;
    border: none;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.fc .fc-button-primary:hover {
    background: #001530;
}

/* =====================
   TODAY
===================== */
.fc .fc-day-today {
    background: rgba(0, 33, 71, .05);
}

/* =====================
   EVENTS
===================== */
.fc .fc-event-title {
    white-space: normal;
}

.fc .fc-daygrid-event,
.fc .fc-timegrid-event {
    border-radius: 6px;
    padding: 4px 6px;
    font-weight: 600;
    font-size: 13px;
    border: none;
}

/* Color Variants */
.fc-bg-blue { background-color: #002147 !important; }
.fc-bg-lightgreen { background-color: #28a745 !important; }
.fc-bg-pinkred { background-color: #e83e8c !important; }
.fc-bg-deepskyblue { background-color: #0dcaf0 !important; }
.fc-bg-default { background-color: #6c757d !important; }

/* =====================
   MODAL
===================== */
.modal-body {
    background: #F3F5F9;
}

.modal-body h4 {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
    color: #002147;
    margin-bottom: 20px;
}

.modal-body .form-control {
    box-shadow: none;
}

.form-group label {
    font-weight: 600;
    font-size: 15px;
}

.horaireRDV {
    width: 100%;
    text-align: right;
}

/* =====================
   DARK MODE
===================== */
body.dark-mode {
    background: #1e1e1e;
    color: #f5f5f5;
}

body.dark-mode .fc .fc-toolbar-title {
    color: #ffffff;
}

body.dark-mode .fc .fc-button-primary {
    background: #444;
}

body.dark-mode .fc .fc-daygrid-day,
body.dark-mode .fc .fc-timegrid-slot {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .fc .fc-day-today {
    background: rgba(255,255,255,.08);
}

body.dark-mode .fc-bg-blue { background-color: #4a90e2 !important; }
body.dark-mode .fc-bg-lightgreen { background-color: #3ddc97 !important; }
body.dark-mode .fc-bg-pinkred { background-color: #ff4d6d !important; }
body.dark-mode .fc-bg-deepskyblue { background-color: #00bcd4 !important; }
body.dark-mode .fc-bg-default { background-color: #888 !important; }

body.dark-mode .modal-body {
    background: #2a2a2a;
}

body.dark-mode .modal-body .form-control {
    background: #444;
    color: #fff;
    border: 1px solid #666;
}

/* =====================
   MOBILE RESPONSIVE
===================== */
@media (max-width: 768px) {

    body {
        font-size: 14px;
    }

    #calendar {
        font-size: 0.85rem;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        gap: 6px;
    }

    .fc-toolbar-title {
        font-size: 1rem !important;
        text-align: center;
    }

    .fc-button {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
    }

    .fc .fc-timegrid-slot {
        height: 35px;
    }

    .fc .fc-timegrid-event {
        font-size: 0.8rem;
        padding: 6px;
    }

    /* Fullscreen Modal Mobile */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }

    .modal-content {
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
    }
    /* =====================
       MOBILE LIST / AGENDA VIEW
    ===================== */

    .fc .fc-list {
        border: none;
    }

    .fc .fc-list-day-cushion {
        background: transparent;
        font-weight: 700;
        font-size: 0.9rem;
        padding: 10px 0;
        text-transform: uppercase;
        color: #002147;
    }

    .fc .fc-list-event {
        border: none;
    }

    .fc .fc-list-event td {
        padding: 0;
        border: none;
    }

    .fc .fc-list-event-title {
        display: block;
        background: #ffffff;
        margin-bottom: 12px;
        padding: 14px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        font-weight: 600;
    }

    .fc .fc-list-event-time {
        display: block;
        font-size: 0.75rem;
        opacity: 0.7;
        margin-bottom: 6px;
    }

    body.dark-mode .fc .fc-list-event-title {
        background: #2a2a2a;
        box-shadow: none;
    }
    }

    /* Button for indicating possible event on day */
    .fc-daygrid-day .add-event-btn {
        display: inline-block;
        margin-top: 4px;
        padding: 2px 6px;
        font-size: 0.65rem;
        background-color: #28a745;
        color: #fff;
        border-radius: 4px;
        cursor: pointer;
        text-align: center;
        width: 80%;
        transition: background 0.2s;
    }

    .fc-daygrid-day .add-event-btn:hover {
        background-color: #218838;
    }