/* Habillage commun Déclic · ETHICS. Bootstrap local conserve ses composants et comportements. */
:root {
  --brand: #21796b;
  --accent: #21796b;
  --ui-ink: #203c3d;
  --ui-muted: #64756a;
  --ui-line: #dce3d7;
  --ui-canvas: #f8f9f5;
  --ui-soft: #edf2e8;
  --ui-radius: 7px;
  --bs-primary: #21796b;
  --bs-primary-rgb: 33, 121, 107;
  --bs-link-color-rgb: 33, 121, 107;
  --bs-link-hover-color-rgb: 23, 92, 80;
  --bs-primary-text-emphasis: #175c50;
  --bs-primary-bg-subtle: #edf2e8;
  --bs-primary-border-subtle: #c5d2be;
  --bs-body-font-family: 'DM Sans', Arial, sans-serif;
  --bs-body-color: var(--ui-ink);
  --bs-secondary-color: var(--ui-muted);
  --bs-secondary-rgb: 100, 117, 106;
  --bs-tertiary-bg: #f4f6ef;
  --bs-secondary-bg: #edf2e8;
  --bs-border-color: var(--ui-line);
  --bs-link-color: #21796b;
  --bs-link-hover-color: #175c50;
}
body {
  background-color: var(--ui-canvas);
  background-image: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ui-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1;
  min-width: 0;
}
a {
  text-underline-offset: 0.2em;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ui-ink);
  font-weight: 600;
  line-height: 1.3;
  font-family: Manrope, 'DM Sans', Arial, sans-serif;
}
h1,
.h1 {
  letter-spacing: -0.04em;
}
h2,
.h2,
.h3 {
  letter-spacing: -0.025em;
}
:focus-visible {
  outline: 3px solid #21796b;
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1100;
  padding: 0.7rem 1rem;
  background: #fff;
  color: var(--brand);
  border-radius: 8px;
}
.skip-link:focus {
  top: 0.5rem;
}
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--ui-line);
}
.site-header .container,
.site-footer,
.site-main {
  max-width: 1240px;
}
.site-header nav {
  min-height: 90px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ui-ink);
  text-decoration: none;
  font-weight: 750;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}
.brand:hover {
  color: var(--brand);
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--accent);
  color: #203c3d;
  font-weight: 800;
  font-size: 1.3rem;
}
.brand-caption {
  display: block;
  color: var(--ui-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.account-menu {
  position: relative;
  color: var(--brand);
  min-width: 0;
}
.account-menu summary {
  cursor: pointer;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.account-menu summary:hover,
.account-menu[open] summary {
  background: var(--ui-soft);
}
.account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.7rem);
  z-index: 1050;
  width: 300px;
  max-width: 88vw;
  background: #fff;
  padding: 1.5rem;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  box-shadow: 0 20px 55px #203c3d20;
}
.site-main {
  padding-top: clamp(1.8rem, 4vw, 3.4rem) !important;
  padding-bottom: 4rem !important;
}
.site-footer {
  color: var(--ui-muted);
  font-size: 0.78rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--ui-line);
}
.eyebrow {
  color: var(--ui-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.ui-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.2rem;
}
.ui-page-heading h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.55rem);
  margin-bottom: 0.6rem;
}
.ui-page-heading p {
  margin-bottom: 0;
  color: var(--ui-muted);
  max-width: 65ch;
}
.content-card {
  min-height: 210px;
}
.site-main > .content-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0 !important;
}
.card,
.ui-surface {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: 0 3px 14px #203c3d04;
}
.card-body {
  padding: 1.7rem;
}
.ui-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.ui-module-card {
  min-width: 0;
  height: 100%;
}
.ui-module-card .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ui-module-card .card-title {
  font-size: 1.2rem;
  margin-block: 0.85rem 0.7rem;
  overflow-wrap: anywhere;
}
.ui-module-card.is-unpublished {
  border-inline-start: 3px solid #b42318;
}
.ui-card-link {
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
  text-decoration: none;
  color: var(--ui-ink);
  transition:
    border-color 140ms,
    box-shadow 140ms;
}
.ui-card-link:hover {
  border-color: #a6baa9;
  box-shadow: 0 9px 24px #203c3d09;
  color: var(--ui-ink);
}
.ui-card-link .card-title {
  margin-top: 0.8rem;
}
.ui-open-label {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand);
}
.ui-description {
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: #617363;
  font-size: 0.93rem;
  margin-bottom: 1.2rem;
}
.ui-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.3rem;
  color: var(--ui-muted);
  font-size: 0.75rem;
  margin-bottom: 1.1rem;
}
.ui-dates > span {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.ui-card-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-top: 1.25rem;
  margin-top: auto;
  border-top: 1px solid var(--ui-line);
}
.ui-card-actions .ui-delete {
  margin-left: auto;
  color: #9c3e47;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 0.55rem;
  border-radius: 8px;
}
.ui-delete:hover {
  background: #fdf0f1;
  color: #842a33;
  text-decoration: underline;
}
.ui-access {
  font-size: 0.8rem;
  color: var(--ui-muted);
  margin-block: 0 0.9rem;
}
.ui-technical {
  font-size: 0.75rem;
  color: var(--ui-muted);
  margin-bottom: 1.1rem;
}
.ui-technical summary {
  cursor: pointer;
  width: fit-content;
}
.ui-technical code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ui-muted);
  font-size: inherit;
  margin-top: 0.5rem;
}
.ui-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.5rem;
}
.badge {
  font-weight: 600;
  font-size: 0.7rem;
  border-radius: 7px;
  padding: 0.45rem 0.65rem;
  letter-spacing: 0.01em;
}
.badge.text-bg-warning {
  color: #755811 !important;
  background: #fff5d5 !important;
}
.badge.text-bg-secondary {
  color: #546177 !important;
  background: #eff3eb !important;
}
.badge.text-bg-success,
.ui-status-published {
  color: #416554 !important;
  background: #edf5f0 !important;
}
.btn {
  border-radius: 5px;
  padding: 0.7rem 1.05rem;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.45;
  transition:
    background-color 140ms,
    border-color 140ms;
}
.btn-sm {
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
}
.btn-brand {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}
.btn-brand:hover,
.btn-brand:focus-visible {
  background: #186356;
  border-color: #186356;
  color: #ffffff;
}
.btn-outline-dark,
.btn-outline-secondary,
.ui-btn-secondary {
  background: #fff;
  border: 1px solid #dce3d7;
  color: var(--brand);
}
.btn-outline-dark:hover,
.btn-outline-secondary:hover,
.ui-btn-secondary:hover {
  background: var(--ui-soft);
  color: #203c3d;
  border-color: #a6baa9;
}
.btn-outline-danger {
  border-color: #ebd7db;
  color: #9c3e47;
  background: #fff;
}
.btn-outline-danger:hover,
.btn-danger {
  color: #fff;
  background: #aa3c49;
  border-color: #aa3c49;
}
.btn-danger:hover {
  background: #8e2d38;
  border-color: #8e2d38;
}
.btn:disabled {
  opacity: 0.55;
}
.form-label,
legend {
  color: #526c55;
  font-weight: 500;
  font-size: 0.87rem;
  margin-bottom: 0.55rem;
}
.form-control,
.form-select {
  padding: 0.75rem 0.9rem;
  border: 1px solid #d8e0d2;
  border-radius: 5px;
  font-size: 0.93rem;
  color: var(--ui-ink);
  background-color: #fff;
}
.form-select {
  padding-right: 2.5rem;
}
.form-control-sm,
.form-select-sm {
  padding-block: 0.55rem;
  font-size: 0.85rem;
}
.form-control:focus,
.form-select:focus {
  border-color: #6e9b80;
  box-shadow: 0 0 0 3px #21796b12;
}
textarea.form-control {
  line-height: 1.7;
  resize: vertical;
}
.form-control[readonly] {
  background: #f0f3ea;
}
.form-control::placeholder {
  color: #707e6b;
}
.form-control::file-selector-button {
  background: #edf2e8;
  color: var(--brand);
  padding-block: 0.75rem;
}
.form-check {
  padding-left: 1.8rem;
  margin-block: 0.55rem;
}
.form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin-left: -1.8rem !important;
  margin-top: 0.3rem;
  border-color: #9cac98;
}
.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}
.invalid-feedback {
  font-size: 0.82rem;
  margin-top: 0.45rem;
}
.ui-settings {
  max-width: 880px;
  padding: clamp(1.25rem, 4vw, 2.4rem);
}
.ui-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 2rem;
  min-width: 0;
}
.ui-fieldset + .ui-fieldset {
  border-top: 1px solid var(--ui-line);
  padding-top: 1.8rem;
}
.ui-fieldset legend {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  float: none;
}
.ui-fieldset .form-control,
.ui-fieldset .form-select {
  margin-bottom: 1.25rem;
}
.ui-help {
  color: var(--ui-muted);
  font-size: 0.79rem;
  margin-top: -0.45rem;
  margin-bottom: 1.15rem;
}
.ui-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.5rem;
}
.ui-save-bar {
  border-top: 1px solid var(--ui-line);
  padding-top: 1.5rem;
  margin-top: 0.3rem;
}
.ui-context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1rem;
  margin-bottom: 1.5rem;
}
.ui-context h2 {
  font-size: 1.05rem;
  margin: 0;
}
.ui-context .ui-technical {
  margin: 0;
}
.nav-tabs {
  display: inline-flex;
  max-width: 100%;
  gap: 0.35rem;
  border: 0;
  border-radius: 13px;
  background: #edf2e8;
  padding: 0.35rem;
  margin-bottom: 1.8rem !important;
}
.nav-tabs .nav-link {
  border: 0;
  border-radius: 9px;
  color: #617363;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.75rem 1.2rem;
}
.nav-tabs .nav-link:hover {
  border: 0;
  color: var(--ui-ink);
  background: #ffffff70;
}
.nav-tabs .nav-link.active {
  border: 0;
  color: var(--ui-ink);
  background: #fff;
  box-shadow: 0 2px 6px #203c3d0d;
}
.tab-pane:focus-visible {
  outline-offset: 6px;
}
.ui-discussion {
  max-width: 920px;
}
.ui-discussion > p {
  max-width: 70ch;
}
.ui-discussion .list-group-numbered {
  gap: 1.1rem;
}
.ui-discussion .list-group-item {
  background: transparent;
  border: 0;
  border-radius: 0 !important;
  padding: 1.5rem 0 !important;
}
.ui-discussion .list-group-item + .list-group-item {
  border-top: 1px solid var(--ui-line);
}
.ui-discussion .list-group-item::before {
  display: inline-grid;
  place-items: center;
  min-width: 1.8rem;
  height: 1.8rem;
  border-radius: 8px;
  background: var(--ui-soft);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 0.6rem;
}
.ui-discussion .list-group-item h2 {
  font-size: 0.97rem;
  font-weight: 700;
}
.ui-discussion .list-group-item > p {
  font-size: 0.88rem;
  color: var(--ui-muted);
  margin-top: 0.8rem;
}
.ui-discussion #prompt-ia {
  font-size: 0.8rem;
  min-height: 240px;
  margin-top: 0.7rem;
}
.ui-upload {
  background: #f4f6ef;
  border: 1px dashed #adbfac;
  border-radius: 6px;
  padding: 1.2rem;
  margin-top: 1rem;
}
.ui-back {
  display: inline-block;
  text-decoration: none;
  color: var(--ui-muted);
  font-size: 0.85rem;
  margin-bottom: 1.6rem;
}
.ui-back:hover {
  color: var(--brand);
  text-decoration: underline;
}
.ui-form-nav {
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--ui-line);
}
.ui-form-nav .btn {
  background: transparent;
  border-color: transparent;
}
.ui-form-nav .btn[aria-current='page'] {
  background: #fff;
  border-color: var(--ui-line);
  color: var(--ui-ink);
}
.alert {
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.alert-success {
  color: #315e4b;
  background: #edf7f0;
  border-color: #d4e9dd;
}
.alert-danger {
  color: #8d3541;
  background: #fff1f2;
  border-color: #f0d6dc;
}
.alert-warning {
  color: #77591b;
  background: #fff8e5;
  border-color: #f1e4bd;
}
.alert-info,
.alert-light {
  color: #526c50;
  background: #edf2e6;
  border-color: #dce5d4;
}
.ui-empty {
  background: #fff;
  border: 1px dashed #c5d2be;
  border-radius: var(--ui-radius);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--ui-muted);
}
.ui-empty h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.login-card {
  max-width: 530px;
  margin: 2vh auto;
  padding: clamp(1.6rem, 4vw, 3rem) !important;
  box-shadow: 0 15px 55px #203c3d08;
}
.login-card .brand-mark {
  width: 50px;
  height: 50px;
  font-size: 1.7rem;
}
.login-card h1 {
  font-size: 2rem;
}
.site-main .fm-formulaire {
  max-width: 800px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.site-main .fm-formulaire > .mb-3 {
  margin-bottom: 1.5rem !important;
}
.site-main .fm-indicateur,
.site-main .fm-panneau {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
  padding: 1.5rem;
}
.site-main .fm-indicateur {
  border-top: 1px solid var(--ui-line);
}
.site-main .fm-indicateur-valeur {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand);
  letter-spacing: -0.035em;
  margin-bottom: 0.4rem;
}
.site-main .fm-panneau > h2 {
  margin-bottom: 1.4rem;
}
.site-main .fm-filtres {
  padding: 1.4rem;
  background: #fff;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  margin-inline: 0;
  row-gap: 0.75rem;
}
.table-responsive {
  background: #fff;
  border: 1px solid var(--ui-line);
  border-radius: 7px;
}
.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: #f4f6ef;
  --bs-table-hover-bg: #edf2e8;
  color: var(--ui-ink);
  font-size: 0.87rem;
  margin-bottom: 0;
}
.table > :not(caption) > * > * {
  padding: 1rem;
  border-bottom-color: #eff3eb;
}
.table thead th {
  background: #f4f6ef;
  color: #617363;
  font-size: 0.74rem;
  font-weight: 600;
  vertical-align: middle;
}
.table caption {
  padding: 1rem;
  color: var(--ui-muted);
}
.page-link {
  color: var(--brand);
  background: #fff;
  border-color: var(--ui-line);
  padding: 0.6rem 0.9rem;
}
.pagination .page-item.active .page-link {
  background: var(--brand);
  border-color: var(--brand);
}
.table details > summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
}
@media (min-width: 992px) {
  .site-main {
    padding-inline: 2rem;
  }
}
@media (max-width: 767px) {
  .ui-card-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .site-header nav {
    min-height: 78px;
    padding-block: 1rem !important;
    gap: 0.8rem !important;
  }
  .account-menu summary {
    max-width: 210px;
    font-size: 0.8rem;
    padding: 0.5rem;
  }
  .brand {
    font-size: 1.1rem;
    gap: 0.6rem;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 5px;
  }
  .site-main {
    padding-inline: 1.1rem;
  }
  .ui-page-heading {
    margin-bottom: 1.6rem;
    gap: 1.2rem;
  }
  .ui-page-heading > .btn {
    width: 100%;
  }
  .ui-module-card .card-body,
  .ui-card-link {
    padding: 1.35rem;
  }
  .ui-field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .nav-tabs {
    display: flex;
    width: 100%;
  }
  .nav-tabs .nav-link {
    flex: 1;
    padding: 0.7rem 0.5rem;
    font-size: 0.8rem;
  }
  .ui-discussion .list-group-item {
    padding: 1.5rem 0 !important;
  }
  .ui-dates {
    flex-direction: column;
    gap: 0.25rem;
  }
  .fm-graphique {
    max-width: 100%;
  }
}
@media (max-width: 420px) {
  .account-nav {
    width: 100%;
    justify-content: space-between;
  }
  .account-menu {
    min-width: 0;
  }
  .account-menu summary {
    max-width: 235px;
  }
  .brand-caption {
    font-size: 0.62rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
.ui-page-heading .eyebrow {
  margin-bottom: 0.6rem;
}

/* Sections de saisie : fond commun et séparations fines, sans cartes imbriquées. */
.ui-settings-blocks {
  max-width: 920px;
}
.ui-settings-blocks .ui-fieldset {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 1.8rem 0;
  margin: 0;
}
.ui-settings-blocks .ui-fieldset + .ui-fieldset {
  border-top: 1px solid var(--ui-line);
}
.ui-settings-blocks .ui-fieldset:first-of-type {
  padding-top: 0;
}
.ui-block-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.3rem;
  color: var(--ui-ink);
  font-size: 0.97rem;
  font-weight: 600;
}
.ui-block-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 1.8rem;
  height: 1.8rem;
  border-radius: 8px;
  background: var(--ui-soft);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
}
.ui-settings-blocks .ui-save-bar {
  border: 0;
  padding-top: 0.4rem;
}
.ui-card-states {
  margin-bottom: 0.65rem;
}
.ui-status-neutral {
  color: #617363;
  background: #edf2e8;
}
.ui-card-dates {
  margin-bottom: 1.2rem;
}
.ui-card-actions {
  flex-wrap: wrap;
}
.ui-card-id {
  margin: 0.8rem 0 0;
  text-align: right;
  overflow-wrap: anywhere;
  color: #64756a;
  font-size: 0.65rem;
  line-height: 1.6;
}
@media (max-width: 767px) {
  .ui-settings-blocks .ui-fieldset {
    padding: 1.5rem 0;
  }
}

.ui-page-id {
  margin-top: 2rem;
}

/* Contexte Admin : bandeau partagé sous le header, sans changer le fond du site. */
.admin-context-bar {
  width: 100%;
  background: #edf2e8;
  color: var(--brand);
}
.admin-context-bar > .container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 1240px;
  min-height: 48px;
}
.admin-context-bar .eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}
.admin-context-back {
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  min-height: 40px;
  color: var(--brand);
  font-size: 1.4rem;
  text-decoration: none;
  border-radius: 8px;
}
.admin-context-back:hover {
  background: #dce6d6;
  color: var(--brand);
}
.admin-context-back:focus-visible {
  outline-color: var(--brand);
}

.brand-logo {
  background: transparent;
  object-fit: contain;
}

/* Composants de saisie communs Déclic : structure indépendante des modules. */
.declic-champ {
  min-width: 0;
}
.declic-champ > fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.declic-champ .form-text,
.declic-champ .invalid-feedback,
.declic-champ .form-check-label {
  overflow-wrap: anywhere;
}

/* Édition des textes : aucune règle propre à un métier. */
.declic-texte-bloc {
  white-space: pre-line;
}
.declic-texte,
.declic-texte-ligne {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
  white-space: normal;
  min-width: 0;
}
.declic-texte {
  display: inline-grid;
  max-width: 100%;
  vertical-align: top;
}
.declic-texte-valeur {
  white-space: pre-line;
  overflow-wrap: anywhere;
  min-width: 0;
}
.declic-champ > .declic-texte-ligne {
  margin-bottom: 0.55rem;
}
.declic-texte-ligne > .form-label {
  margin-bottom: 0;
}
.declic-texte-ligne > .form-check {
  margin-block: 0;
  min-width: 0;
}
.declic-texte-crayon {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  min-height: 1.8rem;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1;
  white-space: normal;
}
.declic-texte-dialog {
  width: min(92vw, 680px);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #d8e0d2;
  border-radius: 14px;
  padding: 1.5rem;
  color: #21796b;
}
.declic-texte-dialog::backdrop {
  background: #1d253c80;
}

.declic-champ .form-text {
  white-space: pre-line;
}

/* Édition Admin : sections intégrées au fond de page. */
.ui-edit-block {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 1.5rem 0;
  margin-bottom: 0;
  min-width: 0;
}
.ui-edit-block + .ui-edit-block {
  border-top: 1px solid var(--ui-line);
}
fieldset.ui-edit-block > legend {
  float: none;
  width: auto;
  padding: 0;
}
.ui-edition-save {
  position: sticky;
  bottom: 0;
  z-index: 1010;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  background: var(--ui-canvas);
  padding: 1rem 0;
  border: 0;
  border-top: 1px solid var(--ui-line);
  border-radius: 0;
  box-shadow: none;
}
.ui-edition-save > p {
  flex: 1 1 18rem;
  margin: 0 !important;
  min-width: 0;
}
.ui-edition-save > button {
  margin-left: auto;
}
#edition-message {
  flex-basis: 100%;
  order: 3;
}
.ui-edition-save > noscript {
  flex-basis: 100%;
  order: 4;
}
@media (max-width: 575px) {
  .ui-edition-save > p,
  .ui-edition-save > button {
    flex-basis: 100%;
  }
}
.declic-texte-en-attente {
  outline: 1px dashed #a38d20;
  outline-offset: 3px;
}

/* Session : information commune, indépendante des modules. */
.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.header-menu .account-nav {
  justify-content: flex-end;
  text-align: right;
}
.account-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  min-width: 0;
}
.account-identity-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  min-width: 0;
}
.account-avatar {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #e3ecdf;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
}
.account-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-identity-content {
  min-width: 0;
  flex: 0 1 auto;
}
.account-identity .account-menu summary {
  padding: 0.2rem 0.35rem;
}
.session-widget {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.25rem;
  justify-content: flex-end;
  width: auto;
  max-width: none;
}
#declic-session-compteur {
  font-size: 0.75rem;
}
.session-renew {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 32px;
  flex-shrink: 1;
  padding: 0.2rem 0.15rem;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border: 1px solid transparent;
  color: var(--brand);
}
.session-renew:hover {
  background: var(--ui-soft);
  border-color: var(--ui-line);
  color: var(--brand);
}
.session-widget > p {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 1060;
  width: 320px;
  max-width: calc(100vw - 2rem);
  padding: 0.8rem 1rem;
  margin: 0;
  border: 1px solid #dce5d4;
  border-radius: 6px;
  background: #edf2e6;
  color: #203c3d;
  box-shadow: 0 4px 16px #203c3d14;
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.session-widget.session-proche #declic-session-compteur {
  color: #8a5500 !important;
  font-weight: 700;
}
.session-widget.session-expiree #declic-session-compteur {
  color: #8e2d38 !important;
  font-weight: 700;
}
.site-version {
  white-space: nowrap;
}
@media (max-width: 575px) {
  .account-identity {
    flex: 1 1 220px;
  }
  .session-widget {
    max-width: 100%;
  }
}

/* Actions Admin : deux accès directs et menu secondaire à droite. */
.ui-card-menu {
  margin-left: auto;
  flex-shrink: 0;
}
.ui-card-menu-toggle {
  font-size: 1.4rem;
  line-height: 1;
  min-width: 2.25rem;
  min-height: 2.25rem;
}
.ui-card-menu .dropdown-menu {
  --bs-dropdown-font-size: 0.85rem;
  --bs-dropdown-min-width: 11rem;
  --bs-dropdown-padding-y: 0.35rem;
  z-index: 1020;
  font-family: var(--bs-body-font-family);
  font-weight: 400;
}
.ui-card-menu .dropdown-item {
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.45;
  padding: 0.6rem 0.9rem;
  min-height: 40px;
}
.ui-card-menu .dropdown-item:focus-visible {
  outline-offset: -3px;
}
@media (max-width: 380px) {
  .ui-card-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}

/* Annuaire central : suggestions et sélection dans le bloc de réglages. */
.annuaire-resultats,
.annuaire-selection {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
}
.annuaire-resultats {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  max-height: 20rem;
  overflow: auto;
}
.annuaire-proposition {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e9ecef;
  padding: 0.7rem;
  background: #fff;
  text-align: left;
  overflow-wrap: anywhere;
}
.annuaire-proposition:hover,
.annuaire-proposition:focus-visible {
  background: #eef5f3;
}
.annuaire-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.annuaire-selection li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.15rem 0.25rem 0.15rem 0.7rem;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: #edf2e8;
  color: var(--ui-ink);
  font-size: 0.85rem;
}
.annuaire-selection li span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.annuaire-retirer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0.2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.annuaire-retirer:hover {
  background: #dce8d6;
}
.annuaire-selecteur [data-annuaire-etat] {
  margin-block: 0.65rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.5;
}
.annuaire-saisie {
  margin-block: 0.8rem 1rem;
}
.annuaire-saisie > summary {
  cursor: pointer;
  color: var(--ui-muted);
  font-size: 0.8rem;
}

/* Parcours partagé : sections visibles sans JS ; menu latéral puis cartes mobiles. */
.declic-parcours {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.site-main .fm-formulaire:has(> .declic-parcours) {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}
.declic-etapes-nav {
  position: sticky;
  top: 1.5rem;
  background: #fff;
  border-right: 1px solid var(--ui-line);
  padding: 1.5rem 1.5rem 1.5rem 0;
}
.declic-etapes-liste {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.declic-etape-lien {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0.8rem;
  text-decoration: none;
  color: #536d60;
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.5;
  min-height: 64px;
}
.declic-etape-lien:hover {
  background: #f3f6ef;
  color: var(--brand);
}
.declic-etape-lien[aria-current='step'] {
  background: #e9f2e8;
  color: #176456;
}
.declic-etape-numero {
  display: grid;
  place-items: center;
  flex: 0 0 1.6rem;
  height: 1.6rem;
  border: 1px solid #a5bba6;
  border-radius: 50%;
  font-size: 0.7rem;
}
.declic-etape-libelles {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.declic-etape-groupe {
  display: block;
  color: #647b5f;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.declic-etapes-aide {
  border-top: 1px solid var(--ui-line);
  margin: 1.5rem 0 0;
  padding-top: 1.2rem;
  font-size: 0.75rem;
  color: var(--ui-muted);
}
.declic-etapes-contenu {
  min-width: 0;
  padding-top: 1.5rem;
}
.declic-etape + .declic-etape {
  margin-top: 3rem;
}
.declic-parcours[data-etapes-pretes] .declic-etape {
  margin-top: 0;
}
.declic-etape-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #64745c;
  text-transform: uppercase;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.declic-etape-meta .eyebrow {
  margin: 0;
}
.declic-etape h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.2rem;
}
.declic-etape .declic-champ {
  margin-bottom: 1.7rem !important;
}
.declic-etape .form-text {
  color: #65755d;
  font-size: 0.78rem;
  margin-top: 0.5rem;
}
.declic-etapes-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--ui-line);
  padding-top: 1.8rem;
  margin-top: 2.5rem;
}
.declic-etapes-compteur {
  font-size: 0.75rem;
  color: var(--ui-muted);
}
.declic-etapes-final {
  text-align: right;
  margin-top: 1.2rem;
}
.declic-etape-erreur {
  display: block;
  color: #9c3e47;
  font-size: 0.75rem;
  font-weight: 600;
}
.declic-parcours [hidden] {
  display: none !important;
}
.declic-encadre {
  padding: 1.3rem;
  background: #edf2e6;
  border: 1px solid #dce5d4;
  border-radius: 6px;
  color: #526c50;
  margin-block: 1.5rem 2rem;
}
.declic-encadre {
  font-size: 0.9rem;
  line-height: 1.7;
}
.declic-encadre > h2 {
  color: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.declic-encadre .text-secondary {
  color: inherit !important;
}
.declic-encadre > :last-child {
  margin-bottom: 0;
}
.declic-encadre summary {
  cursor: pointer;
  font-weight: 500;
}

.btn-brand:active,
.btn-brand:first-child:active {
  background: #175c50;
  border-color: #175c50;
  color: #fff;
}
.form-check-input:focus {
  border-color: #6e9b80;
  box-shadow: 0 0 0 3px #21796b20;
}
.nav-tabs {
  background: #edf2e8;
  border-radius: 10px;
  border-bottom: 0;
  padding: 0.3rem;
}
.nav-tabs .nav-link {
  background: transparent;
  border-radius: 7px;
  border: 1px solid transparent;
  font-weight: 500;
}
.nav-tabs .nav-link:hover {
  background: #e3ecdf;
  border: 1px solid transparent;
}
.nav-tabs .nav-link.active {
  background: #dce8d6;
  border: 1px solid var(--brand);
  box-shadow: none;
  color: var(--brand);
}
.nav-tabs .nav-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.nav-tabs .nav-link:disabled,
.nav-tabs .nav-link.disabled {
  color: var(--ui-muted);
  background: transparent;
  border-color: transparent;
  opacity: 0.65;
}
.modal-content,
.dropdown-menu {
  border-color: var(--ui-line);
  border-radius: var(--ui-radius);
}
.dropdown-item {
  color: var(--ui-ink);
}
.dropdown-item:active {
  background: var(--brand);
}
@media (max-width: 991px) {
  .declic-parcours {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .declic-etapes-nav {
    position: static;
    padding: 1rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
    background: transparent;
    min-width: 0;
  }
  .declic-etapes-liste {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.3rem 0.2rem 0.7rem;
    scroll-snap-type: x proximity;
  }
  .declic-etapes-liste li {
    flex: 0 0 190px;
    scroll-snap-align: start;
  }
  .declic-etape-lien {
    height: 100%;
    background: #f0f3eb;
    padding: 0.9rem 0.7rem;
  }
  .declic-etapes-aide {
    border-top: 0;
    margin-top: 0.5rem;
    padding-top: 0;
  }
  .declic-etapes-contenu {
    padding-top: 0;
  }
}
@media (max-width: 420px) {
  .declic-etapes-actions {
    gap: 0.5rem;
  }
  .declic-etapes-actions .btn {
    font-size: 0.8rem;
    padding-inline: 0.7rem;
  }
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: #175c50;
  --bs-btn-hover-border-color: #175c50;
  --bs-btn-active-bg: #175c50;
  --bs-btn-active-border-color: #175c50;
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
}
.progress {
  --bs-progress-bar-bg: var(--brand);
  --bs-progress-bg: var(--ui-soft);
}

.declic-etapes-pied {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--ui-line);
  padding-top: 1.8rem;
  margin-top: 2.5rem;
}
.declic-etapes-pied .declic-etapes-actions {
  flex: 1;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.declic-etapes-pied .declic-etapes-final {
  margin: 0 0 0 auto;
}
.declic-etapes-compteur {
  flex: 1;
  text-align: center;
}
.form-control:disabled,
.form-select:disabled {
  background-color: #f0f3ea;
  color: #64745c;
}
@media (max-width: 420px) {
  .declic-etapes-pied {
    gap: 0.5rem;
  }
  .declic-etapes-final .btn {
    font-size: 0.8rem;
    padding-inline: 0.7rem !important;
  }
}

/* Titres de niveau 2, y compris les tailles utilitaires Bootstrap. */
h2,
h2[class],
.h2 {
  font-weight: 700;
}

/* Disposition commune : ordre du DOM, sans remplissage dense ni position absolue. */
.declic-grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
  align-items: start;
  container-type: inline-size;
}
.declic-grille > [data-disposition-champ] {
  grid-column: 1 / -1;
  min-width: 0;
}
.declic-grille > [hidden] {
  display: none !important;
}
@media (min-width: 992px) {
  @container (min-width: 640px) {
    .declic-grille > [data-disposition-champ][data-largeur='1'] {
      grid-column: auto;
    }
  }
}
.declic-disposition-outils {
  display: none;
}
.declic-disposition-edition [data-editer-texte] {
  display: none;
}
.declic-disposition-edition .declic-texte,
.declic-disposition-edition .declic-texte-ligne {
  grid-template-columns: minmax(0, 1fr);
}
.declic-disposition-edition [data-disposition-champ] {
  border: 1px dashed #b6c9b0;
  border-radius: 6px;
  padding: 0.8rem;
}
.declic-disposition-edition .declic-disposition-outils {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}
.declic-disposition-outils .btn {
  min-height: 36px;
  font-size: 0.78rem;
}
.declic-disposition-outils [aria-pressed='true'] {
  background: #dce8d6;
  border-color: var(--brand);
  color: var(--brand);
}
.declic-disposition-edition [data-disposition-champ][data-visible-si][hidden] {
  display: block !important;
}
.declic-disposition-edition [data-disposition-champ][data-visible-si]::after {
  content: 'Champ soumis à une condition';
  display: block;
  color: var(--ui-muted);
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Catalogue d’icônes Déclic : dimensions communes, couleur héritée de l’action. */
.declic-icone {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.18em;
  flex-shrink: 0;
  pointer-events: none;
}
.btn > .declic-icone:not(:last-child),
.dropdown-item > .declic-icone,
.ui-back > .declic-icone {
  margin-inline-end: 0.35em;
}
.btn > .declic-icone:last-child:not(:first-child) {
  margin-inline-start: 0.35em;
}
.declic-texte-crayon .declic-icone {
  width: 1rem;
  height: 1rem;
}
.session-renew .declic-icone {
  width: 24px;
  height: 24px;
}
.declic-disposition-outils .declic-icone {
  width: 1rem;
  height: 1rem;
}
.declic-catalogue-icone .declic-icone {
  width: 24px;
  height: 24px;
  color: var(--brand);
}

/* Menu du header : visible sur ordinateur, dépliant sur téléphone. */
.header-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  color: var(--brand);
  border: 1px solid var(--ui-line);
  flex-shrink: 0;
}
.header-menu-toggle .declic-icone {
  width: 24px;
  height: 24px;
}
.header-menu {
  display: block !important;
}
@media (max-width: 767px) {
  .header-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }
  .site-header .brand-caption {
    display: none;
  }
  .header-menu {
    width: 100%;
    flex-basis: 100%;
  }
  .header-menu.collapse:not(.show) {
    display: none !important;
  }
  .header-menu.collapsing,
  .header-menu.collapse.show {
    display: block !important;
  }
  .header-menu .account-nav {
    justify-content: flex-end;
    text-align: right;
    padding-top: 0.8rem;
    border-top: 1px solid var(--ui-line);
  }
  .header-menu .account-panel {
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 0.5rem;
  }
  .header-menu .account-panel .btn {
    text-align: right;
  }
  .header-menu .account-identity {
    flex: 0 1 auto;
    width: 100%;
    align-items: flex-end;
  }
  .header-menu .account-identity-top {
    justify-content: flex-end;
    max-width: 100%;
  }
  .header-menu .account-identity-content {
    flex: 0 1 auto;
  }
  .header-menu .session-widget {
    justify-content: flex-end;
    width: auto;
    max-width: 100%;
    gap: 0.15rem 0.25rem;
  }
  .header-admin + .header-menu-toggle {
    margin-left: 0;
  }
}

.ui-admin-heading-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}
.ui-catalogue-link {
  color: var(--ui-muted);
  font-size: 0.75rem;
  line-height: 1.25;
  text-decoration: none;
}
.ui-catalogue-link:hover {
  color: var(--brand);
  text-decoration: underline;
}
@media (max-width: 767px) {
  .ui-admin-heading-actions {
    width: 100%;
    align-items: stretch;
  }
  .ui-catalogue-link {
    align-self: flex-end;
  }
}

.header-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  height: 52px;
  min-height: 52px;
  min-width: 88px;
  padding-inline: 1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.account-name {
  color: var(--brand);
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.session-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.session-logout {
  display: inline-flex;
  margin: 0;
}
.session-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0.25rem;
  border: 1px solid transparent;
  color: var(--brand);
}
.session-logout-button .declic-icone {
  width: 24px;
  height: 24px;
}
.session-logout-button:hover {
  background: var(--ui-soft);
  border-color: var(--ui-line);
  color: var(--brand);
}
@media (max-width: 767px) {
  .header-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    min-height: 44px;
    min-width: 64px;
    padding-inline: 0.75rem;
  }
  .account-name {
    font-size: 0.8rem;
  }
}

/* Séparation entre l’action Admin et les deux lignes du compte sur ordinateur. */
.header-account-separator {
  display: block;
  width: 1px;
  height: 48px;
  flex: 0 0 1px;
  background: var(--ui-line);
}
@media (max-width: 767px) {
  .header-account-separator {
    display: none;
  }
  .header-account-separator + .header-menu-toggle {
    margin-left: 0;
  }
}

.account-identity-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}
.header-super {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0.25rem;
  color: #934b4b;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.header-super:hover {
  color: #733636;
  background: #f9eceb;
  border-color: #edd4d1;
}
.header-super .declic-icone {
  width: 20px;
  height: 20px;
}
.super-context-bar {
  background: #f9eceb;
  border-color: #edd4d1;
}
.super-context-bar .eyebrow,
.super-context-bar .admin-context-back {
  color: #8a4242;
}
.super-report-text {
  white-space: pre-line;
  min-width: 180px;
  max-width: 440px;
  overflow-wrap: anywhere;
}

.ui-status-unpublished {
  color: #b42318 !important;
  background: #fee4e2 !important;
}

/* Cycle de vie du formulaire : les mêmes repères sur les cartes et pages DEV. */
.cycle-card { overflow: visible; }
.cycle-card-heading { padding: 1.5rem; }
.cycle-card-heading p { margin-bottom: 0; color: var(--ui-muted, #60716a); }
.cycle-environment { border-top: 1px solid #dce5dd; padding: 1.2rem 1.5rem; }
.cycle-dev { background: #f3f6fa; }
.cycle-environment-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.cycle-environment-heading strong { letter-spacing: 0.05em; }
.cycle-caption { margin: 0.65rem 0 0; font-size: 0.82rem; color: #586c65; }
.cycle-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.cycle-card-footer { padding: 0.9rem 1.5rem; border-top: 1px solid #dce5dd; font-size: 0.8rem; color: #586c65; }
.ui-status-dev { color: #234e80 !important; background: #dfeaf8 !important; }
.declic-dev-banner { display: flex; flex-direction: column; gap: 0.35rem; background: #fff1c2; color: #563c08; border: 2px solid #b47700; border-inline-start-width: 8px; border-radius: 6px; padding: 1rem 1.3rem; margin-bottom: 1.5rem; }
.declic-dev-banner strong { font-size: 1rem; letter-spacing: 0.04em; }
.declic-dev-banner span { font-size: 0.9rem; }
@media (max-width: 575.98px) {
  .cycle-card-heading, .cycle-environment { padding: 1rem; }
  .cycle-actions .btn { flex-grow: 1; }
}

.acces-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.acces-card-heading .card-title { flex: 1 1 12rem; margin-top: 0; }
.acces-card-button { white-space: nowrap; }
#acces-tdb-form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
#acces-tdb-form .modal-body { overflow-y: auto; }
#acces-tdb-form fieldset { min-width: 0; }
#acces-tdb-form .annuaire-resultats { position: static; }

/* Consultation et contacts : mêmes espacements que les cartes de gestion. */
.consultation-card .cycle-card-heading { padding: 1.5rem; }
.consultation-card .cycle-card-heading p + p { margin-top: 0.6rem; }
.consultation-environment { display: flex; align-items: center; justify-content: space-between; gap: 0.85rem; flex-wrap: wrap; }
.consultation-environment p { margin: 0; }
.ui-form-contact { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; margin-top: 0.3rem; font-size: 0.76rem; }
.ui-form-contact a { color: inherit; text-underline-offset: 0.15em; overflow-wrap: anywhere; }
.ui-form-serial { overflow-wrap: anywhere; }
.acces-person-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, 13rem) 4rem; align-items: center; gap: 0.75rem; padding: 0.75rem 0.6rem; border-bottom: 1px solid #e4eae6; }
.acces-person-row.is-owner { background: #f3f7f4; border-radius: 0.4rem; }
.acces-person-row .form-select { width: 100%; }
#acces-personnes-liste { max-height: none; overflow: visible; }
@media (max-width: 575.98px) {
  .consultation-card .cycle-card-heading, .consultation-card .cycle-environment, .consultation-card .cycle-card-footer { padding: 1rem; }
  .consultation-environment .btn { width: 100%; }
  .acces-person-row { grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; }
  .acces-person-row > .acces-person-email { grid-column: 1 / -1; }
}

/* Utiliser la hauteur de l’écran ; un seul défilement dans le corps de la popup. */
#acces-tdb-modal .modal-dialog { height: calc(100vh - 1rem); height: calc(100dvh - 1rem); margin-top: 0.5rem; margin-bottom: 0.5rem; }
#acces-tdb-modal .modal-content { height: 100%; }
#acces-tdb-form { height: 100%; max-height: 100%; }
#acces-tdb-form .modal-body { min-height: 0; flex: 1 1 auto; }
@media (max-width: 575.98px) {
  #acces-tdb-modal .modal-dialog { height: 100%; margin: 0; }
}

.acces-person-row.is-readonly { grid-template-columns: minmax(0, 1fr) minmax(10rem, 13rem); }
@media (max-width: 575.98px) {
  .acces-person-row.is-readonly { grid-template-columns: minmax(0, 1fr); }
}

/* Menus d’actions des cartes : même taille que l’information du propriétaire. */
.cycle-card .dropdown-menu { --bs-dropdown-font-size: 0.875rem; font-size: 0.875rem; }
.cycle-card .dropdown-item, .cycle-card .dropdown-item-text { font-size: inherit; }

/* Comparaison avant mise en production : mêmes composants que la gestion. */
.production-report summary { cursor: pointer; }
.production-report table { table-layout: fixed; min-width: 34rem; }
.production-report th:first-child { width: 28%; }
.production-report-value { white-space: pre-wrap; overflow-wrap: anywhere; }
