@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lora:wght@400;500;600&display=swap');

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

body {
    font-family: 'Lora', 'Georgia', serif;
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5b7 50%, #d4c4a8 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(184, 134, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    background: linear-gradient(to bottom, #fffef9 0%, #faf8f3 100%);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(139, 115, 85, 0.2),
        0 0 0 1px rgba(212, 175, 55, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 850px;
    width: 100%;
    padding: 50px 45px;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(212, 175, 55, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    position: relative;
}

.header-section::after {
    content: '✡';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, #fffef9 0%, #faf8f3 100%);
    padding: 0 20px;
    font-size: 24px;
    color: #d4af37;
    opacity: 0.6;
}

h1 {
    font-family: 'Playfair Display', serif;
    color: #8b7355;
    text-align: center;
    margin-bottom: 12px;
    font-size: 2.8em;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(139, 115, 85, 0.1);
    background: linear-gradient(135deg, #8b7355 0%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: #a0826d;
    margin-bottom: 0;
    font-size: 1.25em;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 28px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #6b5d4f;
    font-weight: 600;
    font-size: 1em;
    letter-spacing: 0.3px;
}

label .required {
    color: #c9a961;
    margin-left: 4px;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8ddd0;
    border-radius: 12px;
    font-size: 1.05em;
    transition: all 0.3s ease;
    font-family: 'Lora', serif;
    background: #fffef9;
    color: #5a4a3a;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 
        0 0 0 4px rgba(212, 175, 55, 0.15),
        0 4px 12px rgba(212, 175, 55, 0.1);
    background: #ffffff;
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

.radio-group {
    display: flex;
    gap: 25px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    background: #faf8f3;
    border: 2px solid #e8ddd0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.radio-option:hover {
    background: #f5f0e8;
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.1);
}

.radio-option input[type="radio"]:checked + label {
    color: #8b7355;
    font-weight: 600;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #d4af37;
}

.radio-option input[type="radio"]:checked ~ label,
.radio-option:has(input[type="radio"]:checked) {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fff9e6 0%, #faf8f3 100%);
}

.radio-option label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    color: #6b5d4f;
    transition: color 0.3s ease;
}

.form-section {
    display: none;
    animation: slideIn 0.4s ease-out;
}

.form-section.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fffef9;
    border: 2px solid #d4af37;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 
        0 8px 16px rgba(139, 115, 85, 0.15),
        0 0 0 1px rgba(212, 175, 55, 0.1);
}

.autocomplete-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f0e8d8;
    transition: background 0.2s;
    color: #5a4a3a;
    font-size: 1em;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, #fff9e6 0%, #faf8f3 100%);
    color: #8b7355;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.submit-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 50%, #9a7209 100%);
    color: #fffef9;
    border: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    box-shadow: 
        0 4px 12px rgba(212, 175, 55, 0.3),
        0 2px 4px rgba(139, 115, 85, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

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

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

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(212, 175, 55, 0.4),
        0 4px 8px rgba(139, 115, 85, 0.3);
    background: linear-gradient(135deg, #e0c158 0%, #c99a1a 50%, #a87a0a 100%);
}

.submit-btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(212, 175, 55, 0.3),
        0 2px 4px rgba(139, 115, 85, 0.2);
}

.error-message {
    color: #c97a5a;
    font-size: 0.9em;
    margin-top: 8px;
    display: none;
    font-style: italic;
    padding-left: 4px;
}

.error-message.show {
    display: block;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.success-message {
    background: linear-gradient(135deg, #8fbc8f 0%, #7ba87b 100%);
    color: #fffef9;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    display: none;
    box-shadow: 0 4px 12px rgba(143, 188, 143, 0.3);
    font-weight: 500;
    font-size: 1.05em;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.success-message.show {
    display: block;
    animation: slideDown 0.4s ease-out;
}

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

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4af37' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
    appearance: none;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 35px 25px;
        border-radius: 20px;
    }

    h1 {
        font-size: 2.2em;
    }

    .subtitle {
        font-size: 1.1em;
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }

    .radio-option {
        width: 100%;
    }
}

/* Décorations subtiles */
.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(184, 134, 11, 0.05));
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.container:hover::before {
    opacity: 1;
}

/* Loader overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 115, 85, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.loader-overlay.active {
    display: flex;
}

.loader-container {
    text-align: center;
    background: linear-gradient(to bottom, #fffef9 0%, #faf8f3 100%);
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(139, 115, 85, 0.4),
        0 0 0 1px rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.loader-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid #e8ddd0;
    border-top: 4px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: #8b7355;
    font-size: 1.1em;
    font-weight: 500;
    font-family: 'Lora', serif;
    margin: 0;
    letter-spacing: 0.5px;
}
