:root {
    --bg-dark: #1e1b2e;
    --card-dark: #262238;
    --card-border: #3b3554;
    --gold-glow: #fbbf24;
    --orange: #f97316;
    --purple-accent: #a78bfa;
    --text-muted: #cbd5e1;
    --text-body: #e2e8f0;
    --green-glow: #10b981;
    --rose: #fb7185;
    --page: 960px;
}

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

[hidden] { display: none !important; }

body {
    background-color: var(--bg-dark);
    background-image: url("img/bg2.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, #f97316 0%, #ea580c 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(0, 0, 0, 0.4);
    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: #ffffff;
    font-size: 50px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.2px;
    margin-bottom: 16px;
}

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

.subtitle {
    max-width: 700px;
    margin: 0 auto 20px auto;
    font-size: 18.4px;
    line-height: 1.5;
}

.subtitle strong { color: #ffffff; font-weight: 800; }

/* --- Formulaire --- */

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

.step { border: 0; }

.step-title {
    display: block;
    width: 100%;
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 26px;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 18px;
    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 25px rgba(249, 115, 22, 0.35);
    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;
}

/* 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 30px rgba(249, 115, 22, 0.55);
}

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

.choice:focus-within, .btn-cta:focus-visible {
    outline: 3px solid var(--gold-glow);
    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: 1px solid var(--card-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--bg-dark);
    font-family: inherit;
    font-size: 21px;
    text-align: left;
}

.field input::placeholder { color: #6b6480; }

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

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

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


.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(--gold-glow); }

/* --- 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; }
    .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) {
    body { background-attachment: scroll; }
    .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::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::after, .btn-cta::after { width: 22px; right: 16px; }
    .field input { padding: 18px 16px; font-size: 18px; }
    .rgpd { font-size: 11.5px; }
}
