
/* ==============================
   STYLE GÉNÉRAL
============================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f3f6fa;
    color: #263445;
    line-height: 1.6;
}

/* ==============================
   HEADER
============================== */
header {
    text-align: center;
}
header img {
    width: 200px;
}

/* ==============================
   FOOTER
============================== */
footer {
    text-align: center;
    margin-top: 2rem;
}

/* ==============================
   CONTENEUR PRINCIPAL
============================== */

section {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(30, 60, 90, 0.08);
}

/* ==============================
   TITRE
============================== */

h1 {
    color: #174a70;
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 3px solid #e3edf5;
}

h1::after {
    content: "";
    display: block;
    width: 75px;
    height: 4px;
    background: #4e93cf;
    border-radius: 5px;
    margin-top: 12px;
}

/* ==============================
   INTRODUCTION
============================== */

section > p {
    background: #f4f8fb;
    border-left: 4px solid #4e93cf;
    padding: 20px;
    border-radius: 8px;
    color: #536477;
    margin-bottom: 30px;
}

/* ==============================
   BLOCS DES QUESTIONS
============================== */

.section {
    background: #ffffff;
    border: 1px solid #e3eaf1;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.section:hover {
    border-color: #b5d4e5;
    box-shadow: 0 4px 12px rgba(30, 80, 120, 0.05);
}

.section > strong,
.section > label > strong {
    display: block;
    color: #174a70;
    font-size: 16px;
    margin-bottom: 16px;
}

/* ==============================
   CHAMP INTITULÉ FORMATION
============================== */

input[type="text"] {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d5e0e9;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #4e93cf;
    box-shadow: 0 0 0 3px rgba(53, 166, 160, 0.12);
}

/* ==============================
   RÉPONSES RADIO
============================== */

.responses {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.responses label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    background: #f5f8fb;
    border: 1px solid #dce6ee;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.responses label:hover {
    background: #eaf5f6;
    border-color: #4e93cf;
}

/* Boutons radio */

.responses input[type="radio"] {
    accent-color: #4e93cf;
    width: 17px;
    height: 17px;
    cursor: pointer;
    margin: 0;
}

/* Réponse sélectionnée */

.responses label:has(input[type="radio"]:checked) {
    background: #e5f4f2;
    border-color: #4e93cf;
    color: #4e93cf;
    font-weight: 600;
}

/* ==============================
   CHAMPS CONDITIONNELS
============================== */

.conditional-field {
    margin-top: 18px;
    padding: 20px;
    background: #f0f8f8;
    border-left: 4px solid #4e93cf;
    border-radius: 8px;
    animation: apparition 0.3s ease;
}

.conditional-field label {
    display: block;
    color: #4e93cf;
    font-weight: 600;
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 13px 15px;
    border: 1px solid #d5e0e9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.conditional-field[hidden] {
    display: none;
}

@keyframes apparition {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   BOUTON ENVOYER
============================== */

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 30px;
    background: #176c83;
    color: white;
    border: none;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

button[type="submit"]:hover {
    background: #4e93cf;
    transform: translateY(-2px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* ==============================
   RESPONSIVE MOBILE
============================== */

@media screen and (max-width: 650px) {

    body {
        padding: 15px 10px;
    }

    section {
        padding: 22px 16px;
        border-radius: 12px;
    }

    h1 {
        font-size: 22px;
    }

    .section {
        padding: 17px;
    }

    .responses {
        flex-direction: column;
        gap: 8px;
    }

    .responses label {
        width: 100%;
    }

    button[type="submit"] {
        padding: 13px;
    }
}
