/* Shared visual refinements for public pages and workspaces. */
:root {
  --rtc-royal: #2449b8;
  --rtc-navy: #111827;
  --rtc-red: #c8102e;
  --rtc-green: #178a50;
  --rtc-surface: #fff;
  --rtc-surface-soft: #f5f7fb;
  --rtc-line: #dbe2ec;
  --rtc-shadow: 0 12px 32px rgba(17, 24, 39, .08);
  --rtc-ease: cubic-bezier(.22, 1, .36, 1);
}

html { scroll-padding-top: 1rem; }
body { -webkit-font-smoothing: antialiased; }

/* The full rubrique list now uses two compact desktop rows instead of three. */
@media (min-width: 1025px) {
  html body .site-header #main-navigation.main-nav {
    box-sizing: border-box;
    width: min(100%, 1440px);
    margin-inline: auto;
    padding: 8px 12px 10px;
    justify-content: center;
    align-content: center;
    gap: 4px;
  }

  html body .site-header #main-navigation.main-nav > a {
    min-height: 34px;
    padding: 6px 5px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    letter-spacing: .01em !important;
  }
}

@media (min-width: 1400px) {
  html body .site-header #main-navigation.main-nav > a {
    padding: 6px 6px !important;
    font-size: 13px !important;
  }
}

@media (min-width: 1025px) and (max-width: 1119px) {
  html body .site-header #main-navigation.main-nav {
    padding: 8px 8px 10px;
    gap: 3px;
  }
  html body .site-header #main-navigation.main-nav > a {
    min-height: 32px;
    padding: 5px 3px !important;
    font-size: 11px !important;
  }
}

/* Keep administrative actions readable and inside their available width. */
html body .ad-admin { display: grid; gap: 16px; min-width: 0; }
html body .ad-admin-head {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(10, 30, 73, .16);
}
html body .ad-admin-tabs {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  gap: 8px;
  padding: 10px 0 12px;
  scrollbar-width: thin;
}
html body #ad-admin-panel,
html body #ad-admin-panel > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
html body #ad-admin-panel > p:first-child:not(:empty) {
  margin: 0 0 4px;
  padding: 10px 13px;
  border: 1px solid #d9e5f4;
  border-left: 3px solid var(--rtc-royal);
  border-radius: 11px;
  background: #f5f8fd;
  color: #334155;
  line-height: 1.55;
}
html body #ad-admin-panel .ad-admin-title {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  align-items: stretch;
  gap: 10px 12px;
  margin: 12px 0 14px;
}
html body #ad-admin-panel .ad-admin-title > h3 {
  grid-column: 1 / -1;
  align-self: end;
  margin: 0 0 2px;
  color: inherit;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.3;
}
html body #ad-admin-panel .ad-admin-title > button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  height: auto;
  padding: 11px 14px !important;
  white-space: normal;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}
html body #ad-admin-panel .ad-table { gap: 10px; }
html body #ad-admin-panel .ad-row {
  min-height: 62px;
  border-radius: 14px !important;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
html body #ad-admin-panel .ad-row:hover {
  transform: translateY(-1px);
  border-color: #9cb4e0 !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .08);
}
@media (max-width: 760px) {
  html body .ad-admin { gap: 10px; }
  html body .ad-admin-head { align-items: flex-start; padding: 18px; }
  html body .ad-admin-tabs { margin: 0; }
  html body #ad-admin-panel .ad-admin-title {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
}

/* RH desktop navigation: retain clear labels without the overly heavy all-caps weight. */
@media (min-width: 641px) {
  html body #hr-nav a {
    font-size: 15px !important;
    font-weight: 550 !important;
    text-transform: none !important;
    letter-spacing: .01em !important;
    line-height: 1.45 !important;
  }
  html body #hr-nav a[aria-current="page"] {
    font-weight: 650 !important;
  }
}

/* Refined scroll reveals: lighter movement, replay when a section re-enters view. */
.ui-reveal { transition-duration: .5s, .58s, .5s !important; }
.ui-reveal[data-ui-pending="true"] { transform: translateY(14px) scale(.995); filter: none; }
.ui-reveal[data-ui-variant="left"][data-ui-pending="true"] { transform: translateX(-12px); }
.ui-reveal[data-ui-variant="right"][data-ui-pending="true"] { transform: translateX(12px); }
.ui-reveal[data-ui-variant="scale"][data-ui-pending="true"] { transform: translateY(8px) scale(.99); }

/* Shorten the institutional reveals while retaining the tricolour title accent. */
html body .about-block.is-reveal .about-index,
html body .about-block.is-reveal h2,
html body .about-block.is-reveal .about-copy,
html body .about-block.is-reveal .about-timeline,
html body .about-block.is-reveal .about-media,
html body .about-block.is-reveal blockquote,
html body .about-block.is-reveal .about-value-grid article,
html body .about-block.is-reveal [data-team],
html body .about-block.is-reveal .about-contact-grid p {
  filter: none;
  transition-duration: .58s;
}
html body .about-block.is-reveal[data-reveal-direction="down"] :is(.about-index, h2, .about-copy, .about-timeline, blockquote) { transform: translateY(16px); }
html body .about-block.is-reveal[data-reveal-direction="up"] :is(.about-index, h2, .about-copy, .about-timeline, blockquote) { transform: translateY(-14px); }
html body .about-block.is-reveal .about-media { transform: translateY(14px); }
html body .about-block.is-reveal[data-reveal-direction="up"] .about-media { transform: translateY(-12px); }
html body .about-block.is-reveal .about-value-grid article,
html body .about-block.is-reveal [data-team],
html body .about-block.is-reveal .about-contact-grid p { transform: translateY(12px); }
html body .about-block.is-reveal h2 { clip-path: none; }
html body .about-hero h1 { clip-path: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .ui-reveal,
  .ui-reveal[data-ui-pending="true"],
  html body .about-block.is-reveal :is(.about-index, h2, .about-copy, .about-timeline, .about-media, blockquote, .about-value-grid article, [data-team], .about-contact-grid p) {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }
}
