/* ═══════════════════════════════════════════════════════════════
   FAST SERVICES — Rapport client public (?rapport=<token>)
   Vue read-only, mobile-first, palette claire cohérente FastServices
   ═══════════════════════════════════════════════════════════════ */

html.public-report-mode,
html.public-report-mode body {
    background: #f1f5f9;
    color: #0f172a;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ── Défilement molette / trackpad (ordinateur) ───────────────────────────
   L'app applique `overflow-x:hidden` + `overscroll-behavior:none` sur html/body.
   En vue rapport (flux normal), le BODY devient un conteneur de défilement qui
   NE défile pas (son contenu tient pile) : avec overscroll-behavior:none, il
   « avale » la molette/le trackpad au lieu de la transmettre à la racine → la
   page ne descendait qu'avec la barre de défilement, pas au pad. On rétablit
   un défilement normal : la racine défile, le body n'est plus un piège. */
html.public-report-mode {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: auto !important;
    height: auto !important;
    min-height: 100% !important;
    position: static !important;
}
html.public-report-mode body {
    overflow: visible !important;
    overscroll-behavior: auto !important;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    position: static !important;
}

/* Cache TOUT le reste de l'app — on n'affiche que notre root */
html.public-report-mode body > *:not(#public-report-root):not(script) {
    display: none !important;
}

#public-report-root {
    display: block;
    min-height: 100vh;
}

.public-report-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.public-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.25rem;
    flex-wrap: wrap;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-width: none;
}

.public-report-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.public-report-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 4px;
}

.public-report-garage {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.public-report-garage-meta {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.35;
}

.public-report-actions {
    display: flex;
    gap: 0.5rem;
}
.public-report-print {
    background: #fff;
    color: #1e293b;
    border: 1.5px solid #cbd5e1;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.public-report-print:hover {
    border-color: #5a1aa0;
    background: #f8fafc;
}
.public-report-print:disabled {
    opacity: 0.6;
    cursor: wait;
}

.public-report-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.public-report-not-found {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #64748b;
}
.public-report-not-found h1 {
    color: #1e293b;
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
}

.public-report-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: #0f172a;
}

.public-report-meta {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.public-report-vehicle {
    padding-top: 0;
}

/* Layout sommaire (photo véhicule | blocs infos) */
.public-report-summary-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.3rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}
@media (max-width: 640px) {
    .public-report-summary-grid {
        grid-template-columns: 1fr;
    }
}
.public-report-vehicle-photo-wrap {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    aspect-ratio: 4 / 3;
}
.public-report-vehicle-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.public-report-summary-blocks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.public-report-info-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.45;
}
.public-report-info-block > div + div { margin-top: 0.2rem; }
.public-report-info-title {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4a1487;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.public-report-info-block small {
    color: #64748b;
    font-weight: 500;
}

/* Galerie photos d'arrivée du véhicule */
.public-report-arrival-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}
.public-report-arrival-photo {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.public-report-arrival-photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    border-color: #5a1aa0;
}
.public-report-arrival-photo img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.public-report-arrival-photo figcaption {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

/* Ligne staff avec avatar (Inspection effectuée par) */
.public-report-staff-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.55rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.public-report-staff-row:last-child { border-bottom: none; }
.public-report-staff-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    background: #f1f5f9;
}
.public-report-staff-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #4a1487;
    font-size: 1rem;
    background: #f4eefb;
    border-color: #cdb8ec;
}
.public-report-staff-info { flex: 1; min-width: 0; }
.public-report-staff-name { font-size: 0.94rem; color: #0f172a; }
.public-report-staff-title {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.1rem;
}
.public-report-staff-meta {
    font-size: 0.78rem;
    color: #475569;
    margin-top: 0.18rem;
}

.public-report-vehicle-main {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.public-report-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #334155;
}
.public-report-vehicle-grid span {
    color: #64748b;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
}
.public-report-vehicle-grid code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
}

.public-report-section-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 600;
}

.public-report-message-body {
    background: #f8fafc;
    border-left: 3px solid #5a1aa0;
    padding: 0.85rem 1rem;
    border-radius: 0 8px 8px 0;
    color: #1e293b;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* ─── Findings ───────────────────────────────────────────────── */

.public-report-finding {
    border: 1px solid #e2e8f0;
    border-left-width: 4px;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    background: #fff;
}
.public-report-finding--red {
    border-left-color: #ef4444;
    background: #fef2f2;
}
.public-report-finding--yellow {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.public-report-finding-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.public-report-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.public-report-dot--red    { background: #ef4444; }
.public-report-dot--yellow { background: #f59e0b; }
.public-report-dot--green  { background: #22c55e; }
.public-report-dot--gray   { background: #94a3b8; }

.public-report-status-pill {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.public-report-status-pill--red    { background: #fee2e2; color: #b91c1c; }
.public-report-status-pill--yellow { background: #fef3c7; color: #92400e; }
.public-report-status-pill--green  { background: #dcfce7; color: #166534; }

.public-report-finding-body {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.public-report-finding-body em {
    color: #64748b;
    font-style: normal;
    font-weight: 500;
}

.public-report-finding-cat {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.public-report-note {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-style: italic;
    color: #475569;
    margin-top: 0.25rem;
}

.public-report-estimate {
    margin-top: 0.5rem;
    color: #0f172a;
}

/* ─── Galerie photos (par finding) ────────────────────────── */
.public-report-media {
    margin-top: 0.7rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
}
.public-report-photo {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: transform 0.15s, box-shadow 0.15s;
}
.public-report-photo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.public-report-photo a {
    display: block;
    line-height: 0;
}
.public-report-photo img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}
.public-report-photo-caption {
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
    color: #64748b;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    line-height: 1.3;
}

.public-report-empty {
    text-align: center;
    color: #64748b;
    padding: 1.5rem;
    font-style: italic;
}

/* ─── OK count ─────────────────────────────────────────────── */

.public-report-ok-card {
    padding: 0;
    overflow: hidden;
}

.public-report-ok-toggle {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 1rem 1.25rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1e293b;
}
.public-report-ok-toggle:hover { background: #f8fafc; }

.public-report-ok-hint {
    color: #5a1aa0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.public-report-ok-toggle[aria-expanded="true"] .public-report-ok-arrow {
    transform: rotate(180deg);
}
.public-report-ok-arrow { transition: transform 0.15s; display: inline-block; }

.public-report-ok-list {
    padding: 0 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.public-report-ok-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: #334155;
    padding: 0.35rem 0;
    border-top: 1px solid #f1f5f9;
}
.public-report-ok-item:first-child { border-top: 0; }
.public-report-ok-obs {
    color: #64748b;
    font-size: 0.82rem;
}

/* ─── Total ─────────────────────────────────────────────────── */

.public-report-total {
    text-align: right;
    font-size: 1.05rem;
    background: #f4eefb;
    border-color: #cdb8ec;
    color: #312e81;
}
.public-report-total strong { font-size: 1.2rem; }

.public-report-footer {
    text-align: center;
    color: #94a3b8;
    font-size: 0.78rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* ─── Print ─────────────────────────────────────────────────── */
@media print {
    /* Fond blanc + conserver les couleurs (statuts, bandes vert/jaune/rouge, hero) */
    html.public-report-mode,
    html.public-report-mode body { background: #fff !important; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    @page { margin: 12mm; }

    /* Masquer l'UI non imprimable (boutons Imprimer/PDF, bascule de langue) */
    .public-report-print,
    .public-report-actions,
    .public-report-lang-toggle { display: none !important; }

    /* Pleine largeur, sans ombres ni marges d'écran */
    .public-report-wrap { max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
    .public-report-card,
    .public-report-band,
    .public-report-hero { box-shadow: none !important; }

    /* Bandes repliables : tout déplié sur papier */
    .public-report-band-body { display: block !important; max-height: none !important; overflow: visible !important; }
    /* … sans les « + / − » de dépliage ni le bouton Appeler (interactifs = sans
       objet sur papier ; 23 juil. 2026, retouches impression) */
    .public-report-band-toggle-icon,
    .public-report-prep-cta-btn { display: none !important; }

    /* Ne PAS couper ces blocs entre deux pages (les bandes entières, souvent >1 page,
       sont volontairement exclues → sinon grands trous en bas de page) */
    .public-report-card,
    .public-report-finding,
    .public-report-finding-body-v2,
    .public-report-ok-item-v2,
    .public-report-photo,
    .public-report-arrival-photo,
    .public-report-plan-row,
    figure { break-inside: avoid; page-break-inside: avoid; }

    /* Titres jamais seuls en bas de page */
    .public-report-band-title,
    .public-report-hero-h1,
    h1, h2, h3 { break-after: avoid; page-break-after: avoid; }

    /* Photos : hauteur bornée → une photo ne monopolise pas une page entière */
    .public-report-photo img,
    .public-report-arrival-photo img,
    .public-report-finding-body-v2 img,
    .public-report-media img { max-height: 7cm !important; width: auto !important; object-fit: contain; }

    /* Photos d'arrivée : le CADRE épouse l'image (sinon une photo portrait
       flottait dans une vignette pleine largeur → grand cadre vide, 23 juil.). */
    .public-report-arrival-grid { display: block !important; }
    .public-report-arrival-photo {
        display: inline-block !important;
        width: auto !important;
        margin: 0 6px 6px 0 !important;
        vertical-align: top;
    }
    .public-report-arrival-photo img {
        width: auto !important;
        height: auto !important;
        max-height: 6cm !important;
        max-width: 8cm !important;
    }

    /* Visionneuse jamais imprimée */
    .public-report-lightbox { display: none !important; }
}

/* ─── Mobile ────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .public-report-wrap { padding: 0.85rem; }
    .public-report-card { padding: 1rem; }
    .public-report-title { font-size: 1.25rem; }
    .public-report-status-pill { margin-left: 0; }
    .public-report-vehicle-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   RAPPORT V2 — Modern / Score-driven
   ═══════════════════════════════════════════════════════════════ */

.public-report-v2 {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Header ─── */
.public-report-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    background: #fff !important;
    color: #0f172a !important;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    border-bottom: 2px solid #1e293b;
    margin-top: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}
.public-report-header-v2 .public-report-garage-v2,
.public-report-header-v2 .public-report-brand-text,
.public-report-header-v2 .public-report-garage-meta-v2,
.public-report-header-v2 .public-report-garage-meta-v2 span {
    color: #0f172a !important;
}
.public-report-header-v2 .public-report-garage-meta-v2 { color: #475569 !important; }
.public-report-header-v2 .public-report-garage-meta-v2 a { color: #5a1aa0 !important; }
.public-report-header-v2 .public-report-logo-v2 {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 4px;
}
.public-report-brand-v2 {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 1;
    min-width: 250px;
}
.public-report-logo-v2 {
    /* Dimensions AUTO bornées → ratio préservé dans le navigateur ET dans le PDF.
       (html2canvas ignore object-fit : un width+height fixes déformerait le logo.) */
    max-width: 170px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}
.public-report-brand-text { min-width: 0; }
.public-report-garage-v2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}
.public-report-garage-meta-v2 {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
}
.public-report-garage-meta-v2 a { color: #5a1aa0; text-decoration: none; }
.public-report-garage-meta-v2 a:hover { text-decoration: underline; }

.public-report-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.public-report-action-btn {
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}
.public-report-action-btn:hover {
    background: #0f172a;
    transform: translateY(-1px);
}

/* ─── Bascule de langue FR | EN ─── */
.public-report-lang-toggle {
    display: inline-flex;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    align-self: center;
}
.public-report-lang-btn {
    background: #fff;
    color: #475569;
    border: none;
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.public-report-lang-btn + .public-report-lang-btn {
    border-left: 1px solid #cbd5e1;
}
.public-report-lang-btn:hover {
    background: #f1f5f9;
}
.public-report-lang-btn.is-active {
    background: #5a1aa0;
    color: #fff;
}
@media print {
    .public-report-lang-toggle { display: none !important; }
}

/* ─── Hero (titre + score) ─── */
.public-report-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f1f5f9;
    border-radius: 16px;
    padding: 2rem 2rem;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
@media (max-width: 760px) {
    .public-report-hero { grid-template-columns: 1fr; padding: 1.5rem 1.25rem; gap: 1.25rem; }
}
.public-report-hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}
.public-report-hero-h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.5rem;
    line-height: 1.15;
}
.public-report-hero-sub {
    font-size: 1rem;
    color: #cbd5e1;
    font-weight: 500;
    margin-bottom: 0.35rem;
}
.public-report-hero-vin {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}
.public-report-hero-vin code {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 2px 8px;
    border-radius: 5px;
    font-family: ui-monospace, 'SF Mono', monospace;
    font-size: 0.78rem;
}
.public-report-hero-date {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* ─── Score block (score + stats row) ─── */
.public-report-score-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 320px;
}
@media (max-width: 760px) { .public-report-score-block { min-width: 0; } }

.public-report-score-card {
    background: rgba(34, 197, 94, 0.18);
    border: 2px solid rgba(34, 197, 94, 0.45);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.public-report-score-card--yellow { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.5); }
.public-report-score-card--red    { background: rgba(239, 68, 68, 0.18);  border-color: rgba(239, 68, 68, 0.5); }
.public-report-score-big {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    flex-shrink: 0;
}
.public-report-score-big span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #94a3b8;
}
.public-report-score-label-block { flex: 1; min-width: 0; }
.public-report-score-tag {
    font-size: 0.7rem;
    color: #cbd5e1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}
.public-report-score-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}
.public-report-score-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s;
}
.public-report-score-bar-fill--green  { background: linear-gradient(90deg, #22c55e, #86efac); }
.public-report-score-bar-fill--yellow { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.public-report-score-bar-fill--red    { background: linear-gradient(90deg, #ef4444, #fca5a5); }
.public-report-score-status {
    font-size: 0.78rem;
    font-weight: 600;
}
.public-report-score-status--green  { color: #86efac; }
.public-report-score-status--yellow { color: #fcd34d; }
.public-report-score-status--red    { color: #fca5a5; }

.public-report-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}
.public-report-stat-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.7rem 0.5rem;
    text-align: center;
    transition: transform 0.18s;
}
.public-report-stat-card:hover { transform: translateY(-2px); }
.public-report-stat-card--green  .public-report-stat-num { color: #86efac; }
.public-report-stat-card--yellow .public-report-stat-num { color: #fcd34d; }
.public-report-stat-card--red    .public-report-stat-num { color: #fca5a5; }
.public-report-stat-icon { font-size: 1.3rem; line-height: 1; }
.public-report-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin: 0.1rem 0;
}
.public-report-stat-label {
    font-size: 0.66rem;
    color: #cbd5e1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─── Préparé par : bandeau staff (conseiller + tech + boutons contact) ─── */
.public-report-prep-banner {
    background: #fff;
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    margin: 1.2rem 0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.25rem;
    align-items: center;
    border-left: 5px solid #5a1aa0;
}
@media (max-width: 760px) {
    .public-report-prep-banner { grid-template-columns: 1fr; }
}
.public-report-prep-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.public-report-prep-staff {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.public-report-prep-staff-row { display: flex; align-items: center; gap: 0.75rem; }
.public-report-prep-avatar {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid #cdb8ec;
    background: #f1f5f9;
    flex-shrink: 0;
}
.public-report-prep-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.7rem;
}
.public-report-prep-avatar--advisor { background: linear-gradient(135deg, #5a1aa0, #3d1270); }
.public-report-prep-avatar--tech    { background: linear-gradient(135deg, #f59e0b, #dc2626); }
.public-report-prep-name { font-size: 0.95rem; font-weight: 700; line-height: 1.2; color: #0f172a; }
.public-report-prep-title { font-size: 0.78rem; color: #64748b; margin-top: 0.15rem; }
.public-report-prep-cta { display: flex; gap: 0.5rem; flex-shrink: 0; }
.public-report-prep-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #5a1aa0;
    color: #fff;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.15s;
}
.public-report-prep-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.public-report-prep-cta-btn--alt {
    background: #fff;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
}

/* ─── Quick nav ancres ─── */
.public-report-quick-nav {
    display: flex;
    gap: 0.55rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.public-report-quick-nav a {
    padding: 0.45rem 1rem;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: 0.15s;
}
.public-report-quick-nav a:hover {
    border-color: #5a1aa0;
    color: #5a1aa0;
    transform: translateY(-1px);
}

/* ─── CTA bas de page ─── */
.public-report-cta-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    border-radius: 14px;
    padding: 1.8rem 1.6rem;
    text-align: center;
    margin: 1.5rem 0 0.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}
.public-report-cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.public-report-cta-sub {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 1.2rem;
}
.public-report-cta-btns {
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
}
.public-report-cta-btn {
    background: #fbbf24;
    color: #0f172a;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.15s;
}
.public-report-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.35);
}
.public-report-cta-btn--alt {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.public-report-cta-btn--alt:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* ─── Message ─── */
.public-report-message-v2 {
    background: #f4eefb;
    border: 1px solid #cdb8ec;
    border-left: 5px solid #5a1aa0;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}
.public-report-message-icon { font-size: 1.4rem; flex-shrink: 0; }
.public-report-message-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #3d1270;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
}
.public-report-message-body-v2 {
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* ─── Sections ─── */
.public-report-section-v2 {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.6rem;
    margin: 1.2rem 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
}
.public-report-section-h2 {
    margin: 0 0 1.2rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}
.public-report-section-icon { font-size: 1.3rem; }
.public-report-section-count {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-left: auto;
}

/* ─── Findings v2 ─── */
.public-report-finding-v2 {
    border-radius: 10px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-left-width: 5px;
    background: #fafbfc;
    transition: box-shadow 0.15s;
}
.public-report-finding-v2:last-child { margin-bottom: 0; }
.public-report-finding-v2:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06); }
.public-report-finding-v2.public-report-finding--red    { border-left-color: #ef4444; background: #fef2f2; }
.public-report-finding-v2.public-report-finding--yellow { border-left-color: #f59e0b; background: #fffbeb; }

.public-report-finding-head-v2 {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}
.public-report-severity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.32rem 0.7rem;
    border-radius: 6px;
    letter-spacing: 0.07em;
    flex-shrink: 0;
    text-transform: uppercase;
}
.public-report-severity-badge--red    { background: #ef4444; color: #fff; box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35); }
.public-report-severity-badge--yellow { background: #f59e0b; color: #fff; box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35); }
.public-report-finding-name-v2 { flex: 1; min-width: 0; }
.public-report-finding-name-v2 strong {
    display: block;
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}
.public-report-finding-name-v2 small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
}

.public-report-finding-body-v2 { display: grid; gap: 0.55rem; }
.public-report-kv {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.55rem;
    align-items: baseline;
    font-size: 0.92rem;
    line-height: 1.45;
}
@media (max-width: 580px) {
    .public-report-kv { grid-template-columns: 1fr; gap: 0.15rem; }
}
.public-report-kv-key {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.public-report-kv-val { color: #1e293b; }

.public-report-note-v2 {
    background: #fff;
    border-left: 3px solid #94a3b8;
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    font-style: italic;
    color: #475569;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}
.public-report-estimate-v2 {
    font-size: 0.92rem;
    color: #0f172a;
    margin-top: 0.4rem;
    padding-top: 0.55rem;
    border-top: 1px dashed #cbd5e1;
}

.public-report-empty-v2 {
    text-align: center;
    padding: 2rem 1rem;
    color: #16a34a;
    font-weight: 600;
    background: #f0fdf4;
    border-radius: 10px;
    border: 1px dashed #86efac;
    line-height: 1.5;
}

/* ─── OK list ─── */
.public-report-ok-section { padding: 0; overflow: hidden; }
.public-report-ok-toggle-v2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    background: #f0fdf4;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.public-report-ok-toggle-v2:hover { background: #dcfce7; }
.public-report-ok-toggle-v2 .public-report-section-icon { font-size: 1.3rem; }
.public-report-ok-label-v2 {
    flex: 1;
    color: #166534;
    font-size: 1rem;
    font-weight: 600;
}
.public-report-ok-label-v2 strong { font-size: 1.15rem; }
.public-report-ok-toggle-hint {
    color: #16a34a;
    font-size: 0.85rem;
    font-weight: 600;
}
.public-report-ok-arrow { transition: transform 0.2s; display: inline-block; margin-left: 0.3rem; }
.public-report-ok-toggle-v2[aria-expanded="true"] .public-report-ok-arrow { transform: rotate(180deg); }
.public-report-ok-list-v2 {
    padding: 0.5rem 1.5rem 1.2rem;
    display: grid;
    gap: 0.4rem;
}
.public-report-ok-item-v2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;          /* photos « bon état » : la bande passe sous le texte */
    gap: 0.55rem;
    padding: 0.45rem 0.7rem;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #334155;
}
.public-report-ok-item-v2 .public-report-media { width: 100%; margin-top: 0.35rem; }
.public-report-ok-check {
    color: #16a34a;
    font-weight: 800;
    flex-shrink: 0;
}
.public-report-ok-item-v2 small { color: #64748b; font-weight: 500; }

/* ─── Bandes de constatations (vert / jaune / rouge, style accordéon) ─── */
.public-report-band {
    margin: 1rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
}
.public-report-band-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.05rem 1.35rem;
    border: none;
    margin: 0;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    text-align: left;
    transition: filter 0.15s;
}
.public-report-band-head:hover { filter: brightness(0.95); }
.public-report-band-head--static { cursor: default; }
.public-report-band-head--static:hover { filter: none; }
.public-report-band-icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1; }
.public-report-band-title { flex: 1; min-width: 0; }
.public-report-band-title strong { font-weight: 800; }
.public-report-band-toggle-icon {
    flex-shrink: 0;
    font-size: 1.7rem;
    line-height: 1;
    font-weight: 400;
    width: 1.6rem;
    text-align: center;
}
.public-report-band--green  .public-report-band-head { background: #16a34a; }
.public-report-band--yellow .public-report-band-head { background: #ea8a0b; }
.public-report-band--red    .public-report-band-head { background: #dc2626; }
.public-report-band--info   .public-report-band-head { background: #475569; }
.public-report-card-note {
    font-size: 0.95rem; color: #334155; margin-bottom: 0.8rem;
    background: #f8fafc; border-radius: 8px; padding: 0.6rem 0.85rem;
}
.public-report-band-body {
    background: #fff;
    padding: 1rem 1.35rem 1.2rem;
}
/* Les conformes (vert) sont une simple liste : grille plus serrée.
   `:not([hidden])` indispensable — sinon `display:grid` écraserait l'attribut
   `hidden` (display:none) et la bande resterait dépliée au lieu d'être repliée. */
.public-report-band--green .public-report-band-body:not([hidden]) {
    display: grid;
    gap: 0.4rem;
}

/* ─── People (Effectuée par + Client) ─── */
.public-report-people-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.2rem 0;
}
@media (max-width: 680px) {
    .public-report-people-v2 { grid-template-columns: 1fr; }
}
.public-report-people-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.public-report-people-title {
    margin: 0 0 0.85rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #4a1487;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ─── Plan d'entretien recommandé (fin du rapport) ───────────── */
.public-report-plan-intro { font-size: 0.92rem; color: #4b5563; margin: 0 0 0.85rem; line-height: 1.45; }
/* En-tête véhicule + grille de specs (KM / Moteur / Rouage / Transmission) — comme le générateur */
.public-report-plan-veh { font-size: 1.35rem; font-weight: 800; color: #111827; line-height: 1.15; }
.public-report-plan-sub { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #7c3aed; margin: 0.15rem 0 0.9rem; }
.public-report-plan-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; margin: 0 0 1rem; }
.public-report-plan-spec { display: flex; flex-direction: column; gap: 0.15rem; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: 0.5rem 0.7rem; }
.public-report-plan-spec-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #94a3b8; }
.public-report-plan-spec-value { font-size: 0.95rem; font-weight: 700; color: #111827; }
.public-report-plan-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; border-radius: 10px; overflow: hidden; border: 1px solid #e5e7eb; }
/* En-tête SOMBRE « Service à effectuer | Intervalle » — comme le générateur */
.public-report-plan-table thead th { background: #1f2937; color: #fff; text-align: left; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.7rem 0.9rem; }
.public-report-plan-table thead th.public-report-plan-th-int { text-align: right; white-space: nowrap; }
.public-report-plan-table td { padding: 0.95rem 1rem; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.public-report-plan-table tr:last-child td { border-bottom: none; }
.public-report-plan-svc { vertical-align: middle; border-left: 3px solid transparent; }
.public-report-plan-row.ppg-due  .public-report-plan-svc { border-left-color: #ef4444; }
.public-report-plan-row.ppg-soon .public-report-plan-svc { border-left-color: #f59e0b; }
.public-report-plan-row.ppg-done .public-report-plan-svc { border-left-color: #10b981; }
.public-report-plan-name { font-weight: 700; color: #111827; font-size: 1rem; line-height: 1.25; }
.public-report-plan-action { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #7c3aed; margin-top: 0.2rem; }
.public-report-plan-interval { white-space: nowrap; color: #111827; font-weight: 800; font-size: 0.95rem; text-align: right; vertical-align: middle; }
/* Jauge de progression — IDENTIQUE au générateur : barre PLEINE LARGEUR de la colonne */
.public-report-plan-gauge { margin-top: 0.5rem; }
.public-report-plan-gauge-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.public-report-plan-gauge-label { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.public-report-plan-gauge-percent { font-size: 0.62rem; font-weight: 600; color: #94a3b8; }
.public-report-plan-gauge-track { width: 100%; height: 3px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.public-report-plan-gauge-fill { height: 100%; border-radius: 3px; }
.public-report-plan-gauge.ppg-due  .public-report-plan-gauge-label { color: #dc2626; }
.public-report-plan-gauge.ppg-due  .public-report-plan-gauge-fill  { background: linear-gradient(90deg, #dc2626, #ef4444, #f87171); }
.public-report-plan-gauge.ppg-soon .public-report-plan-gauge-label { color: #d97706; }
.public-report-plan-gauge.ppg-soon .public-report-plan-gauge-fill  { background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24); }
.public-report-plan-gauge.ppg-done .public-report-plan-gauge-label { color: #059669; }
.public-report-plan-gauge.ppg-done .public-report-plan-gauge-fill  { background: linear-gradient(90deg, #059669, #10b981, #34d399); }
.public-report-plan-pill { display: inline-block; white-space: nowrap; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.public-report-plan-pill.pp-green { background: #d1fae5; color: #065f46; }
.public-report-plan-pill.pp-amber { background: #fef3c7; color: #92400e; }
.public-report-plan-pill.pp-red   { background: #fee2e2; color: #991b1b; }

/* ── Plan d'entretien sur MOBILE : on empile (l'intervalle « 24 000 km ou 12 mois
   ou quand sale » était en nowrap aligné à droite → le tableau débordait et se
   coupait à droite). Chaque ligne devient une carte : service + jauge en haut,
   intervalle en dessous à gauche, liseré de statut sur toute la hauteur. ── */
@media (max-width: 640px) {
    .public-report-plan-table { overflow: visible; }
    .public-report-plan-table thead { display: none; }
    .public-report-plan-table tbody,
    .public-report-plan-table tr,
    .public-report-plan-table td { display: block; width: 100%; }
    .public-report-plan-table tr { border-left: 3px solid transparent; border-bottom: 1px solid #eef2f7; }
    .public-report-plan-table tr:last-child { border-bottom: none; }
    .public-report-plan-row.ppg-due  { border-left-color: #ef4444; }
    .public-report-plan-row.ppg-soon { border-left-color: #f59e0b; }
    .public-report-plan-row.ppg-done { border-left-color: #10b981; }
    .public-report-plan-table td { border-bottom: none; }
    .public-report-plan-svc { border-left: none; padding: 0.85rem 0.95rem 0.4rem; }
    .public-report-plan-interval {
        text-align: left; white-space: normal; word-break: break-word;
        padding: 0 0.95rem 0.9rem; font-size: 0.92rem; font-weight: 700; color: #374151;
    }
    .public-report-plan-interval::before {
        content: "Intervalle : ";
        font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em;
        text-transform: uppercase; color: #7c3aed;
    }
    .public-report-plan-interval:empty { display: none; }
}


/* ─── Visionneuse plein écran (23 juil. 2026) : tap sur une photo du rapport ─── */
.public-report-lightbox {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(2, 6, 23, 0.92);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem; cursor: zoom-out;
}
.public-report-lightbox img {
    max-width: 100%; max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.public-report-lightbox-close {
    position: absolute; top: 14px; right: 16px;
    width: 44px; height: 44px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, 0.14);
    color: #fff; font-size: 20px; cursor: pointer;
}
.public-report-photo img,
.public-report-arrival-photo img,
.public-report-media img { cursor: zoom-in; }
