/* Styles personnalisés pour le Guide Journaliste Pro */

/* Variables CSS pour les thèmes */
:root {
  --primary-color: #4f46e5;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
}

[data-theme="dark"] {
  --bg-primary: #1f2937;
  --bg-secondary: #111827;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --border-color: #374151;
}

/* Styles de base */
.tab-active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.tab-inactive {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.tab-inactive:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-1px);
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Alertes */
.alert-danger {
    background-color: #fef2f2;
    border-left: 4px solid var(--danger-color);
    color: #dc2626;
}

.alert-success {
    background-color: #f0fdf4;
    border-left: 4px solid var(--success-color);
    color: #16a34a;
}

.alert-warning {
    background-color: #fffbeb;
    border-left: 4px solid var(--warning-color);
    color: #d97706;
}

.alert-info {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1d4ed8;
}

/* Citations */
.cite {
    background-color: #f8fafc;
    border-left: 3px solid #3b82f6;
    padding: 12px 16px;
    margin: 16px 0;
    font-style: italic;
    position: relative;
}

.cite::before {
    content: '"';
    font-size: 2rem;
    color: #3b82f6;
    position: absolute;
    left: -8px;
    top: -8px;
    background: var(--bg-primary);
    padding: 0 4px;
}

/* Barre de progression */
#progress-bar {
    transition: width 0.3s ease;
}

/* Navigation flottante */
#floating-nav {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#floating-nav.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Bouton retour en haut */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-2px);
}

/* Moteur de recherche */
#search-results {
    max-height: 300px;
    z-index: 1000;
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--bg-secondary);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* FAQ accordéon */
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    background-color: var(--bg-secondary);
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background-color: #e5e7eb;
}

.faq-answer {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: var(--bg-primary);
}

.faq-answer.open {
    padding: 16px;
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.open {
    transform: rotate(180deg);
}

/* Modales */
.modal {
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Calculateur */
.calculator-input {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    transition: border-color 0.2s ease;
}

.calculator-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.calculator-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

/* Générateur de documents */
.document-template {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.document-template:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.document-template.selected {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

/* Test d'éligibilité */
.eligibility-question {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.eligibility-option {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eligibility-option:hover {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.eligibility-option.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.eligibility-result {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.eligibility-result.positive {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.eligibility-result.negative {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.eligibility-result.partial {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

/* Glossaire */
.glossary-term {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.glossary-term:last-child {
    border-bottom: none;
}

.glossary-word {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.glossary-definition {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Cas pratiques */
.case-study {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.case-header {
    background-color: var(--bg-secondary);
    padding: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.case-content.open {
    padding: 16px;
    max-height: 1000px;
}

.case-scenario {
    background-color: #fef3c7;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.case-solution {
    background-color: #d1fae5;
    padding: 12px;
    border-radius: 6px;
}

/* Timeline */
.timeline-item {
    position: relative;
    padding-left: 32px;
    margin-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: -24px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    z-index: 1;
}

/* Statistiques */
.stat-card {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Contacts d'urgence */
.contact-card {
    transition: all 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Arbre de décision */
.decision-node {
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.decision-question {
    background-color: #eff6ff;
    border-color: #3b82f6;
}

.decision-answer {
    background-color: #f0fdf4;
    border-color: #10b981;
}

.decision-action {
    background-color: #fef3c7;
    border-color: #f59e0b;
}

/* Responsive */
@media (max-width: 768px) {
    #floating-nav {
        display: none !important;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .cite {
        margin: 12px 0;
        padding: 8px 12px;
    }
    
    .calculator-result,
    .eligibility-result {
        padding: 16px;
    }
    
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}

/* Mode sombre */
[data-theme="dark"] {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .bg-gray-50 {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .text-gray-800 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-gray-600 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .border-gray-200 {
    border-color: var(--border-color) !important;
}

/* Animations personnalisées */
@keyframes pulse-gentle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.pulse-gentle {
    animation: pulse-gentle 2s infinite;
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.bounce-subtle {
    animation: bounce-subtle 1s infinite;
}

/* Utilitaires */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.glass-effect {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scroll personnalisé */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Focus visible pour l'accessibilité */
.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    #floating-nav,
    #back-to-top,
    .tab-btn,
    footer {
        display: none !important;
    }
    
    .content-section {
        display: block !important;
    }
    
    .cite {
        break-inside: avoid;
    }
}
css.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer:not(.hidden) {
    max-height: 500px;
    overflow: visible;
}