/* Custom styles for the site */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

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

.card-title {
    color: var(--dark-color);
    font-weight: 600;
}

footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #fff !important;
    text-decoration: underline;
}

.btn {
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
}

/* Form styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Utility classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.text-purple {
    color: #6f42c1;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Sommaire styles */
.card.bg-light a {
    color: inherit;
    transition: color 0.2s;
}

.card.bg-light a:hover {
    color: var(--primary-color);
}

/* Inline source reference links */
.source-ref {
    font-size: 0.85em;
    vertical-align: super;
    text-decoration: none;
    color: var(--secondary-color);
}

.source-ref:hover,
.source-ref:focus {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Styles spécifiques pour anti-ivg.html */
.alert.alert-danger {
    background-color: #f8d7da;
    border-left-color: #dc3545 !important;
}

.alert.alert-success {
    background-color: #d1e7dd;
    border-left-color: #198754 !important;
}

.card-header h2 {
    font-weight: 600;
}

.card-body p {
    text-align: justify;
    margin-bottom: 1rem;
}

.card-body h4 {
    color: #495057;
    margin-top: 1.5rem;
}

/* Amélioration de la lisibilité des listes de sources */
.list-group-item a {
    color: #0d6efd;
    text-decoration: none;
    word-break: break-all;
}

.list-group-item a:hover {
    text-decoration: underline;
}

/* Espacement amélioré pour les sections */
section.mb-5 {
    margin-bottom: 3rem !important;
}

/* Styles pour la navigation rapide */
.card .btn {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-color: currentColor;
}

.card .btn i {
    transition: transform 0.3s ease;
}

.card .btn:hover i {
    transform: scale(1.1);
}

/* Scroll offset pour la navigation */
section[id] {
    scroll-margin-top: 100px;
}

/* Amélioration du responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem !important;
    }
    
    .alert {
        padding: 1rem;
    }
    
    h1.display-4 {
        font-size: 1.75rem;
    }
    
    .card .btn {
        padding: 0.75rem 0.5rem !important;
    }
    
    .card .btn i {
        font-size: 1.5rem !important;
    }
    
    .card .btn .small {
        font-size: 0.7rem;
    }
}
