/* =============================
   INTERVENTIONS PAGE — THEME V3 (WHITE / EPURÉ)
============================= */

.inter-page{
  padding: 0; /* ✅ le main gère déjà le padding */
}

/* Header */
.inter-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.inter-title{
  font-size:30px;
  color: var(--text-main, #0f172a);
  margin:0;
  font-weight:900;
  letter-spacing:-0.02em;
  line-height:1.1;
}

.inter-subtitle{
  color: var(--text-sub, #64748b);
  font-size:14px;
  margin:6px 0 0 0;
  font-weight:600;
}

.inter-head-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Buttons */
.inter-btn{
  padding:10px 14px;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  border:1px solid transparent;
  transition: transform .08s ease, opacity .15s ease, background .15s ease;
}
.inter-btn:active{ transform: translateY(1px); }

.inter-btn--ghost{
  background:#fff;
  color:#0f172a;
  border:1px solid var(--border, #e8eef6);
}

.inter-btn--ghost:hover{ background:#f8fafc; }

.inter-btn--primary{
  background:#0f172a;
  color:#fff;
  border:0;
  box-shadow: 0 10px 20px rgba(15,23,42,.12);
}
.inter-btn--primary:hover{ opacity:.92; }

/* KPI */
.inter-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:14px;
  margin-bottom:16px;
}

.inter-kpi{
  background: var(--panel, #fff);
  padding: 16px;
  border-radius: var(--radius, 16px);
  border:1px solid var(--border, #e8eef6);
  box-shadow: var(--shadow-xs, 0 1px 6px rgba(15,23,42,.05));
  position:relative;
  overflow:hidden;
}

/* ✅ petite barre discrète (neutre) */
.inter-kpi::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:#e2e8f0;
}

/* Variantes (soft pastel, pas flashy) */
.inter-kpi--blue::before{  background:#cbd5e1; }   /* neutre */
.inter-kpi--amber::before{ background:#e5e7eb; }   /* neutre */
.inter-kpi--green::before{ background:#d1d5db; }   /* neutre */

.inter-kpi--dark{
  background:#0f172a;
  border-color:#0f172a;
  box-shadow: 0 14px 28px rgba(15,23,42,.18);
}
.inter-kpi--dark::before{ background: rgba(255,255,255,.18); }

.inter-kpi__label{
  display:block;
  font-size:11px;
  font-weight:900;
  color: var(--text-sub, #64748b);
  text-transform:uppercase;
  letter-spacing:.06em;
}

.inter-kpi__label--dark{ color: rgba(255,255,255,.65); }

.inter-kpi__value{
  font-size:26px;
  font-weight:900;
  color: var(--text-main, #0f172a);
  display:block;
  margin-top:6px;
  letter-spacing:-0.02em;
}

.inter-kpi--dark .inter-kpi__value{ color:#fff; }

.inter-kpi__value--profit{
  color:#0f172a; /* ✅ pas vert flashy */
}

/* Filters */
.inter-filters{
  background: var(--panel, #fff);
  padding: 14px;
  border-radius: var(--radius, 16px);
  border:1px solid var(--border, #e8eef6);
  margin-bottom:14px;
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  box-shadow: var(--shadow-xs, 0 1px 6px rgba(15,23,42,.05));
}

.inter-search{
  flex:2;
  min-width:260px;
  position:relative;
}

.inter-search__icon{
  position:absolute;
  left:14px;
  top:50%;
  transform: translateY(-50%);
  color:#94a3b8;
  font-size:14px;
}

.inter-search__input{
  width:100%;
  padding: 11px 12px 11px 42px;
  border-radius: 14px;
  border:1px solid var(--border, #e8eef6);
  outline:none;
  font-size:14px;
  font-weight:700;
  color:#0f172a;
  background:#fff;
  transition: border .15s ease, box-shadow .15s ease;
}

.inter-search__input::placeholder{ color:#94a3b8; }

.inter-search__input:focus{
  border-color:#cbd5e1;
  box-shadow: 0 0 0 4px rgba(15,23,42,.06);
}

.inter-select{
  flex:1;
  min-width:200px;
  padding: 11px 12px;
  border-radius: 14px;
  border:1px solid var(--border, #e8eef6);
  background:#fff;
  font-size:14px;
  font-weight:800;
  color:#0f172a;
  outline:none;
  transition: border .15s ease, box-shadow .15s ease;
}

.inter-select:focus{
  border-color:#cbd5e1;
  box-shadow: 0 0 0 4px rgba(15,23,42,.06);
}

/* Table card */
.inter-table-card{
  background: var(--panel, #fff);
  border-radius: var(--radius, 16px);
  border:1px solid var(--border, #e8eef6);
  overflow:hidden;
  box-shadow: var(--shadow-xs, 0 1px 6px rgba(15,23,42,.05));
  position:relative;
}

.inter-table{
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:14px;
  background:#fff;
}

.inter-table thead tr{
  background:#fafcff;
  border-bottom:1px solid var(--border-2, #eef2f7);
}

.inter-table th{
  padding: 13px 16px;
  font-weight:900;
  color: var(--text-sub, #64748b);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.inter-table td{
  padding: 15px 16px;
  border-bottom:1px solid var(--border-2, #eef2f7);
  color:#0f172a;
}

.inter-table tbody tr:hover{ background:#fbfdff; }
.inter-table tbody tr:last-child td{ border-bottom:none; }

.inter-th-right{ text-align:right; }

.inter-loading{
  padding:30px !important;
  text-align:center;
  color:#94a3b8;
  font-weight:800;
}

/* ==========================
   TIMELINE (Carnet de Vie)
   style identique Équipements
========================== */

#timeline-overlay.timeline{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display:none;           /* JS */
  align-items:center;
  justify-content:center;
  padding:24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ✅ Un seul dialog (wrapper) */
#timeline-overlay .timeline__dialog{
  width: min(860px, calc(100% - 32px)); /* ✅ plus large */
  border-radius: 18px;
  overflow: hidden; /* ✅ fusion head/body propre */
  background: #fff;
  border: 1px solid #e8eef6;
  box-shadow: 0 22px 60px rgba(15,23,42,.22);
}

/* Dialog/card */
#timeline-overlay .timeline__head,
#timeline-overlay .timeline__body{
  width: 100%;
  margin: 0;
  background: #fff;
  border: 0;          /* ✅ plus de double border */
  box-shadow: none;   /* ✅ plus de double shadow */
}

#timeline-overlay .timeline__head{
  padding: 16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 12px;
  background: #fbfdff;
  border-bottom: 1px solid #e8eef6; /* ✅ séparation clean */
}

#timeline-overlay .timeline__body{
  padding: 16px 18px 18px;
}

/* Title / sub */
#timeline-overlay .timeline__title{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color:#0f172a;
  letter-spacing: -0.02em;
}
#timeline-overlay .timeline__sub{
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 800;
  color:#64748b;
}

/* Close */
#timeline-overlay .timeline__close{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #e8eef6;
  background:#fff;
  color:#64748b;
  font-size: 18px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: transform .08s ease, background .15s ease, color .15s ease;
}
#timeline-overlay .timeline__close:hover{ background:#f8fafc; color:#0f172a; }
#timeline-overlay .timeline__close:active{ transform: translateY(1px); }

/* Body empty state “folder” look */
#timeline-overlay .timeline__line{
  background:#fbfdff;
  border:1px solid #eef2f7;
  border-radius: 16px; /* ✅ arrondi comme équipements */
  padding: 14px;
}

#timeline-overlay .timeline__item{
  position: relative;     /* ✅ IMPORTANT pour le dot */
  padding-left: 18px;
}

#timeline-overlay .timeline__dot{
  position:absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background:#0f172a;
  opacity:.9;
}

#timeline-overlay .timeline__label{
  font-size: 11px;
  font-weight: 900;
  color:#64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

#timeline-overlay .timeline__text{
  font-size: 14px;
  font-weight: 900;
  color:#0f172a;
}

#timeline-overlay .timeline__text small,
#timeline-overlay .timeline__text .muted{
  display:block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  color:#64748b;
}

#timeline-overlay .timeline__body .card,
#timeline-overlay .timeline__body .timeline-card,
#timeline-overlay .timeline__body .history-card{
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Button */
#timeline-overlay .timeline__btn{
  margin-top: 14px;
  width: 100%;
  border: 0;
  background:#0f172a;
  color:#fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  box-shadow: 0 14px 30px rgba(15,23,42,.18);
  transition: opacity .15s ease, transform .08s ease;
}
#timeline-overlay .timeline__btn:hover{ opacity:.92; }
#timeline-overlay .timeline__btn:active{ transform: translateY(1px); }

/* Mobile */
@media (max-width: 520px){
  #timeline-overlay.timeline{ padding: 14px; }
  #timeline-overlay .timeline__dialog{ width: 100%; }
}

/* Modal (fallback V3) */
.modal{
  display:none;
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  background:rgba(15,23,42,0.45);
  z-index:9999;
  align-items:center;
  justify-content:center;
  padding: 18px;
}

.modal__dialog{
  background:#fff;
  width: 560px;
  max-width:calc(100% - 24px);
  border-radius: 18px;
  padding: 18px;
  position:relative;
  box-shadow: 0 30px 70px rgba(15,23,42,.22);
  border: 1px solid rgba(255,255,255,.35);
}

.modal__dialog--inter{ width:560px; }

.modal__close{
  position:absolute;
  top:14px;
  right:14px;
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid var(--border, #e8eef6);
  background:#fff;
  font-size:18px;
  cursor:pointer;
  color:#64748b;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
}

.modal__close:hover{ background:#f8fafc; }

.modal__title{
  margin:0 0 6px 0;
  font-size:16px;
  font-weight:900;
  letter-spacing:.02em;
  color:#0f172a;
}

.modal__subtitle{
  color:#64748b;
  font-weight:800;
  font-size:13px;
  margin:0 0 12px 0;
}

.modal__grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  font-size:13px;
}

.modal__notes{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--border-2, #eef2f7);
}

.modal__notes-label{
  font-weight:900;
  color:#64748b;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  display:block;
  margin-bottom:6px;
}

.modal__notes-box{
  background:#fafcff;
  border:1px solid var(--border, #e8eef6);
  padding:12px;
  border-radius:14px;
  margin:0;
  color:#0f172a;
  line-height:1.5;
  font-weight:700;
}

/* Responsive */
@media (max-width: 1100px){
  .inter-kpi-grid{ grid-template-columns:repeat(2, 1fr); }
}

@media (max-width: 768px){
  .inter-kpi-grid{ grid-template-columns:1fr; }
  .timeline{
    width:100% !important;
    border-radius:0 !important;
    padding:18px !important;
  }
  .modal__grid{ grid-template-columns:1fr; }
}

/* Bar colorée */
.kpi-blue::before,
.inter-kpi--blue::before{   background:#a8b6ff; }  /* indigo pastel */

.kpi-orange::before,
.inter-kpi--amber::before{  background:#ffc48a; }  /* amber pastel */

.kpi-red::before{           background:#ff9aa5; }  /* rose pastel */

.kpi-green::before,
.inter-kpi--green::before{  background:#7fe6c7; }  /* mint pastel */

/* Option : léger fond teinté (très discret) */
.kpi-blue,
.inter-kpi--blue{   background: linear-gradient(0deg, rgba(168,182,255,.10), rgba(168,182,255,.10)), #fff; }

.kpi-orange,
.inter-kpi--amber{  background: linear-gradient(0deg, rgba(255,196,138,.12), rgba(255,196,138,.12)), #fff; }

.kpi-red{           background: linear-gradient(0deg, rgba(255,154,165,.10), rgba(255,154,165,.10)), #fff; }

.kpi-green,
.inter-kpi--green{  background: linear-gradient(0deg, rgba(127,230,199,.10), rgba(127,230,199,.10)), #fff; }


