/* ============================================================
   illus-event.css — Carte illustration « Événement »
   Charte PrediPlan · accent orange #f97316
   ============================================================ */

:root {
  --ec:        #f97316;
  --ec-bg:     #fff7ed;
  --ec-border: #e5e7eb;
}

/* ── Carte ────────────────────────────────────────────────── */

.ec-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .10), 0 1px 4px rgba(0, 0, 0, .06);
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Arial, sans-serif;
  box-sizing: border-box;
}

/* ── En-tête ─────────────────────────────────────────────── */

.ec-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ec-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ec-icon--orange { background: var(--ec); }
.ec-icon--sm     { width: 32px; height: 32px; }

.ec-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ec);
  margin: 0;
  line-height: 1;
}

/* ── Timeline ────────────────────────────────────────────── */

.ec-timeline {
  border: 1px solid var(--ec-border);
  border-radius: 10px;
  overflow: hidden;
}

.ec-tl-header,
.ec-tl-body {
  display: flex;
  border-bottom: 1px solid var(--ec-border);
}
.ec-tl-body   { border-bottom: none; }
.ec-tl-header { background: #f9fafb; }

/* Colonne étiquette (Ressource / Nom) */
.ec-tl-label {
  width: 76px;
  min-width: 76px;
  padding: 0 8px;
  border-right: 1px solid var(--ec-border);
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  height: 34px;
  flex-shrink: 0;
}
.ec-tl-label--person {
  height: auto;
  min-height: 60px;
  gap: 7px;
  color: #374151;
  font-weight: 700;
  font-size: 0.82rem;
}

/*
 * Marques horaires
 * Technique flex ratio 0.5 / 1 / 1 / 1 / 0.5 :
 * les marques centrales (09, 10, 11) sont centrées exactement
 * sur les séparateurs de colonnes à 25 / 50 / 75 %.
 */
.ec-tl-marks {
  flex: 1;
  display: flex;
  align-items: center;
  height: 34px;
  overflow: visible;
}
.ec-tl-marks > span {
  flex: 1;
  font-size: 0.65rem;
  color: #9ca3af;
  white-space: nowrap;
  text-align: center;
}
.ec-tl-marks > span:first-child { flex: 0.5; text-align: left;  }
.ec-tl-marks > span:last-child  { flex: 0.5; text-align: right; }

/* Zone des créneaux — grid natif, colonnes alignées sur les marques horaires */
.ec-tl-slots {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 10px 0;
  /* Trait séparateur aux colonnes 25 / 50 / 75 % */
  background-image: linear-gradient(to right,
    transparent calc(25% - 0.5px), #e8e8e8 calc(25% - 0.5px),
    #e8e8e8     calc(25% + 0.5px), transparent calc(25% + 0.5px),
    transparent calc(50% - 0.5px), #e8e8e8 calc(50% - 0.5px),
    #e8e8e8     calc(50% + 0.5px), transparent calc(50% + 0.5px),
    transparent calc(75% - 0.5px), #e8e8e8 calc(75% - 0.5px),
    #e8e8e8     calc(75% + 0.5px), transparent calc(75% + 0.5px)
  );
}

/* Cellule vide (col 1 : 08:00-09:00) */
.ec-tl-slot { /* placeholder */ }

/* Bloc événement : colonnes 2-3 = 09:00 → 11:00 */
.ec-tl-event {
  grid-column: 2 / 4;
  background: var(--ec-bg);
  border: 2px solid var(--ec);
  border-radius: 7px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  margin: 0 2px;
  box-sizing: border-box;
}
.ec-tl-event strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ec);
  line-height: 1.2;
  white-space: nowrap;
}
.ec-tl-event span {
  font-size: 0.72rem;
  color: var(--ec);
  opacity: 0.85;
  white-space: nowrap;
}

/* ── Pied de carte ───────────────────────────────────────── */

.ec-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ec-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 50px;
  padding: 6px 16px 6px 6px;
  background: var(--ec-bg);
  border: 2px solid var(--ec);
}
.ec-badge strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ec);
}

.ec-caption {
  font-size: 0.82rem;
  color: #6b7280;
  text-align: center;
  margin: 0;
}

/* ── Responsive mobile ─────────────────────────────────── */
@media (max-width: 520px) {
  .ec-card { padding: 18px; }
  .ec-title { font-size: 1.4rem; }
  .ec-tl-label { width: 64px; min-width: 64px; font-size: 0.63rem; }
}
