/* RESA V1 - Styles */
.resa-v1-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.resa-v1-wrapper {
    --resa-v1-primary: #45b074;
    --resa-v1-primary-hover: #3a9861;
    --resa-v1-bg-dark: #000000;
    --resa-v1-bg-card: #1a1a1a;
    --resa-v1-text-white: #ffffff;
    --resa-v1-text-gray: #b0b0b0;
    --resa-v1-border: #333333;
    
    max-width: 650px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.resa-v1-title {
    text-align: center;
    color: var(--resa-v1-text-white);
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--resa-v1-primary), #fff, var(--resa-v1-primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: resa-v1-shimmer 3s ease-in-out infinite;
}

@keyframes resa-v1-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.resa-v1-subtitle {
    text-align: center;
    color: var(--resa-v1-text-gray);
    margin-bottom: 30px;
    font-size: 1em;
}

/* Progress bar */
.resa-v1-progress {
    margin-bottom: 30px;
}

.resa-v1-progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px;
}

.resa-v1-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--resa-v1-border);
    transform: translateY(-50%);
    z-index: 0;
}

.resa-v1-progress-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--resa-v1-primary), #5fd88f);
    transform: translateY(-50%);
    z-index: 1;
    transition: width 0.6s ease;
    box-shadow: 0 0 20px rgba(69, 176, 116, 0.6);
}

.resa-v1-progress-step {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--resa-v1-bg-card);
    border: 3px solid var(--resa-v1-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--resa-v1-text-gray);
    font-weight: 700;
    font-size: 1.1em;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.resa-v1-progress-step.resa-v1-active {
    background: linear-gradient(135deg, var(--resa-v1-primary), #5fd88f);
    border-color: var(--resa-v1-primary);
    color: white;
    transform: scale(1.3);
    box-shadow: 0 0 30px rgba(69, 176, 116, 0.8);
}

.resa-v1-progress-step.resa-v1-completed {
    background: var(--resa-v1-primary);
    border-color: var(--resa-v1-primary);
    color: white;
}

.resa-v1-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.resa-v1-progress-label {
    font-size: 0.8em;
    color: var(--resa-v1-text-gray);
    text-align: center;
    flex: 1;
    transition: all 0.3s ease;
}

.resa-v1-progress-label:nth-child(1)::after { content: 'Aller'; }
.resa-v1-progress-label:nth-child(2)::after { content: 'Retour'; }
.resa-v1-progress-label:nth-child(3)::after { content: 'Informations'; }

.resa-v1-progress-label.resa-v1-active {
    color: var(--resa-v1-primary);
    font-weight: 600;
}

/* Container */
.resa-v1-container {
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    min-height: 550px;
}

.resa-v1-container::before {
    content: '⛷️';
    position: absolute;
    font-size: 200px;
    opacity: 0.02;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    pointer-events: none;
}

/* Pages */
.resa-v1-page {
    display: none;
    animation-duration: 0.6s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.resa-v1-page.resa-v1-active {
    display: block;
    animation-name: resa-v1-slideInUp;
}

.resa-v1-page.resa-v1-exit {
    animation-name: resa-v1-slideOutDown;
}

@keyframes resa-v1-slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(40px) scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

@keyframes resa-v1-slideOutDown {
    from { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
    to { 
        opacity: 0; 
        transform: translateY(-40px) scale(0.95);
    }
}

.resa-v1-page-title {
    font-size: 1.8em;
    color: var(--resa-v1-text-white);
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
    animation: resa-v1-titlePulse 2s ease-in-out infinite;
}

@keyframes resa-v1-titlePulse {
    0%, 100% { text-shadow: 0 0 10px rgba(69, 176, 116, 0.3); }
    50% { text-shadow: 0 0 20px rgba(69, 176, 116, 0.6); }
}

/* Form fields */
.resa-v1-field {
    margin-bottom: 20px;
    opacity: 0;
    animation: resa-v1-fadeInField 0.5s ease forwards;
}

.resa-v1-field:nth-child(1) { animation-delay: 0.1s; }
.resa-v1-field:nth-child(2) { animation-delay: 0.2s; }
.resa-v1-field:nth-child(3) { animation-delay: 0.3s; }
.resa-v1-field:nth-child(4) { animation-delay: 0.4s; }
.resa-v1-field:nth-child(5) { animation-delay: 0.5s; }
.resa-v1-field:nth-child(6) { animation-delay: 0.6s; }

@keyframes resa-v1-fadeInField {
    from { 
        opacity: 0; 
        transform: translateX(-20px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0);
    }
}

.resa-v1-label {
    display: block;
    color: var(--resa-v1-text-white);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.resa-v1-field:hover .resa-v1-label {
    color: var(--resa-v1-primary);
    transform: translateX(5px);
}

.resa-v1-label small {
    font-weight: normal;
    color: var(--resa-v1-text-gray);
    font-size: 0.85em;
}

.resa-v1-input, .resa-v1-select, .resa-v1-textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--resa-v1-border);
    border-radius: 12px;
    color: var(--resa-v1-text-white);
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.resa-v1-input:focus, .resa-v1-select:focus, .resa-v1-textarea:focus {
    outline: none;
    border-color: var(--resa-v1-primary);
    box-shadow: 0 0 0 4px rgba(69, 176, 116, 0.2);
    transform: translateY(-2px);
}

.resa-v1-input:hover, .resa-v1-select:hover, .resa-v1-textarea:hover {
    border-color: var(--resa-v1-primary);
}

.resa-v1-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2345b074' stroke-width='3' 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 14px center;
    background-size: 20px;
    padding-right: 45px;
}

.resa-v1-select option {
    background: var(--resa-v1-bg-dark);
    color: var(--resa-v1-text-white);
}

.resa-v1-select optgroup {
    background: var(--resa-v1-bg-card);
    color: var(--resa-v1-primary);
    font-weight: 700;
}

/* Conteneur pour le champ date */
.resa-v1-date-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.resa-v1-date-wrapper::after {
    content: '📅';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    pointer-events: none;
    z-index: 1;
}

.resa-v1-date-wrapper .resa-v1-input[type="date"] {
    position: relative;
    z-index: 2;
    width: 100% !important;
    padding-right: 50px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.resa-v1-date-wrapper .resa-v1-input[type="date"]::after {
    display: none;
}

.resa-v1-input[type="date"] {
    cursor: pointer;
    color-scheme: dark;
    position: relative;
    padding: 14px 50px 14px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Masquer l'icône du navigateur */
.resa-v1-input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    opacity: 0;
}

/* Forcer la même apparence sur mobile */
.resa-v1-input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    padding: 0;
}

.resa-v1-textarea {
    resize: vertical;
    min-height: 100px;
}

.resa-v1-input::placeholder, .resa-v1-textarea::placeholder {
    color: var(--resa-v1-text-gray);
}

.resa-v1-custom {
    display: none;
    margin-top: 10px;
    animation: resa-v1-slideDownSmooth 0.4s ease;
}

@keyframes resa-v1-slideDownSmooth {
    from { 
        opacity: 0; 
        max-height: 0;
        transform: translateY(-10px);
    }
    to { 
        opacity: 1; 
        max-height: 100px;
        transform: translateY(0);
    }
}

/* Checkbox group */
.resa-v1-checkbox-group {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 2px solid var(--resa-v1-border);
    opacity: 0;
    animation: resa-v1-fadeInField 0.5s ease forwards;
    animation-delay: 0.6s;
}

.resa-v1-checkbox-group label {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.resa-v1-checkbox-group label:hover {
    background: rgba(69, 176, 116, 0.1);
    transform: translateX(5px);
}

.resa-v1-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--resa-v1-primary);
}

.resa-v1-checkbox-group input[type="checkbox"]:checked {
    animation: resa-v1-checkPop 0.3s ease;
}

@keyframes resa-v1-checkPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.resa-v1-checkbox-group .resa-v1-label {
    margin: 0;
    font-weight: 500;
}

/* Skip button */
.resa-v1-skip {
    text-align: center;
    margin-top: 20px;
}

.resa-v1-skip-btn {
    background: none;
    border: 2px solid var(--resa-v1-border);
    color: var(--resa-v1-text-gray);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
    font-weight: 600;
}

.resa-v1-skip-btn:hover {
    color: var(--resa-v1-primary);
    border-color: var(--resa-v1-primary);
    transform: translateY(-2px);
}

/* Buttons */
.resa-v1-nav {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.resa-v1-btn {
    flex: 1;
    padding: 16px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.resa-v1-btn-secondary {
    background: rgba(0, 0, 0, 0.6);
    color: var(--resa-v1-text-white);
    border: 2px solid var(--resa-v1-border);
}

.resa-v1-btn-secondary:hover {
    border-color: var(--resa-v1-primary);
    transform: translateY(-2px);
}

.resa-v1-btn-primary {
    background: linear-gradient(135deg, var(--resa-v1-primary), #5fd88f);
    color: white;
    box-shadow: 0 5px 25px rgba(69, 176, 116, 0.5);
}

.resa-v1-btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(69, 176, 116, 0.7);
}

.resa-v1-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.resa-v1-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: resa-v1-spin 0.8s linear infinite;
}

@keyframes resa-v1-spin {
    to { transform: rotate(360deg); }
}

/* Success */
.resa-v1-success {
    background: linear-gradient(135deg, var(--resa-v1-primary), #5fd88f);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 25px;
    margin-top: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(69, 176, 116, 0.5);
}

/* Responsive */
@media (max-width: 767px) {
    .resa-v1-container {
        padding: 25px 20px;
    }

    .resa-v1-title {
        font-size: 2em;
    }

    .resa-v1-page-title {
        font-size: 1.5em;
    }

    .resa-v1-progress-step {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
}