/* ============================================
   BORDAUTO - DESIGN PREMIUM 2024
   Modern, Clean, Professional
============================================ */

/* ============== VARIABLES ============== */
:root {
    /* Couleurs principales - Plus vibrantes */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);

    --secondary: #8b5cf6;
    --accent: #06b6d4;

    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --danger-light: #f87171;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --info: #3b82f6;

    /* Background - Tons sombres élégants */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --bg-input: #16161e;
    --bg-elevated: #1e1e28;

    /* Texte */
    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-accent: #c4b5fd;

    /* Bordures */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(99, 102, 241, 0.3);

    /* Radius - Plus arrondis pour le moderne */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows - Plus de profondeur */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--primary-glow);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-color);

    /* Dimensions */
    --header-height: 70px;
    --footer-height: 90px;
    --spacing: 16px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============== RESET & BASE ============== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at top, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============== HEADER DESKTOP ============== */
.header-desktop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(180deg, rgba(18, 18, 26, 0.95) 0%, rgba(18, 18, 26, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: white;
    box-shadow: var(--shadow-glow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.logo-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.logo:hover .logo-icon {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: var(--shadow-glow), 0 0 30px var(--primary-glow);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-desktop {
    display: flex;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-link:active {
    transform: scale(0.98);
}

.nav-link.active {
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-link.active::before {
    opacity: 1;
}

.nav-link.active:hover {
    background: transparent;
    box-shadow: var(--shadow-glow), 0 4px 20px var(--primary-glow);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform var(--transition-normal);
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.nav-link:hover .nav-icon {
    transform: scale(1.15);
}

.nav-link.active .nav-icon svg {
    stroke: white;
}

.nav-logout {
    margin-left: 8px;
}

.nav-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ============== FOOTER MOBILE ============== */
.footer-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background: linear-gradient(0deg, rgba(18, 18, 26, 0.98) 0%, rgba(18, 18, 26, 0.9) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
}

.footer-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    color: var(--text-muted);
    transition: all var(--transition-normal);
    border-radius: var(--radius-lg);
    position: relative;
}

.footer-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 0 0 var(--radius-full) var(--radius-full);
    transition: transform var(--transition-normal);
}

.footer-link.active::before {
    transform: translateX(-50%) scaleX(1);
}

.footer-link:active {
    transform: scale(0.95);
}

.footer-link.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.footer-link.active .footer-icon {
    transform: scale(1.15);
}

.footer-link.active .footer-icon svg {
    stroke: var(--primary-light);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    transition: transform var(--transition-normal);
}

.footer-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    transition: stroke var(--transition-normal), filter var(--transition-normal);
}

.footer-link:hover .footer-icon {
    transform: translateY(-2px);
}

.footer-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-logout:hover {
    color: var(--danger);
}

/* ============== MAIN CONTENT ============== */
.main-content {
    min-height: 100vh;
    padding-bottom: calc(var(--footer-height) + 24px);
}

.page-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px var(--spacing);
}

/* ============== PAGE HEADER ============== */
.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 400;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-light);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-4px);
}

/* ============== WELCOME SECTION ============== */
.welcome-section {
    text-align: center;
    padding: 48px 0;
}

.welcome-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 17px;
}

/* ============== MENU CARDS ============== */
.menu-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.menu-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.menu-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.menu-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.card-primary .card-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.card-secondary .card-icon {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.card-tertiary .card-icon {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 4px 20px rgba(100, 116, 139, 0.3);
}

.card-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-arrow {
    color: var(--text-muted);
    font-size: 20px;
    transition: transform var(--transition-normal);
    position: relative;
    z-index: 1;
}

.menu-card:hover .card-arrow {
    transform: translateX(4px);
    color: var(--primary-light);
}

/* ============== STATS ============== */
.stats-preview, .stats-section {
    margin-bottom: 28px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item, .stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 18px 14px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.stat-item:hover, .stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-pending .stat-value { color: var(--warning); }
.stat-success .stat-value { color: var(--success); }
.stat-danger .stat-value { color: var(--danger); }

.stats-ca {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ca-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--success);
}

/* ============== STEP SECTION ============== */
.step-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.step-title {
    font-size: 17px;
    font-weight: 700;
}

/* ============== TYPE SELECTOR ============== */
.type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.type-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
}

.type-btn.active::before {
    opacity: 1;
}

.type-icon {
    font-size: 36px;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-normal);
}

.type-btn:hover .type-icon {
    transform: scale(1.1);
}

.type-label {
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    color: #ffffff;
}

/* ============== FORM ELEMENTS ============== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-muted);
}

/* Phone input */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.phone-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.phone-flag {
    padding-left: 14px;
    font-size: 22px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.phone-prefix {
    padding: 14px 0 14px 8px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    user-select: none;
}

.phone-full {
    flex: 1;
    padding: 14px 16px 14px 4px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.phone-full:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.phone-full::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.phone-input {
    flex: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ============== CONDITION SELECTOR ============== */
.condition-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.condition-btn {
    padding: 14px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.condition-btn:hover {
    border-color: var(--primary);
}

.condition-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ============== PERIOD SELECTOR ============== */
.period-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.period-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.period-btn:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.period-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.period-label {
    font-weight: 600;
}

.period-mult {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-full);
}

.period-btn.active .period-mult {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* ============== QUANTITY SELECTOR ============== */
.quantity-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.qty-btn {
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.qty-btn:hover {
    border-color: var(--primary);
}

.qty-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ============== BUTTONS ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

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

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 18px 32px;
    font-size: 16px;
    flex: 1;
}

.btn-small {
    padding: 10px 18px;
    font-size: 13px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.btn-secondary.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ============== RECAP BUTTONS ============== */
.recap-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ============== CORRECTION SECTION ============== */
.correction-section {
    margin: 20px 0;
}

.correction-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 2px solid var(--warning);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.correction-input-group {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.correction-input-group .form-input {
    flex: 1;
}

.correction-input-group .btn {
    white-space: nowrap;
}

.correction-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ============== PANIER ============== */
.panier-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.panier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    transition: all var(--transition-normal);
}

.panier-item:hover {
    border-color: var(--border-light);
}

.panier-item-info {
    flex: 1;
}

.panier-item-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-right: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panier-item-name {
    font-weight: 600;
    color: var(--text-primary);
}

.panier-item-price {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.panier-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
}

.panier-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.panier-buttons {
    display: flex;
    gap: 12px;
}

.panier-buttons .btn {
    flex: 1;
}

/* ============== SIDEBAR PANIER ============== */
.panier-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: 300px;
    height: calc(100vh - var(--header-height));
    background: rgba(26, 26, 36, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.panier-sidebar.hidden {
    transform: translateX(-100%);
}

.panier-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.panier-sidebar-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.panier-sidebar-count {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--radius-full);
}

.panier-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.panier-sidebar-item {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
    position: relative;
    border: 1px solid var(--border-color);
}

.panier-sidebar-item-type {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.panier-sidebar-item-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.panier-sidebar-item-price {
    font-size: 12px;
    color: var(--text-secondary);
}

.panier-sidebar-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all var(--transition-fast);
}

.panier-sidebar-item-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

.panier-sidebar-actions {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.page-container.with-sidebar {
    margin-left: 300px;
    transition: margin-left 0.3s ease;
}

/* Mobile: panier badge flottant */
@media (max-width: 768px) {
    .panier-sidebar {
        position: fixed;
        top: auto;
        bottom: 85px;
        left: auto;
        right: 16px;
        width: auto;
        min-width: 60px;
        height: auto;
        max-height: 54px;
        border-right: none;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-full);
        overflow: hidden;
        box-shadow: var(--shadow-lg), 0 0 20px var(--primary-glow);
        transition: all 0.3s ease;
    }

    .panier-sidebar.expanded {
        right: 12px;
        left: 12px;
        width: auto;
        min-width: auto;
        max-height: 65vh;
        border-radius: var(--radius-xl);
        bottom: 85px;
    }

    .panier-sidebar.hidden {
        transform: translateY(200%);
        opacity: 0;
    }

    .panier-sidebar .panier-sidebar-header {
        padding: 14px 18px;
        cursor: pointer;
    }

    .panier-sidebar:not(.expanded) .panier-sidebar-list,
    .panier-sidebar:not(.expanded) .panier-sidebar-actions {
        display: none;
    }

    .panier-sidebar:not(.expanded) .panier-sidebar-header {
        border-bottom: none;
    }

    .panier-sidebar:not(.expanded) .panier-sidebar-title {
        display: none;
    }

    .panier-sidebar:not(.expanded) .panier-sidebar-count {
        font-size: 14px;
        padding: 6px 14px;
    }

    .panier-sidebar:not(.expanded) .panier-sidebar-header::after {
        content: '🛒';
        margin-left: 10px;
        font-size: 18px;
    }

    .panier-sidebar.expanded .panier-sidebar-header::after {
        content: '✕';
        margin-left: auto;
        font-size: 18px;
        cursor: pointer;
    }

    .page-container.with-sidebar {
        margin-left: 0;
        padding-bottom: 100px;
    }
}

/* ============== RESULTS LIST ============== */
.results-section {
    margin-top: 24px;
}

.results-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.result-item:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.result-item.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    box-shadow: 0 0 20px var(--primary-glow);
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-title {
    font-weight: 600;
    font-size: 15px;
}

.result-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.result-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--success);
}

.result-stock {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============== ROUTE INFO ============== */
.route-info {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.route-card {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
}

.route-stat {
    text-align: center;
}

.route-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-light);
}

.route-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.route-address {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* ============== RECAP CARD ============== */
.recap-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.recap-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.recap-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recap-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 700;
}

.recap-value {
    font-size: 16px;
    font-weight: 600;
}

.recap-total {
    font-size: 28px;
    font-weight: 800;
    color: var(--success);
    text-align: center;
}

.recap-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Recap calcul détaillé */
.recap-calcul {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 16px -8px;
}

.calcul-bloc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.calcul-label {
    color: var(--text-secondary);
}

.calcul-value {
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.calcul-result {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 6px -6px;
}

.calcul-result .calcul-label {
    color: var(--text-primary);
    font-weight: 600;
}

.calcul-result .calcul-value {
    color: var(--primary-light);
    font-weight: 700;
}

.recap-totaux {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.calcul-total {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}

.calcul-total .calcul-label {
    font-size: 16px;
    font-weight: 700;
}

.calcul-total .calcul-value {
    font-size: 16px;
}

.calcul-total-ttc {
    padding-top: 16px;
}

.calcul-total-ttc .calcul-label {
    font-size: 20px;
    font-weight: 800;
    color: var(--success);
}

.calcul-total-ttc .calcul-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--success);
}

.correction-applied {
    border-left: 3px solid var(--warning);
    padding-left: 10px;
}

.calcul-original {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ============== MESSAGE INTERVENTION ============== */
.intervention-message-container {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    margin: 24px 0;
    overflow: hidden;
    text-align: left;
    border: 1px solid var(--border-color);
}

.intervention-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
}

.intervention-message-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-light);
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-copy:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.intervention-message {
    padding: 20px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
}

/* ============== CONFIRMATION ============== */
.confirmation-card {
    text-align: center;
    padding: 48px 24px;
}

.confirmation-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    margin: 0 auto 24px;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    color: white;
}

.confirmation-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.confirmation-id {
    font-size: 18px;
    color: var(--primary-light);
    font-weight: 700;
    margin-bottom: 20px;
}

.confirmation-text {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ============== DEVIS LIST ============== */
.devis-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.devis-card {
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all var(--transition-normal);
}

.devis-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.devis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.devis-id {
    font-weight: 700;
    font-size: 15px;
}

.devis-type {
    font-size: 10px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-pneu {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    color: var(--primary-light);
}

.type-batterie {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    color: var(--success);
}

.devis-body {
    margin-bottom: 14px;
}

.devis-info {
    margin-bottom: 10px;
}

.devis-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.devis-value {
    font-size: 14px;
    font-weight: 500;
}

.devis-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.devis-date {
    font-size: 12px;
    color: var(--text-muted);
}

.devis-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--success);
}

/* ============== STATUS BADGES ============== */
.status-badge {
    font-size: 10px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-en_attente {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    color: var(--warning);
}

.status-facture, .status-valide {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    color: var(--success);
}

.status-annule {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    color: var(--danger);
}

/* ============== FILTERS ============== */
.filters-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.filter-btn:hover {
    border-color: var(--primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ============== EMPTY STATE ============== */
.empty-state {
    text-align: center;
    padding: 80px 24px;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.empty-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.empty-text {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* ============== DETAIL SECTION ============== */
.detail-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
}

.product-card {
    display: flex;
    align-items: center;
    gap: 18px;
}

.product-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
}

.product-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.product-qty {
    font-size: 13px;
    color: var(--text-muted);
}

.actions-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
}

.success-card, .cancelled-card {
    text-align: center;
    padding: 32px;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: white;
}

.cancelled-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    color: white;
}

/* ============== LOADING OVERLAY ============== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    margin-top: 20px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============== TOAST NOTIFICATIONS ============== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.info {
    border-left-color: var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============== STARTSTOP SECTION ============== */
.startstop-section {
    margin-top: 24px;
    text-align: center;
}

.startstop-question {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 500;
}

.startstop-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
}

/* ============== UTILITIES ============== */
.hidden {
    display: none !important;
}

.type-badge {
    display: inline-block;
}

/* ============== TOTAL TTC DISPLAY ============== */
.total-ttc-display {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow-lg), 0 0 40px var(--primary-glow);
}

.total-ttc-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.total-ttc-value {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: #fff;
}

/* ============== PAYMENT SELECTOR ============== */
.payment-selector {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.payment-btn {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 20px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.payment-btn:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.payment-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    transform: scale(1.02);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.payment-icon {
    font-size: 32px;
}

.payment-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============== CLIENT TYPE SELECTOR ============== */
.client-type-selector {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.client-type-btn {
    flex: 1;
    padding: 16px 24px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.client-type-btn:hover {
    border-color: var(--primary);
}

.client-type-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ============== PARAMETRES ============== */
.params-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 12px;
}

.params-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.section-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 14px;
}

.params-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.params-grid-small {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.param-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.param-item label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-item-small {
    text-align: center;
}

.param-item-small label {
    font-size: 11px;
    display: block;
    margin-bottom: 6px;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.input-group:focus-within {
    border-color: var(--primary);
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    min-width: 0;
    width: 100%;
}

.input-group input:focus {
    outline: none;
}

.input-suffix {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    min-width: 45px;
    text-align: center;
    white-space: nowrap;
}

.param-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.params-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    position: sticky;
    bottom: calc(var(--footer-height) + 12px);
    border: 1px solid var(--border-color);
}

.params-actions .btn {
    width: 100%;
}

/* ============== RESPONSIVE DESKTOP ============== */
@media (min-width: 768px) {
    .header-desktop {
        display: block;
    }

    .footer-mobile {
        display: none;
    }

    .main-content {
        padding-top: calc(var(--header-height) + 24px);
        padding-bottom: 48px;
    }

    .page-container {
        max-width: 800px;
        padding: 28px;
    }

    .page-title {
        font-size: 40px;
    }

    .welcome-title {
        font-size: 56px;
    }

    .menu-cards {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .menu-card {
        flex: 1;
        min-width: 300px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .confirmation-actions {
        flex-direction: row;
        justify-content: center;
    }

    .toast-container {
        top: calc(var(--header-height) + 24px);
    }

    .params-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .params-grid-small {
        grid-template-columns: repeat(6, 1fr);
    }

    .params-actions {
        flex-direction: row;
        justify-content: flex-end;
        position: static;
        background: transparent;
        padding: 24px 0 0 0;
        border-top: 1px solid var(--border-color);
        border: none;
    }

    .params-actions .btn {
        width: auto;
        min-width: 200px;
    }

    .payment-selector {
        flex-direction: row;
    }

    .total-ttc-value {
        font-size: 56px;
    }
}

/* ============== MOBILE SMALL ============== */
@media (max-width: 480px) {
    .payment-selector {
        flex-direction: column;
    }

    .payment-btn {
        flex-direction: row;
        justify-content: center;
        padding: 18px;
    }

    .total-ttc-value {
        font-size: 40px;
    }

    .type-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .type-btn {
        padding: 18px 12px;
    }

    .type-icon {
        font-size: 28px;
    }
}

/* ============== SAFE AREA iOS ============== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer-mobile {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .main-content {
        padding-bottom: calc(var(--footer-height) + env(safe-area-inset-bottom) + 24px);
    }
}

/* ============== ZONE SELECTOR ============== */
.zone-btn {
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
}

.zone-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ============== ADDRESS MODE SELECTOR ============== */
.address-mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.address-mode-selector .btn {
    flex: 1;
}

/* ============== ARRONDI BUTTONS ============== */
.arrondi-section {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    justify-content: center;
}

.btn-arrondi {
    padding: 10px 18px;
    font-size: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-arrondi:hover {
    border-color: var(--primary);
    background: var(--bg-card);
}

/* ============================================
   ANIMATIONS AVANCEES - PREMIUM EFFECTS
============================================ */

/* ============== KEYFRAMES ============== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px var(--primary-glow); }
}

@keyframes rippleEffect {
    from {
        opacity: 0.6;
        transform: scale(0);
    }
    to {
        opacity: 0;
        transform: scale(4);
    }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============== SCROLL ANIMATIONS ============== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: calc(var(--animation-order, 0) * 0.1s);
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ============== RIPPLE EFFECT ============== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

/* ============== TOAST ANIMATIONS ============== */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    padding: 0;
}

.toast-close:hover {
    opacity: 1;
}

.toast-close svg {
    width: 100%;
    height: 100%;
    stroke: var(--text-secondary);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.success .toast-icon { color: var(--success); }

.toast.error { border-left: 4px solid var(--danger); }
.toast.error .toast-icon { color: var(--danger); }

.toast.warning { border-left: 4px solid var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }

.toast.info { border-left: 4px solid var(--info); }
.toast.info .toast-icon { color: var(--info); }

/* ============== CURSOR GLOW ============== */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

body:not(:hover) .cursor-glow {
    opacity: 0;
}

/* ============== SKELETON LOADING ============== */
.skeleton-container {
    padding: 20px;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 12px;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-box {
    height: 100px;
    width: 100%;
}

/* ============== CARD 3D TRANSFORM ============== */
.card,
.card-product,
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

/* ============== PAGE TRANSITION ============== */
body {
    opacity: 1;
}

/* ============== INPUT FOCUS ANIMATION ============== */
.input-focused {
    position: relative;
}

.input-focused::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease, left 0.3s ease;
}

.input-focused::after {
    width: 100%;
    left: 0;
}

/* ============== HOVER GLOW EFFECT ============== */
.btn-primary,
.btn-success {
    position: relative;
}

.btn-primary::before,
.btn-success::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before,
.btn-success:hover::before {
    opacity: 0.6;
    animation: gradientMove 3s ease infinite;
}

/* ============== FLOATING ANIMATION ============== */
.floating {
    animation: float 3s ease-in-out infinite;
}

/* ============== GLOWING BADGE ============== */
.badge-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ============== PRICE ANIMATION ============== */
.price-animated {
    display: inline-block;
    animation: bounce 0.5s ease;
}

/* ============== LOADING SPINNER ENHANCED ============== */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 3px solid transparent;
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.6s linear reverse infinite;
}

/* ============== GRADIENT TEXT ============== */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 5s ease infinite;
}

/* ============== CARD HOVER SHINE ============== */
.card::after,
.card-product::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 60%
    );
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.card:hover::after,
.card-product:hover::after {
    opacity: 1;
    animation: shimmer 1s ease;
}

/* ============== SMOOTH STEP TRANSITIONS ============== */
.form-section,
.step-section {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============== NOTIFICATION DOT ============== */
.notification-dot {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
    animation: pulse 2s ease-in-out infinite;
}

/* ============== ENHANCED PANIER MOBILE ============== */
@media (max-width: 768px) {
    .panier-sidebar.expanded {
        animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
}

/* ============== ENHANCED INPUTS ============== */
.form-input,
.form-select,
input[type="text"],
input[type="tel"],
input[type="number"],
textarea,
select {
    transition: all var(--transition-normal);
    position: relative;
}

.form-input:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    animation: pulse 0.3s ease;
}

/* ============== SCROLLBAR STYLING ============== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light), var(--secondary));
}

/* ============== SELECTION STYLING ============== */
::selection {
    background: var(--primary);
    color: var(--text-primary);
}

::-moz-selection {
    background: var(--primary);
    color: var(--text-primary);
}
