/*
 * Passerelle intranet design system
 *
 * This layer follows the public site's warm editorial palette, with the
 * contrast and compact spacing needed by a day-to-day operational tool. The
 * app-shell selectors keep the visual reset away from Drupal's admin UI.
 */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  --cream: #f7f4ec;
  --cream-warm: #fbf9f3;
  --card: #ffffff;
  --ink: #23231f;
  --ink-soft: #56564e;
  --ink-faint: #8a8a80;
  --forest: #1f3d2b;
  --forest-deep: #16301f;
  --moss: #55702c;
  --moss-mid: #6e8b3d;
  --sage: #bad688;
  --line: rgba(35, 35, 31, 0.13);
  --line-strong: rgba(35, 35, 31, 0.22);
  --line-light: rgba(255, 255, 255, 0.18);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --app-max-width: 1440px;
  --app-radius: 14px;
  --app-radius-small: 8px;
  --app-shadow: 0 18px 45px rgba(22, 48, 31, 0.08);

  /* Keep legacy component selectors on the same palette. */
  --texte: var(--ink);
  --vert: var(--moss);
  --bleu: var(--sage);
  --t: 180ms ease;
  --bs: var(--app-shadow);
}

html {
  scroll-behavior: smooth;
}

body:not(.toolbar-horizontal):not(.toolbar-vertical) {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--sage);
  color: var(--forest-deep);
}

.app-shell :focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Shared application frame. */
.app-shell {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
}

.app-shell .container {
  width: min(100%, var(--app-max-width));
  margin-inline: auto;
}

.app-shell a {
  color: var(--moss);
  transition: color var(--t), background-color var(--t), border-color var(--t),
    box-shadow var(--t), transform var(--t);
}

.app-shell a:hover,
.app-shell a:active {
  color: var(--forest-deep);
}

.app-shell h1,
.app-shell h2,
.app-shell h3,
.app-shell h4 {
  color: var(--forest-deep);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.15;
}

.app-shell h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
}

.app-shell h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
}

.app-shell h3 {
  font-size: 1.3rem;
}

.app-shell .page-title {
  margin: 0 0 1.5rem;
}

.visually-hidden.focusable.skip-link {
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  transform: translateY(-200%);
}

.visually-hidden.focusable.skip-link:focus {
  transform: translateY(0);
}

/* Authenticated shell: a quiet forest masthead and a readable work surface. */
.app-shell--authenticated > header[role="banner"] {
  position: sticky;
  top: 0;
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--forest);
  box-shadow: 0 8px 24px rgba(22, 48, 31, 0.12);
}

body.user-logged-in:not(.toolbar-horizontal):not(.toolbar-vertical) {
  padding-top: 0;
}

body.toolbar-fixed .app-shell--authenticated > header[role="banner"] {
  top: 39px;
}

body.toolbar-horizontal.toolbar-tray-open .app-shell--authenticated > header[role="banner"] {
  top: 79px;
}

body.toolbar-vertical .app-shell--authenticated > header[role="banner"] {
  top: 39px;
}

.app-shell--authenticated > header[role="banner"] > .container {
  min-height: 76px;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

.app-shell--authenticated .region-header {
  align-items: center;
  min-height: 76px;
  padding-right: clamp(14rem, 20vw, 18rem);
}

.app-shell--authenticated #block-mds-site-branding,
.app-shell--authenticated #block-trotteurs-branding,
.app-shell--authenticated #block-system-branding {
  width: auto;
  min-width: 42px;
  padding-top: 0;
}

.app-shell--authenticated #block-mds-site-branding img,
.app-shell--authenticated #block-trotteurs-branding img,
.app-shell--authenticated #block-system-branding img,
.app-shell--authenticated .site-logo img {
  width: auto;
  max-width: 46px;
  max-height: 52px;
}

.app-shell--authenticated #block-navigationprincipale {
  width: auto;
  min-width: 0;
  padding-left: clamp(1rem, 2vw, 2rem);
}

.app-shell--authenticated #superfish-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.app-shell--authenticated #superfish-main li > .sf-depth-1 {
  height: auto;
  min-height: 54px;
  margin-right: 0;
  padding: 2.15rem 0.75rem 0.45rem;
  border-radius: var(--app-radius-small);
  color: var(--sage);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.app-shell--authenticated #superfish-main li > .sf-depth-1:hover,
.app-shell--authenticated #superfish-main li.active-trail > .sf-depth-1,
.app-shell--authenticated #superfish-main li > .sf-depth-1:focus-visible {
  background: rgba(186, 214, 136, 0.15);
  color: #fff;
}

.app-shell--authenticated #superfish-main li > .sf-depth-1[data-menu-icon]::before {
  width: 1.45rem;
  height: 1.45rem;
  top: 0.38rem;
  background-color: currentColor !important;
  background-image: none !important;
  -webkit-mask-image: var(--menu-icon);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: var(--menu-icon);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  opacity: 0.96;
}

.app-shell--authenticated #superfish-main [data-menu-icon="home"] {
  --menu-icon: url("../images/menu-home.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="horse"] {
  --menu-icon: url("../images/cheval.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="building"] {
  --menu-icon: url("../images/menu-building.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="resources"] {
  --menu-icon: url("../images/menu-resources.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="owner"] {
  --menu-icon: url("../images/menu-owner.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="location"] {
  --menu-icon: url("../images/menu-location.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="users"] {
  --menu-icon: url("../images/menu-users.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="membership"] {
  --menu-icon: url("../images/menu-membership.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="donate"] {
  --menu-icon: url("../images/menu-donate.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="contact"] {
  --menu-icon: url("../images/menu-contact.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="follow-up"] {
  --menu-icon: url("../images/menu-follow-up.svg");
}

.app-shell--authenticated #superfish-main [data-menu-icon="settings"] {
  --menu-icon: url("../images/menu-settings.svg");
}

.app-shell--authenticated #block-trotteurs-views-block-info-user-block-1 {
  top: 50%;
  right: clamp(1rem, 3vw, 2.5rem);
  transform: translateY(-50%);
  z-index: 3;
}

.app-shell--authenticated .account-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.app-shell--authenticated .account-control__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.55rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--sage);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.app-shell--authenticated .account-control__link::before {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  background-color: currentColor;
  content: "";
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.app-shell--authenticated .account-control__link--profile::before {
  -webkit-mask-image: url("../images/user.svg");
  mask-image: url("../images/user.svg");
}

.app-shell--authenticated .account-control__link--logout {
  color: #fff;
}

.app-shell--authenticated .account-control__link--logout::before {
  -webkit-mask-image: url("../images/switchoff.svg");
  mask-image: url("../images/switchoff.svg");
}

.app-shell--authenticated .account-control__link:hover,
.app-shell--authenticated .account-control__link:focus-visible {
  border-color: rgba(186, 214, 136, 0.5);
  background: rgba(186, 214, 136, 0.14);
  color: #fff;
  outline: none;
}

.app-shell--authenticated .account-control__link:focus-visible {
  box-shadow: 0 0 0 3px rgba(186, 214, 136, 0.22);
}

.app-shell--authenticated .main-wrapper > .container {
  padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1rem, 3vw, 2.5rem) 4rem;
}

.app-shell--authenticated .element-top > .container {
  padding: 0.8rem clamp(1rem, 3vw, 2.5rem) 0;
}

.app-shell--authenticated .breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin: 0;
  padding: 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
  list-style: none;
}

.app-shell--authenticated .breadcrumb li + li::before {
  margin-right: 0.65rem;
  color: var(--line-strong);
  content: "/";
}

.app-shell--authenticated .layout-content {
  min-width: 0;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--app-radius);
  background: var(--card);
  box-shadow: 0 8px 24px rgba(22, 48, 31, 0.035);
}

.app-shell--authenticated .layout-sidebar-first,
.app-shell--authenticated .layout-sidebar-second {
  padding: 0.25rem 1rem;
  color: var(--ink-soft);
}

.app-shell--authenticated .layout-sidebar-first .block,
.app-shell--authenticated .layout-sidebar-second .block {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--app-radius-small);
  background: var(--cream-warm);
}

.app-shell--authenticated .block-title {
  color: var(--forest);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.app-shell--authenticated .tabs,
.app-shell--authenticated .action-links {
  margin-bottom: 1.25rem;
}

.app-shell--authenticated .tabs ul,
.app-shell--authenticated .action-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-shell--authenticated .tabs a,
.app-shell--authenticated .action-links a {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream-warm);
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 650;
}

.app-shell--authenticated .tabs a:hover,
.app-shell--authenticated .tabs a.is-active,
.app-shell--authenticated .action-links a:hover {
  border-color: var(--moss);
  background: rgba(186, 214, 136, 0.2);
  color: var(--forest-deep);
}

.app-shell--authenticated table {
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--app-radius-small);
  overflow: hidden;
  background: var(--card);
}

.app-shell--authenticated table th {
  border-bottom: 2px solid var(--line-strong);
  background: var(--cream-warm);
  color: var(--forest);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.app-shell--authenticated table td,
.app-shell--authenticated table th {
  padding: 0.7rem 0.75rem;
  vertical-align: top;
}

.app-shell--authenticated table tbody > tr:nth-child(odd) {
  background: rgba(247, 244, 236, 0.48);
}

.app-shell--authenticated table tbody tr:hover {
  background: rgba(186, 214, 136, 0.16);
}

.app-shell--authenticated .ds-view {
  min-width: 0;
}

.app-shell--authenticated .ds-table-scroll {
  max-width: 100%;
  margin-top: 1rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 6px 20px rgba(22, 48, 31, 0.035);
}

.app-shell--authenticated .ds-data-table {
  width: 100%;
  min-width: 46rem;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.app-shell--authenticated .ds-data-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  padding-block: 0.85rem;
  white-space: nowrap;
}

.app-shell--authenticated .ds-data-table tbody td {
  border-bottom: 1px solid rgba(214, 207, 191, 0.62);
  vertical-align: middle;
}

.app-shell--authenticated .ds-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.app-shell--authenticated .ds-data-table img {
  border-radius: 8px;
  object-fit: cover;
}

.app-shell--authenticated .ds-data-table a:not(.ds-table-action) {
  color: var(--forest);
  font-weight: 650;
  text-decoration-color: rgba(85, 112, 44, 0.35);
  text-underline-offset: 0.17em;
}

.app-shell--authenticated .ds-table-action {
  display: inline-flex;
  min-height: 1.8rem;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(186, 214, 136, 0.22);
  color: var(--forest-deep);
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
}

.app-shell--authenticated .ds-table-action:hover,
.app-shell--authenticated .ds-table-action:focus-visible {
  background: rgba(85, 112, 44, 0.18);
  color: var(--forest-deep);
}

.app-shell--authenticated .ds-filter-card:not(.horse-filter-form) {
  margin: 0 0 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream-warm);
}

.app-shell--authenticated .ds-filter-grid {
  display: grid;
  align-items: end;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-shell--authenticated .ds-filter-grid > .form-item,
.app-shell--authenticated .ds-filter-grid > .form-actions,
.app-shell--authenticated .ds-filter-grid > div {
  width: auto !important;
  min-width: 0;
  margin: 0;
}

.app-shell--authenticated .ds-filter-grid label {
  display: block;
  width: auto;
  margin: 0 0 0.35rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 750;
}

.app-shell--authenticated .ds-filter-grid input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.app-shell--authenticated .ds-filter-grid select {
  width: 100% !important;
  max-width: none;
}

.app-shell--authenticated .ds-filter-grid .form-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-shell--authenticated .ds-empty-state,
.app-shell--authenticated .view-empty {
  margin-top: 1rem;
  padding: 2.25rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--cream-warm);
  color: var(--ink-soft);
  text-align: center;
}

.app-shell--authenticated .pager__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.app-shell--authenticated .pager__item a,
.app-shell--authenticated .pager__item.is-active {
  display: grid;
  min-width: 2.2rem;
  min-height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--forest);
  font-size: 0.78rem;
  font-weight: 700;
  place-items: center;
  text-decoration: none;
}

.app-shell--authenticated .pager__item.is-active,
.app-shell--authenticated .pager__item a:hover {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.app-shell--authenticated input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.app-shell--authenticated select,
.app-shell--authenticated textarea {
  /* Replaces the legacy 32px height, which iOS Safari applies to selects. */
  height: auto;
  min-height: 2.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--app-radius-small);
  background: var(--cream-warm);
  color: var(--ink);
  font: inherit;
  padding: 0.55rem 0.7rem;
  transition: border-color var(--t), box-shadow var(--t), background-color var(--t);
}

.app-shell--authenticated input:not([type="submit"]):focus,
.app-shell--authenticated select:focus,
.app-shell--authenticated textarea:focus {
  border-color: var(--moss);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(85, 112, 44, 0.14);
  outline: 0;
}

.app-shell--authenticated details,
.app-shell--authenticated fieldset {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--app-radius-small);
  background: var(--card);
}

.app-shell--authenticated summary,
.app-shell--authenticated legend {
  color: var(--forest);
  font-weight: 700;
}

.app-shell--authenticated .description {
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.app-shell--authenticated .messages {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--moss);
  border-radius: var(--app-radius-small);
  background: var(--cream-warm);
}

.app-shell .button,
.app-shell input[type="submit"],
.app-shell button[type="submit"] {
  min-height: 2.5rem;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  transition: color var(--t), background-color var(--t), border-color var(--t),
    transform var(--t), box-shadow var(--t);
}

.app-shell .button:hover,
.app-shell input[type="submit"]:hover,
.app-shell button[type="submit"]:hover {
  border-color: var(--forest-deep);
  background: var(--forest-deep);
  color: #fff;
  transform: translateY(-1px);
}

/* Anonymous sign-in: keep the existing Drupal form and fields, but give them
 * a calm, clearly bounded entry point. */
body.path-user:not(.user-logged-in) {
  padding-top: 0;
}

.app-shell--anonymous {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background:
    radial-gradient(circle at 8% 4%, rgba(186, 214, 136, 0.26), transparent 28rem),
    var(--cream);
}

.app-shell--anonymous > header[role="banner"] {
  position: static;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell--anonymous > header[role="banner"] .container {
  min-height: 0;
  padding: 1.5rem clamp(1.25rem, 5vw, 4rem) 0;
}

.app-shell--anonymous .region-header {
  min-height: 0;
  padding: 0;
}

.app-shell--anonymous .app-main {
  display: flex;
  flex: 1;
  align-items: flex-start;
  justify-content: center;
}

.app-shell--anonymous .main-wrapper {
  width: 100%;
}

.app-shell--anonymous .main-wrapper > .container {
  width: min(100%, 38rem);
  padding: clamp(1.75rem, 7vw, 4.5rem) 1.25rem 4rem;
}

.app-shell--anonymous .layout-content {
  float: none;
  width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.app-shell--anonymous #block-trotteurs-introanonyme,
.app-shell--anonymous #block-logoanonymes {
  margin: 0 auto 1.25rem;
  text-align: center;
}

.app-shell--anonymous #block-logoanonymes img,
.app-shell--anonymous #block-logoanonymes svg {
  width: auto;
  max-width: 9rem;
  max-height: 7rem;
  margin-inline: auto;
}

.app-shell--anonymous #block-trotteurs-introanonyme .block-title,
.app-shell--anonymous .page-title {
  margin-bottom: 0.6rem;
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 500;
}

.app-shell--anonymous #block-trotteurs-content,
.app-shell--anonymous #block-mds-content,
.app-shell--anonymous .block-system-main-block {
  width: 100%;
  max-width: 30rem;
  margin: 1.75rem auto 0;
  padding: clamp(1.4rem, 5vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--app-radius);
  background: var(--card);
  box-shadow: var(--app-shadow);
}

.app-shell--anonymous form#user-login-form {
  display: block;
  width: 100%;
  max-width: none;
}

.app-shell--anonymous form#user-login-form .js-form-item,
.app-shell--anonymous form#user-login-form .form-item {
  display: block;
  width: 100%;
  margin: 0 0 1rem;
}

.app-shell--anonymous form#user-login-form label {
  display: block;
  width: auto;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 700;
}

.app-shell--anonymous form#user-login-form input:not([type="submit"]):not([type="checkbox"]),
.app-shell--anonymous form#user-login-form select,
.app-shell--anonymous form#user-login-form textarea {
  width: 100%;
  max-width: none;
  min-height: 3rem;
  background: var(--cream-warm);
}

.app-shell--anonymous form#user-login-form .form-actions,
.app-shell--anonymous form#user-login-form #edit-actions {
  display: flex;
  justify-content: flex-end;
  margin: 1.5rem 0 0;
}

.app-shell--anonymous form#user-login-form input[type="submit"] {
  min-width: 8rem;
}

.app-shell--anonymous .messages {
  max-width: 30rem;
  margin: 1rem auto;
  border-left: 4px solid var(--moss);
  border-radius: var(--app-radius-small);
  background: var(--card);
  padding: 0.8rem 1rem;
}

/* Login composition. The form stays visible in a standard laptop viewport. */
@media (min-width: 760px) {
  .app-shell--anonymous .app-main {
    align-items: center;
  }

  .app-shell--anonymous .main-wrapper > .container {
    width: min(100%, 72rem);
    padding: clamp(0.75rem, 2vh, 1.5rem) clamp(1.25rem, 4vw, 3rem);
  }

  .app-shell--anonymous .region-content {
    display: grid;
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.82fr);
  }

  .app-shell--anonymous #block-trotteurs-introanonyme {
    max-width: 34rem;
    margin: 0;
    text-align: left;
  }

  .app-shell--anonymous #block-trotteurs-introanonyme .icon-logo svg {
    width: auto;
    max-width: 13.5rem;
    max-height: 8rem;
    margin: 0 0 1.35rem;
  }

  .app-shell--anonymous #block-trotteurs-introanonyme h1 {
    max-width: 30rem;
    margin: 0 0 1.1rem;
    font-size: clamp(2.35rem, 4.2vw, 3.7rem);
  }

  .app-shell--anonymous #block-trotteurs-introanonyme .login-text {
    max-width: 32rem;
    color: var(--ink-soft);
  }

  .app-shell--anonymous #block-trotteurs-introanonyme .login-text p {
    margin-bottom: 1rem;
  }

  .app-shell--anonymous #block-trotteurs-content,
  .app-shell--anonymous #block-mds-content,
  .app-shell--anonymous .block-system-main-block {
    max-width: none;
    margin: 0;
    padding: clamp(1.5rem, 3vw, 2.25rem);
  }

  .app-shell--anonymous #block-trotteurs-content::before,
  .app-shell--anonymous #block-mds-content::before {
    display: block;
    margin-bottom: 1.15rem;
    color: var(--forest-deep);
    content: "Connexion";
    font-family: var(--serif);
    font-size: 1.85rem;
    font-weight: 500;
    letter-spacing: -0.018em;
  }

  .app-shell--anonymous form#user-login-form .js-form-item,
  .app-shell--anonymous form#user-login-form .form-item {
    margin-bottom: 0.85rem;
  }

  .app-shell--anonymous form#user-login-form .form-actions,
  .app-shell--anonymous form#user-login-form #edit-actions {
    margin-top: 1.15rem;
  }

  .app-shell--anonymous form#user-login-form input[type="submit"] {
    width: 100%;
  }
}

/* Authenticated home dashboard. */
.path-frontpage .app-shell--authenticated .layout-content {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.home-role-copy,
.home-role-primary,
.home-role-label,
.home-role-actions {
  display: none !important;
}

body.role-administrator .home-role-copy--administrator,
body.role-administrator .home-role-label--administrator,
body.role-administrator .home-role-actions--administrator,
body.role-webmaster:not(.role-administrator) .home-role-copy--webmaster,
body.role-webmaster:not(.role-administrator) .home-role-label--webmaster,
body.role-webmaster:not(.role-administrator) .home-role-actions--webmaster,
body.role-structure:not(.role-administrator):not(.role-webmaster) .home-role-copy--structure,
body.role-structure:not(.role-administrator):not(.role-webmaster) .home-role-label--structure,
body.role-structure:not(.role-administrator):not(.role-webmaster) .home-role-actions--structure,
body.role-proprietaire_entraineur:not(.role-administrator):not(.role-webmaster):not(.role-structure) .home-role-copy--proprietaire,
body.role-proprietaire_entraineur:not(.role-administrator):not(.role-webmaster):not(.role-structure) .home-role-label--proprietaire,
body.role-setf:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur) .home-role-copy--setf,
body.role-setf:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur) .home-role-label--setf,
body.role-adoptant:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur):not(.role-setf) .home-role-copy--adoptant,
body.role-adoptant:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur):not(.role-setf) .home-role-label--adoptant,
body.role-adoptant:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur):not(.role-setf) .home-role-actions--adoptant,
body:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur):not(.role-setf):not(.role-adoptant) .home-role-copy--default,
body:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur):not(.role-setf):not(.role-adoptant) .home-role-label--default {
  display: block !important;
}

body.role-administrator .home-role-primary--administrator,
body.role-webmaster:not(.role-administrator) .home-role-primary--webmaster,
body.role-structure:not(.role-administrator):not(.role-webmaster) .home-role-primary--structure,
body.role-proprietaire_entraineur:not(.role-administrator):not(.role-webmaster):not(.role-structure) .home-role-primary--proprietaire,
body.role-setf:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur) .home-role-primary--setf,
body.role-adoptant:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur):not(.role-setf) .home-role-primary--adoptant,
body:not(.role-administrator):not(.role-webmaster):not(.role-structure):not(.role-proprietaire_entraineur):not(.role-setf):not(.role-adoptant) .home-role-primary--default {
  display: flex !important;
}

.home-dashboard__hero {
  display: grid;
  min-height: 21rem;
  overflow: hidden;
  border-radius: calc(var(--app-radius) + 4px);
  background:
    radial-gradient(circle at 92% 12%, rgba(186, 214, 136, 0.2), transparent 20rem),
    linear-gradient(135deg, var(--forest-deep), var(--forest));
  box-shadow: 0 20px 48px rgba(22, 48, 31, 0.17);
  color: #fff;
  grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.55fr);
}

.home-dashboard__welcome {
  display: flex;
  max-width: 50rem;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4.5rem);
}

.home-dashboard__eyebrow {
  margin: 0 0 0.65rem;
  color: var(--moss-mid);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-dashboard__hero .home-dashboard__eyebrow {
  color: var(--sage);
}

.home-dashboard__hero h1 {
  max-width: 44rem;
  margin: 0;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 4.5rem);
}

.home-dashboard__intro {
  max-width: 42rem;
  margin: 1rem 0 1.75rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.home-dashboard__primary {
  display: flex;
  width: min(100%, 32rem);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem 0.9rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

.home-dashboard__primary:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.home-dashboard__primary strong,
.home-dashboard__primary small {
  display: block;
}

.home-dashboard__primary strong {
  font-size: 0.95rem;
}

.home-dashboard__primary small {
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
}

.home-dashboard__arrow,
.home-action-card__arrow {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest-deep);
  font-size: 1.15rem;
}

.home-dashboard__status {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  text-align: center;
}

.home-dashboard__identity {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.home-dashboard__avatar {
  display: block;
  width: clamp(6.5rem, 10vw, 8.5rem);
  height: clamp(6.5rem, 10vw, 8.5rem);
  border: 2px solid rgba(186, 214, 136, 0.52);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 14px 32px rgba(9, 29, 17, 0.28);
}

.home-dashboard__avatar--fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.16), transparent 42%),
    rgba(186, 214, 136, 0.14);
  color: var(--sage);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.home-dashboard__identity-copy span,
.home-dashboard__identity-copy strong {
  display: block;
}

.home-dashboard__identity-copy span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-dashboard__identity-copy strong {
  margin-top: 0.2rem;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 550;
  line-height: 1.12;
}

.home-dashboard__status p {
  margin: 1rem 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.home-dashboard__status a {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 0.25rem;
}

.home-dashboard__role {
  display: inline-flex;
  padding: 0.38rem 0.65rem;
  border: 1px solid rgba(186, 214, 136, 0.28);
  border-radius: 999px;
  background: rgba(186, 214, 136, 0.12);
  color: var(--sage);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.home-dashboard__section {
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--app-radius);
  background: var(--card);
}

.home-dashboard__section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.home-dashboard__section-heading h2 {
  margin: 0;
}

.home-dashboard__section-heading > p {
  max-width: 28rem;
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.home-dashboard__actions {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-action-card {
  display: grid;
  min-height: 7.5rem;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream-warm);
  color: var(--ink) !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.home-action-card:hover {
  border-color: rgba(85, 112, 44, 0.45);
  background: #fff;
  box-shadow: 0 12px 28px rgba(22, 48, 31, 0.07);
  transform: translateY(-2px);
}

.home-action-card__number {
  color: var(--moss-mid);
  font-family: var(--serif);
  font-size: 1.3rem;
}

.home-action-card__content strong,
.home-action-card__content small {
  display: block;
}

.home-action-card__content strong {
  color: var(--forest-deep);
  font-size: 0.92rem;
}

.home-action-card__content small {
  margin-top: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.home-action-card__arrow {
  width: 1.9rem;
  height: 1.9rem;
  background: rgba(186, 214, 136, 0.26);
  font-size: 0.9rem;
}

.home-dashboard__support-links {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-dashboard__support-links a {
  display: grid;
  min-height: 7rem;
  align-content: center;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  color: var(--ink) !important;
  grid-template-columns: minmax(0, 1fr) auto;
}

.home-dashboard__support-links a + a {
  border-left: 1px solid var(--line);
}

.home-dashboard__support-links a:hover {
  background: var(--cream-warm);
}

.home-dashboard__support-links strong,
.home-dashboard__support-links small {
  display: block;
  grid-column: 1;
}

.home-dashboard__support-links strong {
  color: var(--forest-deep);
  font-size: 0.88rem;
}

.home-dashboard__support-links small {
  color: var(--ink-faint);
  font-size: 0.73rem;
}

.home-dashboard__support-links span {
  align-self: center;
  color: var(--moss);
  grid-column: 2;
  grid-row: 1 / span 2;
}

.home-dashboard__existing-content {
  margin-top: 1.25rem;
}

.home-dashboard__existing-content .block-views:not([hidden]) {
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--app-radius);
  background: var(--card);
}

/* Statistics dashboard. Existing Drupal tables remain available as drill-down. */
.stats-dashboard {
  display: grid;
  gap: 1.25rem;
}

.stats-dashboard__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 15%, rgba(186, 214, 136, 0.2), transparent 15rem),
    var(--cream-warm);
}

.stats-dashboard__intro-copy {
  max-width: 48rem;
}

.stats-dashboard__eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--moss);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stats-dashboard__intro p,
.stats-quality__heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.stats-dashboard__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.stats-dashboard__actions .button {
  min-height: 2.35rem;
  align-items: center;
  font-size: 0.76rem;
  text-decoration: none;
}

.stats-dashboard .cdw-cards {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stats-kpi {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(22, 48, 31, 0.035);
}

.stats-kpi::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--moss);
  content: "";
}

.stats-kpi--active::before {
  background: #719243;
}

.stats-kpi--archived::before {
  background: #b69358;
}

.stats-kpi--managed::before {
  background: #4a7660;
}

.stats-kpi--price::before {
  background: #6d6657;
}

.stats-kpi__label,
.stats-kpi__value,
.stats-kpi__note {
  display: block;
}

.stats-kpi__label {
  min-height: 2.2em;
  color: var(--ink-soft);
  font-size: 0.71rem;
  font-weight: 750;
  line-height: 1.25;
}

.stats-kpi__value {
  margin-top: 0.55rem;
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1;
}

.stats-kpi__note {
  margin-top: 0.45rem;
  color: var(--ink-faint);
  font-size: 0.67rem;
  line-height: 1.35;
}

.stats-quality {
  display: grid;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--forest-deep);
  color: #fff;
  grid-template-columns: minmax(12rem, 0.65fr) minmax(0, 2fr);
}

.stats-quality .stats-dashboard__eyebrow {
  color: var(--sage);
}

.stats-quality__heading p {
  color: rgba(255, 255, 255, 0.7);
}

.stats-quality__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-quality__item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.stats-quality__item-heading strong {
  color: var(--sage);
  font-size: 0.74rem;
}

.stats-quality__track {
  height: 5px;
  margin-top: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.stats-quality__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
}

.stats-quality__item small {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.61rem;
}

.stats-dashboard .cdw-tables {
  display: grid;
  align-items: start;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-dashboard .stats-panel {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 8px 22px rgba(22, 48, 31, 0.035);
}

.stats-dashboard .stats-panel--department,
.stats-dashboard .stats-panel--price {
  grid-column: 1 / -1;
}

.stats-dashboard .stats-panel > summary {
  display: flex;
  min-height: 3.6rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid transparent;
  color: var(--forest-deep);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 550;
  list-style: none;
}

.stats-dashboard .stats-panel > summary::-webkit-details-marker,
.stats-dashboard .stats-raw-data > summary::-webkit-details-marker {
  display: none;
}

.stats-dashboard .stats-panel > summary::after {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cream-warm);
  color: var(--forest);
  content: "+";
  font-family: var(--sans);
  font-size: 0.9rem;
  place-items: center;
}

.stats-dashboard .stats-panel[open] > summary {
  border-bottom-color: var(--line);
}

.stats-dashboard .stats-panel[open] > summary::after {
  content: "−";
}

.stats-panel__content {
  padding: 1rem;
}

.stats-panel__subtitle {
  margin: 0 0 1rem;
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.stats-bars {
  display: grid;
  gap: 0.8rem;
}

.stats-bar__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.32rem;
}

.stats-bar__label {
  min-width: 0;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
}

.stats-bar__value {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
}

.stats-bar__track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--cream-warm);
}

.stats-bar__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--moss), #87a85c);
}

.stats-panel--state .stats-bar__fill {
  background: linear-gradient(90deg, #426d58, #72a17d);
}

.stats-panel--reason .stats-bar__fill {
  background: linear-gradient(90deg, #8d744b, #b79a65);
}

.stats-panel--department .stats-bars {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
}

.stats-bars__more,
.stats-bars__empty {
  margin: 0.2rem 0 0;
  color: var(--ink-faint);
  font-size: 0.66rem;
}

.stats-price-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-price-card {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--cream-warm);
}

.stats-price-card span,
.stats-price-card strong,
.stats-price-card small {
  display: block;
}

.stats-price-card span {
  min-height: 2.2em;
  color: var(--ink-soft);
  font-size: 0.69rem;
  font-weight: 700;
}

.stats-price-card strong {
  margin-top: 0.5rem;
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 550;
}

.stats-price-card small {
  margin-top: 0.25rem;
  color: var(--ink-faint);
  font-size: 0.63rem;
}

.stats-price-card--primary {
  border-color: rgba(85, 112, 44, 0.35);
  background: rgba(186, 214, 136, 0.16);
}

.stats-dashboard .stats-raw-data {
  display: block;
  margin: 1rem 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream-warm);
}

.stats-dashboard .stats-raw-data > summary {
  display: flex;
  min-height: 2.7rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem;
  color: var(--forest);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.69rem;
  font-weight: 750;
  list-style: none;
}

.stats-dashboard .stats-raw-data > summary::after {
  content: "+";
  font-size: 0.9rem;
}

.stats-dashboard .stats-raw-data[open] > summary::after {
  content: "−";
}

.stats-dashboard .stats-raw-data .tableresponsive-toggle-columns {
  display: none;
}

.stats-dashboard .stats-raw-data .ds-data-table {
  min-width: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.stats-dashboard .stats-raw-data .item-list {
  padding: 0 0.9rem 0.9rem;
}

.stats-dashboard .stats-raw-data .item-list ul {
  margin: 0;
  padding-left: 1.1rem;
}

.stats-dashboard .stats-raw-data .item-list li {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

@media (max-width: 1100px) {
  .stats-dashboard .cdw-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-quality {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .stats-dashboard__intro {
    display: block;
  }

  .stats-dashboard__actions {
    margin-top: 1rem;
  }

  .stats-dashboard .cdw-cards,
  .stats-quality__grid,
  .stats-dashboard .cdw-tables,
  .stats-price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-panel--department .stats-bars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .stats-dashboard .cdw-cards,
  .stats-quality__grid,
  .stats-dashboard .cdw-tables,
  .stats-price-grid {
    grid-template-columns: 1fr;
  }

  .stats-dashboard .stats-panel--department,
  .stats-dashboard .stats-panel--price {
    grid-column: auto;
  }

  .stats-dashboard__actions {
    display: grid;
  }
}

/* Horse directory search and filter panel. */
.path-chevaux .view-chevaux .view-header {
  margin-bottom: 1rem;
}

.path-chevaux .view-chevaux .list-links {
  margin: 0;
}

.path-chevaux .view-chevaux .view-filters {
  margin-bottom: 1.35rem;
}

.horse-filter-form {
  display: grid;
  gap: 0.8rem;
}

.horse-search-bar {
  display: grid;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(85, 112, 44, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(186, 214, 136, 0.17), rgba(247, 244, 236, 0.52));
  grid-template-columns: minmax(11rem, 0.4fr) minmax(20rem, 1fr);
}

.horse-search-bar__copy span,
.horse-search-bar__copy strong {
  display: block;
}

.horse-search-bar__copy span {
  margin-bottom: 0.2rem;
  color: var(--moss);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.horse-search-bar__copy strong {
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 550;
}

.horse-search-bar__control {
  position: relative;
}

.horse-search-bar .form-item-title {
  display: block;
  width: 100%;
  min-width: 0;
}

.horse-search-bar .form-item-title label {
  position: absolute;
  width: 1px !important;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.horse-search-bar input[type="search"] {
  width: 100% !important;
  max-width: none !important;
  min-height: 3.15rem;
  padding: 0.7rem 9.5rem 0.7rem 2.8rem !important;
  border-color: var(--line-strong) !important;
  background:
    url("../images/search.svg") no-repeat 0.9rem center / 1.2rem,
    #fff !important;
  font-size: 0.92rem;
}

.horse-search-bar__clear {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  min-height: 2rem;
  padding: 0.3rem 0.65rem;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--forest);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
}

.horse-search-bar__count {
  position: absolute;
  right: 0.8rem;
  bottom: -1.2rem;
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.horse-search-bar__clear:not([hidden]) + .horse-search-bar__count {
  right: 5.2rem;
  bottom: 1rem;
}

.horse-advanced-filters {
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--card);
}

.horse-advanced-filters > summary {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
}

.horse-advanced-filters > summary::-webkit-details-marker {
  display: none;
}

.horse-advanced-filters > summary::after {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--forest);
  content: "+";
  display: grid;
  font-size: 1rem;
  place-items: center;
}

.horse-advanced-filters[open] > summary::after {
  content: "−";
}

.horse-advanced-filters > summary strong,
.horse-advanced-filters > summary small {
  display: block;
}

.horse-advanced-filters > summary strong {
  font-size: 0.82rem;
}

.horse-advanced-filters > summary small {
  margin-top: 0.12rem;
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.horse-filter-grid {
  display: grid !important;
  gap: 0.85rem !important;
  padding: 1rem;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.path-chevaux .horse-filter-grid > div {
  display: block;
  width: auto !important;
  min-width: 0 !important;
}

.path-chevaux .horse-filter-grid label {
  display: block;
  width: auto !important;
  min-height: 2.1em;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 750;
}

.path-chevaux .horse-filter-grid input:not([type="submit"]),
.path-chevaux .horse-filter-grid select {
  width: 100% !important;
  max-width: none !important;
}

.path-chevaux .horse-filter-grid .form-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

.path-chevaux .horse-filter-grid .form-actions input {
  height: auto;
  margin: 0;
}

.app-shell .button--secondary,
.app-shell .horse-filter-reset {
  border-color: var(--line-strong);
  background: var(--cream-warm);
  color: var(--forest);
}

.app-shell .button--secondary:hover,
.app-shell .horse-filter-reset:hover {
  border-color: var(--moss);
  background: rgba(186, 214, 136, 0.2);
  color: var(--forest-deep);
}

.path-chevaux .view-chevaux .view-content {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.path-chevaux .view-chevaux table {
  min-width: 62rem;
  border: 0;
  border-radius: 0;
}

.path-chevaux .view-chevaux table th {
  position: sticky;
  z-index: 1;
  top: 0;
  padding-block: 0.85rem;
}

.path-chevaux .view-chevaux table td {
  vertical-align: middle;
}

:is(.view-chevaux, .view-mes-chevaux, .view-proprios) .views-field-field-photos {
  width: 11rem;
}

:is(.view-chevaux, .view-mes-chevaux, .view-proprios) .views-field-field-photos img {
  width: 160px;
  height: 110px;
  border-radius: 8px;
  object-fit: cover;
}

.path-chevaux .view-chevaux td.views-field-title {
  color: var(--forest-deep);
  font-weight: 750;
}

.path-chevaux .view-chevaux td.views-field-nid a {
  display: inline-flex;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(186, 214, 136, 0.2);
  font-size: 0.7rem;
  font-weight: 750;
}

.horse-no-results {
  padding: 3rem 1rem;
  text-align: center;
}

.horse-no-results strong,
.horse-no-results span {
  display: block;
}

.horse-no-results strong {
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 550;
}

.horse-no-results span {
  margin-top: 0.4rem;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .app-shell--authenticated .region-header {
    padding-right: 0;
  }

  .app-shell--authenticated #block-trotteurs-views-block-info-user-block-1 {
    position: static;
    margin-left: auto;
    transform: none;
  }

  .app-shell--authenticated #block-navigationprincipale {
    max-width: calc(100% - 220px);
    overflow-x: auto;
  }

  .app-shell--authenticated #superfish-main {
    flex-wrap: nowrap;
  }

  .home-dashboard__hero {
    grid-template-columns: 1fr;
  }

  .home-dashboard__status {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .horse-search-bar {
    grid-template-columns: 1fr;
  }

  .horse-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell--authenticated .ds-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .app-shell--authenticated > header[role="banner"] > .container,
  .app-shell--authenticated .main-wrapper > .container {
    padding-inline: 0.85rem;
  }

  .app-shell--authenticated .region-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding-block: 0.65rem;
  }

  .app-shell--authenticated #block-navigationprincipale {
    order: 3;
    width: 100%;
    max-width: none;
    padding: 0;
    overflow-x: hidden;
  }

  .app-shell--authenticated #superfish-main {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .app-shell--authenticated #block-trotteurs-views-block-info-user-block-1 {
    margin-left: auto;
  }

  .app-shell--authenticated .layout-content {
    padding: 1rem;
  }

  .app-shell--authenticated .layout-sidebar-first,
  .app-shell--authenticated .layout-sidebar-second {
    float: none;
    width: 100%;
    padding-inline: 0;
  }

  .app-shell--authenticated.has-sidebar-first .layout-content,
  .app-shell--authenticated.has-sidebar-first.has-sidebar-second .layout-content {
    width: 100%;
  }

  .app-shell--authenticated table {
    display: block;
    overflow-x: auto;
  }

  .home-dashboard__hero {
    min-height: 0;
  }

  .home-dashboard__welcome,
  .home-dashboard__status,
  .home-dashboard__section {
    padding: 1.25rem;
  }

  .home-dashboard__actions,
  .home-dashboard__support-links,
  .horse-filter-grid,
  .app-shell--authenticated .ds-filter-grid {
    grid-template-columns: 1fr;
  }

  .home-dashboard__section-heading {
    display: block;
  }

  .home-dashboard__section-heading > p {
    margin-top: 0.5rem;
  }

  .home-dashboard__support-links a + a {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .horse-search-bar {
    padding: 0.85rem;
  }

  .horse-search-bar input[type="search"] {
    padding-right: 5.5rem !important;
  }

  .horse-search-bar__count,
  .horse-search-bar__clear:not([hidden]) + .horse-search-bar__count {
    position: static;
    display: block;
    margin-top: 0.4rem;
  }
}

@media print {
  .app-shell--authenticated .layout-content,
  .app-shell--authenticated .layout-sidebar-first .block,
  .app-shell--authenticated .layout-sidebar-second .block {
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }
}

/* Operational forms use the same readable labels as the navigation. */
.app-shell.app-shell form label,
.app-shell.app-shell form .label,
.app-shell.app-shell .form-item > label,
.app-shell.app-shell form legend,
.app-shell.app-shell th,
.app-shell.app-shell th a,
.app-shell.app-shell th :is(h2, h3, h4, h5, h6),
.app-shell.app-shell .horizontal-tabs-list a,
.app-shell.app-shell .vertical-tabs__menu a {
  font-family: var(--sans);
  font-style: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1.5;
}
.app-shell .passerelle-partner-followup table { width: 100%; }
.app-shell .passerelle-partner-followup td { vertical-align: top; }
@media (max-width: 640px) {
  :is(.view-chevaux, .view-mes-chevaux, .view-proprios) .views-field-field-photos img {
    width: 120px;
    height: 83px;
  }
}

/* Administrator is a separate role, not a synonym for Webmaster. */
body.role-administrator .app-shell .lk-gest,
body.role-administrator .app-shell .lk-structure,
body.role-administrator .app-shell .field--name-field-afficher-sur-la-carte,
body.role-administrator .app-shell .field--name-field-cheval-reserve,
body.role-administrator .app-shell .field--name-field-prix-pour-affichage-sur-le,
body.role-administrator .app-shell .form-item-field-je-suis-custom,
body.role-administrator .app-shell #edit-footer,
body.role-administrator .app-shell .field--name-field-date-de-validation-setf {
  display: block !important;
}
body.role-administrator .app-shell .field--name-field-etat-dossier-setf select,
body.role-administrator .app-shell .field--name-field-validite-du-livret select,
body.role-administrator .app-shell .field--name-field-validite-de-la-carte-de-pr select,
body.role-administrator .app-shell .field--name-field-validite-ael select {
  pointer-events: auto;
  appearance: auto;
  border: 1px solid var(--line);
  background: var(--cream-warm);
}

.home-dashboard > *,
.passerelle-partner-followup,
.passerelle-partner-followup details {
  min-width: 0;
}
.app-shell .passerelle-partner-followup details {
  display: block;
}
.app-shell .passerelle-partner-followup .details-wrapper {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
