/* TYRIA — Chrome partagé (footer, recherche, mobile) */
@import url('./theme.css?v=1789031393279');

.tyria-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(201, 169, 110, 0.15);
  padding: 16px 24px 18px;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(210, 225, 245, 0.35);
  font-family: 'Rajdhani', sans-serif;
}

.tyria-footer-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  opacity: 0.55;
}

.tyria-footer-ornament::before,
.tyria-footer-ornament::after {
  content: '';
  height: 1px;
  width: 48px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.45), transparent);
}

.tyria-footer-ornament svg {
  width: 14px;
  height: 14px;
  stroke: rgba(201, 169, 110, 0.7);
  fill: none;
}

.tyria-footer-motto {
  font-size: 8px;
  letter-spacing: 0.35em;
  color: rgba(201, 169, 110, 0.4);
  margin-bottom: 6px;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  text-transform: none;
}

.tyria-footer-line { line-height: 1.6; }
.tyria-footer-module { color: rgba(201, 169, 110, 0.55); }

/* Boutons barre de navigation (Recherche, liens module) */
.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 5px 12px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  text-decoration: none;
  color: var(--text-secondary, rgba(210, 225, 245, 0.78));
  background: transparent;
  border: 1px solid var(--border-medium, rgba(201, 169, 110, 0.28));
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

a.btn-small {
  box-sizing: border-box;
}

.btn-small:hover,
.btn-small:focus-visible {
  border-color: var(--accent-gold, #c9a96e);
  color: var(--accent-gold, #c9a96e);
  outline: none;
}

.btn-small.tyria-search-trigger {
  color: var(--accent-gold, #c9a96e);
  border-color: rgba(201, 169, 110, 0.45);
  background: rgba(201, 169, 110, 0.08);
}

.btn-small.tyria-search-trigger:hover,
.btn-small.tyria-search-trigger:focus-visible {
  background: rgba(201, 169, 110, 0.16);
  border-color: var(--accent-gold, #c9a96e);
  color: var(--accent-gold, #c9a96e);
}

.btn-small.tyria-search-trigger::before {
  content: '';
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.9;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

#_docRHLink.tyria-doc-rh-link {
  color: var(--accent-gold, #c9a96e);
  border-color: rgba(201, 169, 110, 0.45);
  background: rgba(201, 169, 110, 0.06);
}

#_docRHLink.tyria-doc-rh-link:hover,
#_docRHLink.tyria-doc-rh-link:focus-visible {
  background: var(--accent-gold, #c9a96e);
  color: var(--bg-primary, #0d1117);
  border-color: var(--accent-gold, #c9a96e);
}

.navbar-module-right .btn-small,
.navbar-module-right #_docRHLink,
.navbar-top-actions .btn-small {
  align-self: center;
}

html[data-theme="light"] .btn-small {
  color: rgba(35, 32, 28, 0.72);
  border-color: rgba(120, 95, 50, 0.28);
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme="light"] .btn-small.tyria-search-trigger,
html[data-theme="light"] #_docRHLink.tyria-doc-rh-link {
  color: #8a6b2e;
  border-color: rgba(138, 107, 46, 0.45);
  background: rgba(201, 169, 110, 0.1);
}

html[data-theme="light"] .btn-small:hover,
html[data-theme="light"] .btn-small:focus-visible,
html[data-theme="light"] #_docRHLink.tyria-doc-rh-link:hover {
  color: #6b5220;
  border-color: #8a6b2e;
}

/* Recherche globale Cmd+K */
.tyria-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(5, 8, 14, 0.82);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
}

.tyria-search-overlay.open { display: flex; }

.tyria-search-panel {
  width: 100%;
  max-width: 560px;
  background: #0f141c;
  border: 1px solid rgba(201, 169, 110, 0.28);
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.tyria-search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tyria-search-header input {
  flex: 1;
  background: var(--tyria-surface-deep, rgba(0, 0, 0, 0.35));
  border: 1px solid rgba(201, 169, 110, 0.2);
  color: #e8edf5;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
}

.tyria-search-header input:focus {
  outline: none;
  border-color: rgba(201, 169, 110, 0.5);
}

.tyria-search-kbd {
  font-size: 10px;
  color: rgba(210, 225, 245, 0.4);
  letter-spacing: 0.08em;
}

.tyria-search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}

.tyria-search-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 12px;
  cursor: pointer;
  color: inherit;
  font-family: 'Rajdhani', sans-serif;
}

.tyria-search-item:hover,
.tyria-search-item:focus {
  background: rgba(201, 169, 110, 0.08);
  border-color: rgba(201, 169, 110, 0.2);
}

.tyria-search-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #e8edf5;
}

.tyria-search-item-sub {
  font-size: 11px;
  color: rgba(210, 225, 245, 0.5);
  margin-top: 2px;
}

.tyria-search-type {
  display: inline-block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(201, 169, 110, 0.75);
  margin-bottom: 4px;
}

.tyria-search-empty {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(210, 225, 245, 0.45);
}

.tyria-icon-inline {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
}

/* Mobile */
@media (max-width: 900px) {
  .tyria-hide-mobile { display: none !important; }
  .hero-kpis,
  .kpi-management-grid,
  .kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .navbar-module-title-text {
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
  }
  .tab-navigation { overflow-x: auto; flex-wrap: nowrap; }
  .tab-button { white-space: nowrap; font-size: 10px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .alert-card-header { flex-wrap: wrap; }
  .detail-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 520px) {
  .hero-kpis,
  .kpi-row {
    grid-template-columns: 1fr !important;
  }
}

/* Documents RH — utilisateur connecté (barre haute) */
.tyria-doc-rh-user-info,
.topbar-right .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-user-text,
.tyria-doc-rh-user-info .topbar-user-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, rgba(210, 225, 245, 0.75));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(320px, 42vw);
}

html[data-theme="light"] .topbar-user-text {
  color: rgba(35, 32, 28, 0.72);
}

.topbar-module .badge-role,
.badge-role#roleDisplay {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid rgba(201, 169, 110, 0.28);
  color: var(--accent-gold, #c9a96e);
  background: rgba(201, 169, 110, 0.08);
  margin-left: auto;
  flex-shrink: 0;
}

/* ─── Small laptop / narrow headers ─────────────────────────────────────── */
@media screen and (max-width: 1366px) {
  .navbar-top,
  .topbar,
  header.topbar {
    height: auto !important;
    min-height: 48px;
    flex-wrap: wrap;
    row-gap: 6px;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .navbar-top-subtitle,
  .logo-sub,
  .topbar .logo-sub {
    display: none !important;
  }

  .navbar-top-actions,
  .topbar .tr,
  .topbar-right {
    flex-wrap: wrap;
    gap: 8px !important;
    max-width: 100%;
  }

  .navbar-module,
  .navbar-module-left {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    scrollbar-width: thin;
  }

  .navbar-module-link,
  .admin-nav a {
    font-size: 10px !important;
    padding: 4px 8px !important;
    letter-spacing: 0.06em !important;
  }

  .topbar-user-text,
  .tyria-doc-rh-user-info .topbar-user-text {
    max-width: min(160px, 28vw);
    font-size: 11px;
  }

  .btn-small {
    padding: 4px 9px;
    font-size: 10px;
  }
}

@media screen and (max-width: 1100px) {
  .navbar-top-brand,
  .logo-txt {
    letter-spacing: 0.18em !important;
    font-size: 15px !important;
  }

  .admin-nav {
    width: 100%;
    order: 5;
    margin-left: 0 !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
  }
}

