/* Mise en page propre à A2E, sur la base de airbus.css */
.context-bar__division { display: inline-flex; align-items: center; gap: 6px; }
.context-bar__division svg, .context-bar__who svg { width: 18px; height: 18px; }
.context-bar__sep { width: 1px; height: 20px; background: rgba(255,255,255,.25); }
.context-bar__site { display: flex; align-items: center; gap: 8px; }
.context-bar__site label { color: rgba(255,255,255,.75); }
.context-bar__site select { height: 30px; padding: 0 28px 0 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 3px; background: transparent; color: #fff; font: 500 14px "Inter", sans-serif; }
.context-bar__site select option { color: var(--text); }

.hero__eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; color: var(--blue-30) !important; margin: 0 0 var(--space-s); }
.hero h1 strong { font-weight: 700; display: block; }
.hero h1 { font-weight: 300; }
.hero__intro { margin-top: var(--space-l); max-width: 760px; }
.hero__intro-title { color: var(--white); font-size: 20px; font-weight: 700; margin-bottom: var(--space-s); }
.hero__intro .rich, .hero__intro .rich p { color: rgba(255,255,255,.88); font-size: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-m); margin-top: var(--space-xl); }

.quicklink__title { font-weight: 300; font-size: 20px; line-height: 1.25; }
.quicklink__title strong { display: block; font-weight: 700; }
.card__cta svg { width: 18px; height: 18px; }
.card__icon { display: block; }
.card__icon svg { width: 100%; height: 100%; }

.section--white { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.layout-split { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-2xl); align-items: start; }

.prevention .card__body { padding: var(--space-xl); }
.rich h2 { font-size: 24px; color: var(--blue-90); }
.rich ul { padding-left: 20px; }
.rich li { margin-bottom: 6px; }
.rich p { margin: 0 0 var(--space-m); }

.content { min-width: 0; }
.content h2.h6 { margin-top: var(--space-xl); }
.page-title { margin-bottom: var(--space-l); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; margin-bottom: var(--space-s); }
.back-link svg { width: 18px; height: 18px; }
.sub-card { display: flex; align-items: center; gap: var(--space-m); padding: var(--space-m) var(--space-l); font-weight: 500; color: var(--blue-90); }
.sub-card svg { width: 22px; height: 22px; color: var(--blue-50); flex: none; }
.sub-card svg:last-child { margin-left: auto; color: var(--grey-40); }
.subrubriques { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-m); }
.emergency { align-items: center; margin-bottom: var(--space-l); }
.emergency > div { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-m); }
.doc__meta svg { width: 14px; height: 14px; display: inline; vertical-align: -2px; }
.doc__name { word-break: break-word; }

.narrow { max-width: 860px; padding-top: var(--space-xl); padding-bottom: var(--space-3xl); }
.error-page { text-align: center; }
.error-page__code { font-size: 96px; font-weight: 300; color: var(--blue-30); margin: 0; }

.search-page { display: flex; gap: var(--space-s); margin-bottom: var(--space-l); max-width: 720px; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; color: var(--grey-60); }
.search-field .input { padding-left: 42px; }
.dialog--search { width: min(760px, calc(100vw - 32px)); margin-top: 10vh; }
.search-results { margin-top: var(--space-m); max-height: 55vh; overflow: auto; }
.search-results .empty { padding: var(--space-l); }

/* Connexion */
.login-methods { display: grid; gap: var(--space-m); margin-top: var(--space-l); }
.login-method { display: flex; align-items: center; gap: var(--space-m); padding: var(--space-l); border: 1px solid var(--border); background: #fff; color: var(--text); box-shadow: var(--elev-02); transition: box-shadow .2s; }
.login-method:hover { box-shadow: var(--elev-09); text-decoration: none; }
.login-method strong { display: block; color: var(--blue-90); font-size: 17px; }
.login-method small { display: block; color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.login-method > svg { width: 22px; height: 22px; margin-left: auto; color: var(--grey-40); flex: none; }
.login-method__icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--blue-10); color: var(--blue-70); flex: none; }
.login-method__icon svg { width: 26px; height: 26px; }
.login-legal { font-size: 13px; color: var(--text-muted); max-height: 180px; overflow: auto; padding: var(--space-m); background: var(--grey-5); margin-bottom: var(--space-l); }
.readonly-value { padding: 9px 12px; background: var(--grey-10); font-weight: 500; }
.autocomplete { position: relative; }
.autocomplete__list { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; list-style: none; margin: 2px 0 0; padding: 0; background: #fff; border: 1px solid var(--grey-40); box-shadow: var(--elev-04); max-height: 240px; overflow: auto; }
.autocomplete__list li { padding: 10px 12px; cursor: pointer; font-size: 14px; }
.autocomplete__list li[aria-selected="true"], .autocomplete__list li:hover { background: var(--blue-10); }
.division-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-l); margin-top: var(--space-xl); }
.division-card { text-align: left; border: 1px solid var(--border); cursor: pointer; font: inherit; padding: 0; }
.division-card .card__icon { width: 56px; height: 56px; }

@media (max-width: 900px) {
  .layout-split { grid-template-columns: 1fr; }
}

/* Nom de la personne connectée, à côté de la déconnexion */
.header__user { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.9); max-width: 260px; }
.header__user svg { width: 20px; height: 20px; flex: none; }
.header__user .label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Menu principal : rubriques racines du site, sous-rubriques au survol */
.main-menu { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: var(--header-h); z-index: 40; }
.main-menu__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; }
.main-menu__list > li { position: relative; flex: none; }
.main-menu__list > li > a { position: relative; display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 14px; color: var(--grey-80); font-size: 14px; font-weight: 500; white-space: nowrap; }
/* Soulignement collé au bas de la barre, par-dessus sa bordure */
.main-menu__list > li > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; }
.main-menu__list > li > a.is-active::after { background: var(--blue-50); }
.main-menu__list > li > a:hover { color: var(--blue-90); background: var(--grey-5); text-decoration: none; }
.main-menu__list > li > a.is-active { color: var(--blue-90); font-weight: 700; }
.main-menu__list > li > a svg { width: 18px; height: 18px; flex: none; color: var(--grey-60); }
.main-menu__list > li:first-child > a { padding: 0 12px; justify-content: center; }
.main-menu__list > li:first-child { margin-left: -12px; }
.main-menu__sub { list-style: none; margin: 0; padding: 6px 0; position: absolute; top: 100%; left: 0; min-width: 260px; max-width: 360px; background: var(--white); border: 1px solid var(--border); box-shadow: var(--elev-09); display: none; z-index: 45; }
.main-menu__sub a { display: block; padding: 9px 16px; color: var(--grey-80); font-size: 14px; }
.main-menu__sub a:hover { background: var(--blue-10); color: var(--blue-90); text-decoration: none; }
.main-menu__list > li.has-children:hover > .main-menu__sub, .main-menu__list > li.has-children:focus-within > .main-menu__sub { display: block; }
.main-menu__list > li:last-child .main-menu__sub, .main-menu__list > li:nth-last-child(2) .main-menu__sub { left: auto; right: 0; }
.side-nav { top: calc(var(--header-h) + 64px); }
@media (max-width: 900px) {
  .main-menu { position: static; }
  .main-menu__list { flex-wrap: nowrap; overflow-x: auto; }
  .main-menu__sub { display: none !important; }
  .main-menu__list > li > a svg:not(:only-child) { display: none; }
  .header__user { display: none; }
}


/* Menu sur une ligne : ce qui ne tient pas passe dans « Plus » */
.main-menu__more { flex: none; }
.main-menu__more > button { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 14px; border: 0; background: transparent; color: var(--grey-80); font: 500 14px "Inter", sans-serif; cursor: pointer; }
.main-menu__more > button:hover { background: var(--grey-5); color: var(--blue-90); }
.main-menu__more > button svg { width: 18px; height: 18px; color: var(--grey-60); }
.main-menu__more .main-menu__sub { left: auto; right: 0; }
.main-menu__more .main-menu__sub > li > a { display: flex; justify-content: space-between; align-items: center; height: auto; padding: 9px 16px; border: 0; font-weight: 500; white-space: normal; }
.main-menu__more .main-menu__sub > li > a svg, .main-menu__more .main-menu__sub .main-menu__sub { display: none !important; }
.main-menu__more.has-active > button { color: var(--blue-90); font-weight: 700; box-shadow: inset 0 -3px 0 var(--blue-50); }

/* ---------- En-tête : zone droite (site, recherche, langue, profil) ----------
   Grammaire unique : chaque commande est une pilule « fantôme » de 40px
   (hauteur bouton M de l'Airbus Design System), sans bordure ni fond au repos,
   fond blanc 10 % au survol, 16 % quand son menu est ouvert, anneau blanc au
   focus clavier. Libellés Inter 500 14px. Seul l'orange signale l'état ouvert. */
:root {
  --accent: #fe5000;                                   /* Orange, Pantone 021 C */
  --accent-gradient: linear-gradient(90deg, #fe5000 0%, #ff8a00 55%, #ffc800 100%);
  --hctl-h: 40px;
  --hctl-hover: rgba(255,255,255,.10);
  --hctl-open: rgba(255,255,255,.16);
  --hctl-muted: rgba(255,255,255,.72);
}

.header__nav { gap: 4px; }
.header__nav .hctl {
  display: inline-flex; align-items: center; gap: 8px;
  height: var(--hctl-h); min-width: var(--hctl-h); padding: 0 14px; margin: 0;
  border: 0; border-radius: 999px; background: transparent;
  color: #fff; font: 500 14px/20px "Inter", sans-serif; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background-color .14s ease;
}
.header__nav .hctl:hover,
.header__nav .iconmenu[data-open="true"] > .hctl,
.header__nav .profile[data-open="true"] .hctl { background: var(--hctl-hover); text-decoration: none; }
.header__nav .iconmenu[data-open="true"] > .hctl,
.header__nav .profile[data-open="true"] .hctl { background: var(--hctl-open); }
.header__nav .hctl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.header__nav .hctl > svg { width: 20px; height: 20px; flex: none; color: var(--hctl-muted); }
.header__nav .hctl:hover > svg { color: #fff; }
.header__nav .hctl .hctl__chev { width: 18px; height: 18px; margin: 0 -4px 0 -2px; color: var(--hctl-muted); transition: transform .16s ease, color .14s ease; }
.header__nav [data-open="true"] .hctl__chev { transform: rotate(180deg); color: var(--accent); }
.hctl__text { overflow: hidden; text-overflow: ellipsis; max-width: 180px; }

/* Rond (langue) */
.header__nav .hctl--round { width: var(--hctl-h); padding: 0; justify-content: center; border: 0; }
.header__nav .hctl--round .flag--trigger { width: 22px; height: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }

/* Séparateur avant l'identité */
.header__nav .header__sep { width: 1px; height: 24px; margin: 0 8px; background: rgba(255,255,255,.22); }

/* Profil (look ai4prod conservé : avatar 34px, pastille verte, pilule au survol) */
.profile { position: relative; margin-left: 0; }
.header__nav .profile__btn { gap: 10px; padding: 0 14px 0 3px; font-size: 14px; font-weight: 500; }
.header__nav .profile__btn .hctl__chev { margin-left: -4px; }
.profile--nomenu .profile__btn,
.profile--nomenu .profile__btn:hover { cursor: default; background: transparent !important; }
.profile__avatar { position: relative; width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #d7deeb; color: #00205b; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.profile__status { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #34c759; border: 2px solid var(--blue-90); }
.profile__name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

/* Menus déroulants de l'en-tête (site, langue, profil) : même carte blanche */
.hmenu { position: absolute; top: calc(100% + 16px); right: 0; z-index: 60;
  min-width: 240px; max-width: 320px; max-height: min(70vh, 420px); overflow-y: auto;
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: #fff; border-top: 3px solid var(--accent); border-radius: 0 0 3px 3px;
  box-shadow: 0 20px 48px -12px rgba(0,22,64,.35), 0 2px 8px rgba(0,22,64,.12);
  transform-origin: top right; animation: menuIn .14s ease; }
.hsite .hmenu { left: 0; right: auto; }
.hmenu--lang { min-width: 140px; }
.hmenu[hidden] { display: none; }
.hmenu__form { display: contents; }
.hmenu__head { margin: 0; padding: 8px 10px 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--grey-60); }
.hmenu__head--who { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--grey-10); text-transform: none; letter-spacing: 0; }
.hmenu__head--who strong { font-size: 14px; color: var(--blue-90); }
.hmenu__head--who span { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header__nav .hmenu__opt {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: 100%; height: auto; min-height: 40px; padding: 8px 10px; margin: 0;
  border: 0; border-radius: 3px; background: transparent;
  color: var(--grey-80); font: 500 14px/20px "Inter", sans-serif; text-align: left; cursor: pointer;
  transition: background-color .12s ease, color .12s ease; }
.header__nav .hmenu__opt:hover { background: #eef2f7; color: var(--blue-90); text-decoration: none; }
.header__nav .hmenu__opt:focus-visible { outline: 2px solid var(--blue-50); outline-offset: -2px; }
.header__nav .hmenu__opt.is-active { background: var(--blue-90); color: #fff; font-weight: 700; border-radius: 0 3px 3px 0; box-shadow: inset 3px 0 0 var(--accent); }
.header__nav .hmenu__opt svg { width: 20px; height: 20px; flex: none; color: var(--blue-50); }
.header__nav .hmenu__opt.is-active svg { color: #fff; }
.header__nav .hmenu__opt .hmenu__check { margin-left: auto; width: 18px; height: 18px; color: var(--accent); }
.hmenu__label { display: flex; flex-direction: column; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hmenu__label small { font-size: 12px; font-weight: 400; color: var(--grey-60); }
.hmenu__sep { height: 1px; margin: 4px 6px; background: var(--grey-10); }
.header__nav .lang-opt { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.header__nav .lang-opt .flag { width: 20px; height: 14px; }

/* Lien « Urgences » : dernier item de la barre de menu (sticky, donc toujours visible au défilement sur ordinateur).
   Grammaire des items du menu (48px, Inter 14px, survol --grey-5, soulignement 3px au bas de la barre),
   repérage par une pastille rouge (disque --urgent, picto blanc, halo --urgent-halo) ; libellé gris au repos.
   Le lien reste hors de .main-menu__list : le calcul « Plus » (data-menu-fit) mesure la place restante.
   Sur mobile, picto rouge dans l'en-tête et entrée en tête du tiroir (inchangés). */
/* Rouge « urgences » adouci (validé), commun à l'ordinateur et au mobile : 4,7:1 sur blanc. */
:root { --urgent: #c64a4a; --urgent-halo: #f6e1e1; }
.main-menu .container { display: flex; align-items: stretch; }
.main-menu__list { flex: 1 1 auto; min-width: 0; }
.main-menu__urgent {
  position: relative; flex: none; display: flex; align-items: center; gap: var(--space-s);
  height: 48px; padding: 0 12px 0 10px; margin: 0 -12px 0 var(--space-m);
  color: var(--grey-80); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background-color .14s ease, color .14s ease;
}
/* Soulignement collé au bas de la barre, par-dessus sa bordure, comme les rubriques */
.main-menu__urgent::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; transition: background-color .14s ease; }
.main-menu__urgent-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--urgent); color: var(--white); box-shadow: 0 0 0 3px var(--urgent-halo);
}
.main-menu__urgent-ico svg { width: 16px; height: 16px; }
.main-menu__urgent:hover { color: var(--urgent); text-decoration: none; }
.main-menu__urgent:hover::after { background: var(--urgent-halo); }
.main-menu__urgent.is-active { color: var(--urgent); font-weight: 700; }
.main-menu__urgent.is-active::after { background: var(--urgent); }
.main-menu__urgent:focus-visible { outline: 2px solid var(--blue-50); outline-offset: -2px; text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  .main-menu__urgent, .main-menu__urgent::after { transition: none; }
}
/* Contraste élevé Windows : la pastille garde une forme visible sans couleur de fond */
@media (forced-colors: active) {
  .main-menu__urgent-ico { background: transparent; color: LinkText; box-shadow: none; border: 1px solid LinkText; }
  .main-menu__urgent.is-active::after { background: Highlight; }
}
/* Mobile : même pastille que sur ordinateur, dans l'en-tête */
.header__nav .hctl--urgent { padding: 0; width: var(--hctl-h); justify-content: center; }
.header__nav .hctl--urgent .main-menu__urgent-ico { box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }
.drawer__link--urgent svg { color: var(--urgent); }

/* Largeurs intermédiaires (900-1179px) : recherche en rond, noms raccourcis */
@media (max-width: 1180px) {
  .header__nav .hctl--search { width: var(--hctl-h); padding: 0; justify-content: center; }
  .header__nav .hctl--search .label { display: none; }
  .hctl__text { max-width: 150px; }
  .profile__name { max-width: 150px; }
}
@media (min-width: 1440px) {
  .profile__name { max-width: 240px; }
}
.header__nav .profile__chevron { width: 16px; height: 16px; flex: none; color: rgba(255,255,255,.7); }

/* Communs repris d'ai4prod */
.iconmenu { position: relative; }
.flag { width: 20px; height: 14px; border-radius: 2px; overflow: hidden; display: inline-block; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
@keyframes menuIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive : tiroir mobile et ajustements tablette / mobile ---------- */
.mob-only { display: none !important; }
.header__nav .header__burger { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; }
.header__burger svg { width: 26px; height: 26px; }
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer[hidden] { display: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(1,19,51,.55); animation: fadeIn .15s ease; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); background: #fff; display: flex; flex-direction: column; box-shadow: var(--elev-09); animation: slideIn .2s ease; }
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--blue-90); color: #fff; }
.drawer__head .profile__status { border-color: var(--blue-90); }
.drawer__who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.drawer__who strong { font-size: 16px; font-weight: 500; }
.drawer__who small { font-size: 12px; color: rgba(255,255,255,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.drawer__close svg { width: 22px; height: 22px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 0 24px; -webkit-overflow-scrolling: touch; }
.drawer__site { padding: 12px 16px 16px; border-bottom: 1px solid var(--grey-10); display: flex; flex-direction: column; gap: 6px; }
.drawer__site label { font-size: 13px; font-weight: 500; color: var(--grey-60); }
.drawer__division { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-top: 6px; }
.drawer__division svg { width: 18px; height: 18px; }
.drawer__menu { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--grey-10); }
.drawer__link, .drawer__group > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px; color: var(--grey-90); font-size: 15px; font-weight: 500; cursor: pointer; list-style: none; }
.drawer__group > summary::-webkit-details-marker { display: none; }
.drawer__group > summary svg { width: 22px; height: 22px; margin-left: auto; color: var(--grey-60); transition: transform .15s; flex: none; }
.drawer__group[open] > summary svg { transform: rotate(180deg); }
.drawer__group[open] > summary { color: var(--blue-90); font-weight: 700; }
.drawer__link svg { width: 20px; height: 20px; color: var(--blue-50); flex: none; }
.drawer__link:hover, .drawer__group > summary:hover { background: var(--grey-5); text-decoration: none; }
.drawer__link.is-active { color: var(--blue-90); font-weight: 700; box-shadow: inset 3px 0 0 var(--blue-50); }
.drawer__link--admin { margin: 8px 16px; min-height: 44px; border: 1px solid var(--border); justify-content: center; }
.drawer__sublink { display: block; padding: 11px 16px 11px 32px; color: var(--grey-80); font-size: 14px; border-left: 3px solid var(--blue-10); margin-left: 16px; }
.drawer__sublink:first-of-type { font-weight: 700; color: var(--blue-90); }
.drawer__sublink:hover { background: var(--grey-5); text-decoration: none; }
.drawer__langs { display: flex; gap: 8px; padding: 16px; }
.drawer__lang { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 1px solid var(--border); color: var(--grey-80); font-size: 14px; font-weight: 500; }
.drawer__lang.is-active { background: var(--blue-90); border-color: var(--blue-90); color: #fff; }
.drawer__lang:hover { text-decoration: none; }
body.drawer-open { overflow: hidden; }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; } }

/* Tablette paysage et petits écrans de bureau */
@media (max-width: 1180px) {
  .header__app { display: none; }
}

/* Tablette portrait et mobile : tiroir à la place du menu */
@media (max-width: 900px) {
  .mob-only { display: inline-flex !important; }
  .desk-only, .main-menu { display: none !important; }
  .header .container { gap: var(--space-s); }
  .header__nav { gap: 4px; }
  .header__nav [data-open-search] { width: 42px; padding: 0; justify-content: center; border-radius: 50%; }
  .layout-side { grid-template-columns: 1fr; gap: 0; }
  .layout-side > .side-nav { display: none; }
  .hero .container { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
  .hero::after { -webkit-mask-size: auto 35%, 100% 100%; mask-size: auto 35%, 100% 100%; }
  .section { padding: var(--space-xl) 0; }
  .section-heading { flex-wrap: wrap; }
  .section-heading h2 { font-size: 24px; }
  .layout-split { gap: var(--space-xl); }
  .breadcrumb { margin-top: var(--space-m); }
}

/* Mobile */
@media (max-width: 600px) {
  :root { --header-h: 60px; }
  .header__logo { width: 92px; }
  .hero h1 { font-size: 28px; }
  .hero__intro-title { font-size: 17px; }
  .hero p, .hero__intro .rich, .hero__intro .rich p { font-size: 15px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; gap: var(--space-m); }
  .quicklinks { grid-template-columns: 1fr 1fr; gap: 12px; }
  .quicklink .card__body { padding: 16px; }
  .quicklink .card__icon { width: 32px; height: 32px; margin-bottom: 10px; }
  .quicklink__title { font-size: 15px; }
  .quicklink .card__cta { padding: 0 16px 16px; }
  .doc { grid-template-columns: 36px 1fr auto; gap: 12px; padding: 14px 16px; }
  .doc__icon { width: 36px; height: 36px; font-size: 10px; }
  .doc > .btn { grid-column: auto; width: 40px; height: 40px; padding: 0; }
  .doc > .btn span { display: none; }
  .doc__meta { gap: 4px 12px; }
  .h4, .content h1 { font-size: 24px; }
  .search-page { flex-direction: column; }
  .search-page .btn { width: 100%; }
  .prevention .card__body { padding: var(--space-l); }
  .footer .container { flex-direction: column; align-items: flex-start; }
  .emergency > div { flex-direction: column; align-items: flex-start; }
  .dialog--search { margin-top: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; }
  .search-results { max-height: none; }
}

/* Photo d'équipe de l'ancien site, fondue dans le bleu (login et accueil).
   Toujours en « cover » pour ne jamais laisser voir ses bords, et deux fondus combinés :
   de gauche à droite sous le texte, et depuis le haut sous l'en-tête. */
.auth::before, .hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("/img/hero-team.webp") 70% 40% / cover no-repeat; opacity: .85;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.14) 0%, rgba(0,0,0,.2) 38%, #000 68%), linear-gradient(to bottom, rgba(0,0,0,.2) 0%, #000 22%, #000 85%, rgba(0,0,0,.2) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, rgba(0,0,0,.14) 0%, rgba(0,0,0,.2) 38%, #000 68%), linear-gradient(to bottom, rgba(0,0,0,.2) 0%, #000 22%, #000 85%, rgba(0,0,0,.2) 100%);
  mask-composite: intersect; }
.auth::after, .hero::after { z-index: 0; }
.auth > .container, .hero .container { position: relative; z-index: 1; }
@media (max-width: 900px) {
  .auth::before, .hero::before { opacity: .3; background-position: 70% center;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 80%, transparent 100%); -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 80%, transparent 100%); mask-composite: add; }
}

/* ---------- Page de connexion : fond pleine largeur, contenu dans la grille du site ---------- */
.auth { position: relative; overflow: hidden; display: flex; align-items: center; min-height: calc(100vh - var(--header-h) - 70px);
  background: linear-gradient(160deg, var(--blue-100), var(--blue-90) 60%, var(--blue-70)); color: #fff; }
/* Airbus Carbon Grid centré, effacé sous le texte */
.auth::after { content: ""; position: absolute; inset: 0; background: var(--blue-50); opacity: .85; pointer-events: none; }
.auth__grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: var(--space-3xl); align-items: center; padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
.auth__grid--single { grid-template-columns: 1fr; }
.auth__intro h1 { color: #fff; font-size: 44px; font-weight: 300; max-width: 600px; }
.auth__intro h1 strong { display: block; font-weight: 700; }
.auth__intro .rich { max-width: 600px; color: rgba(255,255,255,.94); font-size: 17px; }
.auth__panel { background: #fff; color: var(--text); padding: var(--space-xl); box-shadow: var(--elev-09); }
.auth__panel--wide { max-width: 900px; width: 100%; margin: 0 auto; }
.auth .banner { margin-bottom: var(--space-m); }
@media (max-width: 1000px) {
  .auth__grid { grid-template-columns: minmax(0, 1fr) 400px; gap: var(--space-xl); }
  .auth__intro h1 { font-size: 34px; }
}
@media (max-width: 900px) {
  .auth { min-height: 0; align-items: stretch; }
  .auth__grid { grid-template-columns: 1fr; gap: var(--space-xl); padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
  .auth__intro h1 { font-size: 30px; }
}
@media (max-width: 600px) {
  .auth__grid { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
  .auth__intro h1 { font-size: 26px; }
  .auth__intro .rich { font-size: 15px; }
  .auth__panel { padding: var(--space-l); margin: 0 calc(-1 * var(--space-m)); box-shadow: none; }
}

/* Code ARP : un trait par caractère possible (10 au maximum), visibles pendant la saisie */
.input--code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 22px; letter-spacing: .45em; text-transform: uppercase; height: 56px; padding: 0 0 6px 16px;
  background-image: repeating-linear-gradient(90deg, var(--grey-40) 0 1ch, transparent 1ch calc(1ch + .45em));
  background-repeat: no-repeat; background-size: calc(10 * (1ch + .45em) - .45em) 2px; background-position: 16px calc(100% - 13px); }
.input--code:focus { background-image: repeating-linear-gradient(90deg, var(--blue-50) 0 1ch, transparent 1ch calc(1ch + .45em)); }
.input--code::placeholder { color: transparent; }

/* ---------- Touches d'orange (accent #fe5000, Pantone 021 C) ----------
   Règles : l'orange marque la navigation et les repères, jamais un statut.
   Erreurs = --red-50, avertissements = --orange-50 (#e07400), inchangés.
   Pas de texte courant orange sur blanc (3,3:1) ni de texte blanc sur orange (3,3:1) :
   orange sur blanc seulement pour des filets, pictos et chiffres >= 24px. */

/* 1. Menu principal : soulignement de la rubrique active */
.main-menu__list > li > a.is-active::after { background: var(--accent); }
.main-menu__more.has-active > button { box-shadow: inset 0 -3px 0 var(--accent); }

/* 2. Bandeau d'accueil : nom du site en orange (4,7:1 sur bleu nuit) et filet dégradé en pied */
.hero__eyebrow { color: var(--accent) !important; }
.hero { border-bottom: 4px solid var(--accent); border-image: var(--accent-gradient) 1; }

/* 3. Accès rapides : pictos au trait orange (3,3:1 sur blanc, seuil 3:1 des éléments graphiques) */
.quicklink .card__icon { color: var(--accent); }
.quicklink:hover .card__cta { color: var(--blue-70); }

/* 4. Pages rubrique : trait dégradé sous le titre, et repère actif de l'arborescence */
.page-title h1::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 12px; background: var(--accent-gradient); }
.side-nav a.is-active { border-left-color: var(--accent); }

/* 5. Connexion : bandeau dégradé en tête du panneau (écho de l'ancienne popin) */
.auth__panel { position: relative; }
.auth__panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--accent-gradient); }

/* 6. Accueil, connexions du mois : chiffre et barre du site courant en orange (voir bloc .conn) */

/* Accueil : connexions du mois (remplace les règles .stats*) */
.conn { background: var(--white); border: 1px solid var(--border); box-shadow: var(--elev-02); padding: var(--space-l); }
.conn__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-m); padding-bottom: var(--space-m); margin-bottom: var(--space-s); border-bottom: 1px solid var(--grey-10); }
.conn__title { margin: 0; font-size: 20px; line-height: 26px; font-weight: 700; color: var(--blue-90); }
.conn__sub { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.conn__month { text-transform: capitalize; }
.conn__total { margin: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.conn__total strong { font-size: 32px; font-weight: 700; color: var(--blue-90); font-variant-numeric: tabular-nums; }
.conn__total span { margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.conn__list { list-style: none; margin: 0; padding: 0; }
.conn__item { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: var(--space-m); row-gap: 6px; padding: 12px 0; }
.conn__item + .conn__item { border-top: 1px solid var(--grey-10); }
.conn__group { display: flex; align-items: center; gap: 8px; margin: 0; padding: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.conn__group:first-child { padding-top: 4px; }
.conn__group + .conn__item { border-top: 0; }
.conn__item + .conn__group { border-top: 1px solid var(--grey-20, #dfe3e8); margin-top: 4px; }
.conn__group svg { width: 20px; height: 20px; flex: none; color: var(--blue-90); }
.conn__site { min-width: 0; font-size: 14px; font-weight: 500; color: var(--grey-80); }
.conn__value { font-size: 24px; line-height: 28px; font-weight: 700; color: var(--blue-90); font-variant-numeric: tabular-nums; }
.conn__tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: var(--blue-10); color: var(--blue-90); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.conn__item.is-current .conn__site { color: var(--blue-90); font-weight: 700; }
/* 24px gras = grand texte : l'orange (3,3:1 sur blanc) passe le seuil AA de 3:1 */
.conn__item.is-current .conn__value { color: var(--accent); }
/* Barre de proportion : part du site dans le total du mois */
.conn__bar { grid-column: 1 / -1; display: block; width: 100%; height: 6px; border: 0; border-radius: 3px; overflow: hidden; background: var(--grey-10); color: var(--blue-90); -webkit-appearance: none; appearance: none; }
.conn__bar::-webkit-progress-bar { background: var(--grey-10); border-radius: 3px; }
.conn__bar::-webkit-progress-value { background: var(--blue-90); border-radius: 3px; }
.conn__bar::-moz-progress-bar { background: var(--blue-90); border-radius: 3px; }
.conn__item.is-current .conn__bar { color: var(--accent); }
.conn__item.is-current .conn__bar::-webkit-progress-value { background: var(--accent-gradient); }
.conn__item.is-current .conn__bar::-moz-progress-bar { background: var(--accent-gradient); }

/* Drapeau à égale distance de « Rechercher » et de l'avatar */
.header__nav .profile { margin-left: 11px; }
@media (max-width: 1180px) { .header__nav .profile { margin-left: 7px; } }

/* ---------- Pictos affinés (trait des Airbus Icons allégé sur les grands formats) ---------- */
.card__icon svg, .login-method__icon svg, .division-card .card__icon svg, .sub-card > svg:first-child { filter: url(#icon-thin); }

/* ---------- Touches d'orange, deuxième passe ---------- */
/* Titres de section : trait dégradé, comme les titres de rubrique */
.section-heading h2::after { content: ""; display: block; width: 48px; height: 4px; margin-top: 10px; background: var(--accent-gradient); }
.section-heading { align-items: center; }
/* Cartes : liseré dégradé et flèche orange au survol */
.card--link { position: relative; }
.card--link::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px; background: var(--accent-gradient); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.card--link:hover::before, .card--link:focus-visible::before { transform: scaleX(1); }
.card__cta svg { color: var(--accent); transition: transform .2s ease; }
.card--link:hover .card__cta svg { transform: translateX(4px); }
/* Type de document : pastille orange (texte assombri pour rester lisible) */
.doc__icon { background: #fff1ea; color: #b83a00; }
/* Sous-rubriques : dossier orange */
.sub-card > svg:first-child { color: var(--accent); }
/* Fil d'Ariane : séparateurs orange */
.breadcrumb li + li::before { color: var(--accent); }
/* Bandeau d'accueil : picto orange sur le bouton Nouveautés */
.hero__actions .btn--ghost-negative svg { color: var(--accent); }
/* Pied de page : filet dégradé */
.footer { border-top: 4px solid var(--accent); border-image: var(--accent-gradient) 1; }
/* Fenêtre de recherche : liseré dégradé */
.dialog--search { border-top: 4px solid var(--accent); border-image: var(--accent-gradient) 1; }
/* Menu mobile : rubrique active en orange */
.drawer__link.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.drawer__group[open] > summary svg { color: var(--accent); }

/* ---------- Fenêtre de recherche : résultats sans double encadrement ---------- */
.search-results .doc-list { border: 0; background: transparent; }
/* Même marge interne que les listes de documents des rubriques. */
.search-results .doc { border-bottom: 1px solid var(--grey-10); }
.search-results .doc:last-child { border-bottom: 0; }
.search-results .doc__meta span:empty { display: none; }
.search-results .empty { border: 0; background: var(--grey-5); padding: var(--space-xl); }

/* Sous-rubriques : contenu centré verticalement sur toute la hauteur de la carte */
.subrubriques .card--link > .sub-card { flex: 1; }

/* Champ piège anti-robot, hors écran */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Lisibilité du texte posé sur la photo */
.auth__intro h1, .auth__intro .rich, .hero h1, .hero__intro, .hero__eyebrow { text-shadow: 0 1px 14px rgba(1, 19, 51, .65); }

/* Lisibilité : la photo reste pleine à droite, très atténuée sous le texte,
   et la colonne de texte est resserrée pour rester sur la zone sombre. */
.hero__intro { max-width: 600px; }
.hero h1 { max-width: 720px; }

/* ---------- Fonds du bandeau et de la connexion, compatibles tous navigateurs ----------
   Firefox n'applique pas la combinaison de deux masques (mask-composite) comme Chrome :
   chaque calque n'utilise donc plus qu'un seul masque.
   Photo : un dégradé elliptique unique, plein à droite, estompé à gauche, en haut et en bas.
   Carbon Grid : image déjà colorée en bleu, avec un seul masque horizontal. */
.auth::before, .hero::before {
  -webkit-mask: radial-gradient(ellipse 62% 78% at 78% 50%, #000 45%, rgba(0,0,0,.12) 100%) no-repeat;
  mask: radial-gradient(ellipse 62% 78% at 78% 50%, #000 45%, rgba(0,0,0,.12) 100%) no-repeat;
}
.auth::after, .hero::after {
  background: url("/img/carbon-grid-blue.webp") center / auto 50% no-repeat;
  opacity: 1;
  -webkit-mask: linear-gradient(to right, rgba(0,0,0,.12) 0%, rgba(0,0,0,.12) 40%, #000 72%) no-repeat;
  mask: linear-gradient(to right, rgba(0,0,0,.12) 0%, rgba(0,0,0,.12) 40%, #000 72%) no-repeat;
}
.auth::after { background-size: auto 42%; }
@media (max-width: 900px) {
  .auth::before, .hero::before {
    -webkit-mask: linear-gradient(to bottom, rgba(0,0,0,.2), #000 30%, #000 80%, rgba(0,0,0,.2)) no-repeat;
    mask: linear-gradient(to bottom, rgba(0,0,0,.2), #000 30%, #000 80%, rgba(0,0,0,.2)) no-repeat;
  }
  .hero::after, .auth::after { -webkit-mask: none; mask: none; opacity: .5; }
}

/* ---------- Bascule de langue FR | EN (comme l'ancien site) ---------- */
.lang-switch { display: flex; align-items: center; gap: 10px; padding: 0 8px; font: 700 13px/1 "Inter", sans-serif; letter-spacing: .04em; }
.lang-switch a { color: rgba(255,255,255,.55); padding: 6px 2px; text-decoration: none; transition: color .14s ease; }
.lang-switch a:hover { color: #fff; text-decoration: none; }
.lang-switch a.is-active { color: #fff; }
.lang-switch span { width: 1px; height: 14px; background: rgba(255,255,255,.45); }
.lang-switch a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 2px; }

/* ---------- Pages intérieures : raccourcis « Tous les documents » et « Plans des sites » ---------- */
.side-col { position: sticky; top: calc(var(--header-h) + 64px); display: flex; flex-direction: column; gap: 16px; }
.side-col .side-nav { position: static; max-height: calc(100vh - var(--header-h) - 380px); min-height: 200px; }
.shortcuts { display: flex; flex-direction: column; gap: 16px; }
.shortcut { padding: 20px 20px 18px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title icon" "cta icon"; row-gap: 14px; align-items: start;
  background: linear-gradient(110deg, #fff 55%, #fff6f0 100%); }
.shortcut__icon { grid-area: icon; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; color: var(--accent); align-self: center; }
.shortcut__icon svg { width: 26px; height: 26px; filter: url(#icon-thin); }
.shortcut__title { grid-area: title; font-size: 18px; color: var(--blue-90); }
.shortcut .card__cta { grid-area: cta; padding: 0; }
@media (max-width: 900px) {
  .side-col { position: static; order: 2; margin-top: var(--space-xl); }
  .shortcuts { flex-direction: row; flex-wrap: wrap; }
  .shortcut { flex: 1 1 240px; }
}
@media (max-width: 900px) { .side-col .side-nav { display: none; } }
.header__nav .lang-switch a { height: auto; padding: 6px 2px; background: transparent !important; border-radius: 0; font: 700 13px/1 "Inter", sans-serif; }

/* Accès rapides de l'accueil : même style que les raccourcis des pages intérieures */
.quicklinks.grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.quicklinks .shortcut { padding: 24px 24px 22px; min-height: 150px; align-content: space-between; }
.quicklinks .shortcut__icon { width: 60px; height: 60px; }
.quicklinks .shortcut__icon svg { width: 28px; height: 28px; }
@media (max-width: 600px) {
  .quicklinks.grid { grid-template-columns: 1fr; gap: 12px; }
  .quicklinks .shortcut { min-height: 0; padding: 18px; }
  .quicklinks .shortcut__icon { width: 48px; height: 48px; }
}

/* Numéros d'urgence : raccourci au même format que les autres, accent rouge (comme l'ancien site, colonne de gauche) */
.shortcut--emergency { background: linear-gradient(110deg, #fff 55%, #fdeeee 100%); }
.shortcut--emergency .shortcut__icon { border-color: var(--red-50); color: var(--red-50); }
.shortcut--emergency .card__cta svg { color: var(--red-50); }
.shortcut--emergency:hover .card__cta svg { transform: translateY(2px); }
.shortcut--emergency::before { background: var(--red-50) !important; }
.emergency-mobile { display: none; }
@media (max-width: 900px) {
  .emergency-mobile { display: block; margin-bottom: var(--space-l); }
  .side-col .shortcut--emergency { display: none; }
}

/* =====================================================================
   Propositions UX/UI du front (novembre 2026)
   ===================================================================== */

/* ---------- 1. Arborescence latérale : plus de zone de défilement interne ---------- */
.side-col { position: static; }
.side-col .side-nav { max-height: none; min-height: 0; overflow: visible; }
.side-nav a.is-parent { color: var(--blue-90); font-weight: 700; }

/* ---------- 2. Connexion mobile : titre, formulaire, puis texte d'introduction ---------- */
@media (max-width: 900px) {
  .auth__intro { display: contents; }
  .auth__intro h1 { order: 0; margin: 0; }
  .auth__panel { order: 1; }
  .auth__intro .rich { order: 2; }
  .auth__grid { gap: var(--space-l); }
}
/* Texte légal défilant : fondu tant qu'il reste à lire, focus clavier visible */
.login-legal:not(.is-end) { -webkit-mask-image: linear-gradient(#000 calc(100% - 36px), transparent); mask-image: linear-gradient(#000 calc(100% - 36px), transparent); }
.login-legal:focus-visible { outline: 2px solid var(--blue-50); outline-offset: 2px; }

/* ---------- 3. Accueil mobile : actions avant le texte, accès rapides sur deux colonnes ---------- */
@media (max-width: 900px) {
  .hero .container { display: flex; flex-direction: column; }
  .hero__actions { order: 1; margin-top: var(--space-s); }
  .hero__intro { order: 2; margin-top: var(--space-xl); }
}
.hero__intro > summary { list-style: none; display: block; cursor: default; }
.hero__intro > summary::-webkit-details-marker { display: none; }
.hero__intro > summary > svg { display: none; }
@media (max-width: 600px) {
  .hero__intro > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); min-height: 44px; cursor: pointer; }
  .hero__intro > summary .hero__intro-title { margin: 0; }
  .hero__intro > summary > svg { display: block; width: 24px; height: 24px; flex: none; color: var(--accent); transition: transform .15s ease; }
  .hero__intro[open] > summary > svg { transform: rotate(180deg); }
  .hero__intro[open] > .rich { margin-top: var(--space-s); }

  .quicklinks.grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .quicklinks .shortcut { grid-template-columns: 1fr; grid-template-areas: "icon" "title" "cta"; row-gap: 10px; padding: 16px; align-content: start; }
  .quicklinks .shortcut__icon { width: 44px; height: 44px; justify-self: start; align-self: start; }
  .quicklinks .shortcut__icon svg { width: 22px; height: 22px; }
  .quicklinks .quicklink__title { font-size: 15px; }
  .quicklinks .shortcut { grid-template-rows: auto auto 1fr; }
  .quicklinks .card__cta { align-self: end; }
  .quicklinks .shortcut:last-child:nth-child(odd) { grid-template-rows: auto auto; grid-column: 1 / -1; grid-template-columns: 1fr auto; grid-template-areas: "title icon" "cta icon"; }
  .quicklinks .shortcut:last-child:nth-child(odd) .shortcut__icon { align-self: center; }
}

/* ---------- 4. Accès rapides sur grand écran : une seule rangée, texte jamais collé au picto ---------- */
.shortcut { column-gap: var(--space-m); }
@media (min-width: 1200px) {
  .quicklinks.grid[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-m); }
  .quicklinks.grid[data-count="5"] .shortcut { grid-template-columns: 1fr; grid-template-areas: "icon" "title" "cta"; row-gap: var(--space-m); align-content: start; min-height: 0; padding: 20px; }
  .quicklinks.grid[data-count="5"] .shortcut__icon { justify-self: start; width: 52px; height: 52px; }
  .quicklinks.grid[data-count="5"] .quicklink__title { font-size: 18px; }
  .quicklinks.grid[data-count="5"] .shortcut { grid-template-rows: auto auto 1fr; }
  .quicklinks.grid[data-count="5"] .card__cta { align-self: end; }
}
@media (min-width: 901px) {
  .quicklinks.grid[data-count="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 5. Ligne de document entièrement cliquable, une seule tabulation ---------- */
.doc { position: relative; transition: background-color .12s ease; }
.doc:hover { background: var(--grey-5); }
.doc__name::after { content: ""; position: absolute; inset: 0; }
.doc__name:focus-visible { outline: none; }
.doc:has(.doc__name:focus-visible) { outline: 2px solid var(--blue-50); outline-offset: -2px; }
@supports not selector(:has(*)) { .doc__name:focus-visible { outline: 2px solid var(--blue-50); outline-offset: 2px; } }
.doc__meta a { position: relative; z-index: 1; }
.doc__rub { flex-basis: 100%; }
.doc__meta { row-gap: 2px; }
.doc__dl { pointer-events: none; }
/* PDF : le bouton est un vrai lien de téléchargement, au-dessus du lien de la ligne (qui ouvre le PDF). */
.doc__dl--link { pointer-events: auto; position: relative; z-index: 1; transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.doc__dl--link:hover, .doc__dl--link:focus-visible { background: var(--blue-10); }
.doc__badge { margin-left: 8px; height: 20px; font-size: 11px; letter-spacing: .02em; text-transform: uppercase; vertical-align: 2px; }
.doc__badge--updated { background: var(--blue-10); color: var(--blue-70); }
.doc:hover .doc__dl { background: var(--blue-10); }
.doc.is-pending .doc__dl svg { animation: dlNudge .7s ease-in-out infinite alternate; }
@keyframes dlNudge { to { transform: translateY(3px); opacity: .45; } }
/* Survol du bouton de téléchargement : la flèche « plonge » vers le bas puis revient (une fois par survol).
   Lignes non PDF : toute la ligne télécharge, l'effet part du survol de la ligne. */
.doc__dl { transition: background-color .25s ease; }
.doc:not(.doc--inline):hover .doc__dl svg,
.doc__dl--link:hover svg,
.doc__dl--link:focus-visible svg { animation: dlHover 1s ease-in-out; }
.doc__dl--link:hover, .doc__dl--link:focus-visible { border-color: var(--blue-70); box-shadow: 0 1px 4px rgba(0, 32, 91, .18); }
@keyframes dlHover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) {
  .doc:not(.doc--inline):hover .doc__dl svg, .doc__dl--link:hover svg, .doc__dl--link:focus-visible svg { animation: none; }
}

/* ---------- 6. En-tête mobile et tablette : « A2E » et le site toujours visibles ---------- */
@media (max-width: 1180px) { .header__app { display: block; } }
.header__nav .hsite-mob { padding: 0 10px; gap: 6px; font-size: 13px; }
.header__nav .hsite-mob .hctl__text { max-width: 96px; }
@media (max-width: 600px) {
  .header__brand { gap: 10px; }
  .header__logo { width: 84px; }
  .header__app { padding-left: 10px; font-size: 14px; }
  /* Nom de site long (Montoir-de-Bretagne) : coupé selon la place restante, le menu garde sa marge à droite */
  .header__nav .hsite-mob .hctl__text { max-width: min(96px, calc(100vw - 320px)); }
}
@media (max-width: 360px) { .header__nav .hsite-mob .hctl__text { display: none; } }

/* Titre de section et lien « Tout voir » sur la même ligne en mobile */
@media (max-width: 900px) {
  .section-heading { flex-wrap: nowrap; align-items: flex-end; }
  .section-heading > .btn { flex: none; margin-right: -12px; }
}

/* ---------- 7. Sous-rubriques sur mobile : liste compacte et saut vers les documents ---------- */
@media (max-width: 600px) {
  .subrubriques.grid { gap: 0; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--elev-02); }
  .subrubriques .card--link, .subrubriques .card--link:hover { border: 0; border-bottom: 1px solid var(--grey-10); box-shadow: none; transform: none; }
  .subrubriques .card--link:hover { background: var(--grey-5); }
  .subrubriques .card--link:last-child { border-bottom: 0; }
  .subrubriques .card--link::before { display: none; }
  .subrubriques .sub-card { min-height: 52px; padding: 12px var(--space-m); font-size: 15px; }
}
.jump-docs { align-items: center; gap: 6px; margin: 0 0 var(--space-m); font-size: 14px; font-weight: 700; }
.jump-docs svg { width: 18px; height: 18px; color: var(--accent); }

/* ---------- 8. Accessibilité : focus jamais masqué, mouvement réduit ---------- */
html { scroll-padding-top: calc(var(--header-h) + 48px + var(--space-m)); }
@media (max-width: 900px) { html { scroll-padding-top: calc(var(--header-h) + var(--space-m)); } }
.header__nav .lang-switch a { padding: 10px 4px; }
.drawer__sublink.is-active { color: var(--blue-90); font-weight: 700; border-left-color: var(--accent); background: var(--grey-5); }
.error-page__code { color: var(--blue-50); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .card--link:hover { transform: none; }
}

/* ---------- 9. Fenêtre de recherche : compteur, accès à la page, chargement, termes surlignés ---------- */
.search-results__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); padding: 0 var(--space-l) var(--space-s); font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--grey-10); }
@media (max-width: 600px) { .search-results__head { padding: 0 16px var(--space-s); } }
.search-results mark { background: #fff1ea; color: inherit; font-weight: 700; }
.search-results { transition: opacity .15s ease; }
.search-results.is-loading { opacity: .5; }
.search-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent-gradient) no-repeat; background-size: 40% 100%; opacity: 0; }
.search-field.is-loading::after { opacity: 1; animation: searchBar 1s linear infinite; }
@keyframes searchBar { from { background-position: -60% 0; } to { background-position: 160% 0; } }

/* ---------- 10. Page de recherche et états vides ---------- */
.page-pad { padding-bottom: var(--space-3xl); }
.search-page .search-field { flex: 1; }
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); border: 1px solid var(--border); }
.empty > svg { width: 32px; height: 32px; color: var(--grey-40); }

/* ---------- 11. Images décoratives allégées ---------- */
@media (max-width: 900px) { .auth::before, .hero::before { background-image: url("/img/hero-team-800.webp"); } }

/* Le nom du profil s'aligne sur le bord droit du contenu, comme « Urgences » dans la barre de menu
   (le fond du bouton au survol déborde dans la marge, comme celui des items du menu). */
.header__nav .profile { margin-right: -14px; }

/* Recherche : résultats dans l'autre langue ou un autre site quand rien n'est trouvé ici */
.search-elsewhere { margin-top: var(--space-m); padding: var(--space-l); background: var(--surface); border: 1px solid var(--border); }
.search-results .search-elsewhere { background: var(--grey-5); border: 0; }
.search-elsewhere p { margin: 0 0 var(--space-s); color: var(--text-muted); }
.search-elsewhere ul { margin: 0; padding-left: 20px; }
.search-elsewhere a { font-weight: 600; }
.search-results .search-elsewhere { margin: 0 var(--space-l); }

/* « Trouver un document » mis en valeur : pilule au dégradé orange Airbus, texte et loupe bleu marine
   (contraste 4,7:1 au plus sombre, sur l'orange, conforme WCAG AA), plus large que les autres commandes. */
.header__nav .hctl--search {
  width: 215px; justify-content: center; gap: 8px; padding: 0 16px; margin-right: 8px;
  border-radius: 999px; background: var(--accent-gradient);
  color: var(--blue-90); font-weight: 700;
  transition: box-shadow .2s ease, filter .2s ease;
}
.header__nav .hctl--search > svg,
.header__nav .hctl--search:hover > svg { color: var(--blue-90); }
.header__nav .hctl--search .label { overflow: hidden; text-overflow: ellipsis; }
.header__nav .hctl--search:hover { background: var(--accent-gradient); color: var(--blue-90); filter: brightness(1.06); box-shadow: 0 4px 14px rgba(254, 80, 0, .45); }
.header__nav .hctl--search:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Bouton « Trouver un document » de l'accueil : même dégradé orange que dans le bandeau */
.btn--search { background: var(--accent-gradient); color: var(--blue-90); border: 0; transition: box-shadow .2s ease, filter .2s ease; }
.btn--search:hover { background: var(--accent-gradient); color: var(--blue-90); filter: brightness(1.06); box-shadow: 0 4px 14px rgba(254, 80, 0, .45); }
.btn--search:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 1100px) {
  .header__nav .hctl--search { width: var(--hctl-h); padding: 0; justify-content: center; margin-right: 0; }
  .header__nav .hctl--search .label { display: none; }
}
@media (min-width: 1101px) and (max-width: 1180px) {
  .header__nav .hctl--search { padding: 0 12px; }
  .header__nav .hctl--search .label { display: block; }
}
@media (prefers-reduced-motion: reduce) { .header__nav .hctl--search, .btn--search { transition: none; } }
@media (forced-colors: active) { .header__nav .hctl--search { border: 1px solid ButtonText; } }

/* Petits téléphones (420px et moins) : depuis l'ajout du bouton Urgences, l'en-tête débordait de 18px à 375px
   et coupait le menu. Commandes compactées (36px) et nom du site raccourci selon la place restante. */
@media (max-width: 420px) {
  .header__nav { gap: 2px; }
  .header__nav .hctl--urgent, .header__nav .hctl--search { width: 36px; min-width: 36px; height: 36px; }
  .header__nav .header__burger { width: 38px; height: 38px; }
  .header__nav .hsite-mob { padding: 0 8px; gap: 4px; }
  .header__nav .hsite-mob .hctl__text { max-width: calc(100vw - 318px); }
}
