:root {
    --primary-color: #004aad; /* Apel Blue - Updated */
    --secondary-color: #FFD700; /* Gold/Yellow */
    --success-color: #28a745;
    --danger-color: #d9534f;
    --light-bg: #eaf1fb; /* Bleu très pâle Apel */
    --dark-text: #343a40;
    --light-text: #fff;
    --border-radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-bg);
    margin: 0;
    padding-top: 50px; /* Space for the progress bar */
}

#progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: #e9ecef;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.4s ease-in-out;
}

#quiz-container {
    background-color: var(--light-text);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 600px;
    width: 90%;
    position: relative;
    overflow: hidden;
    transition: height 0.5s ease-in-out;
    border: 2.5px solid var(--primary-color);
}

#logo-apel {
    max-width: 120px;
    margin-bottom: 1.5rem;
}

#logo-apel-deroule {
    max-width: 200px;
    margin-bottom: 1rem;
}

#logo-apel-signature {
    max-width: 150px;
    margin-bottom: 1.5rem;
}

h1 {
    color: var(--primary-color);
    font-weight: 700;
}

h3 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

button {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 2px 8px #004aad22;
}

button:hover {
    background-color: #00337a;
    transform: translateY(-2px);
}

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

.question {
    animation: slideInRight 0.5s forwards;
    position: absolute;
    width: calc(100% - 5rem); /* Adjust for padding */
    left: 2.5rem;
    top: 150px; /* Adjust based on header height */
}

.question.exiting {
    animation: slideOutLeft 0.5s forwards;
}

.options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 1.5rem;
}

.option {
    background-color: var(--light-bg);
    color: var(--dark-text);
    width: 100%;
    border: 2px solid var(--primary-color);
}

.option:hover {
    border-color: var(--primary-color);
    background-color: #fff;
}

.option.selected {
    background-color: var(--primary-color);
    color: var(--light-text);
    border-color: var(--primary-color);
}

.info-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e6f7ff;
    border-left: 5px solid var(--primary-color);
    text-align: left;
    border-radius: 8px;
}

#continue-btn {
    background-color: var(--primary-color);
    display: block;
    margin-left: auto;
    margin-right: 0;
}

#continue-btn:hover {
    background-color: #00337a;
}

button:disabled, textarea:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

textarea {
    width: 100%;
    min-height: 80px;
    margin-top: 1rem;
    padding: 10px;
    border-radius: 8px;
    border: 1.5px solid var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
}

.next-btn {
    display: block;
    margin-left: auto;
    margin-top: 10px;
}

.other-input-container {
    margin-top: 1rem;
}

.results hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #eee;
}

.personalized-message {
    background-color: #fffbe6;
    border-left: 5px solid var(--secondary-color);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    text-align: left;
}

.personalized-message h3 {
    margin-top: 0;
    color: #d46b08;
}

#pdf-btn {
    background-color: var(--danger-color);
    font-weight: bold;
}

#pdf-btn:hover {
    background-color: #c9302c;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* === Mobile Responsive Styles === */
@media (max-width: 600px) {
    body {
        padding-top: 10px; /* Space for progress bar */
    }

    #quiz-container {
        display: flex;
        flex-direction: column;
        justify-content: center; /* Center content vertically */
        width: 100%;
        min-height: calc(100vh - 10px); /* Full height minus progress bar */
        padding: 1.5rem;
        box-sizing: border-box;
        border-radius: 0;
        box-shadow: none;
        height: auto !important; /* Let content flow, overrides JS height adjustments */
        border-width: 0 0 4px 0;
        border-radius: 0;
    }

    #accueil {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    
    .question {
        position: static;
        width: 100%;
        animation: fadeIn 0.4s forwards;
        top: auto;
        left: auto;
        padding-bottom: 2rem; /* Add space at the bottom */
    }

    /* On mobile, we don't need a slide-out animation, just remove the old question */
    .question.exiting {
        display: none;
    }

    h1 {
        font-size: 1.8rem; /* Bigger title */
        line-height: 1.2;
    }

    h3 {
        font-size: 1.3rem; /* Bigger question text */
        line-height: 1.4;
    }
    
    button, .option {
        padding: 16px; /* Larger tap target */
        font-size: 1.1rem;
        border-radius: 12px; /* Nicer radius */
    }

    .option.selected {
        font-weight: bold;
        box-shadow: 0 0 0 2px var(--light-text), 0 0 0 4px var(--primary-color);
    }
    
    textarea {
        font-size: 1.1rem;
        padding: 16px;
    }

    #logo-apel {
        max-width: 100px;
        margin-bottom: 1rem;
    }

    #logo-apel-deroule {
        max-width: 150px;
        margin-bottom: 0.5rem;
    }

    #logo-apel-signature {
        max-width: 100px;
        margin-bottom: 1rem;
    }

    .info-box, .personalized-message {
        padding: 1rem;
    }

    /* Make sure the results page is scrollable and looks good */
    .results {
        width: 100%;
    }
} 