/* Charte SOTRELEC, relevée sur sotrelec.fr : rouge #A62929, anthracite,
   gris chauds. Typographie : Bricolage Grotesque, une seule famille à axes
   variables — coupe d'affichage resserrée pour les titres, coupe de texte
   pour le reste. Aucune police à chasse fixe.

   Les noms de jetons datent de la première charte et sont conservés pour ne
   pas réécrire toutes les règles : --navy porte désormais l'anthracite,
   --orange le rouge SOTRELEC, --mint sa teinte claire. Les couleurs d'état
   restent sémantiques : vert pour ce qui est fait, ambre — tiré du jaune de
   la charte — pour ce qui attend, rouge pour les erreurs. */
:root {
  --brand: #a62929;
  --brand-dark: #8a1f1f;
  --ink: #1f1f1f;
  --ink-soft: #5e5e5e;
  --navy: #262626;
  --navy-light: #3a3a3a;
  --paper: #f6f5f5;
  --surface: #ffffff;
  --line: #e3e1e1;
  --mint: #ead5d5;
  --green: #1e7a4e;
  --green-soft: #e6f2eb;
  --orange: #a62929;
  --orange-soft: #fbf0d5;
  --amber-ink: #7a5200;
  --red: #b3261e;
  --red-soft: #f6e9e9;
  --blue-soft: #eaeff5;
  --blue-ink: #2f5379;
  --shadow: 0 12px 32px rgba(31, 31, 31, 0.07);
  --radius: 12px;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --titre-largeur: 82%;
}

* {
  box-sizing: border-box;
}

/* Une regle de classe qui porte `display` l'emporte sur le `display: none`
   que le navigateur applique a [hidden] : sans ceci, masquer l'ecran de
   connexion en JavaScript ne le ferait pas disparaitre. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 20px 20px;
  color: white;
  background: var(--navy);
  z-index: 20;
}

.brand,
.profile,
.system-mini {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  padding: 0 8px 30px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  font-stretch: var(--titre-largeur);
  background: var(--brand);
  border-radius: 10px;
}

.brand strong,
.brand small,
.profile strong,
.profile small,
.system-mini strong,
.system-mini small {
  display: block;
}

.brand strong {
  letter-spacing: 0.08em;
}

.brand small,
.profile small,
.system-mini small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.main-nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.11);
}

.nav-item.active {
  box-shadow: inset 3px 0 var(--brand);
}

.nav-icon {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

.nav-count {
  min-width: 23px;
  padding: 2px 7px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  background: var(--mint);
  border-radius: 20px;
}

.nav-count.warning {
  color: #fff;
  background: var(--brand);
}

.sidebar-footer {
  display: grid;
  gap: 14px;
  margin-top: auto;
}

.system-mini {
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
}

.system-mini strong {
  font-size: 11px;
}

.status-dot,
.pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #3ba56e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(59, 165, 110, 0.16);
}

.status-dot.offline {
  background: #a9b0b8;
  box-shadow: 0 0 0 4px rgba(169, 176, 184, 0.14);
}

.profile {
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  background: var(--mint);
  border-radius: 50%;
}

.profile strong {
  font-size: 12px;
}

.profile button {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.7);
  border: 0;
  background: transparent;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 36px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  z-index: 15;
}

.environment {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.top-actions,
.global-search {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 12px;
}

.global-search {
  gap: 8px;
  width: min(330px, 30vw);
  padding: 9px 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.global-search input {
  width: 100%;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
}

.icon-button,
.menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.icon-button span {
  color: var(--orange);
}

.icon-button b {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: white;
  font-size: 9px;
  background: var(--red);
  border-radius: 50%;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 42px 38px 70px;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 700;
  font-stretch: var(--titre-largeur);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

h2 {
  margin-bottom: 18px;
  font-size: 19px;
  font-weight: 700;
  font-stretch: var(--titre-largeur);
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 10px;
  font-size: 14px;
}

.muted {
  color: var(--ink-soft);
}

.page-head .muted {
  margin: 0;
  font-size: 13px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: white;
  background: var(--navy);
}

.button.secondary {
  color: var(--navy);
  background: var(--surface);
  border-color: var(--line);
}

.button.orange {
  color: white;
  background: var(--orange);
}

.button.full {
  width: 100%;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 13px 17px;
  color: #62401f;
  font-size: 12px;
  background: var(--orange-soft);
  border: 1px solid #f3d6a8;
  border-radius: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card,
.panel,
.detail-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 31, 31, 0.09);
  box-shadow: var(--shadow);
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
  cursor: pointer;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.metric-value {
  display: block;
  margin: 12px 0 5px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.metric-trend {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 20px;
}

.panel {
  padding: 22px;
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
}

.text-button {
  padding: 0;
  color: var(--navy-light);
  font-size: 11px;
  font-weight: 800;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.priority-list {
  display: grid;
  gap: 10px;
}

.priority-row {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  cursor: pointer;
}

.priority-row:hover {
  border-color: #afbbc6;
}

.order-code,
.code {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.priority-row strong,
.priority-row small {
  display: block;
}

.priority-row strong {
  font-size: 12px;
}

.priority-row small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 20px;
}

.badge.manual {
  color: var(--amber-ink);
  background: var(--orange-soft);
}

.badge.ready,
.badge.planned {
  color: #146944;
  background: var(--green-soft);
}

.badge.error,
.badge.urgent {
  color: #8f3030;
  background: var(--red-soft);
}

.badge.new {
  color: var(--blue-ink);
  background: var(--blue-soft);
}

.service-list {
  display: grid;
  gap: 7px;
}

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.service-row:last-child {
  border: 0;
}

.service-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.service-state {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.service-state.offline {
  color: var(--ink-soft);
}

.activity-panel {
  grid-column: 1 / -1;
}

.compact-grid {
  margin: 0;
}

.history-stat {
  display: grid;
  gap: 5px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.history-stat span,
.history-stat small {
  color: var(--ink-soft);
  font-size: 10px;
}

.history-stat strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.connector-note {
  margin: 16px 0 0;
  padding-top: 14px;
  font-size: 10px;
  line-height: 1.6;
  border-top: 1px solid var(--line);
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 12px;
  height: 190px;
  padding-top: 20px;
  border-bottom: 1px solid var(--line);
}

.chart-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 8px;
  height: 100%;
  color: var(--ink-soft);
  font-size: 9px;
}

.bars {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 140px;
}

.bar {
  width: 12px;
  height: var(--height);
  background: var(--navy-light);
  border-radius: 5px 5px 0 0;
}

.bar.alt {
  background: var(--mint);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-button {
  padding: 8px 12px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  cursor: pointer;
}

.filter-button.active {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.table-panel {
  overflow: hidden;
  padding: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 15px 18px;
  color: var(--ink-soft);
  font-size: 9px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #fafafa;
}

.data-table td {
  padding: 17px 18px;
  font-size: 11px;
  border-top: 1px solid var(--line);
}

.data-table tbody tr {
  cursor: pointer;
  transition: 120ms ease;
}

.data-table tbody tr:hover {
  background: #f7faf8;
}

.cell-main,
.cell-sub {
  display: block;
}

.cell-main {
  font-weight: 700;
}

.cell-sub {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
}

.empty-state {
  padding: 50px;
  color: var(--ink-soft);
  text-align: center;
}

.detail-head {
  align-items: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.detail-stack {
  display: grid;
  gap: 18px;
}

.detail-card {
  padding: 24px;
  border-radius: var(--radius);
}

.detail-section + .detail-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

.info-item label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.info-item strong {
  display: block;
  font-size: 12px;
  line-height: 1.5;
}

.phone-highlight {
  color: var(--green);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-size: 15px !important;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  padding: 11px 4px;
  margin-right: 18px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
}

.tab-button.active {
  color: var(--navy);
  border-bottom-color: var(--orange);
}

.mail-preview,
.technical-preview {
  padding: 18px;
  font-size: 11px;
  line-height: 1.7;
  background: #faf8f8;
  border-radius: 12px;
}

.technical-preview {
  overflow-x: auto;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  white-space: pre-wrap;
}

.action-card {
  position: sticky;
  top: 94px;
  border-top: 5px solid var(--orange);
}

.action-card .alert-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  color: var(--amber-ink);
  font-size: 20px;
  background: var(--orange-soft);
  border-radius: 12px;
}

.action-card p {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.action-buttons {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding-bottom: 20px;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 0;
  left: 7px;
  width: 1px;
  background: var(--line);
}

.timeline-dot {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  background: var(--green);
  border: 4px solid var(--green-soft);
  border-radius: 50%;
}

.timeline-dot.pending {
  background: var(--orange);
  border-color: var(--orange-soft);
}

.timeline-item strong,
.timeline-item small {
  display: block;
}

.timeline-item strong {
  font-size: 10px;
}

.timeline-item small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 9px;
}

.drawer {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  background: rgba(20, 20, 20, 0.45);
  z-index: 50;
}

.drawer[hidden] {
  display: none;
}

.drawer-backdrop {
  cursor: pointer;
}

.drawer-panel {
  overflow-y: auto;
  padding: 32px;
  background: var(--surface);
  box-shadow: -18px 0 50px rgba(20, 20, 20, 0.2);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  cursor: pointer;
}

.form-field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.form-field label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: white;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--navy-light);
}

.candidate-card {
  margin: 20px 0;
  padding: 16px;
  border: 1px dashed #c6a474;
  border-radius: 12px;
  background: #fffaf0;
}

.candidate-card p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.live-banner {
  color: #174d38;
  background: #edf8f1;
  border-color: #bfe4d0;
}

.upload-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding: 30px;
  background: var(--surface);
  border: 2px dashed #d6d1d1;
  border-radius: var(--radius);
  transition: 160ms ease;
}

.upload-card.compact {
  padding: 22px 26px;
}

.upload-card.dragging {
  background: #e6f5ec;
  border-color: var(--green);
  transform: translateY(-2px);
}

.upload-card h2,
.upload-card p {
  margin-bottom: 5px;
}

.upload-card p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 11px;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 66px;
  color: var(--brand);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  background: var(--red-soft);
  border-radius: 10px;
}

.compact-empty {
  padding: 28px;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.edit-grid label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.edit-grid label.wide {
  grid-column: 1 / -1;
}

.edit-grid input {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.candidate-stack,
.message-list,
.slot-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.candidate-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.slot-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.slot-row.selected {
  background: var(--green-soft);
  border-color: var(--green);
}

.slot-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: white;
  font-weight: 800;
  background: var(--brand);
  border-radius: 50%;
}

.slot-row strong,
.slot-row small {
  display: block;
}

.slot-row small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 9px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.message {
  max-width: 82%;
  padding: 13px 15px;
  background: #f4f4f4;
  border-radius: 14px 14px 14px 4px;
}

.message.outbound {
  margin-left: auto;
  color: white;
  background: var(--navy-light);
  border-radius: 14px 14px 4px 14px;
}

.message p {
  margin: 6px 0;
  font-size: 11px;
  white-space: pre-line;
}

.message small,
.small-note {
  font-size: 9px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.toast.error {
  background: var(--red);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 380px;
  padding: 14px 18px;
  color: white;
  font-size: 11px;
  font-weight: 700;
  background: var(--navy);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 180ms ease;
  z-index: 80;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1050px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .action-card {
    position: static;
  }
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-105%);
    width: 260px;
    transition: 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .topbar {
    padding: 0 18px;
  }

  .environment {
    display: none;
  }

  .global-search {
    width: min(62vw, 330px);
  }

  .content {
    padding: 28px 18px 55px;
  }

  .page-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .data-table th:nth-child(3),
  .data-table td:nth-child(3),
  .data-table th:nth-child(4),
  .data-table td:nth-child(4) {
    display: none;
  }

  .upload-card {
    grid-template-columns: 1fr;
  }

  .edit-grid {
    grid-template-columns: 1fr;
  }

  .edit-grid label.wide {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .metric-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .top-actions {
    flex: 1;
  }

  .global-search {
    width: 100%;
  }

  .icon-button {
    display: none;
  }

  .priority-row {
    grid-template-columns: 66px 1fr;
  }

  .priority-row .badge {
    grid-column: 2;
  }

  .drawer {
    grid-template-columns: 1fr;
  }

  .drawer-backdrop {
    display: none;
  }
}

/* Echeance : le retard doit se voir sans avoir a lire la date. */
.info-item.overdue strong {
  color: var(--red);
}

.info-item.overdue .cell-sub {
  color: var(--red);
  font-weight: 700;
}

.info-item.due-soon strong {
  color: var(--orange);
}

.info-item.due-soon .cell-sub {
  color: var(--orange);
  font-weight: 700;
}

/* Reprise en main manuelle dans Praxedo, en attendant l'ecriture automatique. */
.candidate-card.todo {
  border: 1px solid var(--red);
  background: var(--red-soft);
}

.candidate-card.done {
  border: 1px solid var(--green);
  background: var(--green-soft);
}

.candidate-card.todo .button {
  margin-top: 12px;
}

/* Justification du choix des creneaux, destinee a l'operateur. */
.rationale {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 2px solid var(--ink-soft);
  background: #f7f8fa;
  border-radius: 0 8px 8px 0;
}

.rationale strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rationale p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink);
}

.ia-tag {
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--blue-ink);
  background: var(--blue-soft);
  border-radius: 20px;
}

/* Distinguer les creneaux reellement envoyes au locataire des autres. */
.slot-row.unoffered {
  opacity: 0.55;
}

.slot-row.unoffered .slot-index {
  color: var(--ink-soft);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Relevage automatique des reponses : signaler que l'attente est prise en charge. */
.small-note.auto-sync {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}

.small-note.auto-sync::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pouls 2s ease-in-out infinite;
}

@keyframes pouls {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .small-note.auto-sync::before { animation: none; }
}

/* Redirection des SMS vers un numero de test : doit sauter aux yeux. */
.small-note.redirection {
  padding: 8px 12px;
  color: var(--amber-ink);
  background: var(--orange-soft);
  border-radius: 8px;
  font-weight: 600;
}

/* ---------- Retours visuels pendant les actions longues ---------- */

.spinner {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.85;
  animation: rotation 720ms linear infinite;
  flex: none;
}

@keyframes rotation {
  to { transform: rotate(360deg); }
}

.button.is-busy {
  cursor: progress;
  opacity: 0.9;
}

.button.is-busy:hover {
  transform: none;
}

/* Silhouette de chargement : donner la forme de ce qui arrive. */
.skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton-line {
  height: 13px;
  border-radius: 7px;
  background: linear-gradient(90deg, #efeded 25%, #e3e1e1 37%, #efeded 63%);
  background-size: 400% 100%;
  animation: balayage 1400ms ease infinite;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.skeleton-card {
  height: 84px;
  border-radius: 14px;
  background: linear-gradient(90deg, #efeded 25%, #e3e1e1 37%, #efeded 63%);
  background-size: 400% 100%;
  animation: balayage 1400ms ease infinite;
}

@keyframes balayage {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Apparition du contenu : eviter le changement sec entre deux vues. */
#appContent > * {
  animation: apparition 220ms ease both;
}

@keyframes apparition {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Les creneaux arrivent en cascade : on lit d'abord le premier. */
.slot-row {
  animation: apparition 260ms ease both;
}

.slot-row:nth-child(2) { animation-delay: 45ms; }
.slot-row:nth-child(3) { animation-delay: 90ms; }
.slot-row:nth-child(4) { animation-delay: 135ms; }
.slot-row:nth-child(n+5) { animation-delay: 175ms; }

@media (prefers-reduced-motion: reduce) {
  .spinner,
  .skeleton-line,
  .skeleton-card { animation: none; }
  #appContent > *,
  .slot-row { animation: none; }
}

/* --------------------------------------------------------------------
   Écran de connexion — variante sobre : une colonne, la marque en tête,
   le formulaire sans cadre. Aucun décor.
   -------------------------------------------------------------------- */

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 40px 56px;
  overflow-y: auto;
  background: var(--paper);
}

.auth-haut strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  font-stretch: var(--titre-largeur);
  letter-spacing: 0.04em;
  line-height: 1;
}

.auth-haut small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.auth-zone {
  display: grid;
  place-items: center;
  padding-block: 32px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  animation: auth-entree 0.3s ease both;
}

@keyframes auth-entree {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 700;
  font-stretch: var(--titre-largeur);
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--ink);
}

.auth-card .auth-intro {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

.auth-field { margin-bottom: 18px; }

.auth-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.auth-saisie { position: relative; }

.auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid #d6d1d1;
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-saisie input { padding-right: 88px; }

.auth-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(166, 41, 41, 0.12);
}

/* Afficher le mot de passe saisi, pour le vérifier avant d'envoyer. */
.auth-voir {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auth-voir:hover { color: var(--ink); background: var(--paper); }
.auth-voir:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.auth-card .button.full {
  width: 100%;
  height: 50px;
  margin-top: 6px;
  font-size: 15px;
}

.auth-message {
  margin: 0 0 20px;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-message.erreur { background: var(--red-soft); color: var(--red); }
.auth-message.succes { background: var(--green-soft); color: var(--green); }
.auth-message.info { background: var(--blue-soft); color: var(--blue-ink); }

.auth-liens { margin-top: 18px; }

.auth-liens button {
  padding: 0;
  border: none;
  background: none;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-liens button:hover { color: var(--brand-dark); }

.auth-aide {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.auth-aide b { color: var(--ink); font-weight: 600; }

@media (max-width: 600px) {
  .auth-screen { padding: 24px 20px; }
  .auth-card h1 { font-size: 32px; }
}

.profile .deconnexion {
  margin-left: auto;
  border: none;
  background: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 1rem;
}

.profile .deconnexion:hover { opacity: 1; }

/* --------------------------------------------------------------------
   Choix manuel des créneaux
   -------------------------------------------------------------------- */

button.slot-row {
  width: 100%;
  font: inherit;
  text-align: left;
  color: inherit;
}

.slot-row.choisissable {
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}

.slot-row.choisissable:hover:not([disabled]) {
  border-color: var(--green);
  background: var(--green-soft);
}

.slot-row.choisissable:active:not([disabled]) { transform: translateY(1px); }

.slot-row.choisissable:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.slot-row.choisissable[disabled] {
  cursor: default;
  opacity: .55;
}

.choix-barre {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.choix-barre .small-note { margin: 0; flex: 1 1 14rem; }

.choix-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------
   Aperçu de l'intervention Praxedo
   -------------------------------------------------------------------- */

/* La garantie « rien n'est envoyé » est ce qu'il faut lire en premier sur
   cette carte : elle ne peut pas être la ligne la plus discrète. */
.avertissement-lecture {
  margin: 0 0 18px;
  padding: 12px 15px;
  border-left: 3px solid var(--green);
  border-radius: 0 10px 10px 0;
  background: var(--green-soft);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.avertissement-lecture strong {
  color: var(--green);
}

/* La requête ne tient pas dans la colonne d'action : le libellé y tombe
   en colonne d'un caractère. Elle occupe donc les deux colonnes. */
.detail-card.pleine-largeur {
  grid-column: 1 / -1;
}

.apercu {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.apercu-ligne {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.apercu-ligne:last-child { border-bottom: none; }
.apercu-ligne:nth-child(odd) { background: var(--paper); }

.apercu-ligne span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  align-self: center;
}

.apercu-ligne strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.apercu-ligne .doute {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.apercu-brut { margin-top: 14px; }

.apercu-brut summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
}

.apercu-brut summary:hover { color: var(--navy); }

.apercu-brut pre {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--navy);
  color: #ededed;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-size: 0.76rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* ------------------------------------------------------------------
   V1.1 — file de travail, fiche à côté du bon de commande, fenêtres
   de relecture (specs.md, 4.12). Mêmes jetons que la charte.
   ------------------------------------------------------------------ */

.nav-item {
  grid-template-columns: 1fr auto;
}

.nav-item .status-dot {
  justify-self: center;
}

.status-dot.alerte {
  background: #e0605a;
  box-shadow: 0 0 0 4px rgba(224, 96, 90, 0.2);
}

.topbar {
  gap: 14px;
}

.topbar .global-search {
  flex: 1;
  width: auto;
  max-width: 440px;
  margin-right: auto;
}

.global-search kbd {
  padding: 0 6px;
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.upload-card.compact {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 22px;
  border-style: dashed;
}

.upload-card.compact .upload-icon {
  width: 40px;
  height: 46px;
  font-size: 10px;
}

.upload-card.compact p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.upload-card.compact p strong {
  color: var(--ink);
}

/* File de travail */

.file-travail {
  display: grid;
  grid-template-columns: repeat(var(--colonnes, 5), minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.colonne {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.colonne header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

.colonne.operateur header {
  border-bottom-color: var(--brand);
}

.colonne header strong,
.colonne header small {
  display: block;
}

.colonne header strong {
  font-size: 14px;
}

.colonne header small {
  color: var(--ink-soft);
  font-size: 11px;
}

.colonne header b {
  font-size: 22px;
  font-stretch: var(--titre-largeur);
  font-variant-numeric: tabular-nums;
}

.colonne-vide {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.colonne-pied {
  justify-self: center;
  color: var(--ink-soft);
  font-weight: 600;
}

.carte {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 120ms ease;
}

.carte:hover,
.carte:focus-visible {
  border-color: var(--ink-soft);
}

.carte strong {
  font-size: 13px;
  line-height: 1.3;
}

.carte small {
  color: var(--ink-soft);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  padding: 2px 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--paper);
  border-radius: 6px;
}

.chip.late {
  color: var(--red);
  background: var(--red-soft);
}

.chip.soon {
  color: var(--amber-ink);
  background: var(--orange-soft);
}

.chip.ok {
  color: var(--green);
  background: var(--green-soft);
}

.carte-action {
  margin-top: 2px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

/* Fil d'étapes */

.fil-etapes {
  display: flex;
  margin: 0 0 18px;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fil-etapes li {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
  border-right: 1px solid var(--line);
}

.fil-etapes li:last-child {
  border-right: 0;
}

.fil-etapes i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  border: 1.5px solid var(--line);
  border-radius: 50%;
}

.fil-etapes .fait {
  color: var(--ink);
}

.fil-etapes .fait i {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.fil-etapes .encours {
  color: var(--ink);
  font-weight: 700;
  background: var(--mint);
}

.fil-etapes .encours i {
  color: var(--brand);
  border-color: var(--brand);
}

.fil-etapes .echec {
  color: var(--red);
  font-weight: 700;
  background: var(--red-soft);
}

.fil-etapes .echec i {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

/* Fiche : PDF | champs | action, puis la suite sous les deux premiers */

.fiche {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.fiche .action-card {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: start;
  top: 90px;
}

.fiche-suite {
  display: grid;
  grid-column: 1 / 3;
  gap: 18px;
  min-width: 0;
}

.fiche .detail-card {
  min-width: 0;
  padding: 20px;
}

.fiche-pdf {
  display: grid;
  gap: 12px;
}

.fiche-pdf .panel-head,
.fiche-champs .panel-head {
  margin-bottom: 0;
}

.fiche-pdf .panel-head {
  flex-wrap: wrap;
  row-gap: 6px;
}

.fiche-pdf h2,
.liens-pdf {
  white-space: nowrap;
}

.liens-pdf {
  display: flex;
  gap: 14px;
}

#appContent > .stable {
  animation: none;
}

.pdf-vue {
  width: 100%;
  height: 620px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pdf-mobile {
  display: none;
}

.fiche-champs .panel-head {
  margin-bottom: 10px;
}

.champs {
  display: grid;
}

.champ {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.champ-libelle {
  color: var(--ink-soft);
  font-size: 12px;
}

.champ-valeur {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.champ-valeur small {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 400;
}

.champ-valeur.alerte,
.champ-valeur.alerte small {
  color: var(--red);
}

/* Le champ se lit comme un texte ; il ne montre son cadre qu'au survol ou
   à la saisie. */
.champ input,
.champ select {
  width: 100%;
  padding: 6px 8px;
  margin-left: -9px;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
}

.champ input:hover,
.champ select:hover {
  border-color: var(--line);
}

.champ input:focus,
.champ select:focus {
  outline: 0;
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(166, 41, 41, 0.12);
}

.champ.manque {
  margin: 2px -8px;
  padding: 6px 8px;
  background: var(--orange-soft);
  border-bottom-color: transparent;
  border-radius: 8px;
}

.champ.manque input,
.champ.manque select {
  background: var(--surface);
  border-color: rgba(122, 82, 0, 0.35);
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.suggestion {
  padding: 3px 8px;
  text-align: left;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.suggestion em {
  color: var(--ink-soft);
  font-style: normal;
}

.barre-enregistrer {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  color: #fff;
  font-size: 12px;
  background: var(--navy);
  border-radius: 10px;
}

.barre-enregistrer span {
  margin-right: auto;
}

.barre-enregistrer .button.primary {
  background: var(--brand);
}

.action-card h2 {
  margin: 4px 0 8px;
}

.action-card .raison {
  padding: 9px 11px;
  color: var(--amber-ink);
  background: var(--orange-soft);
  border-radius: 8px;
}

.action-card .raison.fait {
  color: var(--green);
  background: var(--green-soft);
}

.action-card .manquants {
  font-weight: 600;
}

.action-card .button.full {
  margin-top: 14px;
}

.sous-action {
  margin-top: 6px;
  text-align: center;
}

.historique summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.historique summary::-webkit-details-marker {
  display: none;
}

.historique summary::after {
  margin-left: auto;
  color: var(--ink-soft);
  content: "Afficher";
  font-size: 11px;
  font-weight: 700;
}

.historique[open] summary::after {
  content: "Masquer";
}

.historique summary h2 {
  margin: 0;
}

.historique .timeline {
  margin-top: 16px;
}

/* Fenêtres */

.modale-fond {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(31, 31, 31, 0.45);
}

.modale {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  padding: 24px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
}

.modale.large {
  width: min(640px, 100%);
}

.modale h2 {
  margin: 0;
  font-size: 22px;
}

.modale > .text-button {
  justify-self: start;
}

.creneaux-sms {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.creneaux-sms li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.creneaux-sms b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
}

.creneaux-sms small {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 400;
}

.destinataire {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.destinataire b {
  color: var(--ink);
}

.bulle-sms {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
}

.note-envoi {
  margin: 0;
  padding: 9px 11px;
  color: var(--blue-ink);
  font-size: 12px;
  background: var(--blue-soft);
  border-radius: 8px;
}

.note-envoi.reel {
  color: var(--red);
  font-weight: 600;
  background: var(--red-soft);
}

.modale-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.modale-actions .text-button {
  margin-right: auto;
}

.a-copier {
  display: grid;
}

.a-copier div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.a-copier span,
.a-copier small {
  color: var(--ink-soft);
  font-size: 12px;
}

.a-copier b {
  overflow-wrap: anywhere;
}

.button.petit {
  padding: 5px 10px;
  font-size: 11px;
}

.button.copie {
  color: var(--green);
  border-color: var(--green-soft);
  background: var(--green-soft);
}

@media (max-width: 1280px) {
  .file-travail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fiche {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .fiche .action-card {
    position: sticky;
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .fiche-suite {
    grid-column: 1;
  }

  .pdf-vue {
    height: 480px;
  }
}

@media (max-width: 900px) {
  .file-travail {
    grid-template-columns: 1fr;
  }

  .fiche {
    grid-template-columns: 1fr;
  }

  .fiche .action-card {
    position: static;
    grid-column: 1;
    grid-row: 1;
  }

  .fiche-pdf {
    grid-row: 4;
  }

  .fiche-suite {
    grid-column: 1;
  }

  /* Un PDF dans un cadre est illisible sur téléphone : le lien suffit. */
  .pdf-vue {
    display: none;
  }

  .pdf-mobile {
    display: block;
  }

  .upload-card.compact {
    grid-template-columns: 1fr;
  }

  .upload-card.compact .upload-icon {
    display: none;
  }

  .topbar > .button {
    padding-inline: 12px;
  }

  .global-search kbd {
    display: none;
  }
}

a.button {
  text-decoration: none;
}

.action-card .small-note {
  margin-top: 14px;
}

/* Profil et page « Mon compte » */

.profile {
  padding-top: 0;
  border-top: 0;
}

.profil-bouton {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.profil-bouton:hover {
  background: rgba(255, 255, 255, 0.12);
}

.profil-bouton strong,
.profil-bouton small {
  display: block;
}

.profil-bouton strong {
  font-size: 12px;
}

.profil-bouton small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.profil-bouton .chevron {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.55);
}

.avatar {
  position: relative;
  flex: none;
}

.avatar.alerte::after {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  content: "";
  background: #e0605a;
  border: 2px solid var(--navy);
  border-radius: 50%;
}

.alerte-panne {
  margin: 0 0 14px;
  padding: 11px 14px;
  color: var(--red);
  font-size: 13px;
  background: var(--red-soft);
  border-radius: 10px;
}

.compte {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.compte .detail-card {
  display: grid;
  gap: 14px;
}

.compte h2 {
  margin: 0;
}

.compte-titre {
  margin-top: 8px !important;
}

.compte-form {
  display: grid;
  gap: 12px;
}

.compte-form label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.compte-form input {
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.compte-form input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(166, 41, 41, 0.12);
}

.compte-form small {
  font-size: 11px;
}

.compte-form .button {
  justify-self: start;
}

.champ-valeur.bon {
  color: var(--green);
}

.champ-valeur.attention {
  color: var(--amber-ink);
}

.compte .champ {
  grid-template-columns: 110px minmax(0, 1fr);
}

.compte-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 900px) {
  .compte {
    grid-template-columns: 1fr;
  }
}

/* Réponse libre du locataire */

.reponse-carte {
  display: block;
  padding: 6px 8px;
  color: var(--ink);
  font-size: 12px;
  font-style: italic;
  background: var(--orange-soft);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.reponse-locataire {
  margin: 4px 0 0;
  padding: 10px 12px;
  font-size: 14px;
  font-style: italic;
  background: var(--paper);
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  overflow-wrap: anywhere;
}

.action-card .button.secondary.full {
  margin-top: 8px;
}

/* Numéro de test, dans Mon compte (exploitant seulement) */

.numero-test {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.numero-test h3 {
  margin: 0;
  font-size: 16px;
}

.numero-test p {
  margin: 0;
  font-size: 12px;
}

/* Réponses à attribuer : un numéro partagé par plusieurs dossiers */

.a-attribuer {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--orange-soft);
  border-radius: 12px;
}

.a-attribuer header {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
}

.a-attribuer header strong {
  font-size: 14px;
}

.a-attribuer header span {
  color: var(--amber-ink);
  font-size: 12px;
}

.reponse-a-attribuer {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 10px;
}

.reponse-a-attribuer q {
  font-size: 13px;
  font-style: italic;
}

.reponse-a-attribuer small {
  color: var(--ink-soft);
  font-size: 11px;
}

.choix-dossiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===================================================================
   V2 (docs/v2-specification-detaillee.md, §12) : demi-journées, tours,
   « À appeler », création et reprise Praxedo, page Techniciens.
   =================================================================== */

.chip.pre { background: var(--blue-soft); color: var(--blue-ink); }
.order-code .chip.pre { margin-left: 4px; vertical-align: 1px; }

.raison-appel {
  justify-self: start;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 6px;
  padding: 2px 7px;
}
.raison-appel.neutre { color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); }

.bandeau-info {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 13px;
}
.bandeau-info span { opacity: 0.8; }
.bandeau-info.neutre { background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }

.grille-defile { overflow-x: auto; }
.grille-demi-journees {
  width: 100%;
  min-width: 520px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 6px;
  font-size: 13px;
}
.grille-demi-journees col.col-jour { width: 120px; }
.grille-demi-journees thead th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 0 4px; }
.grille-demi-journees tbody th { text-align: left; font-weight: 600; white-space: nowrap; padding-right: 4px; }
.cellule {
  width: 100%;
  min-height: 48px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.cellule strong { display: block; font-size: 13px; }
.cellule small { display: block; font-size: 11px; color: var(--ink-soft); }
.cellule .rang {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}
.cellule.complet { background: transparent; border-style: dashed; color: var(--ink-soft); align-items: center; }
.cellule.complet .rang { visibility: hidden; }
button.cellule.choisissable { cursor: pointer; }
button.cellule.choisissable:hover:not(:disabled) { border-color: var(--brand); }
button.cellule:disabled { cursor: not-allowed; }
.cellule.retenue { border-color: var(--brand); background: var(--mint); }
.cellule.retenue .rang { background: var(--brand); border-color: var(--brand); color: #fff; }
.cellule.confirmee { border-color: var(--green); background: var(--green-soft); }
.cellule .proche {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--amber-ink);
  background: var(--orange-soft);
  border-radius: 6px;
  padding: 1px 6px;
}

.tours { display: grid; gap: 10px; }
.tour { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.tour header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tour header span { font-size: 12px; color: var(--ink-soft); }
.tour.passe { background: var(--paper); }
.tour.passe .puce { text-decoration: line-through; color: var(--ink-soft); }
.tour.suivante { border-style: dashed; background: transparent; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce { font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; background: var(--surface); }

.compteur { display: flex; gap: 6px; margin: 4px 0 10px; }
.compteur i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.compteur i.on { background: var(--brand); }

.planifier { display: grid; gap: 8px; }
.planifier p { margin: 0; font-size: 14px; }

.alerte-creation {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
}

.lignes-creation { display: grid; margin: 12px 0; }
.ligne-creation {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  align-items: baseline;
}
.ligne-creation:last-child { border-bottom: 0; }
.ligne-creation > span { color: var(--ink-soft); font-size: 12px; }
.ligne-creation small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 12px; }
.ligne-creation select { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; }
.case-creation { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0 12px; }

.reprise-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
.reprise-form label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); flex: 1; min-width: 180px; }
.reprise-form input { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }

.a-confirmer .button { white-space: nowrap; }
.a-confirmer {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--amber-ink);
  background: var(--orange-soft);
  border-radius: 6px;
  padding: 2px 6px;
}

.fiche-praxedo { display: grid; gap: 10px; align-content: start; }
.description-praxedo {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--line);
  background: var(--paper);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  white-space: pre-wrap;
}

.cartes-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
.carte-categorie { display: grid; gap: 10px; align-content: start; }
.carte-categorie header { display: grid; gap: 2px; }
.carte-categorie header h2 { margin: 0; }
.carte-categorie header small { color: var(--ink-soft); font-size: 12px; }
.technicien-designe { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 13px; }
.technicien-designe small { display: block; color: var(--ink-soft); font-size: 11px; }
.ajout-technicien { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px dashed var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-soft); }
.nom-technicien { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); width: 100%; max-width: 220px; }
.techniciens-anciens { margin-top: 12px; }
.techniciens-anciens summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; }

@media (max-width: 760px) {
  .ligne-creation { grid-template-columns: 1fr; gap: 2px; }
  .topbar [data-action="ouvrir-reprise-modale"] { display: none; }
}

/* Pré-planifiées (docs/preplanifiees-specification-detaillee.md, §8). */
.pp-toolbar { flex-wrap: wrap; align-items: end; }
.filter-button b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.filter-button.alerte:not(.active) { color: var(--red); border-color: var(--red-soft); }
.selects-pp { display: flex; flex-wrap: wrap; gap: 10px; }
.select-pp { display: grid; gap: 3px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.select-pp select { min-width: 140px; padding: 6px 10px; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.table-pp { min-width: 860px; }
.table-pp td { vertical-align: top; font-variant-numeric: tabular-nums; }
.table-pp td small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 12px; }
.table-pp tr.choisie td { background: var(--mint); }
.table-pp tr.cliquable { cursor: pointer; }
.table-pp tr.cliquable:hover td { background: var(--paper); }
.table-pp input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }
.bandeau-pp { display: grid; gap: 8px; margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.bandeau-pp p { margin: 0; }
.bandeau-pp.bleu { color: var(--blue-ink); background: var(--blue-soft); }
.bandeau-pp.ambre { color: var(--amber-ink); background: var(--orange-soft); }
.bandeau-pp.rouge { color: var(--red); background: var(--red-soft); }
.bandeau-pp.clos { color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); }
.bandeau-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bandeau-pp .candidate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
@media (max-width: 760px) {
  .pp-toolbar { align-items: stretch; }
  .selects-pp, .select-pp, .select-pp select { width: 100%; }
}

/* Refonte des pages Pré-planifiées et Techniciens (9 octobre 2026). */
.fraicheur { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; color: var(--ink-soft); font-size: 13px; }
.point-vert { display: inline-block; width: 8px; height: 8px; margin-right: 2px; border-radius: 50%; background: var(--green); }
.tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tuile { display: grid; gap: 2px; padding: 14px 16px; text-align: left; font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
button.tuile { cursor: pointer; }
.tuile b { font-size: 30px; font-weight: 800; font-stretch: 80%; line-height: 1; font-variant-numeric: tabular-nums; }
.tuile span { color: var(--ink-soft); font-size: 13px; }
.tuile.rouge b { color: var(--red); }
.tuile.ambre b { color: var(--amber-ink); }
.tuile.active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.onglets { display: flex; gap: 22px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.onglets button { padding: 10px 0; color: var(--ink-soft); font: inherit; font-size: 15px; border: 0; background: none; cursor: pointer; }
.onglets button.active { color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--brand); }
.onglets em { margin-left: 4px; color: var(--ink-soft); font-size: 12px; font-style: normal; }
.outils-pp { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; }
.recherche-pp { flex: 1 1 240px; min-width: 0; }
.recherche-pp input { width: 100%; padding: 9px 12px; color: var(--ink); font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.table-pp .groupe-pp td { padding: 8px 12px; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--paper); }
.table-pp .groupe-pp.rouge td { color: var(--red); background: var(--red-soft); }
.urgence { font-weight: 700; white-space: nowrap; }
.urgence.rouge { color: var(--red); }
.mobile-ok { color: var(--green); font-weight: 600; }
.cellule-action { text-align: right; white-space: nowrap; }
.lien-dossier { color: var(--brand); font-weight: 700; font-size: 13px; }
.cartes-pp { display: none; }
.carte-pp { display: grid; gap: 6px; width: 100%; padding: 12px 14px; color: var(--ink); font: inherit; font-size: 14px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.carte-pp .haut { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.carte-pp small { color: var(--ink-soft); font-size: 12px; }
.carte-pp .button { justify-self: start; }
.barre-selection { position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 16px; color: #f2efef; border-radius: var(--radius); background: var(--navy); box-shadow: var(--shadow); }
.barre-selection p { margin: 0; font-size: 14px; }
.barre-selection .button.secondary { color: var(--ink); }
.bandeau-pp.vert { color: var(--green); background: var(--green-soft); }
.regle { margin-bottom: 14px; }
.matrice { min-width: 760px; }
.matrice th.centre, .matrice td.centre { width: 140px; text-align: center; }
.matrice th small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.matrice input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.matrice input[type="checkbox"]:disabled { cursor: default; }
.nom-tech { font-weight: 600; }
.crayon { margin-left: 6px; padding: 2px 6px; color: var(--ink-soft); font-size: 13px; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.crayon:hover, .crayon:focus-visible { color: var(--ink); background: var(--paper); }
@media (max-width: 760px) {
  .tuiles { grid-template-columns: 1fr; }
  .fraicheur { justify-content: flex-start; }
  .table-seule { display: none; }
  .cartes-pp { display: grid; gap: 10px; padding: 12px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.barre-selection .button.primary { color: #fff; border-color: var(--brand); background: var(--brand); }

/* Démo « Découvrir la plateforme ». */
.nav-decouvrir { margin-top: 10px; }
.decouvrir { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.decouvrir-etapes { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.decouvrir-etapes button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; color: var(--ink-soft); font: inherit; font-size: 14px; text-align: left; border: 0; border-radius: 9px; background: none; cursor: pointer; }
.decouvrir-etapes i { display: grid; flex: none; place-items: center; width: 24px; height: 24px; font-size: 12px; font-style: normal; font-weight: 700; border: 1.5px solid var(--line); border-radius: 50%; }
.decouvrir-etapes button.faite i { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.decouvrir-etapes button.active { color: var(--ink); font-weight: 700; background: var(--mint); }
.decouvrir-etapes button.active i { color: #fff; border-color: var(--brand); background: var(--brand); }
.decouvrir-scene { display: grid; gap: 14px; min-width: 0; }
.decouvrir-scene h2 { margin: 0; font-size: 28px; }
.decouvrir-texte { max-width: 68ch; margin: 0; font-size: 16px; line-height: 1.55; }
.decouvrir-note { margin: 0; padding: 8px 12px; color: var(--blue-ink); font-size: 14px; border-radius: 8px; background: var(--blue-soft); }
.decouvrir-illustration { display: grid; place-items: center; min-height: 240px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.decouvrir-image { display: block; max-width: 100%; max-height: 520px; height: auto; border-radius: 8px; box-shadow: var(--shadow); }
.decouvrir-scene footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.decouvrir-progression { display: flex; gap: 5px; }
.decouvrir-progression i { width: 22px; height: 5px; border-radius: 99px; background: var(--line); }
.decouvrir-progression i.on { background: var(--brand); }
.decouvrir-telephone { display: grid; gap: 10px; width: min(340px, 100%); padding: 18px 14px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); }
.decouvrir-expediteur { margin: 0; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-align: center; }
.decouvrir-bulle { justify-self: start; max-width: 92%; margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.45; border-radius: 16px 16px 16px 4px; background: var(--paper); }
.decouvrir-bulle.reponse { justify-self: end; color: #fff; border-radius: 16px 16px 4px 16px; background: var(--brand); }
@media (max-width: 860px) {
  .decouvrir { grid-template-columns: 1fr; }
  .decouvrir-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Comptes et numéro de test depuis Mon compte (maquette du 9 octobre 2026) */

.tete-etat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.chip.reel { background: var(--red-soft); color: var(--red); }

.etat-sms {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber-ink);
  border-radius: 12px;
}

.etat-sms.reel { border-left-color: var(--red); }

.etat-sms p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.etat-sms > .button { justify-self: start; }

.confirmer-levee {
  display: grid;
  gap: 8px;
  padding: 12px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 10px;
}

.confirmer-levee p { color: var(--red); }

.case {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.case input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.case.au-locataire {
  padding: 10px 12px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 8px;
}

.compte .comptes {
  grid-column: 1 / -1;
}

.comptes-tete {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pastille {
  display: inline-flex;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 99px;
}

.pastille.vert { color: var(--green); background: var(--green-soft); }
.pastille.ambre { color: var(--amber-ink); background: var(--orange-soft); }
.pastille.rouge { color: var(--red); background: var(--red-soft); }
.pastille.gris { color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); }

.nouveau-compte {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
}

.lien-acces {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  color: var(--green);
  font-size: 13px;
  background: var(--green-soft);
  border-radius: 10px;
}

.lien-acces p { margin: 0; }

.lien-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lien-ligne code {
  min-width: 0;
  padding: 4px 7px;
  color: var(--ink);
  font: 12px ui-monospace, Menlo, monospace;
  overflow-wrap: anywhere;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.table-defilante {
  overflow-x: auto;
}

.table-comptes {
  width: 100%;
  min-width: 680px;
  font-size: 13px;
  border-collapse: collapse;
}

.table-comptes th {
  padding: 9px 10px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.table-comptes td {
  padding: 9px 10px;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line);
}

.table-comptes tr:last-child td { border-bottom: 0; }

.table-comptes td small {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
}

.table-comptes .courriel { overflow-wrap: anywhere; }

.actions-compte {
  white-space: nowrap;
  text-align: right;
}

.actions-compte .button + .button { margin-left: 6px; }

@media (max-width: 900px) {
  .nouveau-compte { grid-template-columns: 1fr; }
}

/* Revérification du créneau (specs.md 8.29) */

.verif {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  border-radius: 9px;
}

.verif b { font-size: 13px; }
.verif .button { margin-top: 6px; }
.verif.v { color: var(--green); background: var(--green-soft); }
.verif.a { color: var(--amber-ink); background: var(--orange-soft); }
.verif.r { color: var(--red); background: var(--red-soft); }

/* Ce qui attend quelqu'un (specs.md 8.28) */

.attente-carte {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.attente-carte.retard,
.attente-fiche.retard {
  color: var(--red);
  font-weight: 700;
}

.carte.en-retard {
  box-shadow: inset 4px 0 0 var(--red);
}

.attente-fiche {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.nav-count.retard {
  position: relative;
}

.nav-count.retard::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  background: #ff5a4f;
  border: 2px solid var(--navy);
  border-radius: 50%;
}

.pile-avis {
  position: fixed;
  right: 24px;
  bottom: 84px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(340px, calc(100vw - 32px));
}

.pile-avis:empty { display: none; }

.avis {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber-ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.avis.rouge { border-left-color: var(--red); }

.avis-haut {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.avis-haut b { font-size: 14px; line-height: 1.3; }

.avis-fermer {
  flex: none;
  padding: 0 2px;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  background: none;
  border: 0;
  cursor: pointer;
}

.avis-detail { color: var(--ink-soft); font-size: 12.5px; }

.avis-bas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.avis-bas small { color: var(--ink-soft); font-size: 11.5px; }

.notifications-compte {
  display: grid;
  gap: 10px;
}

.notifications-compte p { margin: 0; font-size: 13px; }
.notifications-compte > .button { justify-self: start; }

.notif-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 600px) {
  .pile-avis {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    width: auto;
  }
}

/* Lot du 19 octobre, §1 : l'objet dans le SMS, corrigé dans la fenêtre d'envoi. */
.objet-sms {
  display: grid;
  gap: 4px;
}

.objet-sms label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.objet-sms input {
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.objet-sms input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--mint);
}

.objet-sms small {
  font-size: 12px;
  color: var(--ink-soft);
}

.objet-sms.manquant input {
  border-color: var(--amber-ink);
  background: var(--orange-soft);
}

.objet-sms.manquant small {
  color: var(--amber-ink);
}

/* Lot du 19 octobre, §2 : frise des relances, clôture, archives. */
.frise-relances {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  font-size: 13px;
}

.frise-relances li {
  display: grid;
  grid-template-columns: 14px 98px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 3px 0;
}

.frise-relances li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--ink-soft);
  background: var(--surface);
  transform: translateY(1px);
}

.frise-relances li.fait::before {
  background: var(--green);
  border-color: var(--green);
}

.frise-relances li.fin::before {
  border-color: var(--red);
}

.frise-relances b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.frise-relances span {
  color: var(--ink-soft);
}

.lien-cloture {
  justify-self: start;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.motifs-cloture {
  display: grid;
  gap: 8px;
}

.motifs-cloture .case span {
  font-size: 14px;
}

.precision-cloture {
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

/* Lot du 19 octobre, §3 et §4 : techniciens suivis dans Praxedo, rayons par agence. */
.tete-actions {
  display: grid;
  justify-items: end;
  gap: 4px;
  max-width: 340px;
  text-align: right;
}

.licence {
  font-size: 12px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 8px;
}

.licence.oui { background: var(--green-soft); color: var(--green); }
.licence.non { background: var(--red-soft); color: var(--red); }

.matrice tr.retire td { color: var(--ink-soft); }
.matrice tr.retire .nom-tech { text-decoration: line-through; }

.matrice small.ecarte {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
}

.rayons {
  display: grid;
  gap: 12px;
}

.rayons-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 16px;
  align-items: center;
}

.rayon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.champ-km {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.champ-km input {
  width: 72px;
  font: inherit;
  font-size: 14px;
  text-align: right;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.champ-km small { color: var(--ink-soft); }

.rayons-pied {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  .tete-actions { justify-items: start; text-align: left; }
}

/* Lot du 19 octobre, §6 : export Excel depuis la page Dossiers. */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.export-champs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.export-champs label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.export-champs label.large {
  grid-column: 1 / -1;
}

.export-champs input,
.export-champs select {
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

/* 13 octobre : recherche du bon joint sans résultat, dite sur la fiche. */
.bon-absent {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px;
}

.bon-absent p,
.verifier-encore {
  margin: 0;
}

.verifier-encore {
  font-size: 13px;
}

.verifier-encore .text-button {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* Lot de novembre, §1 : demande écrite reçue par courriel */
.message-recu { align-content: start; }
.entete-message { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 12px; margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.entete-message dt { color: var(--ink-soft); }
.entete-message dd { margin: 0; overflow-wrap: anywhere; }
.corps-message { margin: 0; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-transfere { border-left: 3px solid var(--mint); padding-left: 12px; }
.message-recu mark { background: var(--orange-soft); color: inherit; border-radius: 3px; padding: 0 2px; }

/* 5 novembre 2026 : chargements dans toute la plateforme */
.attente-lente {
  margin: 6px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--orange-soft);
  color: var(--amber-ink);
  font-size: 12.5px;
  line-height: 1.4;
}
button[aria-busy="true"] { cursor: progress; }
.skeleton-colonnes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.skeleton-colonnes > div { display: grid; gap: 10px; align-content: start; }
.skeleton-rangee { display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px; gap: 14px; }
.skeleton-fiche { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 760px) {
  .skeleton-colonnes, .skeleton-fiche { grid-template-columns: 1fr; }
}
.upload-card.lecture { border-style: solid; border-color: var(--brand); }
.barre-lecture { display: block; height: 4px; margin-top: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.barre-lecture i { display: block; width: 35%; height: 100%; border-radius: 99px; background: var(--brand); animation: va-et-vient 1600ms ease-in-out infinite; }
@keyframes va-et-vient { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .barre-lecture i { animation: none; } }

/* Calendrier (lot de novembre, §3) : maquette validée, planche 2. */
.cal-releve { margin: 0; font-size: 12.5px; color: var(--ink-soft); text-align: right; }
.cal-releve b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-barre { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.cal-bascule { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.cal-bascule button { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cal-bascule button.on { background: var(--navy); color: #fff; }
.cal-grille { display: grid; grid-template-columns: 96px repeat(6, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-grille > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal-grille > div:nth-child(7n) { border-right: 0; }
.cal-jour, .cal-coin { padding: 10px 10px 8px; background: #faf9f9; }
.cal-jour b { display: block; font-size: 14px; }
.cal-jour small { color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.cal-aujourdhui { background: var(--mint); }
.cal-aujourdhui small { color: var(--brand-dark); font-weight: 650; }
.cal-periode { padding: 12px 10px; font-size: 12.5px; color: var(--ink-soft); font-weight: 650; }
.cal-periode small { display: block; font-weight: 400; font-variant-numeric: tabular-nums; }
.cal-case { padding: 8px; display: grid; gap: 6px; align-content: start; min-height: 112px; }
.cal-sans-heure { background: var(--paper); min-height: 0; }
.cal-ferie { background: repeating-linear-gradient(135deg, #f7f6f6 0 8px, #efeded 8px 16px); }
.cal-ferie span, .cal-vide { font-size: 12px; color: #a5a1a1; }
.cal-ferie span { color: var(--ink-soft); }
.cal-rdv { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 8px; padding: 7px 8px; background: var(--surface); font-size: 12.5px; line-height: 1.35; }
.cal-rdv b { display: block; }
.cal-rdv:hover, .cal-rdv:focus-visible { box-shadow: 0 0 0 2px var(--brand); outline: none; }
.cal-tech, .cal-num { color: var(--ink-soft); }
.cal-num { font-variant-numeric: tabular-nums; }
.cal-pxo { border: 1px dashed #c9c4c4; border-left: 3px solid #9a9494; border-radius: 8px; padding: 6px 8px; background: var(--paper); font-size: 12px; line-height: 1.35; color: #3d3d3d; }
.cal-h { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); margin-right: 4px; }
.cal-plus { border: 0; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--blue-ink); background: var(--blue-soft); border-radius: 7px; padding: 5px 8px; cursor: pointer; }
.cal-legende { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); }
.cal-legende span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--green); }
.cal-legende .cal-l-pxo::before { background: #9a9494; }
.cal-legende .cal-l-ferie::before { background: repeating-linear-gradient(135deg, #f7f6f6 0 3px, #dcd9d9 3px 6px); }
@media (prefers-reduced-motion: no-preference) { .cal-rdv { transition: box-shadow .15s; } }
@media (max-width: 720px) { .cal-releve { text-align: left; } }

/* Lot du 17 novembre, §3 : la page Techniciens en liste. */
.liste-tech { min-width: 900px; }
.liste-tech th.centre, .liste-tech td.centre { text-align: center; }
.code-tech { color: var(--ink-soft); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.puce-code { display: inline-block; margin: 0 4px 2px 0; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }
.puce-code.cf { background: var(--green-soft); color: var(--green); border-color: transparent; }
.propose.oui { color: var(--green); font-weight: 600; }
.propose.non { color: var(--ink-soft); }
.case-pp { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.ajout-tech { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); max-width: 560px; }
.ajout-tech label { font-weight: 600; font-size: 13.5px; }
.ajout-tech-ligne { display: flex; flex-wrap: wrap; gap: 8px; }
.ajout-tech-ligne input { flex: 1 1 220px; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
