* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 50%, #FFA500 100%);
    min-height: 100vh;
    padding: 30px 20px;
    color: #333;
    position: relative;
}

/* Effet de fond animé */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundMove 20s linear infinite;
    pointer-events: none;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(255, 107, 0, 0.3),
                0 0 0 1px rgba(255, 140, 0, 0.1);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== HEADER ==================== */
.header {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 50%, #FFA500 100%);
    color: white;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 18px;
    opacity: 0.95;
    font-weight: 600;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==================== FORM SECTION ==================== */
.form-section {
    padding: 45px 40px;
    background: linear-gradient(to bottom, #ffffff 0%, #fff9f5 100%);
}

.form-group {
    margin-bottom: 28px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #FF6B00;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #FFE5D4;
    border-radius: 14px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: #333;
    font-weight: 500;
}

input::placeholder {
    color: #FFAA77;
    opacity: 0.7;
}

input:focus {
    outline: none;
    border-color: #FF6B00;
    background: #FFF9F5;
    box-shadow: 0 0 0 5px rgba(255, 107, 0, 0.12),
                0 8px 20px rgba(255, 107, 0, 0.15);
    transform: translateY(-2px);
}

input:hover:not(:focus) {
    border-color: #FFAA77;
}

/* ==================== BOUTONS ==================== */
.btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 30px rgba(255, 107, 0, 0.35),
                inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(255, 107, 0, 0.45),
                inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-sync {
    background: linear-gradient(135deg, #FF8C00 0%, #FFA500 100%);
    margin-top: 25px;
}

.new-sync {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.35);
}

.new-sync:hover {
    box-shadow: 0 16px 40px rgba(34, 197, 94, 0.45);
}

/* ==================== RESULT SECTION ==================== */
.result-section {
    padding: 0 40px 40px;
    background: linear-gradient(to bottom, #fff9f5 0%, #ffffff 100%);
}

.result-card {
    background: linear-gradient(135deg, #FFF5EB 0%, #FFFBF7 100%);
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 2px solid #FFE5D4;
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #FF6B00, #FFA500);
}

.result-card h3 {
    color: #FF6B00;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.result-item {
    background: white;
    padding: 18px 20px;
    border-radius: 14px;
    border: 2px solid #FFE5D4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.result-item:hover {
    transform: translateY(-4px);
    border-color: #FFAA77;
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.2);
}

.result-item strong {
    color: #FF6B00;
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.result-item span {
    color: #222;
    font-size: 16px;
    font-weight: 600;
    display: block;
    word-break: break-word;
}

/* Sync Form */
.sync-form-wrapper {
    background: linear-gradient(135deg, #FFF5EB 0%, white 100%);
    padding: 35px;
    border-radius: 20px;
    border: 2px dashed #FFAA77;
    margin-top: 25px;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.1);
}

/* ==================== PROGRESS SECTION ==================== */
.progress-section {
    padding: 0 40px 45px;
    display: none;
    background: #FAFAFA;
}

.progress-section.active {
    display: block;
}

.progress-step {
    padding: 24px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: white;
    border: 2px solid #E5E5E5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: #E5E5E5;
    transition: all 0.4s;
}

.progress-step.loading {
    border-color: #FFAA77;
    background: #FFF9F0;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.progress-step.loading::before {
    background: linear-gradient(to bottom, #FF6B00, #FFA500);
}

.progress-step.success {
    border-color: #86efac;
    background: #f0fdf4;
}

.progress-step.success::before {
    background: linear-gradient(to bottom, #22c55e, #16a34a);
}

.progress-step.error {
    border-color: #fca5a5;
    background: #fef2f2;
}

.progress-step.error::before {
    background: linear-gradient(to bottom, #ef4444, #dc2626);
}

.progress-step.warning {
    border-color: #fed7aa;
    background: #fffbeb;
}

.progress-step.warning::before {
    background: linear-gradient(to bottom, #f59e0b, #d97706);
}

.step-title {
    font-weight: 800;
    font-size: 17px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 14px;
}

.step-content {
    margin-top: 14px;
    color: #555;
    line-height: 1.7;
    font-size: 15px;
}

/* ==================== RESULT BOX ==================== */
.result-box {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    padding: 18px 20px;
    border-radius: 12px;
    border-left: 5px solid #3b82f6;
    margin-top: 12px;
}

.result-box strong {
    color: #1e40af;
    font-weight: 700;
}

.error-message {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991b1b;
    padding: 18px 20px;
    border-radius: 12px;
    border-left: 5px solid #dc2626;
    margin-top: 12px;
    font-weight: 600;
}

.warning-message {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400e;
    padding: 18px 20px;
    border-radius: 12px;
    border-left: 5px solid #f59e0b;
    margin-top: 12px;
    font-weight: 600;
}

/* ==================== SPINNER ==================== */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #FFE5D4;
    border-top-color: #FF6B00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== FINAL RESULT ==================== */
.final-result {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 15px 40px rgba(34, 197, 94, 0.35);
    position: relative;
    overflow: hidden;
}

.final-result::before {
    content: '✓';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 200px;
    opacity: 0.1;
    font-weight: 900;
}

.final-result h3 {
    font-size: 26px;
    margin-bottom: 15px;
    font-weight: 800;
}

.final-result p {
    font-size: 16px;
    opacity: 0.95;
    margin: 8px 0;
}

/* ==================== ALERT OVERLAY ==================== */
.alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alert-box {
    background: white;
    padding: 40px;
    border-radius: 24px;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
    text-align: center;
    animation: slideUpAlert 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpAlert {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.alert-box h3 {
    margin-bottom: 18px;
    font-size: 26px;
    font-weight: 800;
}

.alert-box p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 16px;
}

.alert-box button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.alert-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.4);
}

.alert-box.success h3 {
    color: #22c55e;
}

.alert-box.error h3 {
    color: #ef4444;
}

.alert-box.warning h3 {
    color: #f59e0b;
}

/* ==================== ANIMATIONS ==================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.92;
        transform: scale(0.995);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }
    
    .container {
        border-radius: 20px;
    }
    
    .header {
        padding: 40px 25px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .form-section,
    .result-section,
    .progress-section {
        padding: 30px 25px;
    }
    
    .result-info {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 16px 20px;
    }
}

/* ==================== SCROLLBAR PERSONNALISÉE ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #FFF5EB;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #FF6B00, #FFA500);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #FF8C00, #FFB733);
}