/**
 * Registre Numérique - Styles cockpit hôte télépermanences
 *
 * @package        Back - permanences - Télépermanences
 * @author         Nicolas Simplot nsimplot@publilegal.fr
 * @copyright      2026 Publilégal
 * @license        commercial
 * @version        1.0.0
 */

/* Container principal */
.cockpit-host-container {
    padding: 20px 0;
}

/* Cartes */
.creneau-info-card,
.reservations-list-card,
.host-instructions-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.creneau-info-card h4,
.reservations-list-card h4,
.host-instructions-card h4 {
    color: #2196F3;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E3F2FD;
}

.creneau-info-card h4 i,
.reservations-list-card h4 i,
.host-instructions-card h4 i {
    margin-right: 10px;
}

/* Détails du créneau */
.creneau-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
}

.detail-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.detail-value {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

/* Statut du créneau */
.creneau-status {
    text-align: center;
    padding: 15px 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
}

.status-badge i {
    font-size: 16px;
}

.status-upcoming {
    background: #E3F2FD;
    color: #1976D2;
    border: 1px solid #2196F3;
}

.status-active {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #4CAF50;
}

.status-active i {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.status-extended {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FF9800;
}

.status-closed {
    background: #F5F5F5;
    color: #666;
    border: 1px solid #999;
}

/* Table des réservations */
.reservations-table-wrapper {
    overflow-x: auto;
}

.reservations-table {
    margin-top: 15px;
}

.reservations-table thead {
    background: #f5f5f5;
}

.reservations-table thead th {
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #2196F3;
}

.reservations-table tbody tr {
    transition: background-color 0.2s;
}

.reservations-table tbody tr:hover {
    background: #f9f9f9;
}

/* Info participant */
.participant-info {
    display: flex;
    flex-direction: column;
}

.participant-info strong {
    color: #333;
    font-size: 14px;
}

.participant-info small {
    color: #666;
    font-size: 12px;
    margin-top: 3px;
}

/* Badges de statut */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-confirmed {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-pending {
    background: #FFF3E0;
    color: #E65100;
}

.badge-canceled {
    background: #FFEBEE;
    color: #C62828;
}

/* Statut pré-vol */
.preflight-status,
.meeting-status {
    display: flex;
    align-items: center;
}

.status-loading {
    color: #666;
    font-size: 12px;
}

.badge-preflight,
.badge-meeting {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.badge-preflight.badge-success,
.badge-meeting.badge-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-preflight.badge-warning,
.badge-meeting.badge-warning {
    background: #FFF3E0;
    color: #E65100;
}

.badge-preflight.badge-error,
.badge-meeting.badge-error {
    background: #FFEBEE;
    color: #C62828;
}

.badge-preflight.badge-pending,
.badge-meeting.badge-pending {
    background: #f5f5f5;
    color: #666;
}

.badge-meeting.badge-info {
    background: #E3F2FD;
    color: #1976D2;
}

.badge-meeting.badge-active {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #4CAF50;
}

.badge-meeting.badge-active i {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.badge-meeting.badge-ended {
    background: #f5f5f5;
    color: #666;
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* Instructions */
.host-instructions-card ul {
    margin: 0;
    padding-left: 20px;
}

.host-instructions-card li {
    margin: 10px 0;
    color: #333;
    line-height: 1.6;
}

/* Modal Timeline */
#timelineModal .modal-content {
    border-radius: 8px;
}

#timelineModal .modal-header {
    background: #2196F3;
    color: white;
    border-radius: 8px 8px 0 0;
}

#timelineModal .modal-header .close {
    color: white;
    opacity: 0.8;
}

#timelineModal .modal-header .close:hover {
    opacity: 1;
}

/* Timeline */
.timeline-container {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.timeline-events {
    position: relative;
    padding-left: 40px;
}

.timeline-events::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-event {
    position: relative;
    margin-bottom: 25px;
}

.timeline-marker {
    position: absolute;
    left: -33px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-marker i {
    font-size: 12px;
    color: #666;
}

.timeline-event-success .timeline-marker {
    border-color: #4CAF50;
    background: #E8F5E9;
}

.timeline-event-success .timeline-marker i {
    color: #2E7D32;
}

.timeline-event-info .timeline-marker {
    border-color: #2196F3;
    background: #E3F2FD;
}

.timeline-event-info .timeline-marker i {
    color: #1976D2;
}

.timeline-event-warning .timeline-marker {
    border-color: #FF9800;
    background: #FFF3E0;
}

.timeline-event-warning .timeline-marker i {
    color: #E65100;
}

.timeline-event-danger .timeline-marker {
    border-color: #f44336;
    background: #FFEBEE;
}

.timeline-event-danger .timeline-marker i {
    color: #C62828;
}

.timeline-content {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.timeline-time {
    font-size: 11px;
    color: #999;
    font-family: 'Courier New', monospace;
}

.timeline-data {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.event-data-list {
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
    color: #666;
}

.event-data-list li {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .creneau-details {
        grid-template-columns: 1fr;
    }

    .reservations-table {
        font-size: 12px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .participant-info strong {
        font-size: 13px;
    }

    .participant-info small {
        font-size: 11px;
    }

    .timeline-events {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -28px;
        width: 24px;
        height: 24px;
    }

    .timeline-marker i {
        font-size: 10px;
    }
}

/* Accessibilité */
.btn:focus,
.action-buttons .btn:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

/* Animation de chargement */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Scrollbar timeline */
.timeline-container::-webkit-scrollbar {
    width: 8px;
}

.timeline-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Alert dans modal */
#timelineModal .alert {
    margin: 20px 0;
}
