/* ============================================================================
   demo-pro.css — Espace Pro (Lot 3) : vue /pro/, multi-sélection, guichet QR,
   sheets groupées, portée. Maquettes P1-P11 validées 2026-07-16.
   Tokens Lagune définis dans demo-core.css (chargé en premier — pas de fallback).
   ============================================================================ */

/* ---- Vue /pro/ (conteneur plein écran, pattern viewExplore) ---- */
.view-pro {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--c-bg);
}
.view-pro-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); /* place pour la barre de sélection */
}

.pro-layout { display: flex; align-items: flex-start; }

/* Rail modules (P11) — desktop uniquement */
.pro-modules { display: none; }
@media (min-width: 1024px) {
    .pro-modules {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 220px;
        flex: none;
        padding: 20px 12px;
        position: sticky;
        top: 0;
    }
    .pro-modules-org { font-size: 13px; font-weight: 700; color: var(--c-text); padding: 0 10px 2px; }
    .pro-modules-sub { font-size: 11px; color: var(--c-text-muted); padding: 0 10px 12px; }
    .pro-module {
        display: flex;
        align-items: center;
        gap: 9px;
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 13.5px;
        font-weight: 600;
        color: var(--c-text-secondary);
    }
    .pro-module.on { background: rgba(27, 85, 92, .1); color: var(--c-primary); }
    .pro-module.dis { opacity: .55; cursor: default; }
    .pro-soon {
        margin-left: auto;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
        background: var(--c-accent-soft);
        color: #b25e2f;
        border-radius: 999px;
        padding: 1px 8px;
    }
}

.pro-main { flex: 1; min-width: 0; padding: 12px 16px 0; }
@media (min-width: 1024px) { .pro-main { padding: 20px 26px 0; } }

.pro-org-mobile { font-size: 12px; color: var(--c-text-muted); padding: 0 4px 10px; }
@media (min-width: 1024px) { .pro-org-mobile { display: none; } }

/* ---- Stats (P3/P11) ---- */
.pro-stats { display: flex; gap: 10px; margin-bottom: 10px; }
.pro-stat {
    flex: 1;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border-light);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(10, 30, 20, .06);
}
.pro-stat b { display: block; font-size: 19px; font-weight: 600; color: var(--c-text); font-variant-numeric: tabular-nums; }
.pro-stat span { display: block; font-size: 11px; color: var(--c-text-muted); margin-top: 4px; }
@media (min-width: 1024px) {
    .pro-stats { justify-content: flex-end; }
    .pro-stat { flex: none; display: flex; align-items: baseline; gap: 6px; text-align: left; padding: 9px 14px; }
    .pro-stat span { margin-top: 0; font-size: 11.5px; }
}

/* ---- Toolbar (recherche + actions) ---- */
.pro-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pro-search {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 0 14px;
    min-height: 44px;
    color: var(--c-text-muted);
}
.pro-search input {
    flex: 1;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 16px; /* anti-zoom iOS */
    color: var(--c-text);
    outline: none;
    min-width: 0;
}
.pro-toolbar-actions { display: flex; gap: 6px; }
.pro-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-bg-card);
    color: var(--c-primary);
    font: 600 13px/1 inherit;
    font-family: inherit;
    cursor: pointer;
}
.pro-tool-btn:hover { background: var(--c-primary-light); }

/* ---- Chips de filtres ---- */
.pro-fchips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.pro-fchips::-webkit-scrollbar { display: none; }
.pro-fchip {
    border: 1px solid var(--c-border);
    background: var(--c-bg-card);
    color: var(--c-text-secondary);
    font: 600 12px/1 inherit;
    font-family: inherit;
    border-radius: 999px;
    padding: 0 12px;
    min-height: 34px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}
.pro-fchip.on { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-text-inverse); }

/* ---- Liste dense (P3) ---- */
.pro-loading { padding: 30px 0; text-align: center; color: var(--c-text-muted); font-size: 13.5px; }
.pro-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border-light);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(10, 30, 20, .06);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.pro-row.sel { border-color: var(--c-primary); background: var(--c-primary-light); }
.pro-av {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #dcf0ed 0%, #fae4d7 100%);
    color: var(--c-primary);
    font-size: 17px;
    font-weight: 600;
}
.pro-av img { width: 100%; height: 100%; object-fit: cover; }
.pro-av.sm { width: 24px; height: 24px; font-size: 11px; }
.pro-av.lg { width: 64px; height: 64px; font-size: 26px; }
.pro-row-info { flex: 1; min-width: 0; }
.pro-row-info b { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--c-text); }
.pro-pending-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent-vivid); flex: none; }
.pro-row-meta, .pro-row-event { display: block; font-size: 11.5px; color: var(--c-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-row-members { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--c-text-secondary); margin-top: 2px; }
.pro-row-members svg { width: 12px; height: 12px; }
.pro-mschip {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 9px;
    flex: none;
}
.pro-ms-adoptable { background: var(--c-primary-light); color: var(--c-primary); }
.pro-ms-reserved { background: var(--c-accent-soft); color: #b25e2f; }
.pro-ms-fostered { background: var(--c-bg-warm); color: var(--c-text-secondary); }
.pro-ms-archived { background: var(--c-bg); color: var(--c-text-muted); border: 1px dashed var(--c-border-light); }
.pro-qa {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: var(--c-bg);
    color: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    cursor: pointer;
}
.pro-qa:hover { background: var(--c-primary-light); }
.pro-ckbox {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 2px solid var(--c-border);
    flex: none;
    position: relative;
}
.pro-row.sel .pro-ckbox { background: var(--c-primary); border-color: var(--c-primary); }
.pro-row.sel .pro-ckbox::after {
    content: '✓';
    position: absolute;
    inset: 0;
    color: var(--c-text-inverse);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pro-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 44px 20px;
    text-align: center;
    color: var(--c-text-muted);
}
.pro-empty svg { width: 34px; height: 34px; opacity: .5; }
.pro-empty b { color: var(--c-text); font-size: 15px; }
.pro-empty span { font-size: 13px; }

/* ---- Barre de sélection (P4) ---- */
.pro-selbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--c-text);
    border-radius: 16px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .12);
    z-index: 60;
}
body.has-tabbar .pro-selbar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1024px) { .pro-selbar { left: 260px; right: 30px; } }
.pro-selbar-cnt { color: var(--c-text-inverse); font-size: 13px; font-weight: 700; padding: 0 6px; flex: none; }
.pro-selbar button {
    flex: 1;
    border: none;
    border-radius: 10px;
    min-height: 44px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(255, 255, 255, .1);
    color: var(--c-text-inverse);
    cursor: pointer;
}
.pro-selbar button.coral { background: var(--c-accent-vivid); }
.pro-selbar button.coral:hover { background: var(--c-accent-vivid-hover); }
.pro-selbar button.ghost { flex: none; padding: 0 10px; background: transparent; color: #9db4ae; }
.pro-selbar button[disabled] { opacity: .45; cursor: default; }
@media (min-width: 1024px) {
    .pro-selbar button { flex: none; flex-direction: row; gap: 7px; padding: 0 16px; font-size: 13px; }
}

/* ---- Sheets pro (P1/P5/P7/P9/P10 — dans .transfer-sheet existante) ---- */
.pro-sheet-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pro-sheet-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; flex: 1; color: var(--c-text); }
.pro-sheet-x {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--c-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-secondary);
    cursor: pointer;
    flex: none;
}
.pro-sheet-intro { font-size: 13.5px; color: var(--c-text-secondary); margin: 2px 0 12px; }
.pro-slab {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin: 14px 0 8px;
}
.pro-flab { font-size: 12.5px; font-weight: 600; color: var(--c-text); margin: 12px 0 6px; }
.pro-flab-opt { color: var(--c-text-muted); font-weight: 400; }
.pro-fin {
    display: block;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-bg-card);
    padding: 12px 14px;
    font: inherit;
    font-size: 16px; /* anti-zoom iOS */
    color: var(--c-text);
    box-sizing: border-box;
}
.pro-fin.area { min-height: 60px; resize: vertical; }
.pro-typecard {
    display: flex;
    gap: 11px;
    align-items: center;
    border: 1.5px solid var(--c-border-light);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--c-bg-card);
    min-height: 52px;
    cursor: pointer;
}
.pro-typecard.on { border-color: var(--c-primary); background: var(--c-primary-light); }
.pro-typecard input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.pro-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--c-border); flex: none; position: relative; }
.pro-typecard.on .pro-radio { border-color: var(--c-primary); }
.pro-typecard.on .pro-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--c-primary); }
.pro-typecard-txt b { display: block; font-size: 14.5px; color: var(--c-text); }
.pro-typecard-txt span { display: block; font-size: 12px; color: var(--c-text-muted); }
.pro-inforow { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--c-text-muted); margin: 12px 2px 0; line-height: 1.5; }
.pro-inforow svg { flex: none; margin-top: 1px; }
.pro-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(10, 30, 20, .06);
}
.pro-btn.ink { background: var(--c-text); color: var(--c-text-inverse); }
.pro-btn.coral { background: var(--c-accent-vivid); color: var(--c-text-inverse); margin-top: 16px; }
.pro-btn.coral:hover { background: var(--c-accent-vivid-hover); }
.pro-btn.ghost { background: transparent; color: var(--c-text-secondary); box-shadow: none; min-height: 42px; font-weight: 500; }
.pro-batch-pets { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.pro-bpet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--c-border);
    background: var(--c-bg);
    border-radius: 999px;
    padding: 4px 11px 4px 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text);
}
.pro-seg { display: flex; gap: 4px; background: var(--c-bg); border-radius: 12px; padding: 4px; margin: 4px 0 8px; }
.pro-seg button {
    flex: 1;
    border: none;
    border-radius: 9px;
    min-height: 40px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    color: var(--c-text-secondary);
    cursor: pointer;
}
.pro-seg button.on { background: var(--c-bg-card); color: var(--c-primary); box-shadow: 0 1px 3px rgba(10, 30, 20, .06); }
.pro-qrbox { width: min(220px, 60vw); margin: 10px auto; }
.pro-qrbox svg { width: 100%; height: auto; display: block; }
.pro-qrbox.guichet { width: min(260px, 68vw); }
.pro-linkrow {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--c-bg);
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 8px;
}
.pro-linkrow code {
    flex: 1;
    font-size: 11px;
    color: var(--c-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pro-linkrow button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-bg-card);
    color: var(--c-primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    min-height: 36px;
    padding: 0 10px;
    cursor: pointer;
    flex: none;
}
.pro-linkrow.small { background: transparent; justify-content: center; }
.pro-linkrow.small code { flex: none; max-width: 80%; }
.pro-stepper { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 4px 0 10px; }
.pro-stepper button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-bg-card);
    color: var(--c-primary);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}
.pro-stepper-val { font-size: 26px; font-weight: 600; min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.pro-duprow { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.pro-dupidx {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--c-primary-light);
    color: var(--c-primary);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.pro-duprow .pro-fin { min-height: 42px; padding: 9px 13px; }

/* ---- Mode guichet (P6) ---- */
.pro-guichet {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pro-guichet[hidden] { display: none; }
.pro-guichet-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    max-width: 420px;
}
.pro-guichet-x {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--c-bg);
    color: var(--c-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pro-guichet-name { font-size: 30px; font-weight: 600; letter-spacing: -.01em; margin: 14px 0 4px; color: var(--c-text); }
.pro-guichet-meta { font-size: 13.5px; color: var(--c-text-secondary); margin-bottom: 14px; }
.pro-guichet-hint { font-size: 14.5px; font-weight: 600; color: var(--c-text); margin-top: 18px; }
.pro-guichet-sub { font-size: 12px; color: var(--c-text-muted); margin-top: 6px; line-height: 1.6; }

/* ---- Entrée liste Animaux (P2) ---- */
.pro-entry {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    border: none;
    background: var(--c-primary);
    color: var(--c-text-inverse);
    border-radius: 14px;
    margin: 4px 0 12px;
    padding: 13px 15px;
    box-shadow: 0 1px 3px rgba(10, 30, 20, .06);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.pro-entry:hover { background: var(--c-primary-hover); }
.pro-entry svg { flex: none; }
.pro-entry-txt { flex: 1; min-width: 0; }
.pro-entry-txt b { display: block; font-size: 14.5px; }
.pro-entry-txt span { display: block; font-size: 11.5px; color: #cfe6e2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-entry-chev { font-size: 18px; color: #cfe6e2; flex: none; }
.pro-entry.soft { background: var(--c-bg-warm); color: var(--c-text); box-shadow: none; border: 1px solid var(--c-border-light); }
.pro-entry.soft:hover { background: var(--c-primary-light); }
.pro-entry.soft .pro-entry-txt span, .pro-entry.soft .pro-entry-chev { color: var(--c-text-muted); }

/* ---- Section Réglages (P1) ---- */
.pro-settings-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pro-settings-state { flex: 1 1 100%; font-size: 13px; color: var(--c-text-secondary); }
.pro-settings-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-bg-card);
    color: var(--c-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.pro-settings-btn.ghost { border: none; background: transparent; color: var(--c-text-muted); }

/* ---- Tactile / accessibilité ---- */
@media (hover: none) and (pointer: coarse) {
    .pro-qa { background: var(--c-primary-light); }
}
@media (prefers-reduced-motion: reduce) {
    .view-pro *, .pro-guichet * { animation: none !important; transition: none !important; }
}
