/* BDPI 1.3 — expérience terrain et rapports */
.technician-sidebar-create {
  background: linear-gradient(135deg, #d62b3d, #a91727);
  box-shadow: 0 14px 30px rgba(197, 31, 50, .28);
}
.technician-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.technician-identity strong,
.technician-identity small { display:block; }
.technician-identity strong { color:#fff; font-size:12px; }
.technician-identity small { color:#9ca3af; font-size:10px; line-height:1.35; }
.technician-online-dot {
  width:10px;
  height:10px;
  flex:none;
  border-radius:50%;
  background:#31c978;
  box-shadow:0 0 0 5px rgba(49,201,120,.13);
}

.tech-page { display:grid; gap:20px; }
.tech-hero {
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:24px;
  padding:clamp(22px,4vw,38px);
  border:1px solid color-mix(in srgb,var(--primary) 22%,var(--border));
  border-radius:24px;
  color:#fff;
  background:
    radial-gradient(circle at 82% 12%,rgba(255,255,255,.13),transparent 31%),
    radial-gradient(circle at 10% 110%,rgba(232,70,84,.28),transparent 37%),
    linear-gradient(135deg,#101827 0%,#172235 58%,#23151e 100%);
  box-shadow:0 22px 55px rgba(15,23,42,.16);
}
.tech-hero::after {
  content:"";
  position:absolute;
  width:260px;
  height:260px;
  right:-65px;
  top:-105px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:50%;
  box-shadow:0 0 0 35px rgba(255,255,255,.025),0 0 0 70px rgba(255,255,255,.018);
  pointer-events:none;
}
.tech-hero-copy { position:relative; z-index:1; max-width:760px; }
.tech-hero-kicker { margin:0 0 7px; color:#ff9da7; font-size:11px; font-weight:850; letter-spacing:.11em; text-transform:uppercase; }
.tech-hero h1 { margin:0; max-width:720px; font-size:clamp(30px,4.5vw,52px); line-height:1.03; letter-spacing:-.045em; }
.tech-hero p { max-width:700px; margin:12px 0 0; color:#c5cedb; font-size:clamp(13px,1.6vw,16px); }
.tech-hero-actions { position:relative; z-index:1; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.tech-hero .button-secondary { color:#fff; background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.18); }
.tech-hero .button-secondary:hover { background:rgba(255,255,255,.14); }

.tech-day-nav {
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px;
  align-items:center;
  gap:10px;
  padding:9px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface);
  box-shadow:var(--shadow);
}
.tech-day-nav > a {
  height:40px;
  display:grid;
  place-items:center;
  border:1px solid var(--border);
  border-radius:11px;
  color:var(--text);
  text-decoration:none;
  background:var(--surface-soft);
  font-size:20px;
}
.tech-day-label { text-align:center; }
.tech-day-label strong { display:block; font-size:15px; }
.tech-day-label small { display:block; color:var(--muted); font-size:11px; }

.tech-metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:13px;
}
.tech-metric {
  min-height:128px;
  display:flex;
  flex-direction:column;
  padding:17px;
  border:1px solid var(--border);
  border-radius:17px;
  background:var(--surface);
  box-shadow:var(--shadow);
}
.tech-metric-top { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:11px; font-weight:750; }
.tech-metric-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:var(--surface-soft); color:var(--primary); }
.tech-metric strong { margin-top:12px; font-size:32px; line-height:1; letter-spacing:-.04em; }
.tech-metric small { margin-top:auto; color:var(--muted); font-size:11px; }
.tech-metric.is-success { background:linear-gradient(150deg,var(--surface),var(--success-soft)); }
.tech-metric.is-warning { background:linear-gradient(150deg,var(--surface),var(--warning-soft)); }
.tech-metric.is-danger { background:linear-gradient(150deg,var(--surface),var(--danger-soft)); }

.tech-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.7fr); gap:20px; align-items:start; }
.tech-stack { display:grid; gap:16px; }
.tech-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:10px; }
.tech-section-head h2 { margin:0; font-size:20px; letter-spacing:-.025em; }
.tech-section-head p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.tech-section-head a { color:var(--primary); font-weight:750; text-decoration:none; font-size:12px; }

.tech-intervention-list { display:grid; gap:10px; }
.tech-intervention-card {
  position:relative;
  display:grid;
  grid-template-columns:92px minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  min-height:110px;
  padding:16px 16px 16px 19px;
  border:1px solid var(--border);
  border-radius:17px;
  background:var(--surface);
  color:var(--text);
  text-decoration:none;
  box-shadow:0 7px 20px rgba(15,23,42,.045);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.tech-intervention-card::before {
  content:"";
  position:absolute;
  left:0;
  top:16px;
  bottom:16px;
  width:4px;
  border-radius:0 6px 6px 0;
  background:var(--border-strong);
}
.tech-intervention-card.is-active::before { background:var(--primary); }
.tech-intervention-card.is-complete::before { background:var(--success); }
.tech-intervention-card:hover { transform:translateY(-2px); border-color:var(--border-strong); box-shadow:0 13px 28px rgba(15,23,42,.08); }
.tech-time { display:grid; gap:3px; align-content:center; }
.tech-time strong { font-size:15px; }
.tech-time small { color:var(--muted); font-size:10px; }
.tech-card-main { min-width:0; }
.tech-card-main h3 { margin:0; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tech-card-main p { margin:3px 0 0; color:var(--muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tech-card-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.tech-card-action { display:grid; justify-items:end; gap:8px; }
.tech-card-action .ui-icon { width:18px; height:18px; color:var(--muted); }
.tech-status-badge { display:inline-flex; align-items:center; min-height:25px; padding:4px 9px; border-radius:999px; color:var(--info); background:var(--info-soft); font-size:10px; font-weight:850; }
.tech-status-badge.is-active { color:var(--primary); background:var(--primary-soft); }
.tech-status-badge.is-complete { color:var(--success); background:var(--success-soft); }

.tech-empty {
  min-height:170px;
  display:grid;
  place-items:center;
  padding:28px;
  text-align:center;
  border:1px dashed var(--border-strong);
  border-radius:17px;
  background:var(--surface-soft);
}
.tech-empty strong { display:block; margin-bottom:4px; }
.tech-empty p { margin:0; color:var(--muted); font-size:12px; }

.tech-next-card {
  padding:20px;
  border:1px solid color-mix(in srgb,var(--primary) 24%,var(--border));
  border-radius:19px;
  background:linear-gradient(145deg,var(--surface),var(--primary-soft));
  box-shadow:var(--shadow);
}
.tech-next-card .tech-next-time { color:var(--primary); font-size:11px; font-weight:850; text-transform:uppercase; letter-spacing:.07em; }
.tech-next-card h3 { margin:9px 0 4px; font-size:20px; }
.tech-next-card p { margin:0; color:var(--muted); font-size:12px; }
.tech-next-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:16px; }
.tech-next-actions .button { padding-inline:10px; }

.tech-report-reminder { display:grid; gap:9px; }
.tech-report-reminder a { display:flex; justify-content:space-between; gap:12px; padding:12px; border:1px solid var(--border); border-radius:12px; color:var(--text); text-decoration:none; background:var(--surface-soft); }
.tech-report-reminder strong { display:block; font-size:12px; }
.tech-report-reminder small { display:block; color:var(--muted); font-size:10px; }

/* Fiche intervention terrain */
.tech-workspace-header {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:start;
  padding:clamp(20px,3vw,30px);
  border:1px solid var(--border);
  border-radius:22px;
  background:var(--surface);
  box-shadow:var(--shadow);
}
.tech-workspace-header h1 { margin:5px 0 7px; font-size:clamp(27px,3.5vw,42px); line-height:1.05; letter-spacing:-.04em; }
.tech-workspace-header p { margin:0; color:var(--muted); }
.tech-workspace-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.tech-progress { margin-top:20px; }
.tech-progress-head { display:flex; justify-content:space-between; gap:12px; margin-bottom:7px; color:var(--muted); font-size:11px; font-weight:750; }
.tech-progress-track { height:8px; overflow:hidden; border-radius:999px; background:var(--surface-strong); }
.tech-progress-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary),#e24d5d); }

.tech-action-rail {
  position:sticky;
  top:88px;
  z-index:5;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:11px;
  border:1px solid var(--border);
  border-radius:15px;
  background:color-mix(in srgb,var(--surface) 94%,transparent);
  backdrop-filter:blur(14px);
  box-shadow:0 12px 32px rgba(15,23,42,.09);
}
.tech-action-rail form { display:inline-flex; }
.tech-action-rail .button { min-height:43px; }
.tech-action-rail .button.is-next { color:#fff; background:var(--primary); border-color:var(--primary); }

.tech-workspace-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(290px,.62fr); gap:20px; align-items:start; }
.tech-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:17px; }
.tech-info-card { min-height:105px; padding:15px; border:1px solid var(--border); border-radius:14px; background:var(--surface-soft); }
.tech-info-card small { display:block; margin-bottom:6px; color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.tech-info-card strong { display:block; font-size:14px; }
.tech-info-card p { margin:4px 0 0; color:var(--muted); font-size:11px; white-space:pre-line; }
.tech-info-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; }
.tech-info-actions a { display:inline-flex; align-items:center; gap:5px; color:var(--primary); font-size:11px; font-weight:750; text-decoration:none; }
.tech-info-actions .ui-icon { width:15px; height:15px; }

.tech-check-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; padding:15px 17px 5px; }
.tech-check-summary div { padding:12px; border-radius:13px; background:var(--surface-soft); text-align:center; }
.tech-check-summary strong { display:block; font-size:22px; line-height:1; }
.tech-check-summary small { display:block; margin-top:5px; color:var(--muted); font-size:9px; }
.tech-check-list { display:grid; gap:8px; padding:14px 17px 18px; }
.tech-check-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; padding:12px; border:1px solid var(--border); border-radius:12px; }
.tech-check-row h3 { margin:0; font-size:13px; }
.tech-check-row p { margin:2px 0 0; color:var(--muted); font-size:10px; }

.tech-quick-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:16px; }
.tech-quick-action { min-height:105px; display:flex; flex-direction:column; justify-content:space-between; padding:14px; border:1px solid var(--border); border-radius:14px; color:var(--text); background:var(--surface-soft); text-decoration:none; }
.tech-quick-action:hover { border-color:var(--primary); }
.tech-quick-action .ui-icon { width:24px; height:24px; color:var(--primary); }
.tech-quick-action strong { display:block; margin-top:14px; font-size:12px; }
.tech-quick-action small { color:var(--muted); font-size:9px; }

.tech-missing-list { display:grid; gap:7px; padding:16px; }
.tech-missing-item { display:flex; align-items:center; gap:8px; padding:9px 10px; border-radius:10px; color:var(--warning); background:var(--warning-soft); font-size:11px; font-weight:700; }
.tech-missing-item::before { content:"!"; width:21px; height:21px; display:grid; place-items:center; border-radius:50%; color:#fff; background:var(--warning); font-size:11px; }
.tech-ready-item { padding:16px; color:var(--success); font-size:12px; font-weight:750; }

/* Formulaire terrain */
.tech-form-shell { max-width:980px; margin:0 auto; }
.tech-form-hero { margin-bottom:16px; padding:22px; border:1px solid var(--border); border-radius:20px; background:var(--surface); box-shadow:var(--shadow); }
.tech-form-hero h1 { margin:4px 0; font-size:clamp(26px,4vw,38px); }
.tech-form-hero p { margin:0; color:var(--muted); }
.tech-form-panel { padding:20px; border:1px solid var(--border); border-radius:19px; background:var(--surface); box-shadow:var(--shadow); }
.tech-form-panel .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.tech-form-panel .field:has(textarea),
.tech-form-panel .field:has(input[type="file"]) { grid-column:1/-1; }
.tech-form-footer { position:sticky; bottom:76px; z-index:10; display:flex; justify-content:flex-end; gap:9px; margin-top:14px; padding:11px; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb,var(--surface) 95%,transparent); backdrop-filter:blur(14px); box-shadow:0 14px 32px rgba(15,23,42,.12); }

/* Aperçu rapport */
.report-toolbar { position:sticky; top:85px; z-index:15; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:17px; padding:10px 12px; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb,var(--surface) 95%,transparent); backdrop-filter:blur(14px); box-shadow:var(--shadow); }
.report-toolbar-actions { display:flex; flex-wrap:wrap; gap:7px; }
.report-preview-paper { max-width:980px; margin:0 auto; padding:clamp(24px,5vw,58px); border:1px solid var(--border); background:#fff; color:#172033; box-shadow:0 24px 70px rgba(15,23,42,.16); }
.report-preview-head { display:grid; grid-template-columns:minmax(180px,.8fr) minmax(0,1.2fr); gap:30px; align-items:center; padding-bottom:22px; border-bottom:4px solid #c51f32; }
.report-preview-logo { max-width:260px; max-height:95px; object-fit:contain; object-position:left center; }
.report-preview-title { text-align:right; }
.report-preview-title small { color:#6b7280; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.report-preview-title h1 { margin:5px 0; font-size:32px; letter-spacing:-.035em; }
.report-preview-title p { margin:0; color:#6b7280; font-size:12px; }
.report-preview-mission { display:flex; justify-content:space-between; gap:20px; margin:20px 0; padding:18px; border:1px solid #d9dee7; border-radius:14px; background:#f5f7fa; }
.report-preview-mission h2 { margin:0; font-size:18px; }
.report-preview-mission p { margin:4px 0 0; color:#6b7280; }
.report-preview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.report-preview-card { padding:15px; border:1px solid #d9dee7; border-radius:12px; background:#f8fafc; }
.report-preview-card small { display:block; margin-bottom:6px; color:#6b7280; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }
.report-preview-card strong { display:block; font-size:13px; }
.report-preview-card p { margin:4px 0 0; color:#6b7280; font-size:11px; white-space:pre-line; }
.report-preview-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:18px 0; }
.report-preview-metric { padding:14px; border-radius:12px; text-align:center; background:#eaf1fc; }
.report-preview-metric.is-success { background:#e7f6ef; }
.report-preview-metric.is-warning { background:#fff2e3; }
.report-preview-metric.is-danger { background:#fdebec; }
.report-preview-metric strong { display:block; font-size:24px; }
.report-preview-metric small { color:#6b7280; font-size:9px; }
.report-preview-section { margin-top:24px; }
.report-preview-section h2 { margin:0 0 10px; padding-bottom:7px; border-bottom:1px solid #d9dee7; font-size:17px; }
.report-preview-section p { white-space:pre-line; font-size:12px; line-height:1.6; }
.report-preview-table { width:100%; border-collapse:collapse; font-size:10px; }
.report-preview-table th { padding:9px; color:#fff; background:#172033; text-align:left; }
.report-preview-table td { padding:9px; border:1px solid #d9dee7; vertical-align:top; }
.report-preview-table tr:nth-child(even) td { background:#f8fafc; }
.report-preview-photos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.report-preview-photos figure { margin:0; overflow:hidden; border:1px solid #d9dee7; border-radius:12px; }
.report-preview-photos img { width:100%; height:230px; object-fit:contain; background:#f5f7fa; }
.report-preview-photos figcaption { padding:9px; color:#6b7280; font-size:10px; }
.report-preview-signatures { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.report-preview-signature { min-height:150px; padding:14px; border:1px solid #d9dee7; border-radius:12px; text-align:center; }
.report-preview-signature img { display:block; max-height:70px; margin:12px auto; }

/* Activité technicien */
.activity-filter { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:12px; align-items:end; padding:17px; }
.activity-actions { display:flex; flex-wrap:wrap; gap:8px; }
.activity-table td:first-child { white-space:nowrap; }

@media (max-width:1100px) {
  .tech-layout,.tech-workspace-grid { grid-template-columns:1fr; }
  .tech-action-rail { position:static; }
  .tech-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .tech-page { gap:14px; }
  .tech-hero { grid-template-columns:1fr; padding:23px 18px; border-radius:19px; }
  .tech-hero h1 { font-size:34px; }
  .tech-hero-actions { display:grid; grid-template-columns:1fr 1fr; justify-content:stretch; }
  .tech-metrics { gap:9px; }
  .tech-metric { min-height:108px; padding:14px; }
  .tech-metric strong { font-size:27px; }
  .tech-intervention-card { grid-template-columns:72px minmax(0,1fr); gap:11px; padding:14px 13px 14px 17px; }
  .tech-card-action { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; padding-top:8px; border-top:1px solid var(--border); }
  .tech-next-actions { grid-template-columns:1fr; }
  .tech-workspace-header { grid-template-columns:1fr; padding:19px 16px; border-radius:18px; }
  .tech-workspace-actions { display:grid; grid-template-columns:1fr 1fr; justify-content:stretch; }
  .tech-workspace-actions .button { width:100%; }
  .tech-action-rail { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tech-action-rail form,.tech-action-rail .button { width:100%; }
  .tech-info-grid { grid-template-columns:1fr; padding:13px; }
  .tech-check-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tech-quick-actions { grid-template-columns:1fr; }
  .tech-form-panel { padding:15px; }
  .tech-form-panel .form-grid { grid-template-columns:1fr; }
  .tech-form-footer { bottom:74px; display:grid; grid-template-columns:1fr 1fr; }
  .report-toolbar { position:static; }
  .report-preview-paper { padding:20px 14px; }
  .report-preview-head { grid-template-columns:1fr; gap:14px; }
  .report-preview-title { text-align:left; }
  .report-preview-grid,.report-preview-signatures { grid-template-columns:1fr; }
  .report-preview-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-preview-photos { grid-template-columns:1fr; }
  .activity-filter { grid-template-columns:1fr; }
}
@media (max-width:480px) {
  .tech-hero-actions,.tech-workspace-actions,.tech-form-footer { grid-template-columns:1fr; }
  .tech-metrics { grid-template-columns:1fr 1fr; }
  .tech-intervention-card { grid-template-columns:60px minmax(0,1fr); }
  .tech-time strong { font-size:13px; }
  .tech-card-main h3 { font-size:13px; }
  .tech-action-rail { grid-template-columns:1fr; }
}
@media print {
  .sidebar,.topbar,.mobile-dock,.app-footer,.report-toolbar,.messages { display:none !important; }
  .app-shell,.main-column { display:block !important; }
  .content { max-width:none !important; padding:0 !important; }
  .report-preview-paper { max-width:none; border:0; box-shadow:none; padding:10mm; }
  body { background:#fff !important; }
}
