
/* =========================================================
   IVOIREPROS — QUESTIONNAIRE DÉMARRER UN PROJET
   Palette : Bleu marine, or et blanc
   ========================================================= */

:root {
    --dp-navy: #0D1B2A;
    --dp-gold: #D4AF37;
    --dp-white: #FFFFFF;
    --dp-background: #F5F7FA;
    --dp-text: #192433;
    --dp-muted: #697586;
    --dp-border: #E1E6ED;
    --dp-radius: 18px;
    --dp-shadow: 0 18px 55px rgba(13, 27, 42, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--dp-background);
    color: var(--dp-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

body,
button,
input,
textarea {
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font-size: inherit;
}

/* En-tête */

.project-header {
    min-height: 82px;
    padding: 16px max(6%, calc((100% - 1180px) / 2));
    background: var(--dp-navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand span {
    color: var(--dp-gold);
}

.brand strong {
    color: var(--dp-white);
}

.back-link {
    color: #F1F4F8;
    font-size: 14px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--dp-gold);
}

/* Présentation */

.project-main {
    width: min(100% - 32px, 780px);
    margin: 0 auto;
    padding: 65px 0 80px;
}

.intro {
    max-width: 680px;
    margin: 0 auto 36px;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: #92751B;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.intro h1 {
    margin: 0;
    color: var(--dp-navy);
    font-size: clamp(34px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.intro h1 span {
    color: #B18C18;
}

.intro p {
    max-width: 560px;
    margin: 18px auto 0;
    color: var(--dp-muted);
    font-size: 16px;
}

/* Carte du questionnaire */

.questionnaire {
    padding: clamp(22px, 5vw, 42px);
    background: var(--dp-white);
    border: 1px solid #E9EDF2;
    border-radius: var(--dp-radius);
    box-shadow: var(--dp-shadow);
}

/* Progression */

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
    color: var(--dp-muted);
    font-size: 13px;
    font-weight: 600;
}

#progress-percent {
    color: var(--dp-navy);
    font-weight: 800;
}

.progress-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    background: #E9EDF2;
    border-radius: 99px;
    margin-bottom: 35px;
}

.progress-bar {
    width: 20%;
    height: 100%;
    background: var(--dp-gold);
    border-radius: inherit;
    transition: width 0.3s ease;
}

/* Questions */

#question-container h2 {
    margin: 0 0 10px;
    color: var(--dp-navy);
    font-size: clamp(22px, 4vw, 29px);
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.question-description {
    margin: 0 0 25px;
    color: var(--dp-muted);
    font-size: 15px;
}

/* Choix */

.answer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.answer-option {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 88px;
    cursor: pointer;
}

.answer-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.answer-content {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    width: 100%;
    padding: 18px 15px;
    background: #FFFFFF;
    border: 1px solid var(--dp-border);
    border-radius: 13px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.answer-option:hover .answer-content {
    border-color: #C9AC4A;
    transform: translateY(-2px);
}

.answer-option.selected .answer-content,
.answer-option > input:checked + .answer-content {
    background: #FBF8EC;
    border-color: var(--dp-gold);
    box-shadow: 0 0 0 1px var(--dp-gold);
}

.answer-option > input:focus-visible + .answer-content {
    outline: 3px solid rgba(212, 175, 55, 0.45);
    outline-offset: 3px;
}

.answer-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    background: #F1F3F6;
    border-radius: 10px;
    font-size: 20px;
}

.answer-option.selected .answer-icon {
    background: #F0E5B7;
}

.answer-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.answer-text strong {
    color: var(--dp-navy);
    font-size: 14px;
    line-height: 1.45;
}

.answer-text small {
    color: var(--dp-muted);
    font-size: 12px;
    line-height: 1.5;
}

/* Question facultative */

.optional-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin-top: 17px;
    color: var(--dp-muted);
    cursor: pointer;
    font-size: 13px;
}

.optional-choice input {
    width: 17px;
    height: 17px;
    accent-color: var(--dp-navy);
}

/* Coordonnées */

.contact-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.field-group label {
    color: var(--dp-navy);
    font-size: 13px;
    font-weight: 700;
}

.field-group input,
.field-group textarea {
    width: 100%;
    padding: 13px 14px;
    color: var(--dp-text);
    background: #FFFFFF;
    border: 1px solid #D9E0E8;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input {
    min-height: 48px;
}

.field-group textarea {
    min-height: 120px;
    resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus {
    border-color: var(--dp-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
    color: #9AA4B2;
}

.contact-fields .field-group:last-child {
    grid-column: 1 / -1;
}

/* Navigation */

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 49px;
    padding: 12px 23px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}

.button-primary {
    margin-left: auto;
    color: var(--dp-navy);
    background: var(--dp-gold);
}

.button-primary:hover {
    background: #E4C54E;
    transform: translateY(-1px);
}

.button-secondary {
    color: var(--dp-navy);
    background: #FFFFFF;
    border-color: #D9E0E8;
}

.button-secondary:hover {
    background: #F3F5F8;
    border-color: #BBC5D1;
}

.button:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.5);
    outline-offset: 3px;
}

.privacy-note {
    margin: 22px 0 0;
    color: var(--dp-muted);
    font-size: 12px;
    text-align: center;
}

/* Récapitulatif */

.project-review {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--dp-border);
    border-radius: 12px;
    overflow: hidden;
}

.review-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
    gap: 16px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--dp-border);
    overflow-wrap: anywhere;
}

.review-row:last-child {
    border-bottom: 0;
}

.review-row strong {
    color: var(--dp-navy);
    font-size: 13px;
    text-transform: capitalize;
}

.review-row span {
    color: var(--dp-muted);
    font-size: 13px;
}

.review-notice {
    margin-top: 18px;
    padding: 14px;
    color: #66521A;
    background: #FBF7E8;
    border-radius: 10px;
    font-size: 13px;
}

/* Pied de page */

.project-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 24px;
    padding: 24px 20px;
    background: var(--dp-navy);
    color: #DCE3EC;
    font-size: 12px;
    text-align: center;
}

.project-footer p {
    margin: 0;
}

.project-footer a {
    color: var(--dp-gold);
}

.project-footer a:hover {
    text-decoration: underline;
}

/* Adaptation aux écrans mobiles */

@media (max-width: 600px) {
    .project-header {
        min-height: 70px;
        padding: 13px 18px;
    }

    .brand {
        font-size: 24px;
    }

    .back-link {
        font-size: 12px;
    }

    .project-main {
        width: min(100% - 24px, 480px);
        padding: 42px 0 48px;
    }

    .intro {
        margin-bottom: 25px;
    }

    .intro h1 {
        font-size: 35px;
    }

    .intro p {
        font-size: 14px;
    }

    .questionnaire {
        padding: 23px 17px;
        border-radius: 15px;
    }

    .progress-track {
        margin-bottom: 27px;
    }

    .answer-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .answer-option {
        min-height: 74px;
    }

    .answer-content {
        align-items: center;
        padding: 14px;
    }

    .contact-fields {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .contact-fields .field-group:last-child {
        grid-column: auto;
    }

    .form-navigation {
        margin-top: 25px;
    }

    .button {
        min-height: 47px;
        padding: 11px 16px;
    }

    .review-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .project-footer {
        flex-direction: column;
        gap: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}



.field-group input.is-invalid,
.field-group textarea.is-invalid {
    border: 2px solid #dc2626;
    outline-color: #dc2626;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: #dc2626;
    font-size: 0.875rem;
}

.field-error[hidden] {
    display: none;
}



.project-success {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto 28px;
    padding: 22px 24px;
    background: #e8f7ed;
    border: 2px solid #218838;
    border-left: 7px solid #218838;
    border-radius: 12px;
    color: #14532d;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.6;
    box-shadow: 0 4px 14px rgba(33, 136, 56, 0.12);
}

.project-success::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #218838;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
}

.project-success[role="status"] {
    scroll-margin-top: 24px;
}

@media (max-width: 600px) {
    .project-success {
        padding: 18px 16px;
        font-size: 0.98rem;
        gap: 12px;
    }
}

