/* ══════════════════════════════════════════════════
   Formulaire de Sécurité Qualiopi — Styles
   ══════════════════════════════════════════════════ */

/* ─── Reset & Base ───────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #eef2f7;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── Container Principal ────────────────────── */
.container {
    width: 55%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ─── Logo ───────────────────────────────────── */
.logo {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto 1.5rem;
}

/* ─── Formulaire ─────────────────────────────── */
form {
    margin-top: 1rem;
}

/* ─── Titres ─────────────────────────────────── */
h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 10px 16px;
    margin: 0.5rem 0 1rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* ─── Séparateurs ────────────────────────────── */
hr {
    margin: 1.8rem 0;
    border: none;
    border-top: 2px solid #ecf0f1;
}

/* ─── Labels ─────────────────────────────────── */
label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: #444;
}

label em {
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* ─── Input Groups ───────────────────────────── */
.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.input-group1 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group div,
.input-group1 div {
    flex: 1;
}

/* ─── Champs de saisie ───────────────────────── */
input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 2px solid #dce1e8;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    background: #fff;
}

textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #dce1e8;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
    margin-top: 0.5rem;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    background: #fff;
}

/* ─── Questions ──────────────────────────────── */
.question {
    padding: 1rem 1.2rem;
    margin-bottom: 0.5rem;
    background: #f8f9fb;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: background-color 0.2s ease;
}

.question:hover {
    background: #f0f4f8;
}

.question label {
    font-weight: 500;
    margin-bottom: 0.6rem;
}

/* ─── Radio Options ──────────────────────────── */
.radio-options {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.radio-options label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.radio-options label:hover {
    background-color: #e8f0fe;
}

input[type="radio"] {
    margin-right: 0.4rem;
    accent-color: #3498db;
    width: 16px;
    height: 16px;
}

/* ─── Bouton Envoyer ─────────────────────────── */
input[type="submit"] {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.35);
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

/* ─── Pictogramme ATEX ───────────────────────── */
.pictogram {
    width: 70px;
    height: 70px;
    margin-top: 0.5rem;
    border-radius: 4px;
}

/* ─── Légende NA ─────────────────────────────── */
.na-legend {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
}

/* ─── Required asterisk ──────────────────── */
.required {
    color: #e74c3c;
    font-weight: bold;
}

/* ─── Intro Message ───────────────────── */
.intro-message {
    background: linear-gradient(135deg, #eaf4fe, #f0f7ff);
    border-left: 4px solid #3498db;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}

.intro-message p {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
    line-height: 1.5;
}

/* ─── Validation Error Banner ────────── */
.validation-error {
    background: linear-gradient(135deg, #fdeaea, #fdf0f0);
    border-left: 4px solid #e74c3c;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
    animation: shake 0.5s ease-in-out;
}

.validation-error p {
    margin: 0;
    font-size: 0.95rem;
    color: #c0392b;
    line-height: 1.5;
}

/* ─── Field Error States ─────────────── */
input.field-error,
textarea.field-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
    background-color: #fdf0f0 !important;
}

.question-error {
    border-left-color: #e74c3c !important;
    background-color: #fdf0f0 !important;
}

/* ══════════════════════════════════════════════════
   Pages de statut (Erreur / Succès)
   ══════════════════════════════════════════════════ */

.status-page {
    text-align: center;
    padding: 3rem 2.5rem;
    margin-top: 10vh;
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounceIn 0.6s ease-out;
}

.status-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.status-message {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.status-details {
    padding: 1.2rem;
    background: #f8f9fb;
    border-radius: 8px;
    border-left: 4px solid #95a5a6;
    max-width: 500px;
    margin: 0 auto;
}

.status-details p {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.error-icon {
    animation: shake 0.5s ease-in-out;
}

.success-icon {
    animation: bounceIn 0.6s ease-out;
}

/* ─── Animations ─────────────────────────────── */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* ══════════════════════════════════════════════════
   Responsive Design
   ══════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .container {
        width: 75%;
    }
}

@media (max-width: 768px) {
    .container {
        width: 92%;
        padding: 1.5rem;
        margin: 1rem auto;
    }

    h3 {
        font-size: 1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group div {
        width: 100%;
    }

    .question {
        padding: 0.8rem 1rem;
    }

    .radio-options {
        gap: 0.8rem;
    }

    .status-page {
        margin-top: 5vh;
        padding: 2rem 1.5rem;
    }

    .status-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 96%;
        padding: 1rem;
        border-radius: 8px;
    }

    h3 {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .question label {
        font-size: 0.85rem;
    }

    .radio-options label {
        font-size: 0.85rem;
    }

    input[type="submit"] {
        font-size: 1rem;
        padding: 0.85rem;
    }
}
