/* ============================================
   imdba.ch — Dashboard Incident Majeur
   Style RTS premium, moderne, épuré
   ============================================ */

:root {
    /* Couleurs RTS */
    --rts-red: #E2001A;
    --rts-red-dark: #B80015;
    --rts-red-light: #FF1A3A;
    --rts-red-soft: #FFF2F3;

    /* Neutres */
    --ink: #18191b;
    --ink-muted: #62666d;
    --line: #d9dbdf;
    --line-strong: #b9bcc2;
    --paper: #ffffff;
    --canvas: #f2f1ee;
    --canvas-2: #e9e8e4;

    /* Accents statut */
    --success: #1a8754;
    --success-soft: #eaf6ee;
    --warning: #c47c0e;
    --warning-soft: #fdf4e3;
    --danger: #d32f2f;
    --danger-soft: #fdeaea;
    --info: #2763a5;
    --info-soft: #e8f0f9;

    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);

    /* Layout */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --max-width: 1100px;

    /* Transition */
    --t-fast: 0.15s ease;
    --t-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================== RESET ===================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: var(--canvas);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================== HEADER ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 4px solid var(--rts-red);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}

.header-brand img {
    height: 32px;
    width: auto;
}

.header-brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Boutons header */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
}
.btn:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}
.btn-primary {
    background: var(--rts-red);
    border-color: var(--rts-red);
    color: #fff;
}
.btn-primary:hover {
    background: var(--rts-red-dark);
    border-color: var(--rts-red-dark);
}
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ink-muted);
    padding: 6px 10px;
}
.btn-ghost:hover {
    background: var(--canvas-2);
    color: var(--ink);
}
.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
}
.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* Badge rôle */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.role-badge-admin {
    background: var(--rts-red-soft);
    color: var(--rts-red-dark);
}
.role-badge-client {
    background: var(--info-soft);
    color: var(--info);
}

/* ===================== PIN ENTRY (client) ===================== */
.pin-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--canvas);
}

.pin-card {
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.pin-logo {
    height: 48px;
    margin-bottom: 24px;
}

.pin-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pin-subtitle {
    color: var(--ink-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.pin-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--line);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5em;
    transition: border-color var(--t-fast);
    font-family: inherit;
}
.pin-input:focus {
    outline: none;
    border-color: var(--rts-red);
    box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.1);
}

.pin-error {
    display: none;
    margin-top: 16px;
    padding: 10px 16px;
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===================== LOGIN ADMIN ===================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--canvas);
}

.login-card {
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    max-width: 400px;
    width: 100%;
}

.login-logo {
    height: 40px;
    margin-bottom: 24px;
}

.login-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper);
    transition: border-color var(--t-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--rts-red);
    box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.08);
}
.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.login-error {
    display: none;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===================== MAIN LAYOUT ===================== */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
}

/* ===================== NO INCIDENT STATE ===================== */
.no-incident {
    text-align: center;
    padding: 80px 24px;
}
.no-incident-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.no-incident-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
}
.no-incident-text {
    color: var(--ink-muted);
    font-size: 0.95rem;
}

/* ===================== PROGRESS TRACKER ===================== */
.progress-tracker {
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px 28px;
    margin-bottom: 24px;
}

.progress-tracker-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rts-red-dark);
    margin-bottom: 8px;
}

.progress-tracker-meta {
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin-bottom: 20px;
    font-weight: 600;
}

.progress-stages {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    margin-bottom: 28px;
    gap: 4px;
}

/* Ligne de fond */
.progress-line-bg {
    position: absolute;
    top: 18px;
    left: 28px;
    right: 28px;
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    z-index: 0;
}

/* Ligne de progression (remplie) */
.progress-line-fill {
    position: absolute;
    top: 18px;
    left: 28px;
    height: 4px;
    background: linear-gradient(90deg, var(--rts-red) 0%, var(--rts-red-dark) 100%);
    border-radius: 2px;
    z-index: 1;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    cursor: default;
}

.progress-stage-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--paper);
    border: 3px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink-muted);
    transition: all var(--t-base);
    position: relative;
}

.progress-stage.completed .progress-stage-dot {
    background: var(--rts-red);
    border-color: var(--rts-red);
    color: #fff;
}
.progress-stage.completed .progress-stage-dot::after {
    content: "✓";
    font-size: 1rem;
    font-weight: 900;
}

/* Étape actuelle — pulsing */
.progress-stage.current .progress-stage-dot {
    background: var(--rts-red);
    border-color: var(--rts-red);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(226, 0, 26, 0.15);
    animation: pulse 2s ease-in-out infinite;
}
.progress-stage.current .progress-stage-dot::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(226, 0, 26, 0.15); }
    50% { box-shadow: 0 0 0 10px rgba(226, 0, 26, 0.08); }
}

.progress-stage-label {
    margin-top: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    color: var(--ink-muted);
    max-width: 100px;
    line-height: 1.3;
    transition: color var(--t-fast);
}
.progress-stage.completed .progress-stage-label,
.progress-stage.current .progress-stage-label {
    color: var(--ink);
    font-weight: 700;
}

/* Étape skippée */
.progress-stage.skipped .progress-stage-dot {
    opacity: 0.35;
    text-decoration: line-through;
}

/* Étape avec lien (rapport) */
.progress-stage.linkable.completed .progress-stage-dot {
    cursor: pointer;
}

/* Statut actuel */
.current-status {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
}
.current-status-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rts-red-dark);
}
.current-status-time {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin-top: 4px;
}

/* ===================== INCIDENT INFO CARD ===================== */
.incident-card {
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px;
    margin-bottom: 24px;
}

.incident-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.incident-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
    flex: 1;
}

.statut-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}
.statut-badge.encours {
    background: var(--warning-soft);
    color: var(--warning);
}
.statut-badge.resolu {
    background: var(--success-soft);
    color: var(--success);
}
.statut-badge.ferme {
    background: var(--info-soft);
    color: var(--info);
}

/* Références */
.refs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.ref-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--canvas);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--ink-muted);
    font-weight: 600;
}
.ref-item strong {
    color: var(--ink);
}

/* Description en cours */
.en-cours-text {
    padding: 16px;
    background: var(--rts-red-soft);
    border-left: 4px solid var(--rts-red);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink);
}

/* Details grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.detail-block {
    padding: 16px;
    background: var(--canvas);
    border-radius: var(--radius-sm);
}
.detail-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 8px;
}
.detail-text {
    font-size: 0.9rem;
    color: var(--ink);
    line-height: 1.5;
}

/* ===================== TIMELINE COMMS ===================== */
.comms-section {
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px;
    margin-bottom: 24px;
}

.comms-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rts-red-dark);
    margin-bottom: 20px;
}

.comms-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comm-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.comm-item:last-child {
    border-bottom: none;
}

/* Trait vertical */
.comm-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 36px;
    bottom: -4px;
    width: 2px;
    background: var(--line);
}

.comm-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    z-index: 1;
}
.comm-dot.annonce { background: var(--rts-red); color: #fff; }
.comm-dot.update { background: var(--warning); color: #fff; }
.comm-dot.cloture { background: var(--success); color: #fff; }

.comm-body {
    flex: 1;
}
.comm-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.comm-type {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 3px;
}
.comm-type.annonce { background: var(--rts-red-soft); color: var(--rts-red-dark); }
.comm-type.update { background: var(--warning-soft); color: var(--warning); }
.comm-type.cloture { background: var(--success-soft); color: var(--success); }

.comm-time {
    font-size: 0.78rem;
    color: var(--ink-muted);
}
.comm-content {
    font-size: 0.9rem;
    color: var(--ink);
    line-height: 1.5;
    margin-top: 4px;
}

/* Comm actions (admin only) */
.comm-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* Dernière comm — mise en évidence */
.comm-item:first-child {
    padding-top: 0;
}
.comm-item:last-child {
    border-bottom: none;
}

/* Save button pulse when dirty */
.btn-primary.pulse {
    animation: btnPulse 1.5s ease-in-out infinite;
}
@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(226, 0, 26, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(226, 0, 26, 0); }
}
.comm-action-btn {
    font-size: 0.72rem;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink-muted);
    cursor: pointer;
    transition: all var(--t-fast);
    font-family: inherit;
}
.comm-action-btn:hover {
    border-color: var(--rts-red);
    color: var(--rts-red);
}

/* ===================== IMPACT ANTENNE ===================== */
.impact-card {
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 24px;
}
.impact-active {
    border-left: 4px solid var(--rts-red);
}
.impact-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.impact-icon {
    font-size: 1.2rem;
}
.impact-title {
    font-size: 0.95rem;
    font-weight: 700;
}
.impact-timer {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--rts-red);
    font-variant-numeric: tabular-nums;
    margin-top: 8px;
}
.impact-channels {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--ink-muted);
}

/* ===================== ADMIN: LIVE EDIT ===================== */
.edit-panel {
    position: fixed;
    top: 0;
    right: -480px;
    width: 460px;
    max-width: 100vw;
    height: 100vh;
    background: var(--paper);
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    z-index: 200;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.edit-panel.open {
    right: 0;
}

.edit-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 150;
    display: none;
}
.edit-panel-overlay.show {
    display: block;
}

.edit-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--rts-red);
    color: #fff;
}

.edit-panel-title {
    font-size: 1rem;
    font-weight: 700;
}

.edit-panel-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.edit-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.edit-section {
    margin-bottom: 24px;
}

.edit-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.edit-field {
    margin-bottom: 14px;
}

.edit-row {
    display: flex;
    gap: 12px;
}
.edit-row .edit-field {
    flex: 1;
}

.edit-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 4px;
}

.edit-input, .edit-select, .edit-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--ink);
    background: var(--paper);
    transition: border-color var(--t-fast);
}
.edit-input:focus, .edit-select:focus, .edit-textarea:focus {
    outline: none;
    border-color: var(--rts-red);
    box-shadow: 0 0 0 2px rgba(226, 0, 26, 0.08);
}
.edit-textarea {
    resize: vertical;
    min-height: 60px;
}

/* Toggle switch */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.toggle {
    position: relative;
    width: 40px;
    height: 22px;
}
.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--line);
    border-radius: 11px;
    transition: var(--t-fast);
}
.toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--t-fast);
}
.toggle input:checked + .toggle-slider {
    background: var(--rts-red);
}
.toggle input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* Quick step buttons */
.quick-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.quick-step-btn {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    text-align: left;
    color: var(--ink-muted);
}
.quick-step-btn:hover {
    border-color: var(--rts-red);
    color: var(--rts-red);
}
.quick-step-btn.active {
    background: var(--rts-red);
    border-color: var(--rts-red);
    color: #fff;
}

.edit-panel-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: var(--canvas);
}

/* ===================== TOAST ===================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 300;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--ink); color: #fff; }

/* ===================== COMPOSER COMMS ===================== */
.comm-composer {
    margin-top: 20px;
    padding: 20px;
    background: var(--canvas);
    border-radius: var(--radius-md);
}
.comm-composer-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.comm-type-select {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .progress-stages {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 4px;
        min-width: 0;
        padding: 0 8px;
    }
    .progress-line-bg, .progress-line-fill {
        display: none;
    }
    .progress-stage {
        flex: 0 0 calc(50% - 4px);
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    .progress-stage-dot {
        width: 32px;
        height: 32px;
        font-size: 0.72rem;
        flex-shrink: 0;
    }
    .progress-stage-label {
        font-size: 0.75rem;
        max-width: none;
        text-align: left;
        margin-top: 0;
    }
    .progress-tracker {
        overflow-x: hidden;
    }
    .incident-card-header {
        flex-direction: column;
    }
    .statut-badge {
        align-self: flex-start;
    }
    .details-grid {
        grid-template-columns: 1fr;
    }
    .edit-panel {
        width: 100vw;
        right: -100vw;
    }
    .quick-steps {
        grid-template-columns: 1fr;
    }
    .header-brand-text {
        font-size: 0.9rem;
    }
    .main-container {
        padding: 16px;
    }
    .incident-card, .comms-section, .impact-card, .progress-tracker {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .site-header-inner {
        padding: 10px 14px;
    }
    .header-brand img {
        height: 28px;
    }
    .pin-card, .login-card {
        padding: 32px 24px;
    }
}

/* ===================== UTILITIES ===================== */
.hidden { display: none !important; }
.text-muted { color: var(--ink-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* ===================== AUTO-REFRESH INDICATOR ===================== */
.refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--ink-muted);
}
.refresh-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===================== PRINT ===================== */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    body { background: #fff !important; }
    .site-header, .header-actions, .edit-panel, .edit-panel-overlay,
    .btn, .comm-actions, .comm-composer, .refresh-indicator {
        display: none !important;
    }
    .progress-tracker, .incident-card, .comms-section, .impact-card {
        border: 1px solid var(--line);
        box-shadow: none;
        page-break-inside: avoid;
    }
}
