/**
 * Sweever - Modern POS System
 * Brand Color: #013861
 * www.sweever.com
 */

/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    /* Brand Colors */
    --primary: #013861;
    --primary-dark: #01243d;
    --primary-light: #024a80;
    --secondary: #0277bd;
    --accent: #00d4ff;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Typography */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Monaco', monospace;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(1, 56, 97, 0.3);
    --shadow-glow-accent: 0 0 60px rgba(0, 212, 255, 0.2);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 40px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo-text {
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links > a:not(.btn) {
    padding: 0.625rem 1rem;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-links > a:not(.btn):hover {
    color: var(--primary);
    background: var(--gray-50);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hamburger animation when active */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-top: 1px solid var(--gray-200);
        z-index: 1000;
        animation: slideDown 0.3s ease;
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .nav-links > a {
        padding: 0.875rem 1rem;
        border-radius: var(--radius);
        text-align: center;
    }
    
    .nav-links > a:not(.btn):hover {
        background: var(--gray-100);
    }
    
    .nav-links > .btn {
        width: 100%;
        justify-content: center;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(1, 56, 97, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(1, 56, 97, 0.35);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, #013861cc 0%, #013861 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #0c5eaccc 0%, #013861 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    background: var(--gray-50);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-glow {
    box-shadow: 0 4px 20px rgba(1, 56, 97, 0.4);
}

.btn-glow:hover {
    box-shadow: 0 8px 32px rgba(1, 56, 97, 0.5);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
    filter: saturate(0.85);
    transform: scale(1.02);
}

/* Voile bleu semi-transparent : la photo reste lisible, le texte blanc aussi */
.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(1, 36, 61, 0.94) 0%,
        rgba(1, 56, 97, 0.88) 35%,
        rgba(2, 119, 189, 0.72) 75%,
        rgba(2, 136, 209, 0.62) 100%
    );
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

.hero-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    filter: blur(60px);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr 1.1fr;
        gap: 4rem;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 520px;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Visual : la caisse Sweever sur 3 supports (écran, tablette, smartphone) */
.hero-visual {
    position: relative;
    animation: fadeIn 0.8s ease-out 0.3s backwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-devices-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

.hero-devices-caption {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
}

.hero-device-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-device-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
}

.hero-device-chip i {
    color: var(--accent);
}

/* Scène : unités cqw pour que toute la composition suive la largeur disponible */
.devices-stage {
    container-type: inline-size;
    position: relative;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

.devices-stage-inner {
    position: relative;
    width: 100%;
    /* Assez haut pour que tablette et smartphone ne recouvrent que le pied de l'écran */
    aspect-ratio: 10 / 9.8;
}

.devices-glow {
    position: absolute;
    inset: -15%;
    background: radial-gradient(ellipse at 60% 40%, rgba(0, 212, 255, 0.22) 0%, transparent 60%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.device {
    position: absolute;
    z-index: 1;
}

.device-screen {
    position: relative;
    background: var(--gray-100);
    overflow: hidden;
}

/* Écran / PC */
.device-desktop {
    left: 6cqw;
    top: 0;
    width: 88cqw;
}

.device-desktop .device-frame {
    background: #111827;
    border-radius: 1.6cqw;
    padding: 1.3cqw 1.3cqw 1.6cqw;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55), 0 0 0 0.15cqw rgba(255, 255, 255, 0.08);
}

.device-desktop .device-screen {
    border-radius: 0.6cqw;
    aspect-ratio: 16 / 10;
}

.device-desktop .device-cam {
    position: absolute;
    top: 0.45cqw;
    left: 50%;
    width: 0.6cqw;
    height: 0.6cqw;
    margin-left: -0.3cqw;
    border-radius: 50%;
    background: #374151;
}

.device-stand {
    width: 14cqw;
    height: 4.5cqw;
    margin: 0 auto;
    background: linear-gradient(180deg, #1f2937, #111827);
    clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

.device-base {
    width: 30cqw;
    height: 1.2cqw;
    margin: 0 auto;
    border-radius: 0 0 1cqw 1cqw;
    background: #1f2937;
    box-shadow: 0 6cqw 4cqw -3cqw rgba(0, 0, 0, 0.35);
}

/* Tablette (paysage) */
.device-tablet {
    right: 0;
    bottom: 0;
    width: 50cqw;
    transform: rotate(-2deg);
    transform-origin: bottom right;
}

.device-tablet .device-frame {
    background: #0b1220;
    border-radius: 2.4cqw;
    padding: 1.4cqw 2.2cqw;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 0.15cqw rgba(255, 255, 255, 0.1);
    position: relative;
}

.device-tablet .device-screen {
    border-radius: 1cqw;
    aspect-ratio: 4 / 3;
}

.device-tablet .device-cam {
    position: absolute;
    left: 0.9cqw;
    top: 50%;
    width: 0.6cqw;
    height: 0.6cqw;
    margin-top: -0.3cqw;
    border-radius: 50%;
    background: #334155;
}

/* Smartphone (portrait) */
.device-phone {
    left: 0;
    bottom: 0;
    width: 19cqw;
    transform: rotate(3deg);
    transform-origin: bottom left;
    z-index: 2;
}

.device-phone .device-frame {
    background: #0b1220;
    border-radius: 3cqw;
    padding: 1cqw;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 0.15cqw rgba(255, 255, 255, 0.12);
    position: relative;
}

.device-phone .device-screen {
    border-radius: 2.2cqw;
    aspect-ratio: 9 / 19;
}

.device-phone .device-notch {
    position: absolute;
    top: 1.5cqw;
    left: 50%;
    width: 6cqw;
    height: 1.2cqw;
    margin-left: -3cqw;
    border-radius: 999px;
    background: #0b1220;
    z-index: 3;
}

/* Étiquettes flottantes */
.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    z-index: 3;
    animation: float 4s ease-in-out infinite;
    white-space: nowrap;
}

.floating-card .card-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
    background: var(--success);
}

.floating-card.card-1 {
    top: -1.75rem;
    right: 1cqw;
}

.floating-card.card-2 {
    bottom: 2cqw;
    left: 21cqw;
    animation-delay: 2s;
}

.floating-card.card-2 .card-icon {
    background: var(--secondary);
}

.floating-card.card-3 {
    top: -1.75rem;
    left: 2cqw;
    animation-delay: 1s;
}

.floating-card.card-3 .card-icon {
    background: var(--primary);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Maquette POS (.mp) : tout en em, taille pilotée par font-size ---------- */
.mp {
    --mp-primary: #013861;
    --mp-secondary: #0277bd;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    font-family: var(--font-family);
    color: var(--gray-800);
    background: var(--gray-100);
    line-height: 1.2;
    user-select: none;
}

.device-desktop .mp { font-size: 1.15cqw; }
.device-tablet .mp { font-size: 0.85cqw; }
.device-phone .mp { font-size: 0.72cqw; }

.mp-header {
    background: var(--mp-primary);
    color: #fff;
    height: 3.4em;
    padding: 0 0.9em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.mp-header-left,
.mp-header-right {
    display: flex;
    align-items: center;
    gap: 0.6em;
}

.mp-logo {
    height: 1.7em;
    width: auto;
    display: block;
}

.mp-cashier {
    font-size: 0.8em;
    opacity: 0.9;
    white-space: nowrap;
}

.mp-clock {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1em;
}

.mp-hbtn {
    width: 1.8em;
    height: 1.8em;
    border-radius: 0.4em;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
}

.mp-hbtn.danger {
    background: var(--danger);
}

.mp-main {
    /* Hauteur définie par l'écran (pas par le contenu) : le panier ne peut pas déborder */
    position: absolute;
    top: 3.4em;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    min-height: 0;
}

.mp-products {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mp-search {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.6em 0.8em;
    display: flex;
    gap: 0.5em;
    align-items: center;
}

.mp-search-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5em;
    border: 0.12em solid var(--gray-300);
    border-radius: 0.5em;
    padding: 0.5em 0.7em;
    color: var(--gray-400);
    font-size: 0.85em;
    overflow: hidden;
    white-space: nowrap;
}

.mp-search-input span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-manual {
    background: var(--mp-primary);
    color: #fff;
    border-radius: 0.5em;
    padding: 0.55em 0.8em;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

.mp-tabs {
    display: flex;
    gap: 0.4em;
    padding: 0.5em 0.8em;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    overflow: hidden;
}

.mp-tab {
    padding: 0.4em 0.9em;
    border-radius: 0.4em;
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.78em;
    white-space: nowrap;
    border-bottom: 0.2em solid var(--cat-color, transparent);
}

.mp-tab.active {
    background: var(--mp-primary);
    color: #fff;
}

.mp-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6em;
    padding: 0.8em;
    align-content: start;
    overflow: hidden;
}

.mp-tablet .mp-grid {
    grid-template-columns: repeat(3, 1fr);
}

.mp-phone .mp-grid {
    grid-template-columns: repeat(2, 1fr);
}

.mp-card {
    background: #fff;
    border-radius: 0.6em;
    border: 0.15em solid transparent;
    padding: 0.4em 0.4em 0.55em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35em;
    text-align: center;
    box-shadow: var(--shadow-xs);
}

.mp-card.cat-drinks { border-color: rgba(2, 136, 209, 0.7); }
.mp-card.cat-bakery { border-color: rgba(141, 110, 99, 0.7); }
.mp-card.cat-snacks { border-color: rgba(245, 158, 11, 0.7); }

.mp-card.selected {
    box-shadow: 0 0 0 0.25em rgba(1, 56, 97, 0.15), var(--shadow);
    transform: translateY(-0.1em);
}

.mp-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 11;
    border-radius: 0.45em;
    overflow: hidden;
    background: var(--gray-100);
}

.mp-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mp-card-name {
    font-weight: 600;
    font-size: 0.8em;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mp-card-price {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85em;
    color: var(--mp-primary);
    white-space: nowrap;
}

/* Panier */
.mp-cart {
    width: 38%;
    min-height: 0;
    background: #fff;
    border-left: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    box-shadow: -0.3em 0 0.8em rgba(0, 0, 0, 0.04);
}

.mp-cart-header {
    padding: 0.7em 0.9em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.9em;
}

.mp-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    height: 1.5em;
    padding: 0 0.3em;
    border-radius: 999px;
    background: var(--mp-primary);
    color: #fff;
    font-size: 0.75em;
    margin-left: 0.2em;
}

.mp-clear {
    font-size: 0.7em;
    font-weight: 500;
    color: var(--danger);
}

.mp-cart-items {
    flex: 1;
    min-height: 0;
    padding: 0.5em 0.9em;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    overflow: hidden;
}

.mp-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5em;
    padding: 0.45em 0;
    border-bottom: 1px solid var(--gray-100);
}

.mp-cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    min-width: 0;
}

.mp-cart-item-name {
    font-weight: 600;
    font-size: 0.8em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-cart-item-price {
    font-family: var(--font-mono);
    font-size: 0.72em;
    color: var(--gray-500);
}

.mp-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-size: 0.75em;
}

.mp-qty span {
    width: 1.6em;
    height: 1.6em;
    border-radius: 0.35em;
    background: var(--gray-100);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    font-weight: 700;
}

.mp-qty b {
    min-width: 1.2em;
    text-align: center;
}

.mp-cart-summary {
    padding: 0.6em 0.9em;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: grid;
    gap: 0.3em;
}

.mp-sum-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    color: var(--gray-600);
}

.mp-sum-row.total {
    font-size: 1em;
    font-weight: 800;
    color: var(--mp-primary);
    font-family: var(--font-mono);
}

.mp-cart-actions {
    padding: 0.7em 0.9em;
    display: flex;
    gap: 0.45em;
}

.mp-pay {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    padding: 0.7em 0.3em;
    border-radius: 0.5em;
    color: #fff;
    font-weight: 700;
    font-size: 0.72em;
    white-space: nowrap;
}

.mp-pay.cash { background: var(--success); }
.mp-pay.card { background: var(--mp-primary); }
.mp-pay.twint { background: linear-gradient(135deg, #000, #333); }

/* Barre panier mobile */
.mp-cart-bar {
    background: #fff;
    border-top: 0.15em solid var(--gray-300);
    padding: 0.7em 0.8em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
}

.mp-phone .mp-main {
    flex-direction: column;
    top: 4.4em;
}

.mp-phone .mp-header {
    padding-top: 1.2em;
    height: 4.4em;
}

.mp-phone .mp-header-center { display: none; }

.mp-phone .mp-cart-bar-total {
    font-family: var(--font-mono);
    color: var(--mp-primary);
}

.mp-phone .mp-cart-bar-pay {
    background: var(--success);
    color: #fff;
    border-radius: 0.5em;
    padding: 0.5em 0.8em;
    font-size: 0.85em;
}

.mp-phone .mp-grid {
    padding-bottom: 2em;
}

/* Tablette : panier plus étroit, tabs compacts */
.mp-tablet .mp-cart { width: 40%; }

@media (max-width: 1024px) {
    .hero-visual {
        margin-top: 1rem;
        padding: 0 0.5rem;
    }

    .hero {
        min-height: 0;
        padding: 7rem 0 4rem;
    }

    .hero-devices-row {
        justify-content: center;
    }
    
    .hero-content {
        text-align: center;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .hero-content {
        text-align: center;
        max-width: 420px;
        margin: 0 auto;
    }

    .hero-stats {
        gap: 0.75rem 1.25rem;
        flex-wrap: wrap;
    }

    .hero-stats .stat-value {
        font-size: 1.4rem;
    }

    .hero-stats .stat-label {
        font-size: 0.8rem;
    }

    .hero-stats .stat-divider {
        display: none;
    }

    /* Étiquettes flottantes : plus petites et réparties pour ne pas se chevaucher */
    .floating-card {
        font-size: 0.7rem;
        padding: 0.4rem 0.7rem;
    }

    .floating-card .card-icon {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.6rem;
    }

    .floating-card.card-3 {
        top: -1.25rem;
        left: 0;
    }

    .floating-card.card-1 {
        top: 9cqw;
        right: -0.25rem;
    }

    .floating-card.card-2 {
        bottom: 0;
        left: 22cqw;
    }
}

/* ============================================
   Trusted Section
   ============================================ */
.trusted-section {
    padding: 4rem 0;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}

.trusted-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trusted-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem 3rem;
}

.trusted-logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-400);
    transition: var(--transition);
}

.trusted-logo:hover {
    color: var(--gray-600);
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(1, 56, 97, 0.1) 0%, rgba(2, 119, 189, 0.1) 100%);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.section-badge-light {
    margin-top:30px;
}

.section-title {
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-500);
    margin-bottom: 0;
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    padding: 7rem 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    position: relative;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--primary);
    transform: translateY(-4px);
}

.feature-card.feature-large {
    grid-column: span 1;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border: none;
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .feature-card.feature-large {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .feature-card.feature-large {
        grid-column: span 1;
        grid-row: span 2;
    }
}

.feature-icon-wrapper {
    margin-bottom: 1.5rem;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--gray-500);
    margin-bottom: 0;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* ============================================
   How It Works Section
   ============================================ */
.how-section {
    padding: 7rem 0;
    background: var(--gray-50);
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .steps-container {
        flex-direction: row;
        align-items: stretch;
        gap: 0;
    }
}

.step-card {
    position: relative;
    flex: 1;
    padding: 2.5rem 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-card.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
}

.step-card.highlight h3,
.step-card.highlight p {
    color: var(--white);
}

.step-card.highlight .step-number {
    color: rgba(255, 255, 255, 0.3);
}

.step-card.highlight .step-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--gray-100);
    margin-bottom: 1rem;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-content p {
    color: var(--gray-500);
    margin-bottom: 0;
    line-height: 1.6;
}

.step-visual {
    position: absolute;
    top: 2rem;
    right: 2rem;
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    color: var(--primary);
}

.step-connector {
    display: none;
    color: var(--gray-300);
}

@media (min-width: 1024px) {
    .step-connector {
        display: flex;
        align-items: center;
        padding: 0 1rem;
    }
}

/* ============================================
   Testimonials Section
   ============================================ */
.testimonials-section {
    padding: 7rem 0;
    background: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.testimonial-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.testimonial-card.featured {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: var(--white);
    transform: scale(1.02);
}

@media (min-width: 768px) {
    .testimonial-card.featured {
        transform: scale(1.05);
    }
}

.testimonial-card.featured .testimonial-rating {
    color: var(--accent);
}

.testimonial-card.featured p {
    color: rgba(255, 255, 255, 0.9);
}

.testimonial-card.featured .author-info span {
    color: rgba(255, 255, 255, 0.7);
}

.testimonial-rating {
    font-size: 1rem;
    color: var(--warning);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: var(--radius-full);
}

.testimonial-card.featured .author-avatar {
    background: rgba(255, 255, 255, 0.2);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    font-weight: 600;
    color: var(--gray-800);
}

.testimonial-card.featured .author-info strong {
    color: var(--white);
}

.author-info span {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    padding: 5rem 0;
    background: var(--gray-50);
}

.cta-card {
    position: relative;
    padding: 5rem 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #0288d1 100%);
    border-radius: var(--radius-xl);
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.2) 0%, transparent 40%);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-content > p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cta-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
    }
}

.footer-brand {
    max-width: 280px;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand > p {
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    color: var(--gray-400);
    border-radius: var(--radius);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
}

.footer-links h4 {
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-links a {
    display: block;
    color: var(--gray-500);
    padding: 0.375rem 0;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.footer-bottom .swiss-made {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--gray-500);
}

.footer-bottom .swiss-made svg {
    flex-shrink: 0;
    border-radius: 2px;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-800);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(1, 56, 97, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary);
}

.form-error {
    color: var(--danger);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert[hidden] {
    display: none !important;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.badge-primary {
    background: var(--primary);
    color: var(--white);
}

.badge-secondary {
    background: var(--gray-500);
    color: var(--white);
}

/* ============================================
   Tables
   ============================================ */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.table th {
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    background: var(--gray-50);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table-responsive {
    overflow-x: auto;
}

/* ============================================
   Modal
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-lg {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--gray-800);
    color: #ffffff !important;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    min-width: 280px;
    font-size: 0.9375rem;
    font-weight: 500;
}

.toast-success {
    background: #059669 !important;
    color: #ffffff !important;
}

.toast-error {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.toast-warning {
    background: #d97706 !important;
    color: #ffffff !important;
}

.toast-info {
    background: #2563eb !important;
    color: #ffffff !important;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 2rem;
    position: relative;
   /* overflow: hidden; */
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

.auth-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-500);
    margin-bottom: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    padding: 0 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.auth-footer a {
    font-weight: 600;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--gray-500) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-danger { background-color: var(--danger) !important; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ============================================
   Price Display
   ============================================ */
.price {
    font-family: var(--font-mono);
    font-weight: 700;
}

.price-large {
    font-size: 2rem;
}

.price-strike {
    text-decoration: line-through;
    color: var(--gray-400);
    font-weight: 400;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* ============================================
   Responsive Helpers
   ============================================ */
@media (max-width: 576px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 577px) {
    .show-mobile { display: none !important; }
}

@media (max-width: 768px) {
    .hide-tablet { display: none !important; }
}

@media (min-width: 769px) {
    .show-tablet { display: none !important; }
}

/* ============================================
   Language Switcher
   ============================================ */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-left: 0.5rem;
}

.lang-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--primary);
    background: var(--white);
}

.lang-btn.active {
    color: var(--white);
    background: var(--primary);
}

@media (max-width: 768px) {
    .lang-switcher {
        margin: 0.5rem auto 0;
        width: fit-content;
    }
}

/* ============================================
   Nouveautés (accueil) + maquettes CSS partagées
   (panneau d'ajout manuel épinglé, clôture mensuelle)
   ============================================ */
.whatsnew-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #f4f8fb 0%, #ffffff 100%);
}

.whatsnew-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Les maquettes ne doivent jamais élargir la page sur mobile */
.whatsnew-card,
.whatsnew-visual,
.feature-block-visual,
.feature-mock-card,
.sw-mock,
.sw-mock-panel-side,
.sw-mock-panel-main {
    min-width: 0;
}

.whatsnew-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(1, 56, 97, 0.08);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 45px -20px rgba(1, 56, 97, 0.25);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsnew-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -20px rgba(1, 56, 97, 0.35);
}

.whatsnew-card-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.whatsnew-new {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #00a8e8, #025a9e);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.whatsnew-plan {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #e8f5e9;
    color: #1b5e20;
}

.whatsnew-plan.pro {
    background: linear-gradient(135deg, #013861, #025a9e);
    color: #fff;
}

.whatsnew-card h3 {
    font-size: 1.5rem;
    margin: 0;
    color: #013861;
}

.whatsnew-card > p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.whatsnew-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.whatsnew-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #1f2937;
    font-weight: 500;
}

.whatsnew-list li i {
    color: #00a8e8;
}

.whatsnew-visual {
    margin-top: auto;
    border-radius: 16px;
    background: #f1f5f9;
    padding: 1.25rem;
    overflow: hidden;
}

.whatsnew-cta {
    text-align: center;
    margin-top: 3rem;
}

@media (max-width: 900px) {
    .whatsnew-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Maquettes --- */
.sw-mock {
    --mp: #013861;
    --ml: #025a9e;
    --ma: #00a8e8;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    font-size: 0.7rem;
    color: #1f2937;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    user-select: none;
}

/* Panneau d'ajout manuel épinglé */
.sw-mock-panel {
    display: grid;
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(1, 56, 97, 0.3);
    border: 1px solid #e5e7eb;
    aspect-ratio: 16 / 11;
}

.sw-mock-panel-side {
    background: #fff;
    border-right: 2px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0 0 0.5rem;
}

.sw-mock-panel-head {
    background: linear-gradient(135deg, var(--mp), var(--ml));
    color: #fff;
    padding: 0.45rem 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.65rem;
}

.sw-mock-pin {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 0.2rem;
}

.sw-mock-amount {
    margin: 0.2rem 0.5rem 0;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--mp);
    text-align: right;
}

.sw-mock-amount small {
    font-size: 0.55rem;
    color: #6b7280;
    font-weight: 600;
}

.sw-mock-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    margin: 0 0.5rem;
}

.sw-mock-keypad span {
    background: #f3f4f6;
    border-radius: 5px;
    text-align: center;
    padding: 0.28rem 0;
    font-weight: 600;
    color: #374151;
}

.sw-mock-keypad span.del {
    background: #fee2e2;
    color: #b91c1c;
}

.sw-mock-field {
    margin: 0 0.5rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-mock-field-desc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--mp);
    font-weight: 600;
}

.sw-mock-btn {
    margin: auto 0.5rem 0;
    background: #16a34a;
    color: #fff;
    border-radius: 6px;
    text-align: center;
    padding: 0.4rem;
    font-weight: 700;
}

.sw-mock-panel-main {
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
}

.sw-mock-search {
    background: #fff;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #9ca3af;
}

.sw-mock-search span {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
}

.sw-mock-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(1, 56, 97, 0.12);
}

.sw-mock-cart {
    background: #fff;
    border-radius: 8px;
    padding: 0.5rem;
    display: grid;
    gap: 0.3rem;
}

.sw-mock-cart-row {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    color: #374151;
}

.sw-mock-cart-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sw-mock-cart-row.total {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.3rem;
    color: var(--mp);
    font-weight: 700;
}

.sw-mock-pay {
    background: linear-gradient(135deg, var(--mp), var(--ml));
    color: #fff;
    border-radius: 6px;
    text-align: center;
    padding: 0.4rem;
    font-weight: 700;
}

/* Clôture mensuelle : graphique + résultat */
.sw-mock-chart {
    background: #fff;
    border-radius: 12px;
    padding: 0.9rem 1rem 1rem;
    box-shadow: 0 10px 30px -10px rgba(1, 56, 97, 0.3);
    border: 1px solid #e5e7eb;
    display: grid;
    gap: 0.75rem;
}

.sw-mock-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-weight: 700;
    color: var(--mp);
}

.sw-mock-badge {
    background: #cce5ff;
    color: #004085;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
}

.sw-mock-bars {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 110px;
    padding-bottom: 2px;
    border-bottom: 1px solid #e5e7eb;
}

.sw-mock-bars span {
    flex: 1;
    height: var(--h, 40%);
    background: var(--mp);
    border-radius: 2px 2px 0 0;
    opacity: 0.9;
}

.sw-mock-bars span.open {
    background: #f59e0b;
}

.sw-mock-cumul {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sw-mock-cumul path {
    fill: none;
    stroke: var(--ma);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.sw-mock-stats {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem;
}

.sw-mock-stat {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    display: grid;
    gap: 0.15rem;
}

.sw-mock-stat small {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.sw-mock-stat strong {
    font-size: 0.85rem;
    color: var(--mp);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sw-mock-stat.highlight {
    background: linear-gradient(135deg, var(--mp), var(--ml));
}

.sw-mock-stat.highlight small { color: rgba(255, 255, 255, 0.8); }
.sw-mock-stat.highlight strong { color: #fff; }

/* Sur la page Fonctionnalités : la maquette remplace la photo */
.feature-image-card.feature-mock-card {
    background: #f1f5f9;
    padding: 1.25rem;
    width: 100%;
    max-width: 480px;
}

@media (max-width: 480px) {
    .sw-mock-panel {
        grid-template-columns: 130px 1fr;
    }
    .sw-mock-bars {
        height: 80px;
    }
}
