/**
 * Planning Éditorial - Styles
 * Calendrier FullCalendar + vue liste + modals
 *
 * @package BookConnect
 * @since Mars 2026
 */

/* ========== Calendar Container ========== */
#planning-calendar {
    min-height: 500px;
}

/* FullCalendar overrides */
.fc {
    font-family: inherit;
}

.fc .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: capitalize;
}

.fc .fc-button {
    border-radius: 6px;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

.fc .fc-button-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.fc .fc-daygrid-day-number {
    font-size: 0.85rem;
    padding: 4px 8px;
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Event styling */
.fc .fc-event {
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.fc .fc-event:hover {
    opacity: 0.85;
}

.fc .fc-daygrid-event-dot {
    display: none;
}

.fc .fc-list-event-dot {
    border-radius: 50%;
}

/* ========== Status Colors ========== */
.planning-status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    border-radius: 4px;
    padding: 3px 8px;
}

/* Status indicator circles for inline use */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot--a_faire { background-color: #94a3b8; }
.status-dot--en_cours { background-color: #3b82f6; }
.status-dot--en_revision { background-color: #f59e0b; }
.status-dot--valide { background-color: #22c55e; }
.status-dot--bloque { background-color: #ef4444; }

/* ========== List View ========== */
.planning-group {
    border-bottom: 1px solid #e9ecef;
}

.planning-group:last-child {
    border-bottom: none;
}

.planning-group-header {
    background-color: #f8f9fa;
}

.planning-group .table {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.planning-group .table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    border-top: none;
    padding: 0.5rem 0.75rem;
}

.planning-group .table td {
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
}

/* Retard highlighting */
.text-danger.fw-bold {
    animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========== Toolbar ========== */
#viewSelector .btn {
    font-size: 0.82rem;
    padding: 0.3rem 0.7rem;
}

/* ========== Modal ========== */
#modalAddStep .form-label {
    font-weight: 500;
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
}

#modalAddStep .form-control,
#modalAddStep .form-select {
    font-size: 0.9rem;
}

/* ========== Responsive ========== */
@media (max-width: 991.98px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .fc .fc-toolbar-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    #planning-calendar {
        min-height: 350px;
    }

    .fc .fc-event {
        font-size: 0.7rem;
        padding: 1px 4px;
    }

    .planning-group .table {
        font-size: 0.8rem;
    }

    .planning-group .table th,
    .planning-group .table td {
        padding: 0.4rem 0.5rem;
    }

    /* Stack toolbar on mobile */
    .card-body .row.g-2 > .col-auto {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #filterManuscrit,
    #filterStatus {
        min-width: 100% !important;
    }
}

@media (max-width: 575.98px) {
    .fc .fc-toolbar-title {
        font-size: 1rem;
    }

    .fc .fc-button {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}
