:root {
    --bg-page: #eef7fc;
    --deep: #073369;
    --blue: #1986B8;
    --blue-pale: #dceefa;
    --card-border: #bfdff0;
    --orange: #f97316;
    --text-muted: #4a6b85;
    --text-body: #1f3f5c;
    --error: #c62828;
    --page: 960px;
    --halo: 0 0 6px #ffffff, 0 0 14px #ffffff, 0 0 26px #ffffff, 0 0 40px rgba(255, 255, 255, 0.95);
    --halo-s: 0 0 5px #ffffff, 0 0 11px #ffffff, 0 0 20px #ffffff, 0 0 30px rgba(255, 255, 255, 0.95);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scrollbar-color: var(--blue) var(--blue-pale); }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--blue-pale); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 6px; }

::selection { background: rgba(25, 134, 184, 0.25); color: var(--deep); }

body {
    background-color: var(--bg-page);
    background-image: url("img/bg25j.webp");
    background-repeat: no-repeat;
    background-position: left top;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-body);
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    font-size: 17.9px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
}

/* Decalage vers la droite : un cinquieme de l'espace libre, jamais plus. */
.container {
    position: relative;
    left: max(0px, calc((100vw - var(--page)) * 0.2));
    min-height: 100vh;
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 20px;
}

/* Bandeau diagonal, coin haut droit. */
.ribbon {
    position: fixed;
    top: 6px;
    right: -24px;
    z-index: 10;
    width: 200px;
    padding: 4px 0 4px 36px;
    background: linear-gradient(135deg, #1986B8 0%, #073369 100%);
    border-top: 1.5px solid #ffffff;
    border-bottom: 1.5px solid #ffffff;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transform: rotate(30deg);
    box-shadow: 0 6px 22px rgba(7, 51, 105, 0.35);
    pointer-events: none;
}

/* --- Hero --- */

.hero {
    padding: 100px 0 20px 0;
    text-align: center;
}

.hero-logo {
    position: fixed;
    top: 22px;
    left: 26px;
    z-index: 10;
    display: block;
    width: 150px;
    height: auto;
}

.hero h1 {
    color: var(--deep);
    font-size: 50px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.2px;
    text-shadow: var(--halo);
    margin-bottom: 16px;
}

.hero h1 span { color: var(--blue); }

.subtitle {
    max-width: 700px;
    margin: 0 auto 20px auto;
    font-size: 18.4px;
    line-height: 1.5;
    text-shadow: var(--halo-s);
}

.subtitle strong { color: var(--deep); font-weight: 800; }

/* --- Formulaire --- */

.form-card { margin: 40px 0 0 0; }

.step { border: 0; }

.step-title {
    display: block;
    width: 100%;
    color: var(--deep);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    text-shadow: var(--halo);
    margin-bottom: 26px;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 11px;
    align-items: center;
}

/* Le radio reste focusable mais invisible, le label fait le bouton. */
.choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.choice, .btn-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 640px;
    padding: 22px 76px 22px 34px;
    border: 1px solid #fdba74;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.9);
    color: #ffffff;
    font-family: inherit;
    font-size: 23.2px;
    font-weight: 700;
    line-height: 1.22;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.choice { padding: 32px 76px 32px 34px; border: 2px solid #ffffff; font-size: 28px; }

/* Le CTA se limite a son texte plus le padding, il ne s'etire pas. */
.btn-cta {
    width: auto;
    max-width: 100%;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.choice::after, .btn-cta::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 34px;
    width: 32px;
    height: 24px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24' fill='none' stroke='%23ffffff' stroke-width='4.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h23'/%3E%3Cpath d='M19 4l8 8-8 8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.25s ease;
}

.choice:hover, .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(255, 255, 255, 1);
}

.choice:hover::after, .btn-cta:hover::after { transform: translateY(-50%) translateX(5px); }

.choice:focus-within, .btn-cta:focus-visible {
    outline: 3px solid var(--deep);
    outline-offset: 3px;
}

/* --- Champs --- */

.field {
    max-width: 480px;
    margin: 0 auto 10px auto;
}

.field label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.field input {
    width: 100%;
    padding: 23px 20px;
    border: 1.5px solid var(--blue);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 3px 14px rgba(7, 51, 105, 0.1);
    color: var(--text-body);
    font-family: inherit;
    font-size: 21px;
    text-align: left;
}

.field input::placeholder { color: #7f96ab; }

.field input:focus {
    outline: 3px solid var(--deep);
    outline-offset: 2px;
    border-color: var(--deep);
}

.field input[aria-invalid="true"] { border-color: var(--error); }

.error {
    display: block;
    color: var(--error);
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    margin-top: 8px;
}

.form-error { text-align: center; max-width: 480px; margin: 14px auto 0 auto; }

.form-card form { text-align: center; }

.rgpd {
    max-width: 480px;
    margin: 0 auto 30px auto;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.rgpd a {
    color: inherit;
    text-decoration: underline;
}

.btn-cta[disabled] {
    opacity: 0.65;
    cursor: progress;
    transform: none;
}

/* Piège à robots */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Pied de page --- */

.site-footer {
    position: relative;
    margin-top: 40px;
    left: max(0px, calc((100vw - var(--page)) * 0.2));
    max-width: var(--page);
    margin: 0 auto;
    padding: 30px 20px 50px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
}

.legal-links { margin-top: 8px; }

.legal-links a {
    color: var(--text-muted);
    text-decoration: underline;
    margin: 0 10px;
}

.legal-links a:hover { color: var(--blue); }

/* --- Responsive --- */

/* Tablettes et petits ecrans */
@media (max-width: 1024px) {
    .hero { padding: 90px 0 16px 0; }
    .hero h1 { font-size: 42px; }
    .subtitle { max-width: 640px; }
    .step-title { font-size: 24px; }
    .choice { max-width: 520px; font-size: 25px; }
    .choice, .btn-cta { font-size: 21px; }
    .ribbon { width: 185px; padding: 4px 0 4px 33px; font-size: 16px; }
}

/* Mobiles larges et phablettes */
@media (max-width: 640px) {
    /* Le couple occupe la gauche de la photo : on cadre a droite pour garder le texte lisible. */
    body { background-attachment: scroll; background-position: right top; }
    .container, .site-footer { left: 0; }
    .hero { padding: 80px 0 10px 0; }
    .hero-logo { top: 14px; left: 16px; width: 110px; }
    .ribbon { top: 5px; right: -20px; width: 170px; padding: 3px 0 3px 33px; font-size: 14px; letter-spacing: 0.8px; }
    .hero h1 { font-size: 38px; }
    .subtitle { font-size: 16.5px; }
    .step-title { font-size: 22px; }
    .choice { max-width: 440px; }
    .choice, .btn-cta { font-size: 20px; padding: 18px 54px 18px 20px; }
    .choice { padding: 26px 54px 26px 20px; font-size: 23px; }
    .choice::after, .btn-cta::after { width: 24px; right: 20px; }
    .form-card { margin: 30px 0 0 0; }
}

/* Petits mobiles */
@media (max-width: 480px) {
    .hero { padding: 68px 0 8px 0; }
    .hero-logo { top: 12px; left: 14px; width: 96px; }
    .ribbon { top: 4px; right: -18px; width: 150px; padding: 3px 0 3px 30px; font-size: 12.5px; letter-spacing: 0.5px; }
    .hero h1 { font-size: 29px; }
    .subtitle { font-size: 16.5px; }
    .step-title { font-size: 20px; }
    .choice, .btn-cta { font-size: 18px; padding: 16px 46px 16px 16px; }
    .choice { padding: 24px 46px 24px 16px; font-size: 20px; }
    .choice::after, .btn-cta::after { width: 22px; right: 16px; }
    .field input { padding: 18px 16px; font-size: 18px; }
    .rgpd { font-size: 11.5px; }
}
