/* =========================================================
   showcase.css — Vitrine standalone My Medical Inventory
   Préfixe .sc- pour tous les éléments de la vitrine.
   Les mock-ups utilisent les vraies classes de l'app.
   ========================================================= */

/* ── 1. Variables ─────────────────────────────────────────── */
:root {
    --sc-bg-dark:    #080d1a;
    --sc-bg-alt:     #0e1527;
    --sc-bg-card:    #111827;
    --sc-border:     rgba(255,255,255,0.07);
    --sc-border-glow: rgba(0,168,255,0.3);
    --sc-blue:       #00a8ff;
    --sc-blue-dim:   rgba(0,168,255,0.12);
    --sc-text:       #e8edf8;
    --sc-text-muted: #6b7fa8;
    --sc-radius:     14px;
    --sc-transition: 0.22s ease;
}

/* ── 2. Base override (over app's style.css) ──────────────── */
html { scroll-behavior: smooth; }

body.sc-body {
    background: var(--sc-bg-dark) !important;
    color: var(--sc-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* Reset container padding from app */
body.sc-body .container { padding: 0 !important; max-width: none !important; }

/* ── 3. Stat-card styles (extraits de home.php car inline) ── */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 18px 14px 14px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}
.stat-card .s-icon  { font-size: 22px; margin-bottom: 8px; line-height: 1; }
.stat-card .s-value { font-size: 30px; font-weight: 700; line-height: 1; color: #00a8ff; }
.stat-card .s-label { font-size: 11px; color: #999; margin-top: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-card.s-danger  { background: #fff4f4; border-color: #ffd5d5; }
.stat-card.s-danger  .s-value { color: #e74c3c; }
.stat-card.s-warning { background: #fff9f0; border-color: #ffe5c0; }
.stat-card.s-warning .s-value { color: #e67e22; }
.stat-card.s-ok      { background: #f2fff6; border-color: #c3efd0; }
.stat-card.s-ok      .s-value { color: #27ae60; }
.stat-card.s-neutral .s-value { color: #888; }

/* ── 4. Device frames — isolation du contexte app ─────────── */
.sc-device-screen {
    background: #f5f6fa;
    font-family: 'Segoe UI', sans-serif !important;
    color: #333 !important;
    overflow: hidden;         /* clip le contenu */
    overflow-x: hidden;       /* force clip horizontal */
    position: relative;
    width: 100%;              /* bloque toute expansion horizontale */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Surcharger les styles body de l'app dans le contexte device */
.sc-device-screen * { box-sizing: border-box; }
.sc-device-screen h1,
.sc-device-screen h2,
.sc-device-screen h3 { margin: 0; }
.sc-device-screen a { color: #00a8ff; }

/* Mode-bar : permet le retour à la ligne sur les petits frames */
.sc-device-screen .mode-bar { flex-wrap: wrap; }

/* Panneau historique (droite) : masqué quand l'espace est limité */
.sc-device-screen .app-right { flex-shrink: 0; }

/* ── 5. Layout utilitaires ────────────────────────────────── */
.sc-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Les enfants de grid doivent pouvoir rétrécir en-dessous de leur contenu */
.sc-col-2 > *,
.sc-hero-split > * {
    min-width: 0;
    overflow: hidden;
}

/* Les textes longs dans les sections ne débordent pas */
.sc-section-desc,
.sc-list li {
    word-break: break-word;
    overflow-wrap: break-word;
}

.sc-section {
    padding: 96px 0;
    position: relative;
}
.sc-section--alt { background: var(--sc-bg-alt); }

.sc-col-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.sc-col-2.sc-reversed { direction: rtl; }
.sc-col-2.sc-reversed > * { direction: ltr; }

.sc-section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--sc-blue);
    margin-bottom: 12px;
}

.sc-section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--sc-text);
    line-height: 1.2;
    margin: 0 0 16px;
}

.sc-section-desc {
    font-size: 16px;
    color: var(--sc-text-muted);
    line-height: 1.7;
    margin: 0 0 28px;
}

.sc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sc-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: var(--sc-text-muted);
    line-height: 1.5;
}

.sc-list li::before {
    content: '';
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: var(--sc-blue-dim);
    border-radius: 50%;
    border: 1.5px solid var(--sc-blue);
    margin-top: 2px;
    position: relative;
}

.sc-list li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300a8ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 11px;
    background-repeat: no-repeat;
    background-position: center;
}

/* ── 6. Navigation ────────────────────────────────────────── */
.sc-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    transition: background var(--sc-transition), box-shadow var(--sc-transition), backdrop-filter var(--sc-transition);
}

.sc-nav--scrolled {
    background: rgba(8, 13, 26, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--sc-border);
}

.sc-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--sc-text);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.sc-nav-brand-icon {
    width: 32px;
    height: 32px;
    background: var(--sc-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sc-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.sc-nav-links a {
    color: var(--sc-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--sc-transition);
}

.sc-nav-links a:hover { color: var(--sc-text); }

.sc-nav-cta {
    background: var(--sc-blue);
    color: white !important;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: opacity var(--sc-transition) !important;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-decoration: none;
}

.sc-nav-cta:hover { opacity: 0.85 !important; }

/* ── 7. Hero ──────────────────────────────────────────────── */
.sc-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: var(--sc-bg-dark);
    position: relative;
    overflow: hidden;
}

/* Glow orbs */
.sc-hero::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,168,255,0.07) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    pointer-events: none;
}

.sc-hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,168,255,0.05) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.sc-hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.sc-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--sc-border-glow);
    background: var(--sc-blue-dim);
    font-size: 12px;
    font-weight: 700;
    color: var(--sc-blue);
    letter-spacing: 0.3px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.sc-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--sc-text);
    margin: 0 0 20px;
    letter-spacing: -1px;
}

.sc-hero-title .sc-accent { color: var(--sc-blue); }

.sc-hero-sub {
    font-size: 18px;
    color: var(--sc-text-muted);
    line-height: 1.7;
    margin: 0 0 36px;
}

.sc-hero-cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.sc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--sc-transition);
    border: none;
    font-family: inherit;
}

.sc-btn--primary {
    background: var(--sc-blue);
    color: white;
    box-shadow: 0 4px 20px rgba(0,168,255,0.3);
}

.sc-btn--primary:hover {
    background: #0093e0;
    box-shadow: 0 6px 28px rgba(0,168,255,0.45);
    transform: translateY(-1px);
}

.sc-btn--ghost {
    background: transparent;
    color: var(--sc-text);
    border: 1.5px solid var(--sc-border);
}

.sc-btn--ghost:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.04);
}

.sc-trust-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sc-trust-badge {
    font-size: 12px;
    color: var(--sc-text-muted);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--sc-border);
    font-weight: 500;
}

/* Hero browser mock-up */
.sc-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sc-browser-frame {
    background: #141e33;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 48px 120px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.06);
    width: 100%;
    max-width: 520px;
}

.sc-browser-chrome {
    background: #1c2840;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sc-browser-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sc-browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.sc-browser-dots span:nth-child(1) { background: #e74c3c; }
.sc-browser-dots span:nth-child(2) { background: #f39c12; }
.sc-browser-dots span:nth-child(3) { background: #27ae60; }

.sc-browser-url {
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--sc-text-muted);
    flex: 1;
    text-align: center;
}

.sc-browser-body {
    background: #f5f6fa;
    padding: 16px;
    font-family: 'Segoe UI', sans-serif;
}

/* Mini header inside browser */
.sc-mini-header {
    background: white;
    border-radius: 8px 8px 0 0;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.sc-mini-header-title {
    font-size: 13px;
    font-weight: 700;
    color: #273c75;
}

.sc-mini-header-badge {
    font-size: 11px;
    color: #888;
}

/* ── 8. Stats bar ─────────────────────────────────────────── */
.sc-stats-bar {
    background: var(--sc-bg-alt);
    border-top: 1px solid var(--sc-border);
    border-bottom: 1px solid var(--sc-border);
    padding: 36px 0;
}

.sc-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.sc-stat-item-val {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--sc-blue);
    line-height: 1;
    margin-bottom: 6px;
}

.sc-stat-item-lbl {
    font-size: 13px;
    color: var(--sc-text-muted);
    font-weight: 500;
}

/* ── 9. Feature cards ─────────────────────────────────────── */
.sc-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 48px;
}

.sc-feature-card {
    background: var(--sc-bg-card);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    padding: 28px 22px;
    transition: border-color var(--sc-transition), transform var(--sc-transition), box-shadow var(--sc-transition);
    cursor: default;
}

.sc-feature-card:hover {
    border-color: var(--sc-border-glow);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,168,255,0.08);
}

.sc-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--sc-blue-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sc-blue);
    margin-bottom: 16px;
}

.sc-feature-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--sc-text);
    margin: 0 0 8px;
}

.sc-feature-desc {
    font-size: 13px;
    color: var(--sc-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ── 10. Device frames ────────────────────────────────────── */
.sc-tablet-frame {
    background: #141e33;
    border-radius: 20px;
    padding: 12px;
    box-shadow:
        0 48px 120px rgba(0,0,0,0.65),
        0 0 0 1px rgba(255,255,255,0.06),
        inset 0 1px 0 rgba(255,255,255,0.07);
    position: relative;
    width: 100%;
}

.sc-tablet-frame::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 40px;
    background: #0e1527;
    border-radius: 0 3px 3px 0;
}

.sc-tablet-frame .sc-device-screen {
    border-radius: 10px;
    overflow: hidden;
    height: 420px;
}

.sc-phone-frame {
    width: 300px;
    background: #141e33;
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 48px 100px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.06);
    position: relative;
    flex-shrink: 0;
}

.sc-phone-frame::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 22px;
    background: #141e33;
    border-radius: 0 0 12px 12px;
    z-index: 5;
}

.sc-phone-frame .sc-device-screen {
    border-radius: 30px;
    overflow: hidden;
    height: 520px;
    position: relative;
}

/* ── 11. Architecture diagram ─────────────────────────────── */
.sc-arch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 48px;
}

.sc-arch-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.sc-arch-node {
    background: var(--sc-bg-card);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    padding: 14px 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--sc-text);
    min-width: 140px;
}

.sc-arch-node-label {
    font-size: 11px;
    color: var(--sc-text-muted);
    margin-top: 4px;
    font-weight: 400;
}

.sc-arch-hub {
    background: var(--sc-blue);
    border-color: var(--sc-blue);
    box-shadow: 0 0 32px rgba(0,168,255,0.25);
    color: white;
    padding: 18px 32px;
    font-size: 15px;
}

.sc-arch-connectors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 32px;
    width: 100%;
    position: relative;
}

.sc-arch-vline {
    width: 1px;
    height: 32px;
    background: var(--sc-border-glow);
    position: relative;
}

.sc-arch-vline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sc-blue);
}

/* ── 12. CTA & Footer ─────────────────────────────────────── */
.sc-cta-section {
    background: linear-gradient(135deg, #051228 0%, #0a1f4a 50%, #051228 100%);
    padding: 96px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sc-cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,168,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.sc-cta-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--sc-text);
    margin: 0 0 16px;
}

.sc-cta-sub {
    font-size: 17px;
    color: var(--sc-text-muted);
    margin: 0 0 36px;
}

.sc-footer {
    background: #050911;
    border-top: 1px solid var(--sc-border);
    padding: 28px 0;
    text-align: center;
    font-size: 13px;
    color: var(--sc-text-muted);
}

.sc-footer a {
    color: var(--sc-blue);
    text-decoration: none;
}

/* ── 13. Classes CSS mobiles de l'app (extraites de mobile/layout.php) ──
   Scoped sous .sc-device-screen pour éviter tout conflit ────────────── */

/* Header sombre (m-header) */
.sc-device-screen .m-header {
    background: #1e2a3a;
    color: #fff;
    padding: 12px 14px;
    flex-shrink: 0;
}
.sc-device-screen .m-header .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(255,255,255,.55);
    margin-bottom: 3px;
}
.sc-device-screen .m-header .structure-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.sc-device-screen .m-header .superlot-name {
    font-size: 14px;
    color: rgba(255,255,255,.75);
    margin-top: 2px;
}
.sc-device-screen .m-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.sc-device-screen .m-header-info { flex: 1; min-width: 0; }

/* Corps de page */
.sc-device-screen .m-body {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    background: #f4f6f9;
}

/* Carte blanche */
.sc-device-screen .m-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    margin-bottom: 10px;
}
.sc-device-screen .m-card h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1e2a3a;
}

/* Champs formulaire */
.sc-device-screen .m-field { margin-bottom: 10px; }
.sc-device-screen .m-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.sc-device-screen .m-field input,
.sc-device-screen .m-field select,
.sc-device-screen .m-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e5ec;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Segoe UI', sans-serif;
    color: #2f3640;
    background: #fff;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.sc-device-screen .m-field textarea {
    min-height: 64px;
    resize: none;
}

/* Bouton principal mobile */
.sc-device-screen .m-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #00a8ff;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

/* Carte article tenue pliable (borrow.php) */
.sc-device-screen .item-card {
    border: 1.5px solid #e0e5ec;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fff;
    overflow: hidden;
}
.sc-device-screen .item-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    min-height: 52px;
}
.sc-device-screen .item-card-body { padding: 0 12px 12px; }
.sc-device-screen .card-badge {
    font-size: 12px;
    background: #e8f6ff;
    color: #00a8ff;
    border-radius: 10px;
    padding: 3px 8px;
    font-weight: 600;
    margin-left: auto;
}

/* Chips de taille */
.sc-device-screen .size-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border: 2px solid #e0e5ec;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin: 4px 3px;
    font-family: 'Segoe UI', sans-serif;
}
.sc-device-screen .size-chip.selected {
    border-color: #00a8ff;
    background: #e8f6ff;
    color: #00a8ff;
}

/* Carte véhicule mobile (structure_vehicles.php) */
.sc-device-screen .vehicle-card-m {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 12px;
    background: #fff;
    border: 1.5px solid #e0e5ec;
    border-radius: 12px;
    color: #1e2a3a;
    margin-bottom: 8px;
    text-decoration: none;
}
.sc-device-screen .vehicle-card-m .v-name {
    font-size: 17px;
    font-weight: 700;
}
.sc-device-screen .vehicle-card-m .v-sub {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}
.sc-device-screen .vehicle-card-arrow {
    font-size: 22px;
    color: #ccc;
    flex-shrink: 0;
    line-height: 1;
    margin-left: auto;
}

/* ── 13b. Scroll reveal ────────────────────────────────────── */
[data-sc-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-sc-reveal].sc-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-sc-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-sc-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-sc-reveal][data-delay="3"] { transition-delay: 0.3s; }
[data-sc-reveal][data-delay="4"] { transition-delay: 0.4s; }
[data-sc-reveal][data-delay="5"] { transition-delay: 0.5s; }
[data-sc-reveal][data-delay="6"] { transition-delay: 0.6s; }
[data-sc-reveal][data-delay="7"] { transition-delay: 0.7s; }
[data-sc-reveal][data-delay="8"] { transition-delay: 0.8s; }

/* ── 14. Responsive ───────────────────────────────────────── */

/* Empêcher tout débordement horizontal au niveau de la racine */
html {
    overflow-x: hidden;
}

@media (max-width: 1024px) {
    .sc-features-grid { grid-template-columns: repeat(2, 1fr); }
    .sc-hero-title { font-size: 2.8rem; }
    .sc-stats-row { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 900px) {
    .sc-hero-split { grid-template-columns: 1fr; }
    .sc-hero-visual { display: none; }
    .sc-col-2 { grid-template-columns: 1fr; gap: 40px; }
    .sc-col-2.sc-reversed { direction: ltr; }
    .sc-section { padding: 64px 0; }
    .sc-hero { padding: 100px 0 64px; }
    .sc-nav-links { display: none; }
    /* Phone frame centré, légèrement réduit */
    .sc-phone-frame { width: 260px; }
    .sc-phone-frame .sc-device-screen { height: 460px; }
    /* Architecture : les nœuds peuvent passer à la ligne */
    .sc-arch-row { flex-wrap: wrap; gap: 10px; }
    .sc-arch-node { min-width: 110px; }
}

@media (max-width: 600px) {
    /* Typographie */
    .sc-hero-title { font-size: 2rem; }
    .sc-section-title { font-size: 1.7rem; }
    .sc-cta-title { font-size: 1.7rem; }

    /* Layout */
    .sc-features-grid { grid-template-columns: 1fr; }
    .sc-stats-row { grid-template-columns: 1fr 1fr; gap: 16px; }
    .sc-hero-cta-row { flex-direction: column; }
    .sc-btn { width: 100%; justify-content: center; }
    .sc-section { padding: 56px 0; }
    .sc-hero { padding: 90px 0 56px; }

    /* Espacement */
    .sc-container { padding: 0 16px; }
    .sc-nav { padding: 0 16px; }

    /* Shrink du brand pour éviter que le texte dépasse */
    .sc-nav-brand { font-size: 14px; }
    .sc-nav-brand-icon { width: 28px; height: 28px; }

    /* Frames : passer le phone en max-width fluid */
    .sc-phone-frame {
        width: 100%;
        max-width: 280px;
        border-radius: 32px;
        margin: 0 auto;
    }
    .sc-phone-frame .sc-device-screen {
        height: 440px;
        border-radius: 24px;
    }

    /* Tablet frame : réduire hauteur de l'écran pour rester lisible */
    .sc-tablet-frame .sc-device-screen { height: 360px; }

    /* Scan tablet : masquer le panneau historique sur mobile (trop étroit) */
    .sc-tablet-frame .sc-device-screen .app-right { display: none !important; }

    /* Scan tablet : mode-bar en deux lignes max */
    .sc-tablet-frame .sc-device-screen .mode-bar { gap: 4px; flex-wrap: wrap; }
    .sc-tablet-frame .sc-device-screen .mode-btn {
        height: 32px !important;
        padding: 0 8px !important;
        font-size: 11px !important;
    }

    /* Browser frames : permettre le scroll interne des tableaux */
    .sc-browser-body { overflow-x: auto; }

    /* Architecture diagram : tout passer en colonne verticale */
    .sc-arch { gap: 8px; }
    .sc-arch-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .sc-arch-node {
        min-width: 0;
        width: 100%;
        max-width: 300px;
        box-sizing: border-box;
    }
    /* Masquer les lignes de connexion qui n'ont plus de sens en vertical */
    .sc-arch-connectors { display: none; }

    /* Sections overflow protection */
    .sc-section,
    .sc-stats-bar,
    .sc-hero,
    .sc-cta-section {
        overflow-x: hidden;
    }
}

@media (max-width: 400px) {
    .sc-hero-title { font-size: 1.8rem; }
    .sc-section-title { font-size: 1.5rem; }
    .sc-section { padding: 44px 0; }

    /* Stats bar : 1 colonne sur très petits écrans */
    .sc-stats-row { grid-template-columns: 1fr; max-width: 220px; margin: 0 auto; }

    /* Phone frame encore plus compact */
    .sc-phone-frame .sc-device-screen { height: 400px; }

    /* Feature cards : padding réduit */
    .sc-feature-card { padding: 20px 16px; }
}

/* ── Modal contact ──────────────────────────────────────── */
.sc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sc-modal {
    background: var(--sc-bg-card);
    border: 1px solid var(--sc-border);
    border-radius: 16px;
    padding: 40px 36px 36px;
    max-width: 420px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    animation: sc-modal-in 0.18s ease;
}

@keyframes sc-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

.sc-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--sc-border);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--sc-text-muted);
    transition: background var(--sc-transition), color var(--sc-transition);
}

.sc-modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: var(--sc-text);
}

.sc-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(0, 168, 255, 0.12);
    color: var(--sc-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.sc-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--sc-text);
    margin: 0 0 10px;
}

.sc-modal-desc {
    font-size: 14px;
    color: var(--sc-text-muted);
    margin: 0 0 18px;
    line-height: 1.6;
}

.sc-modal-email {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    color: var(--sc-blue);
    text-decoration: none;
    background: rgba(0, 168, 255, 0.08);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 10px;
    padding: 12px 24px;
    transition: background var(--sc-transition), border-color var(--sc-transition);
    word-break: break-all;
}

.sc-modal-email:hover {
    background: rgba(0, 168, 255, 0.15);
    border-color: rgba(0, 168, 255, 0.4);
}

.sc-modal-hint {
    font-size: 12px;
    color: var(--sc-text-muted);
    margin: 16px 0 0;
    opacity: 0.7;
}
