/* Archiviste v4.0 - Styles complémentaires */

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Styles pour les badges de mémoire */
.memory-badge {
    font-size: 0.7em;
    margin-left: 5px;
}

.memory-badge.enhanced {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.memory-badge.new {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

/* Styles responsifs */
@media (max-width: 768px) {
    .archiviste-header .btn-group {
        width: 100%;
        margin-top: 1rem;
    }
    
    .archiviste-header .btn-group .btn {
        flex: 1;
    }
    
    #resultsMap {
        height: 300px;
    }
}

/* Amélioration des cartes de résultats */
.result-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Styles pour la timeline */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3498db;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    width: 2px;
    height: calc(100% + 2rem);
    background: #e9ecef;
}

.timeline-item:last-child::after {
    display: none;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Styles pour les indicateurs de confiance */
.confidence-meter {
    height: 8px;
    border-radius: 4px;
    background: #ecf0f1;
    overflow: hidden;
}

.confidence-meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.confidence-high { background: linear-gradient(45deg, #27ae60, #2ecc71); }
.confidence-medium { background: linear-gradient(45deg, #f39c12, #f1c40f); }
.confidence-low { background: linear-gradient(45deg, #e74c3c, #c0392b); }

/* Tooltips personnalisés */
.custom-tooltip {
    position: relative;
    cursor: help;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.custom-tooltip:hover::after {
    opacity: 1;
}

/* Theme cards (distinctes des period-card) */
.theme-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.theme-card.active {
    border-left: 4px solid #27ae60;
    background-color: #f0fdf4;
}

/* Chips de patterns/suggestions */
.suggestion-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.suggestion-chip.pattern {
    background: #ede9fe;
    color: #6d28d9;
    border-color: #c4b5fd;
}

.suggestion-chip.pattern:hover {
    background: #ddd6fe;
}

.suggestion-chip.keyword {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.suggestion-chip.keyword:hover {
    background: #bae6fd;
}

.suggestion-chip.temporal {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

/* Source badges */
.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.source-badge.google {
    background: #dbeafe;
    color: #1e40af;
}

.source-badge.chronicling {
    background: #fce7f3;
    color: #9d174d;
}

.source-badge.europeana {
    background: #d1fae5;
    color: #065f46;
}

.source-badge.wayback {
    background: #fef3c7;
    color: #92400e;
}

.source-badge.wikidata {
    background: #e0e7ff;
    color: #3730a3;
}

.source-badge.gdelt {
    background: #fce4ec;
    color: #880e4f;
}

.source-badge.dbpedia {
    background: #fff3e0;
    color: #e65100;
}

.source-badge.active {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4);
}

.source-badge.inactive {
    opacity: 0.5;
}

/* Refined tags dans les résultats */
.refined-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    background: #f3e8ff;
    color: #7c3aed;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Styles d'accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .period-card {
        border: 2px solid #000;
    }
    
    .result-card {
        border: 1px solid #000;
    }
}
