/**
 * WeCleaned Core CSS
 * Styles de base, layout, navigation et responsive
 * 
 * @package WeCleaned
 * @version 1.0.0
 */

/* =========================================
   Variables CSS & Typography
   ========================================= */
:root {
    /* Premium Color Palette */
    --wc-primary: #6366F1;
    --wc-primary-hover: #4F46E5;
    --wc-accent: #14B8A6;
    --wc-accent-light: #5EEAD4;
    --wc-success: #10B981;
    --wc-gold: #F59E0B;
    --wc-gold-light: #FCD34D;
    
    /* Dark Sidebar */
    --wc-sidebar-bg: #1F2937;
    --wc-sidebar-dark: #111827;
    --wc-sidebar-text: #D1D5DB;
    --wc-sidebar-active: #374151;
    
    /* Light Theme */
    --wc-text-main: #1F2937;
    --wc-text-muted: #6B7280;
    --wc-text-light: #9CA3AF;
    --wc-bg-page: #F9FAFB;
    --wc-bg-card: #FFFFFF;
    --wc-border: #E5E7EB;
    --wc-border-light: #F3F4F6;
    
    /* Shadows */
    --wc-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --wc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --wc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --wc-radius: 16px;
    --wc-radius-lg: 20px;
    --wc-radius-sm: 12px;
    --wc-radius-xs: 8px;
    
    /* Transitions */
    --wc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --wc-transition-fast: all 0.15s ease;
    
    /* Typography */
    --wc-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =========================================
   Base Reset & Container
   ========================================= */
.wecleaned-wrapper {
    font-family: var(--wc-font);
    color: var(--wc-text-main);
    background: transparent;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wecleaned-wrapper * {
    box-sizing: border-box;
}

.wecleaned-container {
    display: flex;
    gap: 0;
    position: relative;
    background: white;
    border: 4px solid var(--wc-gold);
    border-radius: var(--wc-radius-lg);
    overflow: hidden;
    box-shadow: var(--wc-shadow-xl);
}

/* =========================================
   Typography
   ========================================= */
h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--wc-text-main);
    margin: 0 0 12px 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.step-subtitle {
    color: var(--wc-text-muted);
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 32px 0;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--wc-text-main);
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--wc-text-main);
    margin: 0;
}

button {
    font-family: var(--wc-font);
}

/* =========================================
   Sidebar Navigation (Dark)
   ========================================= */
.wecleaned-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--wc-sidebar-dark) 0%, var(--wc-sidebar-bg) 100%);
    display: flex;
    flex-direction: column;
}

ul.wecleaned-steps {
    list-style: none;
    padding: 24px 20px;
    margin: 0;
}

ul.wecleaned-steps li.step {
    display: flex;
    align-items: center;
    padding: 14px 10px;
    color: var(--wc-sidebar-text);
    border-radius: var(--wc-radius-xs);
    transition: var(--wc-transition);
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    position: relative;
}

ul.wecleaned-steps li.step:hover {
    background: rgba(255, 255, 255, 0.05);
}

ul.wecleaned-steps li.step.active {
    background: var(--wc-sidebar-active);
    color: white;
    font-weight: 600;
}

ul.wecleaned-steps li.step.passed {
    color: var(--wc-accent-light);
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--wc-sidebar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    font-weight: 700;
    transition: var(--wc-transition);
    flex-shrink: 0;
    border: 2px solid transparent;
}

ul.wecleaned-steps li.step.active .step-icon {
    background: var(--wc-accent);
    color: white;
    border-color: var(--wc-accent-light);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
    transform: scale(1.05);
}

ul.wecleaned-steps li.step.passed .step-icon {
    background: var(--wc-accent);
    color: white;
    border-color: var(--wc-accent);
}

ul.wecleaned-steps li.step.passed .step-icon::before {
    content: '✓';
    font-size: 14px;
    font-weight: bold;
}

ul.wecleaned-steps li.step.passed .step-icon {
    font-size: 0;
}

/* =========================================
   Summary Sidebar (Desktop)
   ========================================= */
.wecleaned-summary-sidebar {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    margin: 0 20px 28px 20px;
    border-radius: var(--wc-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wecleaned-summary-sidebar h3 {
    color: white;
    font-size: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--wc-sidebar-text);
    line-height: 1.5;
}

.summary-item span:first-child {
    flex: 1;
    padding-right: 12px;
}

.summary-item span:last-child {
    font-weight: 600;
    white-space: nowrap;
    color: white;
}

.summary-item.main {
    font-weight: 600;
    font-size: 15px;
    color: white;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    margin-bottom: 14px;
}

.summary-item.cs {
    color: var(--wc-accent-light);
}

.summary-item.date {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--wc-accent-light);
    font-size: 13px;
}

.placeholder-text {
    color: var(--wc-sidebar-text) !important;
    font-size: 13px;
    font-style: italic;
}

.summary-total {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.summary-total .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: var(--wc-sidebar-text);
    font-size: 14px;
}

.summary-total .row.total {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-total .row.total span:first-child {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.summary-total .row.total span:last-child {
    font-size: 26px;
    font-weight: 800;
    color: var(--wc-accent-light);
    text-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.badge-savings {
    background: rgba(16, 185, 129, 0.15);
    color: var(--wc-success);
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* =========================================
   Main Content Area
   ========================================= */
.wecleaned-content {
    flex-grow: 1;
    padding: 40px 48px;
    background: var(--wc-bg-page);
    min-width: 0;
}

.step-content {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Formulaires (Step 4)
   ========================================= */
.form-card {
    background: white;
    padding: 36px;
    border-radius: var(--wc-radius-sm);
    box-shadow: var(--wc-shadow-md);
    border: 2px solid var(--wc-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--wc-text-main);
}

.form-group label::after {
    content: ' *';
    color: #EF4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--wc-border);
    border-radius: var(--wc-radius-xs);
    font-size: 15px;
    font-family: var(--wc-font);
    transition: var(--wc-transition);
    background: var(--wc-bg-page);
    color: var(--wc-text-main);
    font-weight: 500;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--wc-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 95px;
}

/* =========================================
   Boutons & Navigation
   ========================================= */
.wecleaned-footer-nav,
.wecleaned-nav-actions {
    margin-top: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.btn-primary {
    background: var(--wc-primary);
    color: white;
    border: none;
    padding: 15px 38px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    transition: var(--wc-transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover:not(:disabled) {
    background: var(--wc-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn-primary.btn-lg {
    padding: 17px 46px;
    font-size: 17px;
}

.btn-outline {
    background: white;
    border: 2px solid var(--wc-border);
    color: var(--wc-text-main);
    padding: 13px 30px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--wc-transition);
    box-shadow: var(--wc-shadow-sm);
}

.btn-outline:hover {
    border-color: var(--wc-primary);
    color: var(--wc-primary);
    transform: translateY(-2px);
    box-shadow: var(--wc-shadow-md);
}

/* =========================================
   Success Message
   ========================================= */
.success-message {
    text-align: center;
    padding: 72px 36px;
    background: white;
    border-radius: var(--wc-radius-sm);
    box-shadow: var(--wc-shadow-lg);
}

.success-message > div:first-child {
    font-size: 76px;
    color: var(--wc-success);
    margin-bottom: 22px;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message h2 {
    font-size: 30px;
    margin-bottom: 15px;
    color: var(--wc-text-main);
}

.success-message p {
    font-size: 16px;
    color: var(--wc-text-muted);
    margin-bottom: 11px;
}

/* =========================================
   Mobile Sticky Bar
   ========================================= */
.wc-mobile-bar {
    display: none;
}

.desktop-only {
    display: block;
}

/* =========================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ========================================= */

@media (max-width: 1200px) {
    .wecleaned-content {
        padding: 36px 28px;
    }
}

@media (max-width: 1024px) {
    .wecleaned-container {
        flex-direction: column;
    }
    
    .wecleaned-sidebar {
        width: 100%;
        background: linear-gradient(135deg, var(--wc-sidebar-dark) 0%, var(--wc-sidebar-bg) 100%);
    }
    
    ul.wecleaned-steps {
        display: flex;
        overflow-x: auto;
        padding: 16px 20px;
        gap: 6px;
        scrollbar-width: thin;
    }
    
    ul.wecleaned-steps li.step {
        flex-shrink: 0;
        white-space: nowrap;
        margin-bottom: 0;
        padding: 10px 8px;
    }
    
    .wecleaned-summary-sidebar {
        margin: 0 20px 20px 20px;
    }
}

@media (max-width: 768px) {
    .wecleaned-wrapper {
        padding: 16px 10px 110px 10px;
    }
    
    .wecleaned-container {
        border-width: 3px;
    }
    
    .wecleaned-content {
        padding: 24px 16px;
    }
    
    h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .step-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    h3 {
        font-size: 17px;
        margin-bottom: 12px;
    }
    
    .wecleaned-summary-sidebar {
        display: none;
    }
    
    .wecleaned-nav-actions.desktop-only {
        display: none !important;
    }
    
    .wc-mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        padding: 14px 18px;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
        z-index: 9999;
        align-items: center;
        justify-content: space-between;
        border-top: 3px solid var(--wc-gold);
        gap: 14px;
    }
    
    .wc-mobile-total .label {
        font-size: 10px;
        color: var(--wc-text-muted);
        display: block;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .wc-mobile-total .amount {
        font-size: 20px;
        font-weight: 800;
        color: var(--wc-primary);
        display: block;
    }
    
    .mobile-nav {
        display: flex;
        gap: 8px;
    }
    
    .wc-mobile-bar .btn-prev {
        background: white;
        border: 2px solid var(--wc-border);
        color: var(--wc-text-main);
        padding: 10px 14px;
        border-radius: 100px;
        font-weight: 600;
        font-size: 13px;
    }
    
    .wc-mobile-bar .btn-primary {
        padding: 10px 18px;
        font-size: 13px;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    
    .form-card {
        padding: 22px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .full-width {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 20px;
    }
    
    .wecleaned-content {
        padding: 20px 14px;
    }
    
    .wc-mobile-bar {
        padding: 10px 14px;
    }
    
    .wc-mobile-total .amount {
        font-size: 18px;
    }
}

@media print {
    .wc-mobile-bar,
    .wecleaned-nav-actions,
    .btn-primary,
    .btn-outline {
        display: none !important;
    }
    
    .wecleaned-container {
        border: 1px solid #000;
    }
}
