/* styles.css - Feuille de style globale pour les tests psychologiques */

/* Import du thème Bootswatch */
/* Thèmes Bootswatch suggérés : lumen, morph, spacelab, yeti */
@import url('https://cdn.jsdelivr.net/npm/bootswatch@5.3.0/dist/yeti/bootstrap.min.css'); /* Changé de darkly à yeti */

/* Section : Réinitialisation */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Section : Styles généraux */
body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    /* Couleurs gérées par le thème Bootswatch */
}

.container {
    max-width: 800px;
    width: 90%;
    margin: 3rem auto 2rem auto; /* Réduit à 3rem pour moins d'espace en haut */
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.instructions {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.disclaimer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Section : Questions du formulaire */
.question {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.question h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.form-check {
    margin: 0.5rem 0;
}

.form-check-input {
    transform: scale(1.2);
    margin-right: 0.5rem;
    cursor: pointer;
}

.form-check-label {
    font-size: 1rem;
}

/* Styles pour les boutons radio Vrai/Faux */
.radio-vrai .form-check-input:checked + .form-check-label {
    color: var(--bs-success);
    font-weight: bold;
}

.radio-faux .form-check-input:checked + .form-check-label {
    color: var(--bs-danger);
    font-weight: bold;
}

/* Section : Boutons */
.submit-btn {
    display: block;
    margin: 1.5rem auto;
    padding: 0.75rem 1.5rem;
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

.submit-btn:hover {
    background: var(--bs-primary-dark);
}

.submit-btn:active {
    transform: scale(0.95);
}

.submit-btn.reset-btn {
    background: var(--bs-danger);
}

.submit-btn.reset-btn:hover {
    background: var(--bs-danger-dark);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 1.5rem 0 1rem 1rem; /* Aligné à gauche */
    transition: background 0.3s;
}

.back-btn:hover {
    background: var(--bs-primary-dark);
}

.back-btn svg {
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.4rem;
    fill: #fff;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
    justify-content: center;
}

.back-link:hover {
    background: var(--bs-primary-dark);
    text-decoration: none;
    color: #fff;
}

.back-link svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    fill: #fff;
}

/* Section : Barre de progression */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 8px !important; /* Hauteur contrainte */
    background: var(--bs-secondary-bg);
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.progress-bar {
    background: var(--bs-success);
    transition: width 0.3s ease;
    height: 100% !important; /* Hauteur contrainte */
    border-radius: 0 0 4px 4px;
}

/* Section : Résultat et graphe */
.result-box {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 2px solid var(--bs-success);
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
}

.chart-container {
    margin-top: 1rem;
    max-width: 100%;
    height: 100px;
}

/* Section : Sélecteur de thème */
.theme-selector {
    display: inline-block;
    padding: 0.4rem;
    background: var(--bs-dark);
    color: var(--bs-light);
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 1.5rem 1rem 1rem 0; /* Aligné à droite */
    float: right; /* Alignement à droite */
    font-family: Arial, sans-serif; /* Compatibilité des icônes Unicode */
}

.theme-selector:focus {
    outline: none;
    border-color: var(--bs-primary);
}

/* Section : Media queries pour petits écrans */
@media screen and (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .container {
        width: 95%;
        margin: 0.5rem auto 1rem auto;
        padding: 1rem;
    }

    .title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .instructions {
        font-size: 0.9rem;
    }

    .question {
        margin: 0.75rem 0;
        padding: 0.75rem;
    }

    .question h3 {
        font-size: 1rem;
    }

    .form-check-label {
        font-size: 0.9rem;
    }

    .form-check-input {
        transform: scale(1.1);
    }

    .submit-btn, .back-link {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .back-btn, .theme-selector {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        margin: 1.2rem 1rem 1rem 0; /* Ajusté pour petits écrans */
    }

    .back-btn {
        margin: 1.2rem 0 1rem 1rem; /* Aligné à gauche */
    }

    .back-btn svg, .back-link svg {
        width: 0.8rem;
        height: 0.8rem;
    }

    .result-box {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .disclaimer {
        font-size: 0.85rem;
    }

    .chart-container {
        height: 80px;
    }
}
