
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { overflow-x: hidden; scroll-behavior: smooth; }
    body { font-family: 'Inter', system-ui, sans-serif; background: #f9fafb; color: #1f2937; min-height: 100vh; }
    :root { --accent: #5b4fcf; --accent2: #e8573c; --green: #1a8f5c; --surface: #ffffff; --bg: #f9fafb; --text: #1f2937; --border: #e5e7eb; --muted: #6b7280; }

    /* NAV */
    nav { background: rgba(255,255,255,0.98); border-bottom: 1px solid var(--border); padding: 0 24px; position: sticky; top: 0; z-index: 200; height: 64px; display: flex; align-items: center; justify-content: space-between; }
    .logo { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.5rem; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; cursor: pointer; }
    .nav-tabs { display: flex; gap: 4px; }
    .nav-tab { padding: 10px 18px; border-radius: 8px; font-weight: 500; font-size: 0.9rem; color: var(--muted); cursor: pointer; transition: all 0.2s; border: none; background: transparent; }
    .nav-tab:hover { background: rgba(91,79,207,0.08); color: var(--accent); }
    .nav-tab.active { background: var(--accent); color: white; }
    .btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; border: none; font-family: inherit; text-decoration: none; }
    .btn-primary { background: linear-gradient(135deg, var(--accent), #7b6fe0); color: white; box-shadow: 0 4px 15px rgba(91,79,207,0.3); }
    .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(91,79,207,0.4); }
    .btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
    .btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
    .btn-retour { background: linear-gradient(135deg, #1a8f5c, #0d6efd); color: white; font-weight: 700; }
    .btn-retour:hover { opacity: 0.9; transform: translateY(-1px); }
    .burger-btn { display: none; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 15px; cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; }
    .burger-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 300; }
    .burger-overlay.open { display: block; }
    .mobile-menu { display: none; flex-direction: column; gap: 2px; padding: 16px; }
    .mobile-menu a, .mobile-menu button { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; text-decoration: none; border: none; width: 100%; text-align: left; background: transparent; color: var(--text); transition: background .12s; }
    .mobile-menu a:hover, .mobile-menu button:hover { background: var(--bg); }
    .user-bar { display: none; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
    .user-bar.visible { display: flex; }
    .user-bar strong { color: var(--text); }
    .user-bar a { color: var(--accent); cursor: pointer; font-weight: 500; text-decoration: none; }
    .account-link-nav { color: var(--accent); cursor: pointer; font-weight: 500; text-decoration: none; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
    .account-link-nav:hover { text-decoration: underline; }

    @media (max-width: 820px) {
      .burger-btn { display: flex; }
      .nav-tabs { display: none !important; position: fixed; top: 0; right: 0; width: 260px; height: 100vh; background: var(--surface); flex-direction: column; padding: 64px 14px 20px; gap: 3px; box-shadow: -10px 0 30px rgba(0,0,0,0.3); z-index: 999; overflow-y: auto; }
      .nav-tabs.open { display: flex !important; }
      .nav-tabs .nav-tab { width: 100%; text-align: left; padding: 12px 14px; border-radius: 8px; font-size: 14px; }
      .nav-tabs .mobile-menu { display: flex !important; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
      .user-bar, #nav-login-btn { display: none !important; }
      nav { padding: 0 12px; }
    }

    /* PAGES */
    .page { display: none; padding: 32px 24px; max-width: 1400px; margin: 0 auto; }
    .page.active { display: block; }
    .section-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
    .section-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

    /* HERO */
    .hero { text-align: center; padding: 56px 20px 36px; background: linear-gradient(135deg, #f0eeff 0%, #fff5f3 100%); border-radius: 20px; margin-bottom: 36px; }
    .hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 12px; }
    .hero h1 span { color: var(--accent); }
    .hero p { font-size: 17px; color: var(--muted); margin-bottom: 24px; }

    .info-block { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
    .info-block h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }

    .compare-section { background: linear-gradient(135deg, #1a1a30, #2d2760); border-radius: 20px; padding: 44px 36px; margin-bottom: 40px; color: #fff; }
    .compare-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
    .compare-sub { font-size: 15px; opacity: .75; margin-bottom: 32px; }
    .compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .compare-col { background: rgba(255,255,255,.07); border-radius: 14px; padding: 22px; border: 1px solid rgba(255,255,255,.12); }
    .compare-col-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
    .compare-col-title .badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
    .compare-col.paper .badge { background: rgba(255,100,80,.25); color: #ff9b8a; }
    .compare-col.digital .badge { background: rgba(60,220,120,.2); color: #6febb0; }
    .compare-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; font-size: 13px; opacity: .9; line-height: 1.4; }
    .compare-cta { text-align: center; margin-top: 28px; }
    .dematbadges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; justify-content: center; }
    .dematbadge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); color: #fff; border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 500; }

    /* ÉDITEUR */
    .editor-layout { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
    .editor-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-bottom: 20px; }
    .editor-panel h3 { font-size: 16px; font-weight: 600; margin-bottom: 18px; }
    .form-group { margin-bottom: 18px; }
    .form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #4b5563; }
    .form-group input[type="text"], .form-group input[type="email"], .form-group input[type="tel"], .form-group select { width: 100%; padding: 12px 14px; font-size: 15px; border: 1px solid var(--border); border-radius: 8px; background: #ffffff; color: var(--text); transition: border-color 0.2s; }
    .form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,79,207,0.1); }
    .fs-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; padding: 8px 10px; background: #f3f4f6; border-radius: 8px; }
    .fs-row select { width: auto; height: 30px; font-size: 12px; padding: 0 8px; border: 1px solid #d1d5db; background: white; border-radius: 6px; cursor: pointer; }
    .fs-range { width: 90px; height: 4px; -webkit-appearance: none; appearance: none; background: #d1d5db; border-radius: 2px; outline: none; cursor: pointer; flex-shrink: 0; }
    .fs-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
    .fs-val { font-size: 11px; color: var(--muted); width: 28px; text-align: center; font-weight: 600; }
    .fs-sep { width: 1px; height: 18px; background: #d1d5db; flex-shrink: 0; }
    .fs-btn { width: 28px; height: 28px; border: 1px solid transparent; border-radius: 5px; background: white; color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-size: 12px; }
    .fs-btn:hover { background: #e5e7eb; color: var(--text); }
    .fs-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
    .social-field { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
    .social-icon-btn { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; flex-shrink: 0; }
    .color-row { display: flex; gap: 10px; flex-wrap: wrap; }
    .color-dot { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: all 0.15s; flex-shrink: 0; }
    .color-dot:hover { transform: scale(1.1); }
    .color-dot.selected { border-color: var(--text); transform: scale(1.15); }
    .solid-color-dot { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: all 0.15s; flex-shrink: 0; }
    .solid-color-dot:hover { transform: scale(1.1); }
    .solid-color-dot.selected { border-color: var(--text); transform: scale(1.15); }
    .photo-row { display: flex; align-items: center; gap: 10px; }
    .photo-preview { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); display: none; }
    .preview-wrap { position: sticky; top: 80px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
    .card-outer { width: 350px; height: 200px; border-radius: 16px; position: relative; overflow: hidden; box-shadow: 0 25px 50px rgba(0,0,0,0.15); flex-shrink: 0; }
    .card-bg { position: absolute; inset: 0; z-index: 0; transition: background 0.3s; }
    .card-effect-animated, .card-effect-holo, .card-effect-metal { position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none; }
    .card-effect-shine { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
    .card-effect-glitter { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; opacity: 0; }
    .card-content { position: relative; z-index: 10; height: 100%; padding: 14px 16px; display: flex; flex-direction: row; justify-content: space-between; overflow: hidden; }
    .card-left { flex: 1; display: flex; flex-direction: column; padding-right: 10px; overflow: hidden; }
    .card-plan-badge { position: absolute; top: 10px; right: 12px; background: rgba(255,255,255,0.2); backdrop-filter: blur(8px); padding: 3px 10px; border-radius: 20px; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; z-index: 20; }
    .card-name { font-size: 18px; font-weight: 800; line-height: 1.2; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card-title { font-size: 11px; font-weight: 400; opacity: 0.9; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card-company { font-size: 12px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card-address { font-size: 8px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card-phone { font-size: 10px; opacity: 0.9; line-height: 1.3; }
    .card-email { font-size: 10px; opacity: 0.9; line-height: 1.3; }
    .card-website { font-size: 10px; opacity: 0.9; line-height: 1.3; }
    .card-social-inline { display: flex; gap: 4px; margin-top: 6px; flex-wrap: nowrap; }
    .card-social-icon { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; color: white; text-decoration: none; flex-shrink: 0; transition: transform 0.15s; }
    .social-linkedin { background: #0077B5; } .social-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); } .social-facebook { background: #1877F2; } .social-twitter { background: #000000; } .social-tiktok { background: #000000; } .social-youtube { background: #FF0000; } .social-whatsapp { background: #25D366; }
    .card-right {width: 90px;display: flex;flex-direction: column;align-items: center;flex-shrink: 0;}
    .card-photo { width: 62px; height: 62px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.4); overflow: hidden; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.2); margin-top: 24px; }
    .card-photo.visible { display: block; } .card-photo img { width: 100%; height: 100%; object-fit: cover; }
    .card-photo-ph { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; margin-top: 24px; font-size: 24px; opacity: 0.5; }
    .card-qr { width: 46px; height: 46px; background: white; border-radius: 8px; overflow: hidden; flex-shrink: 0; } .card-qr img { width: 100%; height: 100%; }.card-qr {margin-top: auto;}
    .card-placeholder { opacity: 0.5; }
    .card-outer.animated .card-bg { animation: gradientMove 6s ease infinite; }
    @keyframes gradientMove { 0%, 100% { filter: hue-rotate(0deg); } 50% { filter: hue-rotate(20deg); } }
    .card-outer.shine::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.35) 45%, transparent 55%); background-size: 200% 100%; animation: cardShine 3.5s ease-in-out infinite; pointer-events: none; z-index: 15; }
    @keyframes cardShine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
    .card-outer.holo .card-effect-holo { opacity: 1; background: linear-gradient(135deg, rgba(255,0,0,0.12) 0%, rgba(255,255,0,0.12) 20%, rgba(0,255,0,0.12) 40%, rgba(0,255,255,0.12) 60%, rgba(0,0,255,0.12) 80%, rgba(255,0,255,0.12) 100%); background-size: 300% 300%; animation: holoShift 6s linear infinite; mix-blend-mode: overlay; }
    @keyframes holoShift { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
    .card-outer.metal .card-effect-metal { opacity: 1; background: repeating-linear-gradient(90deg, transparent 0, rgba(255,255,255,0.35) 1px, transparent 2px); background-size: 150% 100%; animation: metalSheen 3s linear infinite; }
    @keyframes metalSheen { 0% { background-position: 0 0; } 100% { background-position: 200px 0; } }
    .card-outer.glitter .card-effect-glitter { opacity: 1; }
    .star-particle { position: absolute; background: white; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); width: 6px; height: 6px; opacity: 0; pointer-events: none; animation: starTwinkle var(--duration, 2s) infinite ease-in-out; animation-delay: var(--delay, 0s); box-shadow: 0 0 3px rgba(255,255,255,0.7); }
    @keyframes starTwinkle { 0%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 50% { transform: scale(1) rotate(180deg); opacity: 1; } }
    .effects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .effect-toggle { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg); border-radius: 8px; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; font-size: 13px; font-weight: 500; }
    .effect-toggle:hover { background: rgba(91,79,207,0.05); }
    .effect-toggle.on { border-color: var(--accent); background: rgba(91,79,207,0.08); }
    .effect-checkbox { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
    .effect-toggle.on .effect-checkbox { background: var(--accent); border-color: var(--accent); }
    .effect-toggle.on .effect-checkbox::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.6rem; color: white; }
    .qr-section { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; text-align: center; width: 350px; }
    .qr-url { font-size: 12px; color: var(--accent); font-weight: 500; margin-top: 8px; word-break: break-all; }
    .qr-big { margin: 10px auto; width: 100px; height: 100px; background: var(--bg); border-radius: 10px; display: flex; align-items: center; justify-content: center; } .qr-big img { width: 90px; height: 90px; }
    .share-row { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
    .share-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); font-size: 12px; cursor: pointer; background: var(--bg); color: var(--text); font-weight: 500; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
    .share-btn:hover { background: #eeeeff; border-color: var(--accent); color: var(--accent); }
    #btn-save { width: 350px; padding: 14px; font-size: 15px; margin-top: 10px; }
    .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
    .modal-overlay.open { display: flex; }
    .modal { background: var(--surface); border-radius: 16px; padding: 30px; width: 420px; max-width: 95vw; box-shadow: 0 24px 60px rgba(0,0,0,0.2); }
    .modal h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
    .modal-tabs { display: flex; gap: 4px; margin-bottom: 18px; }
    .modal-tab { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; font-weight: 500; cursor: pointer; background: var(--bg); color: var(--muted); text-align: center; }
    .modal-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
    .modal-form { display: flex; flex-direction: column; gap: 10px; }
    .modal-form input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
    .modal-btn { padding: 12px; border-radius: 10px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; }
    .modal-btn-primary { background: var(--accent); color: #fff; }
    .modal-btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
    .notif { position: fixed; bottom: 24px; right: 24px; z-index: 9999; background: var(--text); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 500; opacity: 0; transform: translateY(12px); transition: all .25s; pointer-events: none; }
    .notif.show { opacity: 1; transform: translateY(0); }
    .mobile-frame { width: 200px; height: 380px; border: 3px solid #222; border-radius: 32px; overflow: hidden; position: relative; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,0.2); flex-shrink: 0; }
    .mobile-screen { width: 100%; height: 100%; overflow: hidden; position: relative; }
    .mobile-card { margin: 32px 16px 16px; border-radius: 14px; height: 110px; position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
    .mobile-info { padding: 0 16px; font-size: 10px; }
    .mobile-info .m-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
    .mobile-info .m-job { font-size: 10px; color: var(--muted); }
    .mobile-btns { display: flex; gap: 8px; margin: 12px 16px 0; }
    .mobile-btn { flex: 1; padding: 7px 0; border-radius: 8px; font-size: 9px; font-weight: 600; border: none; cursor: pointer; }
    .mb-save { background: var(--accent); color: #fff; } .mb-share { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
    .nfc-badge { margin: 10px 16px 0; padding: 6px 10px; background: #f0fff8; border: 1px solid #b0e8cc; border-radius: 8px; font-size: 9px; color: var(--green); font-weight: 600; text-align: center; }

    /* MES CARTES */
    .my-card-item { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; transition: all 0.2s; flex-wrap: wrap; }
    .my-card-item:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
    .my-card-thumb { width: 60px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .my-card-info { flex: 1; min-width: 150px; }
    .my-card-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
    .my-card-meta { font-size: 11px; color: var(--muted); }
    .my-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .mc-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 12px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; white-space: nowrap; }
    .mc-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
    .mc-btn-del { color: #ef4444; border-color: #fca5a5; }
    .mc-btn-del:hover { background: #ef4444; color: #fff; }

    @media (max-width: 800px) {
      .editor-layout { grid-template-columns: 1fr !important; }
      .preview-wrap { position: relative !important; top: 0 !important; order: -1 !important; display: flex !important; flex-direction: column !important; align-items: center !important; margin-bottom: 20px; padding: 12px; background: var(--bg); border-radius: 0 0 12px 12px; box-shadow: 0 2px 16px rgba(0,0,0,0.07); }
      .qr-section { display: none !important; }
      #btn-save { width: 100% !important; max-width: 350px; }
      .card-outer { width: 100%; max-width: 350px; height: auto; aspect-ratio: 350/200; }
      .page { padding: 16px !important; }
    }
    @media (max-width: 600px) {
      .hero h1 { font-size: 26px !important; }
      .plans-grid, .compare-grid { grid-template-columns: 1fr !important; }
      .compare-section { padding: 28px 18px !important; }
      .my-card-item { flex-direction: column; align-items: flex-start; }
      .my-card-actions { width: 100%; justify-content: flex-end; }
    }
    @media (max-width: 480px) {
      .fs-row { gap: 4px; padding: 6px; }
      .fs-row select { width: 60px; font-size: 10px; height: 26px; }
      .fs-range { width: 60px; }
      .fs-btn { width: 24px; height: 24px; font-size: 10px; }
      .fs-val { font-size: 10px; width: 22px; }
    }
  
/* ═══════════════════════════════════════════════════════════
   CORRECTIFS v2 (placés en dernier : ils l'emportent sur les règles ci-dessus)
   ═══════════════════════════════════════════════════════════ */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

/* Visibilité selon l'état de connexion (classe posée sur <body> par app.js) */
.auth-only { display: none !important; }
body.is-auth .auth-only { display: revert !important; }
body.is-auth .user-bar.auth-only { display: flex !important; }
body.is-auth .guest-only { display: none !important; }

/* ── Barre de navigation : même menu sur PC et mobile ── */
nav { gap: 12px; }
.nav-tabs { flex: 1; justify-content: center; align-items: center; flex-wrap: nowrap; }
.nav-tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; font-family: inherit; }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.drawer-auth { display: none; }
.plan-badge { background: rgba(91,79,207,.12); color: var(--accent); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.nav-tab.locked-hint { opacity: .6; }
@media (max-width: 1100px) { .nav-tab { padding: 10px 12px; font-size: .85rem; } .nav-actions .btn-retour { display: none; } }

@media (max-width: 820px) {
  .nav-tabs { justify-content: flex-start; }
  .nav-tabs .drawer-auth { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; width: 100%; }
  .nav-tabs .drawer-auth .nav-tab { width: 100%; }
  .nav-right .nav-actions, .nav-right .user-bar { display: none !important; }
  .burger-overlay { z-index: 998; }
  .nav-tabs { z-index: 999; }
  .burger-btn { width: 40px; height: 40px; }
}

/* ── Formulaires : 16px minimum (évite le zoom automatique d'iOS, on peut donc laisser le zoom actif) ── */
@media (max-width: 800px) {
  input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select, textarea { font-size: 16px !important; }
  .fs-row select { font-size: 13px !important; }
}

/* ── Éditeur ── */
.editor-scroll { padding-right: 8px; }
@media (min-width: 801px) { .editor-scroll { overflow-y: auto; max-height: calc(100vh - 200px); } }
@media (max-width: 800px) { .editor-scroll { overflow: visible; max-height: none; padding-right: 0; } }

/* Carte dessinée en 350×200 puis mise à l'échelle par JS : rendu identique à la page publique */
.card-fit { width: 350px; height: 200px; flex-shrink: 0; margin: 0 auto; }
.card-fit .card-outer { width: 350px !important; height: 200px !important; max-width: none !important; aspect-ratio: auto !important; transform-origin: top left; }
.card-photo { display: none; }
.card-photo.visible { display: block; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transform-origin: center center; display: block; }
.card-bg { background-repeat: no-repeat; }

/* Le bloc de partage (lien, QR, .vcf) reste visible sur mobile — il était masqué avant */
@media (max-width: 800px) {
  .qr-section { display: block !important; width: 100% !important; max-width: 350px; }
  .preview-wrap { width: 100%; }
  #btn-save { width: 100% !important; max-width: 350px; }
  .btn-download-card { width: 100%; max-width: 350px; }
}
.btn-download-card { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 350px; padding: 11px; margin-top: 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-download-card:hover { border-color: var(--accent); color: var(--accent); }
.btn-download-card:disabled { opacity: .6; cursor: wait; }

/* Effets verrouillés par le plan */
.effect-toggle.locked { opacity: .4; cursor: not-allowed; }
.effect-toggle.locked::after { content: '🔒'; margin-left: auto; font-size: 12px; }

/* Modale d'erreur d'authentification */
.modal-error { margin-bottom: 4px; }
.modal-form input { font-family: inherit; }
.modal { max-height: 92vh; overflow-y: auto; }

/* Accessibilité */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .card-outer *, .card-outer::after { animation: none !important; } html { scroll-behavior: auto; } }

/* ═══════════════════════════════════════════════════════════
   CORRECTIF MENU MOBILE : le voile (z-index 300) passait AU-DESSUS de la barre (z-index 200)
   qui contient le menu => impossible de cliquer. Voile sous la barre, menu au-dessus.
   ═══════════════════════════════════════════════════════════ */
.burger-overlay { z-index: 150 !important; }
html body .nav-tabs > .drawer-user.auth-only { display: none !important; }
@media (max-width: 820px) {
  .nav-tabs { z-index: 210 !important; }
  body.is-auth .nav-tabs.open > .drawer-user.auth-only { display: block !important; }
  .drawer-user { background: linear-gradient(135deg, #5b4fcf, #e8573c); color: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; }
  .drawer-user .du-name { font-weight: 800; font-size: 15px; word-break: break-word; }
  .drawer-user .du-plan { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
  .drawer-user .plan-badge { background: rgba(255,255,255,.25); color: #fff; }
}

/* ═══ Fenêtres de confirmation / alerte aux couleurs du site (remplacent les popups du navigateur) ═══ */
.cv-dlg-ov { position: fixed; inset: 0; background: rgba(20,20,40,.55); backdrop-filter: blur(3px); z-index: 5000; display: none; align-items: center; justify-content: center; padding: 16px; }
.cv-dlg-ov.open { display: flex; }
.cv-dlg { background: var(--surface); border-radius: 20px; max-width: 420px; width: 100%; padding: 28px 24px 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); text-align: center; animation: cvpop .18s ease; }
@keyframes cvpop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.cv-dlg-ic { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: #eeeeff; color: var(--accent); }
.cv-dlg.danger .cv-dlg-ic { background: #fdecea; color: #d93025; }
.cv-dlg h3 { font-size: 19px; margin-bottom: 8px; color: var(--text); }
.cv-dlg p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.cv-dlg-btns { display: flex; gap: 10px; }
.cv-dlg-btns button { flex: 1; padding: 13px; border-radius: 12px; border: none; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.cv-dlg-cancel { background: var(--bg); color: var(--text); border: 1px solid var(--border) !important; }
.cv-dlg-ok { background: var(--accent); color: #fff; }
.cv-dlg.danger .cv-dlg-ok { background: #d93025; }
.cv-dlg ul { text-align: left; font-size: 13.5px; margin: 0 0 18px 4px; list-style: none; }
.cv-dlg ul li { padding: 5px 0; display: flex; gap: 8px; }
.cv-dlg ul li::before { content: '✓'; color: #1a8f5c; font-weight: 800; }
.cv-dlg .price-box { background: linear-gradient(135deg, #f0eeff, #fff5f3); border: 2px solid #d8d3f8; border-radius: 14px; padding: 12px; margin-bottom: 16px; }
.cv-dlg .price-box b { font-size: 26px; color: var(--accent); }

/* ═══ Quota de partages ═══ */
.quota-mini { font-size: 12px; color: var(--muted); }
.quota-bar { height: 8px; background: #ececf4; border-radius: 6px; overflow: hidden; margin: 6px 0; }
.quota-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #5b4fcf, #e8573c); border-radius: 6px; transition: width .4s; }
.quota-bar.low > i { background: #e8920c; } .quota-bar.out > i { background: #d93025; }
.quota-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.share-main { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }
.chan-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.chan { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1.5px solid var(--border); background: var(--surface); border-radius: 12px; cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit; color: var(--text); }
.chan i { font-size: 18px; color: var(--accent); } .chan.on { border-color: var(--accent); background: #f0eeff; }
.share-hist { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.share-hist small { color: var(--muted); display: block; }
.share-hist .tag { background: #eeeeff; color: var(--accent); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; height: fit-content; white-space: nowrap; }

/* ═══ Parrainage ═══ */
.referral-block { background: linear-gradient(135deg, #f7f5ff, #fff6f3) !important; border: 1px solid #ddd6fb !important; }
.ref-code { display: flex; gap: 8px; margin: 10px 0; }
.ref-code code { flex: 1; background: #fff; border: 2px dashed var(--accent); border-radius: 10px; padding: 11px; font-size: 18px; font-weight: 800; letter-spacing: 3px; text-align: center; color: var(--accent); }
.ref-hint { font-size: 12px; color: #1a8f5c; font-weight: 600; margin-top: -4px; }
.forgot-link { text-align: center; font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }

/* ═══ Corbeille client ═══ */
.trash-block { margin-top: 26px; }
.trash-toggle { background: none; border: 1px dashed var(--border); color: var(--muted); border-radius: 10px; padding: 10px 16px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; }
.trash-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 8px; font-size: 14px; }
.trash-item small { color: var(--muted); display: block; }

/* ═══ Assistant de création ═══ */
.ai-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 900; display: flex; align-items: center; gap: 8px; border: none; border-radius: 50px; padding: 13px 18px; background: linear-gradient(135deg, #5b4fcf, #e8573c); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 10px 30px rgba(91,79,207,.45); font-family: inherit; }
.ai-fab i { font-size: 16px; }
.ai-panel { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 370px; max-width: calc(100vw - 24px); height: 520px; max-height: calc(100vh - 110px); background: var(--surface); border-radius: 20px; box-shadow: 0 25px 70px rgba(0,0,0,.35); z-index: 950; display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--border); }
.ai-panel.open { display: flex; }
.ai-head { background: linear-gradient(135deg, #5b4fcf, #e8573c); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.ai-head small { display: block; opacity: .85; font-size: 12px; } .ai-head button { background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; line-height: 1; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.ai-b { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.ai-b.bot { background: var(--surface); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-b.me { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: var(--surface); }
.ai-chips button { border: 1.5px solid var(--accent); background: #fff; color: var(--accent); border-radius: 20px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.ai-chips button:hover { background: var(--accent); color: #fff; }
.ai-input { display: flex; gap: 8px; padding: 10px 12px; background: var(--surface); }
.ai-input input { flex: 1; border: 1px solid var(--border); border-radius: 24px; padding: 11px 16px; font-size: 16px; font-family: inherit; }
.ai-input button { width: 44px; border: none; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; }
@media (max-width: 820px) {
  .ai-fab span { display: none; } .ai-fab { padding: 15px; }
  .ai-panel { right: 8px; left: 8px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ═══ v4 : consentements, bandeau de vérification, pied de page ═══ */
.chk-line { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.chk-line input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.chk-line a { color: var(--accent); }
.verify-banner { background: #fff4d6; border-bottom: 1px solid #f0d58a; color: #6b5200; font-size: 13px; padding: 10px 16px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.verify-banner button { background: #6b5200; color: #fff; border: none; border-radius: 20px; padding: 6px 14px; font-weight: 700; font-size: 12px; cursor: pointer; font-family: inherit; }
.site-footer { text-align: center; padding: 26px 16px 90px; font-size: 12.5px; color: var(--muted); display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; } .site-footer a:hover { color: var(--accent); }
.inv-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.inv-row small { color: var(--muted); display: block; }
