/* /assets/css/style.css */
/* Styles personnalisés pour ch-ue.com */

:root {
    --primary-red: #DC143C;
    --primary-blue: #003580;
    --eu-yellow: #FFD700;
    --swiss-white: #FFFFFF;
    --light-gray: #F8F9FA;
    --dark-gray: #343A40;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding-top: 76px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-blue) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--eu-yellow);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: calc(100vh - 76px);
    position: relative;
    overflow: hidden;
	top: -10px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220,20,60,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,53,128,0.1) 0%, transparent 70%);
    animation: rotate-reverse 25s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.logo-hero {
    max-width: 400px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.2));
}

/* Animations */
.animate-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.animate-fade-in-delay-3 {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Classe pour les éléments qui doivent être animés au scroll */
.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Buttons */
.btn {
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-blue) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-red) 100%);
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(220,20,60,0.1) 0%, rgba(0,53,128,0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Quiz Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 30px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.progress {
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--light-gray);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-blue) 100%);
    transition: width 0.5s ease;
}

/* Response Scale */
.response-scale {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 30px 0;
}

.response-option {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.response-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.response-option.selected {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, rgba(220,20,60,0.1) 0%, rgba(0,53,128,0.1) 100%);
}

.response-option input[type="radio"] {
    display: none;
}

/* Package Info */
.package-info {
    background: var(--light-gray);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.package-info h4 {
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.pros, .cons {
    padding: 20px;
    border-radius: 10px;
}

.pros {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
}

.cons {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
}

/* Results Page */
.results-container {
    max-width: 1000px;
    margin: 0 auto;
}

.score-card {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-blue) 100%);
    color: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.score-display {
    font-size: 5rem;
    font-weight: 700;
    margin: 20px 0;
    text-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.share-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.share-button:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Statistics Charts */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 600px; /* ou 100% selon la grille Bootstrap */
    margin: auto;
    margin-bottom: 30px;
}

.chart-container canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 400px;
}


/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.social-links a {
    transition: all 0.3s ease;
	text-decoration: none;
}

.social-links a:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .logo-hero {
        max-width: 300px;
        margin-top: 30px;
    }
    
    .response-scale {
        flex-direction: column;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
    
    .score-display {
        font-size: 3rem;
    }
}

/* Loading Animation */
.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-red);
    border-right: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Tooltips */
.tooltip-custom {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: var(--dark-gray);
    color: white;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Print Styles */
@media print {
    .navbar, footer, .share-buttons, .btn {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .question-card {
        page-break-inside: avoid;
    }
}

/* Correction pour le problème d'opacity sur les éléments animés */

/* S'assurer que les cartes sont visibles par défaut */
.feature-card,
.question-card,
.chart-container,
.card {
    opacity: 1 !important;
}

/* Pour les éléments qui doivent être animés au scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Fix spécifique pour la page accords */
.agreements-page .card {
    opacity: 1 !important;
    visibility: visible !important;
}

/* S'assurer que tous les éléments Bootstrap sont visibles */
.row > div[class*="col-"] {
    opacity: 1 !important;
}

/* Ajouter ces styles au fichier /assets/css/style.css */

/* Styles spécifiques pour la page de résultats */
.stat-box {
    background: linear-gradient(135deg, rgba(220,20,60,0.05) 0%, rgba(0,53,128,0.05) 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,53,128,0.1);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 15px 0;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badge des mots-clés */
.badge {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Prévisualisation de l'image générée */
#image-preview-container img {
    transition: all 0.3s ease;
}

#image-preview-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.notification-info {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
}

.notification-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* Boutons de génération d'image */
.btn[disabled] {
    cursor: not-allowed;
    opacity: 0.7;
}

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

/* Modal de partage */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-blue) 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Amélioration du graphique radar */
#packageChart, #distributionChart {
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

/* Effet de survol sur les boutons de partage */
.share-button {
    position: relative;
    overflow: hidden;
}

.share-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.share-button:hover::before {
    width: 100px;
    height: 100px;
}

/* Animation de pulsation pour le score */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.score-display {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive pour les éléments de résultats */
@media (max-width: 768px) {
    .stat-box {
        margin-bottom: 20px;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    #image-preview-container img {
        max-width: 100%;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}

/* Style pour l'impression */
@media print {
    .score-card {
        background: white !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .score-display {
        color: var(--primary-blue) !important;
        animation: none;
    }
    
    .btn, .share-buttons, #image-preview-container {
        display: none !important;
    }
    
    .chart-container {
        page-break-inside: avoid;
    }
}

/* Effet de chargement pour la génération d'image */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s ease-in-out infinite;
}

.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-container p {
    margin-top: 20px;
    color: var(--primary-blue);
    font-weight: 500;
}