.section-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
}
.section-document-editor {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #d6e0eb;
}
.section-document-editor form {
  margin-top: 16px;
}
.section-document-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.section-document-item .section-documents,
.section-document-editor .section-document-item form {
  margin: 0;
}
.section-document-item button {
  padding: 10px 12px;
  font-size: 12px;
}
@media (max-width: 480px) {
  .section-document-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .section-document-item form {
    justify-self: end;
  }
}
.section-documents {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.section-documents li + li {
  margin-top: 8px;
}
.section-documents a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #d6e0eb;
  border-radius: 12px;
  background: #edf2f8;
  color: #123c7c;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.section-documents a strong,
.section-documents a small {
  display: block;
}
.section-documents a small {
  margin-top: 4px;
  font-size: 12px;
  color: #52667b;
}
.section-documents a:hover {
  border-color: #123c7c;
}
.section-documents a:focus-visible {
  outline: 3px solid #c0385f;
  outline-offset: 3px;
}
.section-editor > * {
  min-width: 0;
}
.section-editor form {
  display: grid;
  gap: 16px;
}
.section-editor input,
.section-editor select,
.section-editor textarea {
  width: 100%;
  box-sizing: border-box;
}
.section-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.section-tabs [aria-current='page'] {
  background: #092650;
  color: white;
}
.section-news-list {
  list-style: none;
  padding: 0;
}
.section-news-list li {
  display: grid;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid #d6e0eb;
}
.section-news-list small,
.section-category {
  color: #52667b;
}
.section-live-preview {
  position: sticky;
  top: 24px;
}
.section-import-visit {
  border-top: 1px solid #d6e0eb;
  padding: 18px 0;
}
.section-import-visit li {
  margin: 8px 0;
}
.section-visits {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 20px;
}
.visit-people {
  list-style: none;
  padding: 0;
}
.section-visits > .card > h3 {
  color: #9f3554;
}
.visit-agency-link,
.visit-agency-itinerary,
.calendar-agency-itinerary {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.visit-agency-itinerary,
.calendar-agency-itinerary {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}
.visit-agency-itinerary {
  min-height: 44px;
}
.calendar-agency-itinerary {
  min-height: 28px;
  padding-inline: 5px;
  font-size: 0.9em;
}
.visit-agency-link:focus-visible,
.visit-agency-itinerary:focus-visible,
.calendar-agency-itinerary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.visit-people li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #d6e0eb;
}
.visit-people li > span {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.visit-people li > .visit-person {
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.visit-person-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.visit-job {
  display: block;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.35;
}
.visit-people li > .visit-slots {
  flex-direction: column;
  gap: 6px;
}
.member-badge {
  display: inline-block;
  border-radius: 24px;
  background: #e9effa;
  color: #123c7c;
  font-size: 0.8rem;
  padding: 3px 10px;
}
.section-news-home {
  margin-top: 32px;
  padding: 30px;
  border: 1px solid #e6dae2;
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 70% 50%, #f7dce4, transparent 65%),
    linear-gradient(125deg, #fcfcff, #f7edf3);
  box-shadow: 0 18px 42px #123c7c0d;
}
.section-news-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #092650;
}
.section-news-heading h2 {
  margin: 0;
}
.section-news-heading > span {
  font-size: 26px;
}
.section-news-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 38px 10px 12px;
  text-decoration: none;
  color: #092650;
}
.section-date {
  display: grid;
  text-align: center;
  min-width: 130px;
  border: 1px solid #fff;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #e8edf7);
  box-shadow: 12px 17px 25px #123c7c21;
  transform: rotate(-7deg);
  overflow: hidden;
}
.section-date span {
  background: #123c7c;
  color: white;
  font-size: 12px;
  text-transform: uppercase;
  padding: 12px;
}
.section-date strong {
  font-size: 60px;
  padding: 10px;
}
.section-news-feature > span {
  display: grid;
  gap: 12px;
  max-width: 450px;
  padding: 22px;
  border: 1px solid #ffffffd9;
  background: #ffffffb3;
  border-radius: 18px;
  box-shadow: 0 10px 25px #9e557716;
}
.section-news-feature > span > strong {
  font-size: 21px;
}
.section-news-feature small {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.section-news-feature:hover .section-date {
  transform: rotate(-3deg) translateY(-4px);
}
.section-date {
  transition: transform 0.2s;
}
.section-articles .card {
  margin-bottom: 20px;
}
.section-articles h2,
.section-live-preview h2 {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .section-editor {
    grid-template-columns: 1fr;
  }
  .section-live-preview {
    position: static;
  }
  #main:has(> .section-visits) {
    padding-inline: 12px;
  }
  .section-visits {
    padding-inline: 0;
  }
  .visit-people li {
    flex-direction: column;
    gap: 8px;
  }
  .section-news-home {
    padding: 22px;
  }
  .section-news-feature {
    gap: 15px;
  }
  .section-date {
    min-width: 85px;
  }
  .section-date strong {
    font-size: 42px;
  }
  .section-news-feature > span {
    padding: 16px;
  }
  .section-news-feature > span > strong {
    font-size: 17px;
  }
}
/* Les liens des formulaires restent lisibles sur le fond photographique desktop. */
@media (min-width: 1000px), (hover: hover) and (pointer: fine) {
  .entry-page .entry-shell:not(.entry-welcome) > .entry-back {
    background: transparent;
    color: #fff;
    border: 0;
    border-radius: 0;
    padding: 6px 10px;
    margin: 12px 6px 0;
    min-height: 0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-underline-offset: 3px;
    box-shadow: none;
    text-shadow: 0 1px 3px #0d2b5eb3;
  }
  .entry-page .entry-shell:not(.entry-welcome) > .entry-back:hover {
    background: transparent;
    text-decoration: underline;
  }
  .entry-page .entry-shell:not(.entry-welcome) > .entry-back:focus-visible {
    outline: 3px solid #c0385f;
    outline-offset: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .section-date {
    transition: none;
  }
}

.section-editor select {
  font: inherit;
  color: #142b49;
  background: #ffffffb3;
  border: 1px solid #d6e0eb;
  border-radius: 14px;
  padding: 12px;
  min-height: 44px;
}
.section-editor label {
  display: grid;
  gap: 8px;
}
.section-live-preview {
  position: static;
}

.calendar-visit-link {
  flex-shrink: 0;
  align-self: flex-start;
  margin: 8px 20px 0;
  gap: 18px;
  min-height: 44px;
}

/* Fond des écrans pilote et de la connexion : les fonds des maquettes 1 à 3
   eux-mêmes, interface effacée (zones masquées reconstituées par retouche IA,
   fonds mobiles agrandis ×2). Un fond par écran et par format :
   hub-fond-accueil(-mobile).webp pour les écrans connectés,
   hub-fond-connexion(-mobile).webp pour la connexion. */
body.signed-in,
body.entry-page {
  background: #e9eef6;
}
body.signed-in .ambience,
body.entry-page .ambience {
  /* Accueil connecté sur ordinateur (maquette 2) : nœud au bord droit. */
  background: #e9eef6 url('/assets/hub-fond-accueil.webp?v=20261028-maquettes')
    70% 50% / cover no-repeat;
}
/* Agenda, Profil et administration : même photo, voilée de blanc pour la
   lisibilité de leurs cartes et calendrier translucides. */
body.signed-in:not(:has(.pilot-home, .section-news-page, .section-blank))
  .ambience::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(250 249 246 / 62%);
}
body.entry-page .ambience {
  /* Connexion sur ordinateur (maquette 3). */
  background-image: url('/assets/hub-fond-connexion.webp?v=20261028-maquettes');
  background-position: 50% 50%;
}
@media (max-width: 999px) {
  /* Mobile et tablette (maquette 1) : fonds propres à chaque écran. */
  body.signed-in .ambience {
    background-image: url('/assets/hub-fond-accueil-mobile.webp?v=20261028-maquettes');
    background-position: 75% 50%;
  }
  body.entry-page .ambience {
    background-image: url('/assets/hub-fond-connexion-mobile.webp?v=20261028-maquettes');
    background-position: 50% 100%;
  }
}
/* Pied de page livdesign.fr : conservé uniquement dans les réglages du profil.
   La feuille est aussi chargée au profil des comptes concernés. */
body:not(:has(.profile-card)) .site-footer {
  display: none;
}
body.signed-in .aurora,
body.signed-in .fine-grid,
body.entry-page .aurora,
body.entry-page .fine-grid {
  display: none;
}
body:has(.pilot-home, .section-news-page, .section-blank) .hub-header .glass {
  border: 1px solid rgb(18 60 124 / 10%);
  background: #fff;
  box-shadow:
    0 1px 2px rgb(11 42 91 / 6%),
    0 6px 16px -10px rgb(11 42 91 / 25%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body:has(.pilot-home, .section-news-page, .section-blank)
  .hub-header
  .glass::before {
  display: none;
}

/* Connexion (maquettes 1 et 3) : logo, titre, grand bouton rose, liens
   empilés sur mobile et côte à côte sur ordinateur. Unité --u calée sur la
   largeur des maquettes (390 px mobile, 1834 px ordinateur). */
body.entry-page:has(.entry-welcome) {
  --u: clamp(0.82px, calc(100vw / 390), 1.12px);
}
body.entry-page:has(.entry-welcome) main {
  place-items: start center;
  padding: 18vh 20px 40px;
}
.entry-welcome {
  display: grid;
  justify-items: center;
  width: min(100%, calc(318 * var(--u)));
}
.entry-welcome > * {
  grid-column: 1 / -1;
}
.entry-welcome .entry-logo {
  width: 100%;
  margin: 0 0 calc(30 * var(--u));
}
.entry-welcome h1 {
  margin: 0 0 calc(32 * var(--u));
  color: #0d2b5e;
  font-size: calc(50 * var(--u));
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.045em;
}
.entry-welcome > .button {
  width: calc(307 * var(--u));
  min-height: calc(54 * var(--u));
  border: 0;
  background: linear-gradient(180deg, #c23b62, #a8304f);
  box-shadow:
    0 calc(10 * var(--u)) calc(22 * var(--u)) calc(-10 * var(--u))
      rgb(150 40 72 / 55%),
    inset 0 1px 0 rgb(255 255 255 / 22%);
  font-size: calc(18 * var(--u));
  font-weight: 550;
  letter-spacing: 0;
}
.entry-welcome .entry-create,
.entry-welcome .entry-back {
  margin: 0;
  padding: calc(8 * var(--u)) calc(6 * var(--u));
  color: #12387a;
  font-size: calc(18 * var(--u));
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: calc(6 * var(--u));
}
.entry-welcome .entry-create {
  margin-top: calc(16 * var(--u));
}
/* Le ruban bleu nuit de la photo peut passer sous les liens (ordinateur,
   petits écrans) : halo de lumière chaude limité à cette zone. */
.entry-welcome {
  position: relative;
  isolation: isolate;
}
.entry-welcome::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: calc(-40 * var(--u));
  width: calc(380 * var(--u));
  height: calc(190 * var(--u));
  background: radial-gradient(
    closest-side,
    rgb(255 249 240 / 88%),
    rgb(255 249 240 / 62%) 45%,
    rgb(255 249 240 / 0%)
  );
  transform: translateX(-50%);
  pointer-events: none;
}
@media (min-width: 1000px) {
  .entry-welcome::after {
    bottom: calc(-70 * var(--u));
    width: calc(760 * var(--u));
    height: calc(230 * var(--u));
  }
  body.entry-page:has(.entry-welcome) {
    --u: clamp(0.62px, calc(100vw / 1834), 1.2px);
  }
  /* Colonnes extensibles autour des deux liens : écart fixe entre eux. */
  .entry-welcome {
    grid-template-columns: 1fr auto auto 1fr;
    column-gap: calc(43 * var(--u));
    width: min(100%, calc(573 * var(--u)));
  }
  .entry-welcome .entry-logo {
    width: calc(435 * var(--u));
    margin-bottom: calc(48 * var(--u));
  }
  .entry-welcome h1 {
    margin-bottom: calc(52 * var(--u));
    font-size: calc(58 * var(--u));
    line-height: 1.14;
  }
  .entry-welcome > .button {
    width: calc(573 * var(--u));
    min-height: calc(66 * var(--u));
  }
  /* Les deux liens finals partagent la dernière ligne. */
  .entry-welcome .entry-create,
  .entry-welcome .entry-back:last-child {
    margin-top: calc(28 * var(--u));
    font-size: calc(20 * var(--u));
  }
  .entry-welcome .entry-create {
    grid-column: 2;
  }
  .entry-welcome .entry-back:last-child {
    grid-column: 3;
  }
}

/* Page Actualités pilote — finition mate, rose réservé au décor. */
.section-news-page {
  --mt-night: #0b2a5b;
  --mt-blue: #123c7c;
  --mt-rose: #eb668b;
  --mt-muted: #4d6076;
  --mt-tint: #eef3fa;
  --mt-line: rgb(18 60 124 / 10%);
  --mt-ease: cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--mt-night);
}
/* Même colonne que l’accueil pilote : en-tête et contenu alignés. */
body:has(.section-news-page) .hub-header {
  width: min(920px, calc(100% - 48px));
  margin-inline: auto;
}
body:has(.section-news-page) main {
  max-width: 968px;
}
.section-news-page .page-heading {
  margin: 0 0 26px;
}
.section-news-page .page-heading h1 {
  position: relative;
  margin: 0;
  padding-bottom: 16px;
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--mt-night);
}
.section-news-page .page-heading h1::after {
  content: '';
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 44px;
  height: 4px;
  border-radius: 4px;
  background: var(--mt-rose);
}
.section-news-page .section-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 2px;
  margin: 0 0 28px;
  padding: 3px;
  border-radius: 22px;
  background: rgb(18 60 124 / 7%);
  box-shadow: none;
}
.section-news-page .section-tabs a {
  min-height: 38px;
  padding: 8px 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--mt-blue);
  font-size: 13.5px;
  font-weight: 650;
  transition:
    background 0.25s var(--mt-ease),
    color 0.25s var(--mt-ease),
    box-shadow 0.25s var(--mt-ease),
    transform 0.25s var(--mt-ease);
}
.section-news-page .section-tabs a:hover {
  background: rgb(255 255 255 / 70%);
  box-shadow: none;
  transform: none;
}
.section-news-page .section-tabs a[aria-current='page'] {
  background: #fff;
  color: var(--mt-night);
  box-shadow:
    0 1px 2px rgb(11 42 91 / 10%),
    0 4px 10px -6px rgb(11 42 91 / 30%);
}
.section-news-page .section-tabs a:active {
  transform: scale(0.95);
}
.section-news-page .section-articles {
  display: grid;
  gap: 14px;
}
.section-article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  margin: 0;
  padding: 24px 28px 26px 22px;
  border: 1px solid var(--mt-line);
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 1px 2px rgb(11 42 91 / 6%),
    0 8px 22px -14px rgb(11 42 91 / 22%);
  scroll-margin-top: 24px;
}
.section-article-date {
  display: grid;
  justify-items: center;
  align-content: center;
  height: 76px;
  border-radius: 16px;
  background: var(--mt-tint);
  color: var(--mt-blue);
  line-height: 1;
}
.section-article-date strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.section-article-date span {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mt-muted);
}
.section-article-date small {
  margin-top: 3px;
  font-size: 10px;
  color: var(--mt-muted);
}
.section-article-body {
  min-width: 0;
}
.section-article .section-category {
  margin: 2px 0 10px;
}
.section-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  background: var(--mt-tint);
  color: var(--mt-blue);
  font-size: 12px;
  font-weight: 650;
}
.section-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mt-rose);
}
.section-article h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--mt-night);
}
.section-article .section-text {
  margin: 0;
  color: #26374f;
  font-size: 15.5px;
}
.section-article.section-empty {
  display: block;
  padding: 22px 24px;
  color: var(--mt-muted);
}
/* Article ouvert depuis l’accueil : halo rose bref puis contour discret. */
.section-article:target {
  border-color: rgb(235 102 139 / 45%);
  box-shadow:
    0 0 0 4px rgb(235 102 139 / 12%),
    0 8px 22px -14px rgb(11 42 91 / 22%);
  animation: section-target 1.2s var(--mt-ease) 0.2s backwards;
}
@keyframes section-target {
  from {
    box-shadow:
      0 0 0 14px rgb(235 102 139 / 0%),
      0 8px 22px -14px rgb(11 42 91 / 22%);
  }
  40% {
    box-shadow:
      0 0 0 8px rgb(235 102 139 / 20%),
      0 8px 22px -14px rgb(11 42 91 / 22%);
  }
}
.section-news-page a:focus-visible {
  outline: 3px solid var(--mt-blue);
  outline-offset: 3px;
}
@media (max-width: 700px) {
  body:has(.section-news-page) .hub-header {
    width: calc(100% - 32px);
  }
}
@media (max-width: 600px) {
  .section-news-page .page-heading {
    margin-bottom: 22px;
  }
  .section-news-page .section-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-bottom: 22px;
  }
  .section-news-page .section-tabs a {
    padding: 8px;
    font-size: 13px;
    white-space: normal;
    text-align: center;
  }
  .section-article {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 16px 20px 14px;
    border-radius: 20px;
  }
  .section-article-date {
    height: 62px;
    border-radius: 14px;
  }
  .section-article-date strong {
    font-size: 23px;
  }
  .section-article-date span {
    font-size: 10px;
  }
  .section-article-date small {
    font-size: 9px;
  }
  .section-article h2 {
    font-size: 19px;
  }
  .section-article .section-text {
    font-size: 15px;
  }
}
@media (max-width: 420px) {
  .section-article {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 16px 18px 20px;
  }
  .section-article-date {
    display: inline-flex;
    align-items: baseline;
    justify-self: start;
    gap: 6px;
    height: auto;
    padding: 6px 13px;
    border-radius: 999px;
  }
  .section-article-date strong {
    font-size: 17px;
  }
  .section-article-date span,
  .section-article-date small {
    margin: 0;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .section-news-page *,
  .section-article {
    transition: none !important;
    animation: none !important;
  }
}
