:root {
  --primary: #0b858a;
  --secondary: #097075;
  --accent: #f5dd5d;
  --primary-fg: #fff;
  --body-fg: #1a1a2e;
  --body-bg: #fff;
  --body-quiet-color: #555;
  --body-loud-color: #000;
  --header-color: #ffc;
  --header-branding-color: var(--accent);
  --header-bg: #0b858a;
  --header-link-color: var(--primary-fg);
  --breadcrumbs-fg: #c4dce8;
  --breadcrumbs-link-fg: var(--body-bg);
  --breadcrumbs-bg: var(--primary);
  --link-fg: #0b6e72;
  --link-hover-color: #064547;
  --link-selected-fg: #0b6e72;
  --hairline-color: #e0e0e0;
  --border-color: #ccc;
  --error-fg: #ba2121;
  --message-success-bg: #dfd;
  --message-warning-bg: #ffc;
  --message-error-bg: #ffefef;
  --darkened-bg: #f8f9fa;
  --selected-bg: #e4e4e4;
  --selected-row: #ffc;
  --button-fg: #fff;
  --button-bg: var(--primary);
  --button-hover-bg: #0a9da3;
  --default-button-bg: var(--secondary);
  --default-button-hover-bg: #0a9da3;
  --close-button-bg: #888;
  --close-button-hover-bg: #747474;
  --delete-button-bg: #ba2121;
  --delete-button-hover-bg: #a41515;
  --object-tools-fg: var(--button-fg);
  --object-tools-bg: var(--close-button-bg);
  --object-tools-hover-bg: var(--close-button-hover-bg);
}

input[type="checkbox"] {
  filter: hue-rotate(320deg);
}

form .aligned label+div.readonly {
  margin: 0 !important;
}

/* =============--- INDEX ---=== */
@media (min-width: 1025px) {
  .dashboard #content {
    width: calc(100% - 400px);
  }
}

/* --- Table rows: meilleure lisibilité --- */
.dashboard #content #content-main tbody th,
#nav-sidebar .module th {
  padding: 0;
}
.dashboard #content #content-main tbody th > a,
#nav-sidebar .module th > a {
  display: block;
  padding: 8px 10px;
  color: #1a1a2e;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.dashboard #content #content-main tbody th > a:hover,
#nav-sidebar .module th > a:hover {
  background: #e8f7f8;
  color: #064547;
}

/* --- Liens "Ajouter" (hover discret uniquement) --- */
.dashboard #content #content-main .addlink:hover,
#nav-sidebar .module .addlink:hover {
  text-decoration: underline;
}

/* --- Lignes de table alternées --- */
.dashboard #content #content-main tbody tr:nth-child(even) {
  background: #f8f9fa;
}
.dashboard #content #content-main tbody tr:hover {
  background: #e8f7f8;
  cursor: pointer;
}

/* --- Contrainte des select dans les tables (évite le débordement sur les colonnes adjacentes) --- */
#changelist-form table td select,
.results table td select,
#result_list td select,
table.module select {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Captions (en-têtes de section) --- */
.module caption,
.module caption *,
.module caption a,
.module caption a:link,
.module caption a:visited,
#nav-sidebar .module caption,
#nav-sidebar .module caption a,
.dashboard #content #content-main table caption,
.dashboard #content #content-main table caption *,
.dashboard #content #content-main table caption a.section,
.dashboard #content #content-main table caption a.section:link,
.dashboard #content #content-main table caption a.section:visited {
  color: #ffffff !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* =============--- SIDEBAR ---=== */
#nav-sidebar .module caption {
  padding-left: 8px;
}

/* =============--- PARLER ---=== */
.parler-language-tabs span.current {
  background-color: var(--primary);
  border-color: var(--primary);
}
.parler-language-tabs {
  border-bottom: none;
}

/* =============--- AI AGENT MODULE ---=== */
.ai-agent-module {
  background: #1a2e0a;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid rgba(200, 230, 74, 0.15);
}

.ai-agent-title {
  background: transparent;
  color: #c8e64a;
  padding: 0;
  border: none;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.ai-agent-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #c8e64a;
  margin-right: 8px;
  box-shadow: 0 0 5px rgba(200, 230, 74, 0.3);
}

.ai-agent-button {
  display: block;
  background: #9ab838;
  color: #1a2e0a;
  text-align: center;
  padding: 10px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s;
}

.ai-agent-button:hover {
  background: #c8e64a;
  color: #111d08;
}
