@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #FFCD00;
    --primary-light: #FFE066;
    --primary-dark: #B39400;
    --primary-glow: rgba(255, 205, 0, 0.15);
    --background-gradient-start: #0a0a0f;
    --background-gradient-end: #111118;
    --form-background: rgba(22, 22, 30, 0.92);
    --card-bg: rgba(28, 28, 38, 0.7);
    --card-bg-hover: rgba(38, 38, 50, 0.8);
    --text-color: #f0f0f5;
    --text-muted: #9999aa;
    --border-subtle: rgba(255, 205, 0, 0.12);
    --border-active: rgba(255, 205, 0, 0.5);
    --input-bg: rgba(15, 15, 22, 0.7);
    --shadow-lg: 0 25px 80px rgba(0, 0, 0, 0.5);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: var(--background-gradient-start);
    color: var(--text-color);
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 30px 20px;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated background orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
}

body::before {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -150px;
    background: radial-gradient(circle, rgba(255, 205, 0, 0.08) 0%, transparent 70%);
    animation: orbFloat1 15s ease-in-out infinite;
}

body::after {
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -100px;
    background: radial-gradient(circle, rgba(255, 205, 0, 0.06) 0%, transparent 70%);
    animation: orbFloat2 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 40px) scale(1.1); }
    66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

/* Starfield background */
.hero__stars {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: -1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.container {
    width: 100%;
    max-width: 640px;
    text-align: center;
    position: relative;
    animation: containerFadeIn 0.8s ease-out;
}

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

h1 {
    color: #ffffff;
    font-size: 2.6em;
    margin-bottom: 0.3em;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -1px;
    line-height: 1.15;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    border-radius: 2px;
}

.icon {
    font-size: 3.2em;
    color: var(--primary-color);
    margin-bottom: 0.6em;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(255, 205, 0, 0.4));
    animation: iconFloat 4s ease-in-out infinite;
    position: relative;
}

.icon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 8px;
    background: rgba(255, 205, 0, 0.15);
    border-radius: 50%;
    filter: blur(4px);
    animation: iconShadow 4s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(2deg); }
    75% { transform: translateY(-4px) rotate(-1deg); }
}

@keyframes iconShadow {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.3; transform: translateX(-50%) scale(0.8); }
}

/* ─── Form ─── */
form {
    background: var(--form-background);
    padding: 3em 2.5em;
    border-radius: var(--radius-lg);
    box-shadow: 
        var(--shadow-lg),
        0 0 0 1px var(--border-subtle),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    width: 100%;
    margin: 1.5em auto 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

/* Decorative corner accent */
form::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at top right, rgba(255, 205, 0, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

form::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at bottom left, rgba(255, 205, 0, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* ─── Labels ─── */
label {
    display: block;
    margin-bottom: 10px;
    text-align: left;
    font-size: 0.88em;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

label:has(+ input:focus),
label:has(+ textarea:focus) {
    color: var(--primary-color);
}

/* ─── Text Inputs ─── */
input[type="text"] {
    width: 100%;
    padding: 15px 18px;
    margin-bottom: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: #ffffff;
    font-size: 0.95em;
    font-family: inherit;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 300;
}

input[type="text"]:hover {
    border-color: rgba(255, 205, 0, 0.25);
    background: rgba(18, 18, 26, 0.8);
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    background: rgba(18, 18, 26, 0.9);
    box-shadow: 
        0 0 0 4px rgba(255, 205, 0, 0.1),
        0 4px 20px rgba(255, 205, 0, 0.08);
    transform: translateY(-1px);
}

/* ─── Textarea ─── */
textarea,
.input-as-textarea {
    width: 100%;
    min-height: 130px;
    padding: 15px 18px;
    margin-bottom: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: #ffffff;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition-smooth);
    box-sizing: border-box;
    line-height: 1.6;
}

textarea::placeholder,
.input-as-textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 300;
}

textarea:hover,
.input-as-textarea:hover {
    border-color: rgba(255, 205, 0, 0.25);
}

textarea:focus,
.input-as-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background: rgba(18, 18, 26, 0.9);
    box-shadow: 
        0 0 0 4px rgba(255, 205, 0, 0.1),
        0 4px 20px rgba(255, 205, 0, 0.08);
    transform: translateY(-1px);
}

.input-as-textarea {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    vertical-align: top;
}

/* ─── Submit Button (input) ─── */
input[type="submit"] {
    width: auto;
    min-width: 200px;
    padding: 14px 32px;
    margin: 10px auto 0;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #0a0a0f;
    font-size: 0.95em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 6px 25px rgba(255, 205, 0, 0.25);
    display: block;
}

input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(255, 205, 0, 0.35);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

input[type="submit"]:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 205, 0, 0.3);
}

/* ─── Radio Group ─── */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 10px auto;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    backdrop-filter: blur(15px);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.radio-option {
    position: relative;
    padding: 16px 20px 16px 52px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
}

/* Custom radio indicator - cercle extérieur */
.radio-option::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
    background: transparent;
    box-sizing: border-box;
}

/* Point intérieur doré - CORRIGÉ */
.radio-option::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%) scale(0);
    border-radius: 50%;
    background: var(--primary-color);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 8px rgba(255, 205, 0, 0.6);
    box-sizing: border-box;
    border: 5px solid rgba(15, 15, 22, 1);
}

.radio-option:hover {
    background: rgba(255, 205, 0, 0.04);
    border-color: rgba(255, 205, 0, 0.2);
}

.radio-option:hover::before {
    border-color: rgba(255, 205, 0, 0.4);
}

.radio-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 205, 0, 0.08) 0%, rgba(255, 205, 0, 0.04) 100%);
    box-shadow: 
        0 4px 20px rgba(255, 205, 0, 0.12),
        inset 0 0 0 1px rgba(255, 205, 0, 0.08);
}

.radio-option.selected::before {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 205, 0, 0.15);
}

.radio-option.selected::after {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 12px rgba(255, 205, 0, 0.6);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.radio-option label {
    width: 100%;
    cursor: pointer;
    margin-bottom: 0;
    color: var(--text-color);
    font-weight: 400;
    font-size: 0.92em;
    transition: color 0.3s ease;
    pointer-events: none;
}

.radio-option.selected label {
    color: var(--primary-color);
    font-weight: 500;
}

/* ─── Form Sections ─── */
.form-section {
    position: relative;
    padding: 10px 0;
    animation: sectionFadeIn 0.5s ease-out;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1em;
    letter-spacing: 0.2px;
}

.section-title i {
    font-size: 1.15em;
    filter: drop-shadow(0 0 6px rgba(255, 205, 0, 0.3));
}

/* ─── Nested Elements ─── */
.nested {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 205, 0, 0.3);
    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nested::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--primary-color);
    transition: height 0.6s ease;
}

.nested.visible {
    opacity: 1;
    transform: translateY(0);
}

.nested.visible::before {
    height: 100%;
}

.nested-input {
    margin-left: 15px;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9em;
    font-family: inherit;
    width: auto;
    min-width: 220px;
    transition: var(--transition-smooth);
}

.nested-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 205, 0, 0.1);
}

/* ─── Custom Select ─── */
.custom-select {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 0.92em;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23FFCD00' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.custom-select:hover {
    border-color: rgba(255, 205, 0, 0.25);
}

.custom-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 205, 0, 0.1);
}

.custom-select option {
    background: #1a1a24;
    color: white;
    padding: 10px;
}

/* ─── Collaborators Input ─── */
.collaborators-input {
    width: 100%;
    padding: 15px 18px;
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 0.92em;
    font-family: inherit;
    min-height: 110px;
    resize: vertical;
    margin-bottom: 15px;
    transition: var(--transition-smooth);
    line-height: 1.6;
    box-sizing: border-box;
}

.collaborators-input:hover {
    border-color: rgba(255, 205, 0, 0.25);
}

.collaborators-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 
        0 0 0 4px rgba(255, 205, 0, 0.1),
        0 4px 20px rgba(255, 205, 0, 0.08);
}

/* ─── Submit Button (styled class) ─── */
.submit-button {
    width: auto;
    min-width: 220px;
    padding: 16px 36px;
    margin: 20px auto 0;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--primary-color) 100%);
    background-size: 200% auto;
    color: #0a0a0f;
    font-size: 1em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 
        0 8px 30px rgba(255, 205, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.25), 
        transparent
    );
    transition: left 0.6s ease;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 14px 40px rgba(255, 205, 0, 0.35),
        0 0 0 2px rgba(255, 205, 0, 0.15);
    background-position: right center;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 205, 0, 0.3);
}

.submit-button i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.submit-button:hover i {
    transform: translateX(3px);
}

/* ─── Thank You Message ─── */
.thankyou {
    text-align: center;
    margin-top: 25px;
    font-weight: 500;
    padding: 30px;
    background: rgba(255, 205, 0, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 205, 0, 0.15);
    animation: thankYouPulse 2s ease-in-out infinite;
}

.thankyou-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.thankyou-icon {
    font-size: 3em;
    color: var(--primary-color);
    animation: iconBounce 1s ease-out;
    filter: drop-shadow(0 0 15px rgba(255, 205, 0, 0.4));
}

.thankyou p {
    font-size: 1.25em;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 205, 0, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-button:hover {
    background: var(--primary-color);
    color: var(--background-gradient-start);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 205, 0, 0.3);
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255, 205, 0, 0.2);
}

.back-button i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-3px);
}

@keyframes iconBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes thankYouPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 205, 0, 0.1); }
    50% { box-shadow: 0 0 0 8px rgba(255, 205, 0, 0); }
}

/* ─── Animations ─── */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 205, 0, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 205, 0, 0.5);
}

/* ─── Selection ─── */
::selection {
    background: rgba(255, 205, 0, 0.3);
    color: #ffffff;
}

/* ─── Focus Visible for Accessibility ─── */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ─── Responsive: Tablet ─── */
@media screen and (max-width: 768px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .container::before {
        display: none;
    }

    h1 {
        font-size: 1.8em;
        padding: 0 20px;
        margin: 0.8em 0 0.4em;
    }

    .icon {
        font-size: 2.4em;
        margin-bottom: 0.4em;
        margin-top: 1.2em;
    }

    form {
        width: 100%;
        margin: 1em 0 0;
        padding: 2em 1.5em;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        gap: 22px;
    }

    .radio-group {
        padding: 16px;
        margin: 8px 0;
        border-radius: var(--radius-sm);
    }

    .radio-option {
        padding: 14px 16px 14px 48px;
    }

    .nested {
        margin-left: 12px;
        padding-left: 16px;
    }

    input[type="text"],
    textarea,
    .collaborators-input,
    .custom-select,
    .radio-group,
    .input-as-textarea {
        width: 100%;
    }

    .nested-input {
        width: 100%;
        margin-left: 0;
        min-width: unset;
    }

    .submit-button,
    input[type="submit"] {
        width: 100%;
        min-width: unset;
    }
}

/* ─── Responsive: Mobile ─── */
@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.5em;
        letter-spacing: -0.5px;
    }

    h1::after {
        width: 35px;
        height: 2px;
    }

    .icon {
        font-size: 2em;
    }

    form {
        padding: 1.5em 1.2em;
        gap: 20px;
    }

    .section-title {
        font-size: 0.88em;
    }

    label {
        font-size: 0.84em;
    }

    .radio-option {
        padding: 12px 14px 12px 44px;
    }

    .radio-option::before {
        left: 14px;
        width: 18px;
        height: 18px;
    }

    .radio-option::after {
        left: 14px;
        width: 18px;
        height: 18px;
        border: 5px solid rgba(15, 15, 22, 1);
    }

    .radio-option label {
        font-size: 0.84em;
    }

    .radio-group {
        padding: 12px;
        gap: 8px;
    }

    input[type="text"],
    textarea,
    .collaborators-input,
    .custom-select,
    .input-as-textarea {
        padding: 13px 14px;
        font-size: 0.9em;
    }

    .submit-button {
        padding: 15px 24px;
        font-size: 0.92em;
        letter-spacing: 1px;
    }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}