﻿/* ===== PUBLIC ORDER VIEW - COMMANDE EN LIGNE ===== */
    #publicOrderView { max-width:100%; margin:0; padding:0; background:#f5f5f0; min-height:100vh; font-family:inherit; }
    .po-topbar { background:linear-gradient(135deg,#111827 0%,#1e293b 100%); padding:0 24px; height:80px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:50; box-shadow:0 2px 12px rgba(0,0,0,0.15); }
    .po-topbar-brand { display:flex; align-items:center; gap:14px; color:#fff; font-size:18px; font-weight:700; letter-spacing:0.3px; text-decoration:none; }
    .po-topbar-brand img { height:58px; width:auto; max-width:200px; border-radius:6px; object-fit:contain; flex-shrink:0; display:block; background:#fff; padding:4px 8px; }
    .po-back { display:flex; align-items:center; gap:6px; padding:8px 18px; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.12); color:rgba(255,255,255,0.75); border-radius:8px; font-size:13px; font-weight:500; cursor:pointer; transition:all 0.2s; font-family:inherit; }
    .po-back:hover { background:rgba(255,255,255,0.15); color:#fff; }
    .po-back svg { width:16px; height:16px; }
    .po-main { max-width:820px; margin:0 auto; padding:32px 24px 48px; }
    @media(max-width:640px) {
        .po-main { padding:20px 16px 40px; }
        .po-topbar { height:auto; min-height:56px; padding:10px 14px; }
        .po-topbar-brand { font-size:14px; gap:8px; flex:1; min-width:0; overflow:hidden; }
        .po-topbar-brand img { height:36px; padding:2px 4px; }
        .po-back { padding:6px 10px; font-size:11px; white-space:nowrap; flex-shrink:0; }
        .po-back svg { width:14px; height:14px; }
    }

    /* Hero */
    .po-hero { text-align:center; margin-bottom:32px; }
    .po-hero-title { font-size:28px; font-weight:800; color:#111827; margin-bottom:6px; letter-spacing:-0.5px; }
    .po-hero-sub { font-size:15px; color:#6b7280; font-weight:400; letter-spacing:0.5px; }
    @media(max-width:640px) { .po-hero-title { font-size:22px; } .po-hero-sub { font-size:13px; } }

    /* Info block */
    .po-info-block { background:#fff; border:1px solid #e5e7eb; border-radius:14px; overflow:hidden; margin-bottom:28px; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
    .po-info-header { background:linear-gradient(135deg,#f9fafb,#f5f5f5); padding:18px 24px; border-bottom:1px solid #f1f3f5; }
    .po-info-header h3 { font-size:16px; font-weight:700; color:#111827; display:flex; align-items:center; gap:10px; }
    .po-info-header h3 svg { width:20px; height:20px; color:#6b7280; }
    .po-info-content { padding:20px 24px; }
    .po-info-msg { padding:14px 18px; background:#f0fdf4; border:1px solid #bbf7d0; border-radius:10px; font-size:13px; color:#166534; line-height:1.6; margin-bottom:16px; }
    .po-info-msg strong { color:#15803d; }
    .po-info-contacts { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:16px; }
    @media(max-width:640px) { .po-info-contacts { grid-template-columns:1fr; } }
    .po-info-shop { background:#f9fafb; border:1px solid #e5e7eb; border-radius:10px; padding:14px 16px; text-align:center; }
    .po-info-shop-name { font-size:14px; font-weight:700; color:#111827; margin-bottom:2px; }
    .po-info-shop-addr { font-size:12px; color:#9ca3af; margin-bottom:10px; line-height:1.4; }
    .po-info-shop-tel { display:inline-flex; align-items:center; gap:6px; padding:8px 20px; background:#111827; color:#fff; border-radius:8px; font-size:14px; font-weight:600; text-decoration:none; transition:all 0.2s; }
    .po-info-shop-tel:hover { background:#1f2937; transform:translateY(-1px); }
    .po-info-shop-tel svg { width:14px; height:14px; }
    .po-carte-btn { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:14px; background:#fff; border:2px solid #e5e7eb; border-radius:10px; cursor:pointer; transition:all 0.2s; font-family:inherit; font-size:14px; font-weight:600; color:#374151; }
    .po-carte-btn:hover { border-color:#111827; background:#f9fafb; }
    .po-carte-btn svg { width:18px; height:18px; color:#6b7280; }

    /* Cards */
    .po-card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; overflow:hidden; margin-bottom:24px; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
    .po-card-head { display:flex; align-items:center; gap:12px; padding:18px 24px; background:linear-gradient(135deg,#fafafa,#f5f5f5); border-bottom:1px solid #f1f3f5; }
    .po-card-icon { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
    .po-card-icon svg { width:19px; height:19px; }
    .po-card-icon.blue { background:#eff6ff; color:#2563eb; }
    .po-card-icon.amber { background:#fffbeb; color:#d97706; }
    .po-card-icon.red { background:#fef2f2; color:#dc2626; }
    .po-card-icon.green { background:#f0fdf4; color:#15803d; }
    .po-card-ttl { font-size:16px; font-weight:700; color:#111827; }
    .po-card-body { padding:24px; }
    @media(max-width:640px) { .po-card-head { padding:14px 18px; } .po-card-body { padding:18px; } }

    /* Form fields inside po-cards */
    .po-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
    .po-field-grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:18px; }
    @media(max-width:640px) { .po-field-grid { grid-template-columns:1fr; } .po-field-grid-3 { grid-template-columns:1fr; } }
    .po-field label { display:block; font-size:12px; font-weight:700; color:#6b7280; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:6px; }
    .po-field input[type="text"], .po-field input[type="tel"], .po-field select { width:100%; padding:12px 14px; border:2px solid #e5e7eb; border-radius:10px; font-size:15px; font-family:inherit; color:#111827; background:#fff; transition:border-color 0.2s; box-sizing:border-box; }
    .po-field input:focus, .po-field select:focus { outline:none; border-color:#111827; box-shadow:0 0 0 3px rgba(17,24,39,0.08); }
    .po-field input::placeholder { color:#c4c9d1; }

    /* Phone warning */
    .po-phone-warn { display:none; color:#b45309; background:#fffbeb; border:1px solid #fbbf24; border-radius:8px; padding:10px 14px; font-size:12px; margin-top:8px; line-height:1.5; }
    .po-phone-warn svg { width:14px; height:14px; vertical-align:-2px; margin-right:4px; }

    /* Date/Time grid */
    .po-datetime { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
    @media(max-width:640px) { .po-datetime { grid-template-columns:1fr; gap:16px; } }

    /* Articles sections */
    .po-articles-grid { display:grid; grid-template-columns:1fr; gap:20px; }
    .po-art-section { background:#f9fafb; border:2px solid #e5e7eb; border-radius:12px; padding:20px; }
    .po-art-head { display:flex; align-items:center; gap:10px; margin-bottom:16px; padding-bottom:14px; border-bottom:2px solid #e5e7eb; }
    .po-art-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
    .po-art-icon svg { width:17px; height:17px; }
    .po-art-icon.red { background:#fef2f2; color:#dc2626; }
    .po-art-icon.green { background:#f0fdf4; color:#15803d; }
    .po-art-title { font-size:16px; font-weight:700; color:#111827; }

    /* RGPD */
    .po-rgpd { display:flex; align-items:flex-start; gap:14px; padding:18px 22px; background:#f9fafb; border:1px solid #e5e7eb; border-radius:14px; margin-bottom:24px; cursor:pointer; user-select:none; }
    .po-rgpd input { margin-top:3px; width:20px; height:20px; cursor:pointer; flex-shrink:0; accent-color:#111827; }
    .po-rgpd-text { font-size:13px; line-height:1.6; color:#6b7280; }
    .po-rgpd-text strong { color:#374151; }

    /* Submit */
    .po-submit { width:100%; padding:18px 24px; background:linear-gradient(135deg,#111827,#1e293b); color:#fff; border:none; border-radius:12px; font-size:17px; font-weight:700; cursor:pointer; transition:all 0.2s; display:flex; align-items:center; justify-content:center; gap:10px; box-shadow:0 4px 16px rgba(17,24,39,0.2); font-family:inherit; margin-bottom:24px; }
    .po-submit:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(17,24,39,0.3); }
    .po-submit svg { width:20px; height:20px; }

    /* Success display */
    .po-success { display:none; margin-top:24px; }
    .po-success-header { background:linear-gradient(135deg,#111827,#1e293b); padding:24px; border-radius:14px; color:#fff; text-align:center; margin-bottom:20px; }
    .po-success-check { display:flex; align-items:center; justify-content:center; gap:10px; font-size:20px; font-weight:700; margin-bottom:4px; }
    .po-success-check svg { width:24px; height:24px; color:#4ade80; }
    .po-success-sub { font-size:14px; opacity:0.8; }
    .po-code-box { background:#f9fafb; border:2px solid #e5e7eb; border-radius:14px; padding:24px; text-align:center; margin-bottom:16px; }
    .po-code-label { font-size:11px; font-weight:700; color:#9ca3af; text-transform:uppercase; letter-spacing:1px; margin-bottom:12px; }
    .po-code-value { font-size:32px; font-weight:800; letter-spacing:3px; color:#111827; font-family:'Courier New',monospace; margin-bottom:8px; }
    .po-code-hint { font-size:12px; color:#9ca3af; }
    .po-copy-timer { text-align:center; color:#6b7280; font-size:13px; margin-bottom:12px; }
    .po-copy-timer span { font-weight:700; color:#111827; }
    .po-copy-btn { width:100%; padding:14px; background:#111827; color:#fff; border:none; border-radius:10px; font-size:14px; font-weight:700; cursor:pointer; transition:all 0.2s; font-family:inherit; }
    .po-copy-btn:hover { background:#1f2937; }
    .po-success-info { border-top:1px solid #e5e7eb; margin-top:20px; padding-top:16px; font-size:13px; color:#6b7280; line-height:1.6; }
    .po-landline-warn { display:none; background:#fef3c7; border:2px solid #f59e0b; border-radius:12px; padding:16px 18px; margin-top:14px; }
    .po-landline-warn-title { font-weight:700; color:#92400e; font-size:13px; margin-bottom:4px; display:flex; align-items:center; gap:6px; }
    .po-landline-warn-title svg { width:16px; height:16px; }
    .po-landline-warn-text { font-size:12px; color:#92400e; line-height:1.5; }

    /* Footer */
    .po-footer { text-align:center; padding:24px 0 8px; font-size:12px; color:#9ca3af; border-top:1px solid #e5e7eb; margin-top:8px; }

/* ===== CLIENT VIEW - ESPACE CLIENT ===== */
    #clientView { max-width:100%; margin:0; padding:0; background:#f5f5f0; min-height:100vh; }
    .cv-topbar { background:linear-gradient(135deg,#111827 0%,#1e293b 100%); padding:0 24px; height:80px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:50; box-shadow:0 2px 12px rgba(0,0,0,0.15); }
    .cv-topbar-brand { display:flex; align-items:center; gap:14px; color:#fff; font-size:18px; font-weight:700; letter-spacing:0.3px; }
    .cv-topbar-brand img { height:58px; width:auto; max-width:200px; border-radius:6px; object-fit:contain; flex-shrink:0; display:block; background:#fff; padding:4px 8px; }
    .cv-logout { display:flex; align-items:center; gap:6px; padding:8px 18px; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.12); color:rgba(255,255,255,0.75); border-radius:8px; font-size:13px; font-weight:500; cursor:pointer; transition:all 0.2s; font-family:inherit; }
    .cv-logout:hover { background:rgba(255,255,255,0.15); color:#fff; }
    .cv-logout svg { width:16px; height:16px; }
    .cv-main { max-width:960px; margin:0 auto; padding:32px 24px 48px; }
    @media(max-width:640px) { .cv-main { padding:20px 16px 80px; } }
    /* Mobile "Laisser un avis" button */
    .cv-mobile-avis-bar { display:none; }
    .cv-mobile-avis-btn { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; padding:14px; background:linear-gradient(135deg,#f59e0b,#d97706); color:#fff; border:none; border-radius:12px; font-size:15px; font-weight:600; cursor:pointer; font-family:inherit; box-shadow:0 4px 14px rgba(245,158,11,0.4); transition:all 0.2s; }
    .cv-mobile-avis-btn:hover { background:linear-gradient(135deg,#d97706,#b45309); transform:translateY(-1px); }
    @media(max-width:640px) {
        .cv-review-btn { display:none !important; }
        .cv-mobile-avis-bar { display:block; padding:0 0 16px; }
        .cv-topbar { height:auto; min-height:56px; padding:10px 14px; gap:0; }
        .cv-topbar-brand { font-size:14px; gap:8px; flex:1; min-width:0; overflow:hidden; }
        .cv-topbar-brand img { height:36px; padding:2px 4px; }
        .cv-logout { padding:6px 10px; font-size:11px; white-space:nowrap; flex-shrink:0; }
    }
    .cv-hero { text-align:center; margin-bottom:28px; }
    .cv-greeting { font-size:28px; font-weight:300; color:#475569; margin-bottom:20px; line-height:1.3; }
    .cv-greeting strong { font-weight:700; color:#111827; }
    .cv-order-badge { display:inline-block; background:linear-gradient(135deg,#111827,#1e293b); color:#fff; padding:16px 40px; border-radius:12px; font-size:22px; font-weight:800; letter-spacing:2px; box-shadow:0 6px 20px rgba(17,24,39,0.25); }
    @media(max-width:640px) { .cv-order-badge { padding:14px 28px; font-size:18px; letter-spacing:1px; } .cv-greeting { font-size:22px; } }
    .cv-card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; overflow:hidden; margin-bottom:24px; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
    .cv-card-head { display:flex; align-items:center; gap:12px; padding:18px 24px; background:linear-gradient(135deg,#fafafa,#f5f5f5); border-bottom:1px solid #f1f3f5; }
    .cv-card-icon { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
    .cv-card-icon svg { width:19px; height:19px; }
    .cv-card-icon.blue { background:#eff6ff; color:#2563eb; }
    .cv-card-icon.red { background:#fef2f2; color:#dc2626; }
    .cv-card-icon.green { background:#f0fdf4; color:#15803d; }
    .cv-card-icon.purple { background:#faf5ff; color:#7c3aed; }
    .cv-card-ttl { font-size:16px; font-weight:700; color:#111827; }
    .cv-card-body { padding:24px; }
    @media(max-width:640px) { .cv-card-head { padding:14px 18px; } .cv-card-body { padding:18px; } }
    .cv-client-strip { display:flex; align-items:center; gap:24px; padding:14px 24px; background:#f9fafb; border-bottom:1px solid #f1f3f5; flex-wrap:wrap; }
    .cv-chip { display:flex; align-items:center; gap:7px; font-size:14px; color:#374151; }
    .cv-chip svg { width:15px; height:15px; color:#9ca3af; flex-shrink:0; }
    .cv-chip strong { font-weight:600; }
    @media(max-width:640px) { .cv-client-strip { gap:16px; padding:12px 18px; } }
    .cv-retrait { display:grid; grid-template-columns:1fr 1fr 1.5fr; gap:20px; }
    @media(max-width:640px) { .cv-retrait { grid-template-columns:1fr 1fr; gap:14px; } .cv-retrait .cv-field:last-child { grid-column:1/-1; } }
    .cv-lbl { font-size:11px; font-weight:700; color:#9ca3af; text-transform:uppercase; letter-spacing:0.8px; margin-bottom:6px; }
    .cv-val { font-size:15px; color:#111827; font-weight:600; line-height:1.5; }
    .cv-articles { display:grid; grid-template-columns:1fr; gap:24px; margin-bottom:24px; }
    @media(max-width:640px) { .cv-articles { gap:16px; } }
    .cv-articles > div > .cv-card { margin-bottom:0; height:100%; display:flex; flex-direction:column; }
    .cv-articles > div > .cv-card > .cv-card-body { flex:1; }
    .cv-item { display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid #f3f4f6; }
    .cv-item:last-of-type { border-bottom:none; }
    .cv-item-name { font-size:14px; color:#1f2937; font-weight:500; flex:1; line-height:1.4; }
    .cv-item-meta { display:flex; align-items:center; gap:8px; margin-left:12px; white-space:nowrap; }
    .cv-item-qty { font-size:13px; color:#64748b; font-weight:600; background:#f1f5f9; padding:3px 10px; border-radius:6px; }
    .cv-item-price { font-size:13px; color:#059669; font-weight:700; }
    .cv-comment { background:#f8fafc; border-left:3px solid #cbd5e1; padding:12px 16px; border-radius:0 10px 10px 0; margin-top:16px; }
    .cv-comment-lbl { font-size:11px; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:4px; }
    .cv-comment-txt { font-size:14px; color:#475569; line-height:1.5; }
    #clientPriceSection { border-radius:14px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
    .cv-price-head { display:flex; align-items:center; gap:12px; padding:18px 24px; background:linear-gradient(135deg,#f0fdf4,#ecfdf5); border-bottom:1px solid #bbf7d0; }
    .cv-price-body { padding:20px 24px; background:#fff; }
    .cv-price-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; }
    .cv-price-row + .cv-price-row { border-top:1px dashed #e5e7eb; }
    .cv-price-lbl { font-size:15px; color:#374151; font-weight:500; }
    .cv-price-val { font-size:18px; font-weight:800; }
    .cv-price-val.green { color:#059669; }
    .cv-price-val.red { color:#dc2626; }
    .cv-modify-btn { width:100%; padding:16px 24px; background:linear-gradient(135deg,#111827,#1e293b); color:#fff; border:none; border-radius:12px; font-size:16px; font-weight:700; cursor:pointer; transition:all 0.2s; display:flex; align-items:center; justify-content:center; gap:10px; box-shadow:0 4px 16px rgba(17,24,39,0.2); font-family:inherit; }
    .cv-modify-btn:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(17,24,39,0.3); }
    .cv-modify-btn svg { width:18px; height:18px; }
    .cv-contacts { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:24px; }
    @media(max-width:640px) { .cv-contacts { grid-template-columns:1fr; } }
    .cv-contact { padding:24px; background:#fff; border:1px solid #e5e7eb; border-radius:14px; text-align:center; transition:all 0.2s; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
    .cv-contact:hover { border-color:#d1d5db; box-shadow:0 4px 12px rgba(0,0,0,0.08); }
    .cv-contact-name { font-size:14px; font-weight:700; color:#111827; margin-bottom:6px; }
    .cv-contact-addr { font-size:12px; color:#9ca3af; margin-bottom:14px; line-height:1.5; }
    .cv-contact-tel { display:inline-flex; align-items:center; gap:8px; padding:10px 24px; background:#111827; color:#fff; border-radius:8px; font-size:14px; font-weight:600; text-decoration:none; transition:all 0.2s; }
    .cv-contact-tel:hover { background:#1f2937; transform:translateY(-1px); }
    .cv-contact-tel svg { width:15px; height:15px; }
    .cv-help { background:#f9fafb; border:1px solid #e5e7eb; border-radius:12px; padding:16px 20px; margin-bottom:24px; display:flex; gap:12px; align-items:flex-start; }
    .cv-help svg { width:18px; height:18px; color:#9ca3af; flex-shrink:0; margin-top:1px; }
    .cv-help-txt { font-size:13px; color:#6b7280; line-height:1.6; }
    .cv-help-txt strong { color:#374151; }
    .cv-cancel { text-align:center; padding:20px 0; }
    .cv-cancel-btn { background:#fef2f2; border:2px solid #fecaca; color:#dc2626; font-size:15px; font-weight:600; cursor:pointer; padding:14px 32px; border-radius:10px; transition:all 0.2s; font-family:inherit; display:inline-flex; align-items:center; gap:8px; }
    .cv-cancel-btn:hover { color:#fff; background:#dc2626; border-color:#dc2626; }
    .cv-cancel-btn svg { width:17px; height:17px; }
    .cv-qr { text-align:center; margin-bottom:24px; }
    .cv-qr-btn { background:linear-gradient(135deg,#0f172a,#1f2937); border:none; color:#fff; font-size:15px; font-weight:700; cursor:pointer; padding:12px 28px; border-radius:12px; transition:all 0.2s; font-family:inherit; display:inline-flex; align-items:center; gap:10px; box-shadow:0 4px 14px rgba(15,23,42,0.25); }
    .cv-qr-btn:hover { transform:translateY(-1px); box-shadow:0 8px 20px rgba(15,23,42,0.35); }
    .cv-qr-btn svg { width:18px; height:18px; }
    .cv-qr-btn.disabled { opacity:0.6; cursor:not-allowed; box-shadow:none; transform:none; }
    .cv-qr-hint { margin-top:8px; font-size:12px; color:#6b7280; }
    .cv-footer { text-align:center; padding:24px 0 8px; font-size:12px; color:#9ca3af; border-top:1px solid #e5e7eb; margin-top:8px; }
    .cv-notice { display:flex; align-items:flex-start; gap:12px; padding:16px 20px; border-radius:12px; border:1px solid; margin-bottom:24px; }
    .cv-notice svg { width:20px; height:20px; flex-shrink:0; margin-top:1px; }
    .cv-notice-body { flex:1; }
    .cv-notice-title { font-size:14px; font-weight:700; margin-bottom:2px; }
    .cv-notice-text { font-size:13px; line-height:1.5; }
    .cv-notice.ok { background:#f0fdf4; border-color:#bbf7d0; }
    .cv-notice.ok .cv-notice-title { color:#166534; }
    .cv-notice.ok .cv-notice-text { color:#15803d; }
    .cv-notice.ok svg { color:#16a34a; }
    .cv-notice.warn { background:#fffbeb; border-color:#fde68a; }
    .cv-notice.warn .cv-notice-title { color:#92400e; }
    .cv-notice.warn .cv-notice-text { color:#a16207; }
    .cv-notice.warn svg { color:#d97706; }
    .cv-notice.off { background:#f9fafb; border-color:#e5e7eb; }
    .cv-notice.off .cv-notice-title { color:#374151; }
    .cv-notice.off .cv-notice-text { color:#6b7280; }
    .cv-notice.off svg { color:#9ca3af; }
