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

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

:root {
    --violet: #A78BFA;
    --violet-bright: #8B5CF6;
    --rose: #F472B6;
    --rose-bright: #EC4899;
    --cyan: #22D3EE;
    --jaune: #FCD34D;
    --vert: #34D399;
    --fond: #0F0A1A;
    --fond-card: #1A1425;
    --fond-input: #231C32;
    --border: #2D2440;
    --text: #F3E8FF;
    --text-soft: #A78BFA;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    position: relative;
    /* UNIQUE IMAGE DE FOND */
    background-image: url('eve2.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    background-repeat: no-repeat;
}

/* Aucun pseudo-élément avec overlay ou dégradé par-dessus l'image */
/* On garde uniquement l'image de fond pure */

/* Suppression des blobs et overlay grille pour garder l'image claire */
/* Mobile-first base styles */
.container {
    width: 100%;
    max-width: 320px;
    background: rgba(26, 20, 37, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(139, 92, 246, 0.15) inset;
}

.form-box, .welcome-box {
    padding: 0.5rem;
}

.form-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, var(--violet-bright), var(--rose-bright));
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 60px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin-bottom: 0.6rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.form-header h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.2px;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.form-description {
    color: var(--text-soft);
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.input-group {
    margin-bottom: 0.6rem;
}

.input-row {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.input-group.half {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--violet);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

input, select {
    width: 100%;
    padding: 10px 12px;
    background: var(--fond-input);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.8rem;
    transition: all 0.25s ease;
    outline: none;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
}

/* Style spécifique pour le select */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23A78BFA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
}

select option {
    background: var(--fond-card);
    color: var(--text);
    padding: 10px;
}

/* Style pour le conteneur ville personnalisée */
.city-custom-container {
    margin-top: 0.75rem;
    animation: fadeIn 0.3s ease;
}

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

input:hover, select:hover {
    border-color: var(--violet);
    background: #2a1f36;
}

input:focus, select:focus {
    border-color: var(--violet-bright);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: #2f2340;
}

input::placeholder {
    color: #5E4A74;
    font-size: 0.85rem;
}

.submit-btn {
    background: linear-gradient(135deg, var(--violet-bright), var(--rose-bright));
    color: white;
    border: none;
    padding: 10px 14px;
    width: 100%;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.btn-arrow {
    font-size: 0.9rem;
}

/* Welcome section styles */
.welcome-box {
    text-align: center;
    animation: fadeSlideUp 0.45s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

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

.confetti-icon {
    font-size: 2rem;
    margin-bottom: 0.3rem;
    animation: gentleBounce 1.6s ease-in-out infinite;
    display: inline-block;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    40% { transform: translateY(-6px) rotate(2deg); }
    80% { transform: translateY(-3px) rotate(-1deg); }
}

.welcome-box h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.1px;
    margin-bottom: 0.15rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.welcome-subtitle {
    color: var(--violet);
    font-weight: 500;
    font-size: 0.6rem;
    margin-bottom: 0.4rem;
}

.message-card {
    background: linear-gradient(125deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1));
    border-radius: 16px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.8rem 0;
    border: 1px solid rgba(139, 92, 246, 0.25);
    text-align: left;
    backdrop-filter: blur(2px);
}

.message-emoji {
    font-size: 1.5rem;
}

.message-text {
    flex: 1;
}

.message-text strong {
    font-size: 0.8rem;
    color: var(--violet);
    font-weight: 700;
    display: block;
}

.message-text p {
    font-size: 0.6rem;
    color: var(--text-soft);
    margin-top: 0.05rem;
    word-break: break-word;
}

.qr-card {
    background: rgba(35, 28, 50, 0.9);
    border-radius: 14px;
    padding: 0.6rem;
    margin: 0.6rem 0;
    border: 1px solid var(--border);
    transition: all 0.2s;
    backdrop-filter: blur(2px);
}

.qr-header {
    font-weight: 700;
    color: var(--violet);
    font-size: 0.55rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin: 0.2rem 0;
}

#qrcode {
    background: white;
    padding: 4px;
    border-radius: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#qrcode img, #qrcode canvas {
    border-radius: 6px;
    width: 70px;
    height: 70px;
    display: block;
}

.qr-hint {
    font-size: 0.5rem;
    color: var(--text-soft);
    margin-top: 0.3rem;
}

.motivational-message {
    background: linear-gradient(115deg, rgba(252, 211, 77, 0.12), rgba(236, 72, 153, 0.08));
    padding: 0.5rem 0.6rem;
    border-radius: 14px;
    margin: 0.6rem 0;
    font-size: 0.6rem;
    font-weight: 600;
    text-align: center;
    color: #FDE68A;
    border-left: 2px solid var(--jaune);
}

.reset-btn {
    background: rgba(35, 28, 50, 0.95);
    color: var(--violet);
    border: 2px solid var(--border);
    padding: 10px 14px;
    width: 100%;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.8rem;
}

.download-btn {
    background: linear-gradient(135deg, var(--jaune), #F59E0B);
    color: var(--fond);
    border: none;
    padding: 10px 14px;
    width: 100%;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0.8rem 0;
    box-shadow: 0 6px 16px rgba(252, 211, 77, 0.3);
}

footer {
    margin-top: 0.8rem;
    font-size: 0.5rem;
    color: #B89BE0;
    text-align: center;
}

.info-note {
    background: rgba(139, 92, 246, 0.12);
    padding: 0.6rem;
    border-radius: 16px;
    margin-top: 0.8rem;
    font-size: 0.6rem;
}

/* Tablet and desktop enhancements */
@media (min-width: 560px) {
    body {
        padding: 20px;
    }
    
    .container {
        max-width: 500px;
        border-radius: 40px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(139, 92, 246, 0.15) inset;
    }
    
    .form-box, .welcome-box {
        padding: 1.8rem;
    }
    
    .form-header h1 {
        font-size: 1.8rem;
    }
    
    .welcome-box h2 {
        font-size: 1.7rem;
    }
    
    .form-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1.2rem;
        margin-bottom: 1.2rem;
    }
    
    .form-description {
        font-size: 0.85rem;
    }
    
    .input-group {
        margin-bottom: 1.25rem;
    }
    
    .input-row {
        flex-direction: row;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .input-group.half {
        flex: 1;
        margin-bottom: 0;
    }
    
    label {
        font-size: 0.7rem;
    }
    
    input, select {
        padding: 14px 16px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .submit-btn {
        padding: 15px 24px;
        font-size: 0.95rem;
        border-radius: 28px;
    }
    
    .btn-arrow {
        font-size: 1.2rem;
    }
    
    .confetti-icon {
        font-size: 3.8rem;
    }
    
    .message-card {
        flex-direction: row;
        text-align: left;
        padding: 1.2rem;
        gap: 1rem;
    }
    
    .message-text {
        text-align: left;
    }
    
    .message-text strong {
        font-size: 1.1rem;
    }
    
    .message-text p {
        font-size: 0.75rem;
    }
    
    .qr-card {
        padding: 1.2rem;
        margin: 1.2rem 0;
    }
    
    #qrcode {
        padding: 10px;
        border-radius: 20px;
    }
    
    #qrcode img, #qrcode canvas {
        width: 130px;
        height: auto;
    }
    
    .qr-hint {
        font-size: 0.7rem;
    }
    
    .motivational-message {
        padding: 1rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .download-btn, .reset-btn {
        padding: 14px 20px;
        font-size: 0.85rem;
        margin: 1rem 0;
    }
    
    footer {
        font-size: 0.65rem;
    }
    
    .info-note {
        padding: 0.9rem;
        font-size: 0.75rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1024px) {
    .container {
        max-width: 550px;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(139, 92, 246, 0.2) inset;
    }
}

/* Enhanced animations and transitions */
.form-box, .welcome-box {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced button interactions */
.submit-btn:active {
transform: translateY(0);
}

.download-btn:active, .reset-btn:active {
transform: translateY(0);
}

/* Improved focus states */
input:focus, select:focus {
box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.3);
}

/* Loading states */
.submit-btn.loading {
opacity: 0.8;
cursor: not-allowed;
}

.submit-btn.loading .spinner {
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid transparent;
border-top: 2px solid currentColor;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 8px;
}

.submit-btn.loading .btn-arrow {
opacity: 0 !important;
}

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

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
.container {
border: 2px solid var(--violet-bright);
}
input, select {
border-width: 3px;
}
}

/* Notification System */
.notification {
position: fixed;
top: 20px;
right: 20px;
background: rgba(26, 20, 37, 0.95);
backdrop-filter: blur(12px);
border: 1px solid rgba(139, 92, 246, 0.3);
border-radius: 12px;
padding: 16px;
min-width: 300px;
max-width: 400px;
z-index: 1000;
transform: translateX(120%);
opacity: 0;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.notification.show {
transform: translateX(0);
opacity: 1;
}

.notification-content {
display: flex;
align-items: center;
gap: 12px;
color: var(--text);
}

.notification-success .notification-content {
color: #34D399;
}

.notification-error .notification-content {
color: #F87171;
}

.notification-info .notification-content {
color: var(--violet);
}

.notification-close {
position: absolute;
top: 8px;
right: 8px;
background: none;
border: none;
color: var(--text-soft);
cursor: pointer;
padding: 4px;
border-radius: 4px;
transition: all 0.2s ease;
}

.notification-close:hover {
background: rgba(139, 92, 246, 0.2);
color: var(--text);
}

/* Mobile notifications */
@media (max-width: 480px) {
.notification {
top: 10px;
right: 10px;
left: 10px;
min-width: auto;
max-width: none;
}
}

/* Countdown Timer Styles */
.countdown-timer {
background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.15));
border: 1px solid rgba(139, 92, 246, 0.4);
border-radius: 12px;
padding: 0.6rem 0.8rem;
margin-top: 0.6rem;
text-align: center;
backdrop-filter: blur(4px);
animation: fadeIn 0.5s ease;
}

.timer-label {
display: block;
font-size: 0.6rem;
color: var(--text-soft);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 0.2rem;
}

.timer-value {
display: block;
font-size: 0.9rem;
color: var(--jaune);
font-weight: 700;
letter-spacing: 0.5px;
text-shadow: 0 0 10px rgba(252, 211, 77, 0.3);
}

.countdown-timer .closed {
display: block;
font-size: 0.8rem;
color: #F87171;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
}

/* Registration Closed Message */
.registration-closed {
background: rgba(248, 113, 113, 0.15);
border: 1px solid rgba(248, 113, 113, 0.4);
border-radius: 12px;
padding: 0.8rem;
margin-top: 0.8rem;
display: flex;
align-items: center;
gap: 0.6rem;
animation: shake 0.5s ease-in-out;
}

.registration-closed svg {
color: #F87171;
flex-shrink: 0;
}

.registration-closed span {
color: #F87171;
font-size: 0.7rem;
font-weight: 600;
line-height: 1.4;
}

/* When form is hidden, center the closed message */
.form-header:has(.registration-closed) {
text-align: center;
padding: 1rem 0;
}

.form-header:has(.registration-closed) .registration-closed {
justify-content: center;
margin: 1rem auto;
max-width: 90%;
}

/* Tablet and desktop countdown styles */
@media (min-width: 560px) {
.countdown-timer {
padding: 0.8rem 1.2rem;
margin-top: 1rem;
border-radius: 16px;
}

.timer-label {
font-size: 0.7rem;
}

.timer-value {
font-size: 1.1rem;
}

.countdown-timer .closed {
font-size: 0.95rem;
}

.registration-closed {
padding: 1rem;
border-radius: 16px;
margin-top: 1.2rem;
}

.registration-closed span {
font-size: 0.85rem;
}
}
