/* =========================================================
   AGENTS — Direction C (Technical Hospitality)
   Home screen: eyebrow date, h2 greeting, dense agent rows
   ========================================================= */

.page-agents {
  padding: 14px 14px 96px;
  max-width: 720px;
  margin: 0 auto;
}

.datetime-display {
  padding: 2px 2px 6px;
}

.datetime-date {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 10px;
  font-weight: var(--w-medium);
  color: var(--ink-3);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* Hero card (greeting + search) */
.agents-hero-card {
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 16px 16px 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.agents-title {
  font-size: 22px;
  font-weight: var(--w-semibold);
  color: var(--ink-1);
  letter-spacing: var(--ls-display);
  line-height: 1.1;
  margin: 0 0 4px;
}

/* World clocks (France + Thaïlande) — clair le jour, sombre la nuit */
.world-clocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}

.clock {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-1);
  transition: background 0.6s ease, color 0.6s ease, border-color 0.6s ease;
}

/* Jour : fond clair, encre sombre */
.clock.is-day {
  background: linear-gradient(160deg, #fffdf5 0%, #fff4d6 100%);
  border-color: #f0dfa8;
  color: #3a2f12;
  --sun: #e8a317;
}

/* Nuit : fond sombre, encre claire */
.clock.is-night {
  background: linear-gradient(160deg, #1b2436 0%, #10182a 100%);
  border-color: #2c3a55;
  color: #e6ecf7;
  --sun: #ffd36b;
}

/* Courbe d'ensoleillement */
.clock-graph { margin: 2px 0; }

.sun-svg {
  display: block;
  width: 100%;
  height: auto;
}

.sun-axis {
  stroke: currentColor;
  stroke-width: 0.5;
  opacity: 0.2;
}

.sun-area {
  fill: var(--sun);
  opacity: 0.2;
}

.sun-line {
  fill: none;
  stroke: var(--sun);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sun-tick {
  stroke: currentColor;
  stroke-width: 0.8;
  opacity: 0.35;
}

.sun-tick-label {
  fill: currentColor;
  opacity: 0.55;
  font-size: 6px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

.sun-now {
  stroke: currentColor;
  stroke-width: 0.9;
  stroke-dasharray: 2 2;
  opacity: 0.5;
}

.sun-now-dot {
  fill: var(--sun);
  stroke: currentColor;
  stroke-width: 0.7;
}

.clock-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.clock-flag { font-size: 15px; line-height: 1; }

.clock-country {
  font-size: var(--t-11);
  font-weight: var(--w-semibold);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  opacity: 0.75;
}

.clock-weather {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.clock-weather:empty { display: none; }

.clock-weather-emoji { font-size: 14px; line-height: 1; }

.clock-weather-temp {
  font-size: var(--t-12);
  font-weight: var(--w-semibold);
  font-variant-numeric: tabular-nums;
}

.clock-time {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 30px;
  font-weight: var(--w-bold);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Invite autonome, sous le rectangle météo (hors carte) */
.agents-subtitle {
  font-size: var(--t-13);
  font-weight: var(--w-medium);
  color: var(--ink-3);
  line-height: 1.45;
  text-align: center;
  max-width: 340px;
  margin: 6px auto 16px;
}

/* Tabs */
.agents-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  margin: 0 -14px 10px;
  padding-left: 14px;
  padding-right: 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.agents-tabs::-webkit-scrollbar { display: none; }

.agents-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: var(--t-12);
  font-weight: var(--w-medium);
  color: var(--ink-1);
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.agents-tab svg { width: 14px; height: 14px; stroke-width: 2; }
.agents-tab:hover { background: var(--surface-2); }
.agents-tab.active {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}

.agents-tab-count {
  font-size: 10px;
  font-weight: var(--w-semibold);
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.agents-tab.active .agents-tab-count {
  background: rgba(255,255,255,0.22);
  color: var(--accent-foreground);
}

/* Agent bubbles — grosses pastilles rondes, avatar cliquable (plus de rectangle) */
.agent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 22px 12px;
  padding: 6px 0 8px;
}

.agent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: center;
  user-select: none;
  opacity: 0;
  transform: translateY(4px);
  animation: rowIn 0.28s var(--ease-out) forwards;
}

.agent-card .avatar {
  width: clamp(96px, 30vw, 120px);
  height: clamp(96px, 30vw, 120px);
  font-size: 30px;
  border-color: transparent;
  filter: drop-shadow(0 6px 16px rgba(15, 30, 46, 0.16));
  transition: transform 0.18s var(--ease), filter 0.18s var(--ease);
}
.agent-card:hover .avatar {
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 12px 24px rgba(15, 30, 46, 0.24));
}
.agent-card:active .avatar { transform: scale(0.96); }

/* Anneau de rôle plus épais sur les grosses bulles */
.agent-card .avatar-role-chef    { box-shadow: inset 0 0 0 3px var(--gold); }
.agent-card .avatar-role-manager { box-shadow: inset 0 0 0 3px var(--accent); }
.agent-card .avatar-role-tech    { box-shadow: inset 0 0 0 3px var(--info); }
.agent-card .avatar-role-menage  { box-shadow: inset 0 0 0 3px var(--ok); }
.agent-card .avatar-role-linge   { box-shadow: inset 0 0 0 3px var(--platform-direct); }

.agent-card-name {
  font-size: var(--t-14);
  font-weight: var(--w-semibold);
  color: var(--ink-1);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.agent-card-role {
  font-size: var(--t-11);
  color: var(--ink-3);
  line-height: 1.2;
}

.agents-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-3);
  font-size: var(--t-13);
}

@keyframes rowIn { to { opacity: 1; transform: translateY(0); } }

/* ===== Section letter (agent dashboard header) ===== */
.section-letter {
  font-size: var(--t-11);
  font-weight: var(--w-semibold);
  color: var(--ink-3);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  padding: 10px 2px 6px;
  background: transparent;
}

.counter {
  background: var(--accent);
  color: var(--accent-foreground);
  font-variant-numeric: tabular-nums;
}

/* ===== Dark-mode overrides for home ===== */
@media (prefers-color-scheme: dark) {
  .agents-title { color: var(--ink-1); }
  .agents-subtitle { color: var(--ink-3); }
  .datetime-date { color: var(--ink-3); }

  .agents-hero-card {
    background: var(--surface);
    border-color: var(--line-1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  .agents-tab { background: var(--surface); border-color: var(--line-2); color: var(--ink-1); }
  .agents-tab:hover { background: var(--surface-2); }
  .agents-tab.active { background: var(--accent); color: var(--accent-foreground); border-color: var(--accent); }
  .agents-tab-count { background: var(--surface-2); color: var(--ink-3); }
  .agents-tab.active .agents-tab-count { background: rgba(255,255,255,0.18); color: var(--accent-foreground); }

  /* Bulles : ombre portée plus douce sur fond sombre */
  .agent-card .avatar { filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45)); }
  .agent-card:hover .avatar { filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55)); }
}
