/* Corrige la superposition de la MudAlert sur les boutons */
.mud-alert {
    z-index: 1;
    position: relative;
}

/* ============================================
   STYLES POUR PANNEAUX DE FILTRES PLIABLES
   ============================================ */

/* En-tête du panneau de filtres (style bleu) */
.filters-panel-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters-panel-header:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
}

.filters-panel-header .mud-icon-root {
    transition: transform 0.3s ease;
}

.filters-panel-header.expanded .mud-icon-root {
    transform: rotate(180deg);
}

/* Contenu du panneau de filtres */
.filters-panel-content {
    background: white;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

/* Badge d'information de résultats */
.filters-result-badge {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #90caf9;
}

.filters-result-badge strong {
    font-weight: 700;
    font-size: 1.1em;
}

/* Bouton de réinitialisation des filtres */
.filters-reset-btn {
    min-width: 100%;
}

/* Style pour les MudExpansionPanels de filtres */
.mud-expand-panel.filters-expansion-panel {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.mud-expand-panel.filters-expansion-panel .mud-expand-panel-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 1rem 1.5rem;
    min-height: 48px;
}

.mud-expand-panel.filters-expansion-panel .mud-expand-panel-header:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
}

.mud-expand-panel.filters-expansion-panel .mud-expand-panel-text {
    font-weight: 600;
    font-size: 1rem;
}

.mud-expand-panel.filters-expansion-panel .mud-expand-panel-content {
    padding: 1.5rem;
    background: white;
}

/* Animation smooth pour l'expansion */
.mud-expand-panel.filters-expansion-panel .mud-collapse-container {
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Styles pour l'autocomplétion */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: -1px;
}

.autocomplete-suggestion {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover {
    background-color: #f8f9fa;
}

.autocomplete-suggestion strong {
    color: #0d6efd;
}

/* Styles pour les colonnes triables */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.sortable:hover {
    background-color: #e9ecef;
}

.sortable i {
    margin-left: 0.25rem;
    font-size: 0.875rem;
}

/* Styles pour les timelines de vaccins */
.vaccine-timeline-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.vaccine-timeline-card {
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #4299e1;
}

.vaccine-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.vaccine-title-section {
    flex: 1;
}

.vaccine-title {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.25rem;
}

.protocol-name {
    color: #6c757d;
    font-size: 0.875rem;
    font-style: italic;
}

.next-date-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: white;
    border: 2px solid currentColor;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 200px;
}

.next-date-badge.text-warning {
    color: #f59e0b;
    background: #fffbeb;
    border-color: #fbbf24;
}

.next-date-badge.text-danger {
    color: #dc2626;
    background: #fef2f2;
    border-color: #ef4444;
}

.next-date-badge > i {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.next-date-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.next-date-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.8;
}

.next-date-value {
    font-size: 1.125rem;
    font-weight: 700;
}

.next-date-status {
    font-size: 0.7rem;
    opacity: 0.9;
}

.timeline-container {
    position: relative;
    padding: 2rem 2rem 1.5rem 2rem;
    min-height: 100px;
}

.timeline-track {
    position: absolute;
    top: 2.5rem;
    left: 5%;
    right: 5%;
    height: 3px;
    background: linear-gradient(to right, #e9ecef 0%, #4299e1 50%, #cbd5e0 100%);
    border-radius: 2px;
}

.timeline-point {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.point-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.timeline-point.completed .point-bubble.primo {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.timeline-point.completed .point-bubble.recurrent {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.timeline-point.planned .point-bubble {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    animation: pulse-bubble 2s infinite;
}

.timeline-point.next-injection .point-bubble {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    animation: pulse-next-bubble 1.5s infinite;
    width: 48px;
    height: 48px;
    font-size: 1.375rem;
}

.point-bubble:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 10px rgba(0,0,0,0.25);
}

.point-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    white-space: nowrap;
    background: white;
    padding: 0.2rem 0.65rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.point-date {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: center;
    white-space: nowrap;
}

.protocol-complete-info {
    margin-top: 1.5rem;
    padding: 0.875rem;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 0.5rem;
    border-left: 4px solid #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.protocol-complete-info i {
    font-size: 1.25rem;
}

@keyframes pulse-bubble {
    0%, 100% {
        box-shadow: 0 3px 6px rgba(0,0,0,0.15), 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    50% {
        box-shadow: 0 3px 6px rgba(0,0,0,0.15), 0 0 0 8px rgba(251, 191, 36, 0);
    }
}

@keyframes pulse-next-bubble {
    0%, 100% {
        box-shadow: 0 5px 10px rgba(0,0,0,0.25), 0 0 0 0 rgba(236, 72, 153, 0.7);
    }
    50% {
        box-shadow: 0 5px 10px rgba(0,0,0,0.25), 0 0 0 12px rgba(236, 72, 153, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .vaccine-header {
        flex-direction: column;
    }
    
    .next-date-badge {
        width: 100%;
    }
    
    .point-bubble {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .timeline-point.next-injection .point-bubble {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
    }
    
    .point-label {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
    
    .point-date {
        font-size: 0.65rem;
    }
}

/* Styles pour la fonctionnalité de copie dans le presse-papiers */
.mud-input-adornment-end button:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}

.mud-input-adornment-end button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease-in-out;
}

/* Animation de succès pour la copie */
@keyframes copy-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #4caf50; }
    100% { transform: scale(1); }
}

.copy-success {
    animation: copy-success 0.3s ease-in-out;
}