/* Styles personnalisés supplémentaires */

/* Animation pour le dévoilement des résultats */
@keyframes unblur {
    from {
        filter: blur(8px);
        opacity: 0.5;
    }
    to {
        filter: blur(0);
        opacity: 1;
    }
}

.unblur-animation {
    animation: unblur 1s ease-out forwards;
}

/* Effet de flou pour les résultats non dévoilés */
.blurred-result {
    filter: blur(8px);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

/* Style pour le container du questionnaire avec animation */
.question-container {
    min-height: 300px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.question-container.fade-out {
    opacity: 0;
}

.question-container.fade-in {
    opacity: 1;
}

/* Style amélioré pour les options de questions */
input[type="radio"]:checked + label {
    transform: translateY(-2px);
}

label {
    transition: all 0.2s ease;
}

label:hover {
    transform: translateY(-2px);
}

/* Style pour les graphiques de scores */
.score-bar {
    transition: width 1s ease-out;
}

/* Responsive pour iframe */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    main {
        padding: 0.5rem;
    }

    /* Grille 1 colonne sur mobile */
    .grid {
        grid-template-columns: 1fr !important;
    }
}

/* Style pour les checkboxes personnalisées */
input[type="checkbox"] {
    accent-color: #0A4A5C;
}

/* Loading spinner amélioré */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0A4A5C;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style pour les tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Style pour l'overlay du formulaire de lead capture */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Animation pour les messages de succès */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-down {
    animation: slideInDown 0.5s ease-out;
}

/* Style pour les badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-blue {
    background-color: #0A4A5C;
    color: white;
}

.badge-orange {
    background-color: #F39200;
    color: white;
}

.badge-green {
    background-color: #6DB33F;
    color: white;
}

/* Amélioration de la visibilité des icônes dans les options */
label .text-3xl {
    transition: transform 0.2s ease;
}

label:hover .text-3xl {
    transform: scale(1.1);
}

/* Animation pour les boutons */
button {
    transition: all 0.2s ease;
}

button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:not(:disabled):active {
    transform: translateY(0);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0A4A5C;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #083a48;
}

/* Focus visible pour l'accessibilité */
input[type="radio"]:focus + label {
    outline: 2px solid #0A4A5C;
    outline-offset: 2px;
}

/* Message d'erreur amélioré */
#validation-error {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Style pour la barre de progression */
#progress-bar {
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #0A4A5C 0%, #6DB33F 100%);
}

/* Hover effect pour les cartes d'options */
label {
    position: relative;
    overflow: hidden;
}

label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(10, 74, 92, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

label:hover::before {
    width: 300px;
    height: 300px;
}
