/* WiseDyn admin2 - page/business-specific patches. Shared admin design lives in /front/components/admin/admin.css. */
.sidebar-publish {
  display: flex;
  justify-content: center;
  padding: 0 4px 2px;
}

.sidebar-publish-btn {
  min-height: 30px;
  justify-content: center;
  text-align: center;
  gap: 7px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 12px;
  line-height: 1.1;
}

.admin-mel-modal {
  text-align: center;
}

.admin-mel-modal h4 {
  margin: 0 0 18px;
  font-size: 18px;
}

.admin-mel-body {
  min-height: 92px;
}

.home-dev-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: -18px 0 10px;
  padding: 7px 18px 7px 10px;
  background: transparent;
  position: relative;
  z-index: 20;
}

.home-dev-topbar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -9999px;
  right: -9999px;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 1px 5px rgba(15, 23, 42, .08);
  z-index: -1;
}

.home-dev-spacer {
  flex: 1 1 auto;
}

.home-activity-dropdown,
.home-sites-dropdown {
  flex: 0 0 auto;
}

.home-activity-dropdown .nc-dropdown-bouton,
.home-sites-dropdown .nc-dropdown-bouton {
  padding: 4px 12px;
}

.home-activity-panel,
.home-sites-panel {
  left: auto;
  right: 0;
  overflow: auto;
}

.home-activity-panel {
  width: min(70rem, calc(100vw - 300px));
  min-width: min(70rem, calc(100vw - 300px));
  max-height: min(620px, calc(100vh - 150px));
}

.home-sites-panel {
  min-width: 260px;
  max-height: min(520px, calc(100vh - 150px));
}

.home-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.home-activity-head h6 {
  margin: 0;
  font-size: 13px;
}

.home-activity-table {
  margin: 0;
}

.home-activity-table a {
  color: inherit;
  text-decoration: none;
}

.home-activity-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.home-site-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.home-sites-panel .home-site-agence,
.home-sites-panel .home-site-domain {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.home-sites-panel .home-site-agence {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.home-sites-panel .home-site-domain span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


#pages-admin > .liste,
#repertoire {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#pages-admin > .liste:has(> .toolbar) {
  overflow: visible;
}

#repertoire-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}


#repertoire .table-scroll { --table-min-width: 900px; }


/* Module historique : redactionnels. */
.redactionnels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(216, 226, 236, .9);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(50, 50, 93, .08);
}

.redactionnels .banner {
  flex: 0 0 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel);
}

.redactionnels .content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.redactionnels .header-content,
.redactionnels .d-flex {
  display: flex !important;
}

.redactionnels .header-content {
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.redactionnels .icone {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
}

.redactionnels .icone img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.redactionnels .heading {
  color: var(--text);
  font-size: 17px;
  font-weight: 760;
  line-height: 1.2;
}

.redactionnels .description {
  color: var(--muted);
  font-size: 12px;
}

.redactionnels .icon-button,
.redactionnels .unstyled-button {
  border: 0;
  background: transparent;
}

.redactionnels .icon-button {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--accent);
  cursor: pointer;
}

.redactionnels .icon-button:hover {
  background: var(--accent-pale);
}

.redactionnels-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 0;
  margin: 0 0 10px;
  list-style: none;
}

.redactionnels-tab {
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
}

.redactionnels-tab:hover,
.redactionnels-tab.active {
  color: var(--accent);
  background: var(--accent-pale);
}

.redactionnels-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.redactionnels-list-item {
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background: transparent;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.redactionnels-list-item:hover,
.redactionnels-list-item.active {
  color: var(--accent);
  background: var(--accent-pale);
}

.redactionnels-panels {
  min-height: 0;
}

.redactionnels-pane {
  display: none;
}

.redactionnels-pane.active,
.redactionnels-pane.show {
  display: block;
}

.redactionnels-table tr:hover td {
  background: var(--accent-mist);
}

.redactionnels-table .date,
.redactionnels-table .action {
  white-space: nowrap;
}

.redactionnels-table .action {
  width: 1%;
  text-align: right;
}

.redactionnels .fit {
  min-height: 0;
  overflow-y: auto;
}

.redactionnels .badge {
  border-radius: 999px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.1;
}

.redactionnels .badge-primary { color: #fff !important; background: var(--accent) !important; }
.redactionnels .badge-secondary { color: #31465a !important; background: #edf2f7 !important; }
.redactionnels .badge-success { color: #fff !important; background: var(--success) !important; }
.redactionnels .badge-danger { color: #fff !important; background: var(--danger) !important; }
.redactionnels .badge-info { color: #fff !important; background: #0b84d8 !important; }
.redactionnels .badge-warning { color: #271500 !important; background: #ffd166 !important; }

.redactionnels label.bloc,
.redactionnels .bloc {
  display: block;
  margin: 12px 0 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
}

.url-preview {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--input-border, var(--border-soft));
  border-radius: var(--radius);
  color: var(--muted);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.35;
  margin-left: 0 !important;
  margin-top: .25rem !important;
  max-width: 100%;
  min-height: 38px;
  padding: 4px 10px;
}
.url-preview a {
  color: var(--text);
  text-decoration: none;
}
.url-preview a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.url-preview .sfs {
  color: var(--accent);
}

.redactionnels .modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
  background: rgba(15, 23, 42, .24);
}

.redactionnels .modal.show {
  display: block;
}

.redactionnels .modal-dialog {
  width: auto;
  max-width: 760px;
  margin: 32px auto;
  pointer-events: none;
}

.redactionnels .modal-lg { max-width: 960px; }

.redactionnels .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid rgba(216, 226, 236, .9);
  border-radius: 10px;
  box-shadow: var(--shadow);
  outline: 0;
}

.redactionnels .modal-header,
.redactionnels .modal-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.redactionnels .modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border-soft);
  border-bottom: 0;
}

.redactionnels .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.redactionnels .modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 760;
}

.redactionnels .btn-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.redactionnels .btn-close::before {
  content: "x";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}


/* --- chaine de hauteur FORCEE pour la liste redactionnels ---
   Specificite ID (#redactionnels) pour fiabiliser le remplissage jusqu'au tableau,
   sinon .content se replie (~84px) et la liste devient illisible. --- */
#redactionnels,
#redactionnels .content,
#redactionnels .content > .row,
#redactionnels .content > .row > .col-12,
#redactionnels .tab-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

#redactionnels .content {
  overflow: hidden;
}

#redactionnels .tab-content > .tab-pane.active,
#redactionnels .tab-content > .tab-pane.show.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  /* La tab-pane ne gere QUE le vertical (listes longues) : le scroll horizontal
     appartient au composant .table-scroll, sinon on a deux conteneurs imbriques. */
  overflow-x: hidden;
  overflow-y: auto;
}

/* La barre d'onglets garde sa hauteur naturelle : ni etirement, ni retrecissement.
   Sans flex-shrink:0, un onglet avec un tres grand tableau (ex. categorie Realisations,
   1653px) cree une pression flex qui ecrase la nav (34px -> 18px) et rogne les onglets. */
#redactionnels > .content > .nav {
  flex: 0 0 auto;
  overflow: visible;
}

/* --- projets --- */
#projets,
#projets .content,
#projets .tab-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

#projets .content {
  overflow: hidden;
}

#projets .tab-content > .tab-pane.active,
#projets .tab-content > .tab-pane.show.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#projets > .content > .nav {
  flex: 0 0 auto;
  overflow: visible;
}

#projets .table-scroll {
  flex: 1 1 auto;
}

.projets-suivi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}

.projets-suivi-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px;
  background: var(--table-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--table-rayon, var(--radius));
}

.projets-action-title {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-soft);
  margin-top: 4px;
  padding-top: 4px;
}

.projets-action-title:first-child {
  margin-top: 0;
}

.projets-action-table {
  overflow-x: auto;
}

#suivi .bloc,
#projet-actions > div > .bloc {
  display: none;
}

.form-projet .form-control.titre {
  font-size: 1.3rem;
  font-weight: bold;
}

.dash-cal,
.dash-section {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-bg);
}

.dash-cal {
  padding: 8px;
}

.dash-cal-head {
  margin-bottom: 6px;
}

.dash-cal-user {
  font-weight: 600;
  font-size: .9rem;
}

.dash-cal-mois {
  font-size: .8rem;
  min-width: 110px;
  text-align: center;
  display: inline-block;
  text-transform: capitalize;
}

.dash-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dash-cal-dow {
  text-align: center;
  font-size: .65rem;
  color: var(--muted);
  font-weight: 600;
  padding: 2px 0;
}

.dash-cal-day,
.dash-cal-empty {
  position: relative;
  min-height: 46px;
  border: 1px solid color-mix(in srgb, var(--border-soft) 65%, transparent);
  border-radius: 4px;
  padding: 1px 2px;
}

.dash-cal-empty {
  background: color-mix(in srgb, var(--table-bg) 60%, transparent);
  border-color: transparent;
}

.dash-cal-day.is-today {
  background: color-mix(in srgb, #ffd86b 22%, var(--table-bg));
  border-color: color-mix(in srgb, #d9a300 45%, transparent);
}

.dash-cal-no {
  font-size: .62rem;
  color: var(--muted);
}

.dash-cal-bars {
  position: relative;
  height: 34px;
}

.dash-bar {
  position: absolute;
  left: -3px;
  right: -3px;
  height: 8px;
  cursor: pointer;
  overflow: hidden;
}

.dash-bar .dash-bar-txt {
  font-size: .6rem;
  color: #fff;
  line-height: 8px;
  padding-left: 3px;
  white-space: nowrap;
}

.dash-bar.f-seul {
  border-radius: 4px;
  left: 1px;
  right: 1px;
}

.dash-bar.f-debut {
  border-radius: 4px 0 0 4px;
  left: 1px;
}

.dash-bar.f-fin {
  border-radius: 0 4px 4px 0;
  right: 1px;
}

.dash-bar.voie-1 { top: 0; }
.dash-bar.voie-2 { top: 9px; }
.dash-bar.voie-3 { top: 18px; }
.dash-bar.voie-4 { top: 27px; }
.dash-bar.voie-5,
.dash-bar.voie-6 {
  top: 27px;
  opacity: .6;
}

.dash-section {
  padding: 10px;
  height: 100%;
}

.dash-section-title {
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 8px;
}


.fiche[data-table="repertoire"] .rep-identification-panel {
  margin-left: auto;
  margin-right: auto;
  max-width: 300px;
  width: 100%;
}

.fiche[data-table="repertoire"] .rep-identification-panel .champ {
  max-width: 100% !important;
  width: 100% !important;
}

.paragraphes .par.drag {
  border: 3px solid transparent;
  border-radius: 1rem;
  padding: 0.5rem;
  padding-top: 0 !important;
  padding-bottom: 0;
  margin-top: -5px;
  margin-bottom: -5px;
}
.paragraphes .par.drag.rect {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  padding-top: 0 !important;
  padding-bottom: 0.5rem;
  border-radius: 1rem;
  margin-top: 5px;
  margin-bottom: 5px;
}
.paragraphes .par.drag > i {
  font-size: 18px;
  padding: 3px 10px;
  margin-left: -10px;
  cursor: pointer;
  vertical-align: middle;
}
.paragraphe {
  margin-top: 10px;
}
.par {
  position: relative;
}
.par-del { display: none !important; }
.par .module {
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: -20px;
  padding-bottom: .25rem;
}
.par .module .poignee {
  color: #ccc;
  margin-left: 0.3rem;
}
.par .module .par-poignee {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  margin-left: 0.2rem;
  text-decoration: none;
  width: 24px;
}
.par .module .par-poignee .sfs {
  font-size: 14px;
  line-height: 1;
}
.par .module .par-poignee:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}
.par .module > i {
  cursor: pointer;
  margin-left: 1.1rem;
}
.par .paragraphe {
  margin-left: 40px;
  margin-top: 0.5rem;
  padding-top: 10px;
}
.par .module select {
  width: 360px;
}
.par .module .module-select {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--text);
  font-weight: 700;
  height: 30px;
  line-height: 1.2;
  max-width: 100%;
  min-height: 30px;
  padding-bottom: 2px;
  padding-left: 0;
  padding-right: 24px;
  padding-top: 2px;
}
.par .module .module-select:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.par .coin-te,
.par .coin-ts,
.par .coin-bs {
  display: none;
}
.par:hover .coin-te,
.par:hover .coin-ts,
.par:hover .coin-bs {
  display: block;
}
.par .coin-te,
.par .coin-ts,
.par .coin-bs {
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
  font-size: 20px;
  height: 30px;
  line-height: 28px;
  text-align: center;
  width: 30px;
}
body[data-theme="sombre"] .par .coin-te,
body[data-theme="sombre"] .par .coin-ts,
body[data-theme="sombre"] .par .coin-bs {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.coin-te {
  position: absolute;
  right: -0.6rem;
  top: -0.6rem;
}
.coin-ts {
  position: absolute;
  left: -1rem;
  top: -1.2rem;
}
.coin-bs {
  position: absolute;
  left: -0.8rem;
  bottom: -0.8rem;
}
.note-module {
  background: #fff3a6;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(50, 50, 93, .10);
  color: #202124;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  max-width: 680px;
  padding: 6px 10px;
  position: relative;
  width: fit-content;
}
body[data-theme="sombre"] .note-module {
  background: rgba(145, 119, 34, .62);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  color: #fff4c5;
}
body[data-theme="sombre"][data-wallpaper="0"] .note-module {
  background: rgba(164, 134, 39, .55);
}

/* Toolbar Rédactionnels : icones plus grosses, sans contour ni fond, fond blanc au hover. */
#redactionnels .toolbar .icon-btn {
  border: 0;
  background: transparent;
  box-shadow: none;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  color: var(--muted);
}

#redactionnels .toolbar .icon-btn .sfs {
  font-size: 22px;
}

#redactionnels .toolbar .icon-btn:hover {
  background: var(--hover-overlay);
  color: var(--text);
}

/* Portages admin2 : paniers + formulaires. */
.paniers-page > .content,
.formulaires-page > .content {
  overflow: hidden;
}

.paniers-groups {
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
}

.panier-date-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--table-bg);
  overflow: hidden;
}

.panier-date-head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--accent-mist);
}

.panier-date-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 760;
}

.panier-accordion {
  padding: 8px;
  display: grid;
  gap: 6px;
}

.panier-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgb(255 255 255 / .36);
  overflow: hidden;
  transition: opacity .2s ease;
}

body[data-theme="sombre"] .panier-item {
  background: rgb(255 255 255 / .06);
}

.panier-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  cursor: pointer;
  list-style: none;
}

.panier-summary::-webkit-details-marker {
  display: none;
}

.panier-summary::before {
  content: "+";
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-pale);
  font-weight: 760;
  line-height: 1;
}

.panier-item[open] .panier-summary {
  background: var(--accent-mist);
}

.panier-item[open] .panier-summary::before {
  content: "-";
}

.panier-summary-client {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.panier-summary-client span {
  color: var(--muted);
  font-size: 13px;
}

.panier-summary-total {
  flex: 0 0 auto;
  font-weight: 760;
}

.panier-item-body {
  padding: 10px;
  border-top: 1px solid var(--border-soft);
}

.panier-table-scroll {
  --table-min-width: 520px;
  margin: 8px 0 10px;
}

.formulaires-content {
  --formulaires-border: var(--nc-champ-bord, var(--input-border, var(--border-soft)));
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 10px;
  padding: 0;
  background: var(--table-fond, var(--table-bg));
  border: 1px solid var(--formulaires-border);
  border-radius: var(--table-rayon, var(--radius));
  overflow: hidden;
}

.formulaires-nav {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--formulaires-border);
}

.formulaires-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
}

.formulaires-periode {
  width: 220px;
  height: 32px;
  min-height: 32px;
  margin-bottom: 0;
  box-sizing: border-box;
  padding-top: 0;
  padding-bottom: 0;
}

.formulaires-filter-icon {
  width: 28px;
  height: 32px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
}

.formulaires-filter-icon .sfs {
  font-size: 16px;
  line-height: 1;
}

.formulaires-nav .form-select {
  padding-right: 2.3rem;
}

.formulaires-search {
  width: 210px;
}

.formulaires-filter-group .btn-xs {
  height: 32px;
  min-height: 32px;
}

.formulaires-search input {
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--formulaires-border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  box-sizing: border-box;
}

.formulaires-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 0;
}

.formulaires-list-panel {
  width: 440px;
  min-width: 380px;
  flex: 0 0 440px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--formulaires-border);
  background: rgb(255 255 255 / .18);
}

.formulaires-list-head {
  flex: 0 0 auto;
  padding: 9px 10px 7px;
  border-bottom: 1px solid var(--formulaires-border);
}

.formulaires-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.formulaire-list-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--formulaires-border);
}

.formulaire-list-item:hover {
  background: var(--accent-mist);
}

.formulaire-list-item .flex-grow-1 {
  min-width: 0;
}

.formulaire-detail {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  background: rgb(255 255 255 / .9); /* fond quasi plein : la fiche ne doit pas laisser voir le fond d'écran */
}

body[data-theme="sombre"] .formulaire-detail {
  background: rgb(32 35 44 / .9);
}

.formulaire-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.formulaire-detail-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 760;
}

.formulaire-detail-body {
  padding-right: 0;
}

.formulaire-info-table {
  width: 100%;
  margin: 8px 0 12px;
  font-size: .88rem;
  background: rgb(255 255 255 / .76);
  border: 1px solid var(--formulaires-border);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

body[data-theme="sombre"] .formulaire-info-table {
  background: rgb(255 255 255 / .06);
}

.formulaire-info-table td,
.formulaire-info-table th {
  padding: 6px 10px;
  border-right: 1px solid var(--formulaires-border);
  border-bottom: 1px solid var(--formulaires-border);
  vertical-align: top;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.formulaire-info-table td:last-child,
.formulaire-info-table th:last-child {
  border-right: 0;
}

.formulaire-info-table tr:last-child td {
  border-bottom: 0;
}

.formulaire-info-table td:first-child {
  width: 170px;
  color: var(--muted);
  background: var(--accent-mist);
  font-weight: 600;
}

.formulaire-info-table a {
  min-height: 25px;
  line-height: 25px;
}

.notice {
  margin: 8px 0;
  padding: 9px 11px;
  border-radius: var(--radius);
  background: var(--accent-mist);
  color: var(--text);
}

.formulaire-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.formulaire-file,
.formulaire-file-image {
  width: 120px;
  height: 120px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.formulaire-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  padding: 8px;
}

.formulaire-file .sfs {
  font-size: 34px;
  line-height: 1;
}

.formulaire-file small {
  max-width: 100%;
  font-size: 11px;
  line-height: 1.15;
  word-break: break-all;
}

.formulaire-file-image {
  object-fit: cover;
  cursor: zoom-in;
}

.nc-toggle-words {
  align-items: center;
  gap: 8px;
  margin: 0;
}

.nc-toggle-words .form-check-input {
  margin: 0;
}

.nc-toggle-words .form-check-label {
  display: inline-flex;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.nc-toggle-words .form-check-input:checked + .form-check-label span:first-child,
.nc-toggle-words .form-check-input:not(:checked) + .form-check-label span:last-child {
  color: var(--text);
  font-weight: 700;
}

.badge-secondary {
  background: var(--panel-soft);
  color: var(--muted);
}


/* Split-view responsive (iPad/iPhone) : la liste occupe tout, le détail glisse
   depuis la droite au clic sur un élément ; chevron .fd-retour pour revenir.
   Générique à tous les écrans maître/détail (.formulaires-workspace) — voir
   initSplitResponsive() dans admin2.js. */
@media (max-width: 900px) {
  .formulaires-workspace {
    position: relative;
    overflow: hidden;
  }

  .formulaires-list-panel {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    max-height: none;
    border-right: 0;
  }

  .formulaire-detail {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgb(255 255 255 / .96);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
    box-shadow: -12px 0 28px rgb(15 23 42 / .14);
  }

  body[data-theme="sombre"] .formulaire-detail {
    background: rgb(32 35 44 / .96);
  }

  .page-wisedyn.detail-ouvert .formulaire-detail {
    transform: translateX(0);
    visibility: visible;
    transition: transform .28s ease;
  }

  .page-wisedyn.detail-ouvert .toolbar-heading .fd-retour {
    width: 28px;
    margin-right: 0;
    opacity: 1;
  }

  .formulaires-search,
  .formulaires-periode {
    width: 100%;
  }

  .formulaires-filter-icon {
    width: 100%;
    height: 22px;
    justify-content: flex-start;
  }
}

/* Chevron retour du split-view : dans l'entête de page ; replié à largeur nulle
   (marge négative = annule le gap du flex), il se déploie en poussant l'icône
   du titre vers la droite quand le détail est ouvert en responsive. */
.toolbar-heading .fd-retour {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 28px;
  padding: 0;
  margin-right: -11px;
  opacity: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  border-radius: 8px;
  transition: width .22s ease, margin-right .22s ease, opacity .18s ease;
}
.toolbar-heading .fd-retour:hover { background: var(--hover-overlay, rgba(0, 0, 0, .06)); }

/* Import CSV : rectangle de dépôt (repris de l'ancien admin) */
.drop-csv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 0.5rem;
  border: 1px solid var(--input-border, #ccc);
  box-shadow: var(--drop-inset-shadow, inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 2px 10px rgba(0, 0, 0, .16));
  text-align: center;
  width: auto;
  margin-inline: .5rem;
  padding-inline: 2rem;
  height: 35px;
  cursor: pointer;
  transition: transform .12s ease;
}
.drop-csv:hover { transform: scale(1.04); }
.drop-csv img { width: 1.5rem; height: 1.5rem; }
.drop-csv-active {
  background-color: #6d6d6d;
  color: #fff;
  border: 2px solid #535353;
  box-shadow: var(--drop-inset-shadow-active, inset 0 2px 14px rgba(0, 0, 0, .32));
}
.drop-csv-error {
  color: var(--danger, #dc3545);
  border-color: var(--danger, #dc3545);
}

/* Listes simples (liens, biens, seminaires, visites, morceaux, fichiers…) :
   la table est directement sous la .content, collée à la bande de la toolbar.
   On l'espace de 15px, comme les autres pages (ex. formulaires). */
.page-wisedyn.liste > .content > .table-scroll {
  margin-top: 15px;
}
