/* ==========================================================================
   HUSJ — Mon guide d'hospitalisation
   Layout derived from "HUSJ_Mon Guide d'Hospitalisation_Fr.pdf";
   colour and type taken from the host site.

   INTEGRATION NOTES
   - Every rule is scoped under .husj-guide, so nothing here can leak into
     the rest of your site. Conversely, very aggressive global styles on your
     site (e.g. `* { }` or `img { }` rules) may still reach inside; the reset
     block below defends against the most common ones.
   - Every class name is prefixed `husj-`.
   - Selectors are written `.husj-guide.husj-guide .husj-x`. The doubled class
     is deliberate: it lifts the component above the shallow class rules a host
     theme aims at page content, and keeps it above the reset block without
     depending on source order. Keep the prefix when adding rules.
   - ROOT FONT SIZE. Everything here is sized in `rem`, so it is measured
     against <html>, not against this component. If the host theme ships
     `html { font-size: 62.5% }` (a common WordPress idiom that makes 1rem =
     10px), the whole guide renders at 62.5% scale — correct proportions,
     uniformly too small. Check with, in the browser console on the live page:

         getComputedStyle(document.documentElement).fontSize   // expect "16px"

     If it is not 16px, the rem values here need re-anchoring to a local unit
     rather than to <html>; nothing else in this file will fix it.
   - Type comes from the host site (Noto Serif + Dancing Script, loaded in
     header.php). See section 1.
   - Colour comes from the host site's :root palette (--dark-blue, --red,
     --gray, --white, --purple, --dark). Every token carries the site's own
     hex as a var() fallback, so the guide renders correctly standalone and
     survives the palette being renamed. See section 15 for the mapping and
     the measured contrast ratios.
   - The icons are referenced from the markup, not from here — this file
     contains no url(), so it can be moved on its own (e.g. into a theme's
     /css folder) without any path edits. The markup expects:
         icons/*.svg   relative to the page
     Each icon is a 0 0 100 100 viewBox with the artwork centred in it and a
     baked #fff fill, matching the white PNGs it replaces. They are loaded
     through <img>, so the fill is not themeable from CSS; inline the <svg>
     and switch the fill to currentColor if that is ever wanted.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts — supplied by the host site

   The guide uses the two families the theme already loads in header.php:

       <link href="https://fonts.googleapis.com/css2?family=Dancing+Script:
             wght@400..700&family=Noto+Serif:ital,wght@0,100..900;1,100..900
             &display=swap" rel="stylesheet">

   Noto Serif carries the text (the guide needs 400, 700 and italic; the host
   loads the full 100..900 variable range plus italics). Dancing Script is the
   decorative accent, in place of the Great Vibes lettering on the printed
   cover. There are no @font-face rules here on purpose — declaring them again
   would fetch the same faces a second time.

   This makes the guide DEPENDENT on the host: if it is ever dropped onto a
   page whose header does not load those two families, add the <link> above to
   that page's <head>. The fallbacks below keep it legible either way.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   2. Tokens + scoped reset
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide {
  /* Brand colours, taken from the host site's :root palette. Each one carries
     the site's own hex as a var() fallback, so the guide still renders
     correctly if it is previewed on its own or the palette is ever renamed.

     Four map straight across. The site has no token for the three remaining
     roles — a light accent for text on blue, a muted accent for text on
     white, and a hairline rule — so they are mixed from the site's own
     colours rather than picked by eye. Measured ratios in the comments. */
  --husj-blue: var(--dark-blue, #122d6b);
  --husj-red: var(--red, #c62a3d);
  --husj-tint: var(--gray, #f0f2f5);
  --husj-paper: var(--white, #fff);

  /* Light accent, for text ON the blue panels (5.0:1). Site --purple used
     directly is only 2.9:1 there, so it is lifted toward white. */
  --husj-muted-on-blue: color-mix(in srgb, var(--purple, #6f7698) 70%, #fff);

  /* The same accent for text on white and on --husj-tint (5.4:1 / 4.8:1).
     Site --purple used directly is 4.5:1 / 4.0:1, which misses AA on the
     tinted cards, so it is deepened with the site's --dark. */
  --husj-muted: color-mix(in srgb, var(--purple, #6f7698) 80%, var(--dark, #37363d));

  /* Brand red lightened until it clears the blue panels (4.6:1). Site --red
     used directly is 2.4:1 there. */
  --husj-red-on-blue: color-mix(in srgb, var(--red, #c62a3d) 60%, #fff);

  /* Hairline dividers — the site palette has no rule colour. */
  --husj-rule: color-mix(in srgb, var(--purple, #6f7698) 18%, #fff);

  /* Type */
  --husj-font: "Noto Serif", Georgia, "Times New Roman", Times, serif;
  --husj-font-script: "Dancing Script", "Segoe Script", "Brush Script MT", cursive;
  --husj-fs-base: clamp(1rem, 0.94rem + 0.28vw, 1.0625rem);

  /* Rhythm */
  --husj-gap: clamp(1rem, 0.6rem + 1.4vw, 1.75rem);
  --husj-section-y: clamp(2.5rem, 1.5rem + 3.2vw, 4.5rem);
  --husj-radius: 10px;
  --husj-max: 1120px;

  /* In-page navigation (see section 12b) */
  --husj-sticky-top: 0px;
  --husj-nav-h: 2.6rem;

  /* Base */
  font-family: var(--husj-font);
  font-size: var(--husj-fs-base);
  line-height: 1.6;
  color: var(--husj-blue);
  background: var(--husj-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* The reset below only reaches descendants, so the container has to defend
     itself against the same global rules (`div { position: relative }`,
     `div { float: left }`, …). */
  display: block;
  position: static;
  float: none;
  clear: none;
  width: auto;
  max-width: none;
  overflow: visible;
}

.husj-guide.husj-guide *,
.husj-guide.husj-guide *::before,
.husj-guide.husj-guide *::after {
  box-sizing: border-box;
}

/* Defensive reset.

   `.husj-guide` is doubled so the reset carries two class selectors (0,2,0).
   That clears the shallow class rules a host theme aims at page content
   (`.entry-content p`, `.page-content ul li`, …), which a single class would
   lose to. `:where()` keeps the element list itself at zero, and the component
   rules below are prefixed with the same doubled class, so they sit one class
   higher (0,3,0) and always win over this block regardless of source order.

   The property list covers the declarations a WordPress theme's global
   stylesheet typically ships — the ones that visibly break this layout are
   `display` (themes love `span { display: inline-block }`), `position`
   (`div { position: relative }` re-anchors every absolutely positioned child),
   and the box/float properties. */
.husj-guide.husj-guide :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd,
figure, figcaption, blockquote, header, footer, nav, article, aside, main,
section, div, span, a, strong, em, small, b, i, time, address) {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  text-transform: none;
  text-indent: 0;
  letter-spacing: inherit;
  word-spacing: normal;
  white-space: normal;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-shadow: none;

  /* Layout — the properties that make a scoped flex/grid component collapse
     when the host theme sets them globally. `revert` lands on the browser
     default, i.e. exactly what this component was designed against. */
  display: revert;
  position: static;
  inset: auto;
  float: none;
  clear: none;
  width: revert;
  height: revert;
  min-width: revert;
  max-width: revert;
  min-height: revert;
  max-height: revert;
  overflow: visible;
  vertical-align: baseline;
  background: none;
  transform: none;
  filter: none;
  opacity: 1;
  visibility: visible;
  animation: none;
  transition: none;
}

/* Host themes attach icon-font glyphs to bare elements — `li::before { content:
   "\f105"; font-family: FontAwesome }` is close to universal. Without this the
   glyph is injected in front of every list item and step in the guide. The
   component's own pseudo-elements below re-declare `content` at (0,3,0) and are
   unaffected. */
.husj-guide.husj-guide :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd,
figure, figcaption, blockquote, section, div, span, a, strong, em, small)::before,
.husj-guide.husj-guide :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd,
figure, figcaption, blockquote, section, div, span, a, strong, em, small)::after {
  content: none;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  transform: none;
}

.husj-guide.husj-guide :where(ul, ol) {
  list-style: none;
}

.husj-guide.husj-guide :where(img) {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}

.husj-guide.husj-guide a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 0.18em;
}

.husj-guide.husj-guide a:hover,
.husj-guide.husj-guide a:focus-visible {
  color: var(--husj-red);
  text-decoration-color: currentColor;
}

.husj-guide.husj-guide a:focus-visible {
  outline: 2px solid var(--husj-red);
  outline-offset: 3px;
  border-radius: 2px;
}

.husj-guide.husj-guide .husj-script {
  /* Dancing Script, standing in for the Great Vibes lettering used for
     "Soyez les bienvenus" on the printed cover. A decorative accent — keep it
     to short display lines, not running text. */
  font-family: var(--husj-font-script);
  font-weight: 400;
  font-style: normal;
}

.husj-guide.husj-guide .husj-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   2b. Host-override guards

   Specificity alone cannot beat an `!important` declaration, and two of them
   are common enough in WordPress themes to be worth guarding explicitly:

     img { display: inline-block !important; width: auto !important;
           height: auto !important; }
     a   { text-decoration: none !important; }

   The first collapses the icon badges — the PNG stops being 52% of the circle
   and fills it edge to edge. The second strips the underline the guide uses to
   mark links. Both guards are (0,2,0)/(0,3,0), so they win against the host's
   element-level `!important` rules. Remove this block if the host stylesheet
   turns out not to need it.
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-icon img {
  display: block !important;
  width: 52% !important;
  height: 52% !important;
  max-width: none !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  vertical-align: baseline !important;
}

.husj-guide.husj-guide a {
  text-decoration-line: underline !important;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent) !important;
}

.husj-guide.husj-guide a:hover,
.husj-guide.husj-guide a:focus-visible {
  text-decoration-color: currentColor !important;
}

/* --------------------------------------------------------------------------
   3. Shell
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-wrap {
  width: min(100% - 2.5rem, var(--husj-max));
  margin-inline: auto;
}

.husj-guide.husj-guide .husj-section {
  padding-block: var(--husj-section-y);
}

.husj-guide.husj-guide .husj-section + .husj-section {
  border-top: 1px solid var(--husj-rule);
}

.husj-guide.husj-guide .husj-section__head {
  margin-bottom: clamp(1.5rem, 1rem + 1.8vw, 2.75rem);
}

.husj-guide.husj-guide .husj-section__title {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-section__sub {
  margin-top: 0.35rem;
  font-style: italic;
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.15rem);
  color: var(--husj-red);
}

.husj-guide.husj-guide .husj-lead {
  max-width: 68ch;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.2rem);
  line-height: 1.65;
}

.husj-guide.husj-guide .husj-lead + .husj-lead {
  margin-top: 1.15rem;
}

/* A lead paragraph can be followed straight by a card grid on the secondary
   pages; index.php only ever puts a grid under a section head, which carries
   its own margin. Same rhythm as .husj-steps and .husj-features. */
.husj-guide.husj-guide .husj-lead + .husj-grid {
  margin-top: clamp(2rem, 1.4rem + 1.8vw, 3rem);
}

/* --------------------------------------------------------------------------
   4. Icon badges
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-icon {
  --husj-icon-size: 3.25rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: var(--husj-icon-size);
  height: var(--husj-icon-size);
  border-radius: 50%;
  background: var(--husj-blue);
}

.husj-guide.husj-guide .husj-icon img {
  width: 52%;
  height: 52%;
  object-fit: contain;
}

.husj-guide.husj-guide .husj-icon--red {
  background: var(--husj-red);
}

.husj-guide.husj-guide .husj-icon--lg {
  --husj-icon-size: 4rem;
}

/* --------------------------------------------------------------------------
   5. Cards
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-grid {
  display: grid;
  gap: var(--husj-gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.husj-guide.husj-guide .husj-card {
  height: 100%;
  padding: clamp(1.15rem, 0.8rem + 1.1vw, 1.75rem);
  border-radius: var(--husj-radius);
  background: var(--husj-tint);
}

.husj-guide.husj-guide .husj-card--dark {
  background: var(--husj-blue);
  color: var(--husj-paper);
}

.husj-guide.husj-guide .husj-card__head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.husj-guide.husj-guide .husj-card__title {
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.125rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.045em;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-card--dark .husj-card__title {
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  color: var(--husj-red-on-blue);
}

.husj-guide.husj-guide .husj-card__note {
  margin-top: 0.85rem;
  color: var(--husj-muted-on-blue);
}

.husj-guide.husj-guide .husj-card--dark p + p {
  margin-top: 0.85rem;
}

/* --------------------------------------------------------------------------
   6. Lists
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-list > li {
  position: relative;
  padding-left: 1.4rem;
}

.husj-guide.husj-guide .husj-list > li + li {
  margin-top: 0.6rem;
}

.husj-guide.husj-guide .husj-list > li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--husj-red);
}

.husj-guide.husj-guide .husj-card--dark .husj-list > li::before {
  background: var(--husj-muted-on-blue);
}

.husj-guide.husj-guide .husj-list--wide > li + li {
  margin-top: 0.75rem;
}

.husj-guide.husj-guide .husj-sublist {
  margin-top: 0.45rem;
}

.husj-guide.husj-guide .husj-sublist > li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.96em;
}

.husj-guide.husj-guide .husj-sublist > li + li {
  margin-top: 0.3rem;
}

.husj-guide.husj-guide .husj-sublist > li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.66em;
  width: 5px;
  height: 2px;
  background: var(--husj-muted);
}

.husj-guide.husj-guide .husj-card--dark .husj-sublist > li::before {
  background: var(--husj-muted-on-blue);
}

/* --------------------------------------------------------------------------
   7. Steps (admission)
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-steps {
  margin-top: clamp(2rem, 1.4rem + 1.8vw, 3rem);
}

.husj-guide.husj-guide .husj-steps__title {
  margin-bottom: 1.5rem;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-step {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0 1.15rem;
  padding-bottom: 1.35rem;
}

.husj-guide.husj-guide .husj-step + .husj-step {
  padding-top: 0.25rem;
}

.husj-guide.husj-guide .husj-step__num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--husj-paper);
  background: var(--husj-blue);
}

.husj-guide.husj-guide .husj-step:nth-child(even) .husj-step__num {
  background: var(--husj-red);
}

.husj-guide.husj-guide .husj-step__title {
  align-self: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-step__body {
  margin-top: 0.3rem;
}

/* --------------------------------------------------------------------------
   8. Callouts
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-callout {
  display: flex;
  align-items: flex-start;
  gap: clamp(1rem, 0.7rem + 1vw, 1.6rem);
  margin-top: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem);
  padding: clamp(1.25rem, 0.9rem + 1.2vw, 1.9rem);
  border-radius: var(--husj-radius);
  background: var(--husj-tint);
}

.husj-guide.husj-guide .husj-callout--dark {
  background: var(--husj-blue);
  color: var(--husj-paper);
}

.husj-guide.husj-guide .husj-callout--dark .husj-callout__title {
  color: var(--husj-red-on-blue);
}

.husj-guide.husj-guide .husj-callout__title {
  margin-bottom: 0.55rem;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--husj-red);
}

.husj-guide.husj-guide .husj-callout__body {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1rem);
}

/* Stacked service rows (parking / mobility / antitabac) */
.husj-guide.husj-guide .husj-rows {
  display: grid;
  gap: 1.35rem;
  margin-top: var(--husj-gap);
  padding: clamp(1.25rem, 0.9rem + 1.2vw, 1.9rem);
  border-radius: var(--husj-radius);
  background: var(--husj-tint);
}

.husj-guide.husj-guide .husj-row {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0 1.15rem;
  align-items: start;
}

.husj-guide.husj-guide .husj-row__title {
  align-self: center;
  font-weight: 700;
  letter-spacing: 0.045em;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-row__title--red {
  color: var(--husj-red);
}

.husj-guide.husj-guide .husj-row__body {
  grid-column: 2;
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   9. Feature trio + visiting hours
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-features {
  display: grid;
  gap: var(--husj-gap);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(2rem, 1.4rem + 1.8vw, 3rem);
  text-align: center;
}

.husj-guide.husj-guide .husj-feature__icon {
  margin-inline: auto;
  margin-bottom: 0.85rem;
}

.husj-guide.husj-guide .husj-feature__title {
  font-weight: 400;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-feature__body {
  color: var(--husj-muted);
}

.husj-guide.husj-guide .husj-hours {
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border-radius: var(--husj-radius);
}

.husj-guide.husj-guide .husj-hours__item {
  padding: clamp(1.25rem, 0.9rem + 1.2vw, 1.9rem) 1rem;
  text-align: center;
  background: var(--husj-tint);
}

.husj-guide.husj-guide .husj-hours__icon {
  margin-inline: auto;
  margin-bottom: 0.9rem;
}

.husj-guide.husj-guide .husj-hours__title {
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-hours__title--red {
  color: var(--husj-red);
}

.husj-guide.husj-guide .husj-hours__times {
  font-variant-numeric: tabular-nums;
}

.husj-guide.husj-guide .husj-hours__times > span {
  display: block;
}

.husj-guide.husj-guide .husj-rules {
  margin-top: clamp(2rem, 1.4rem + 1.8vw, 3rem);
}

.husj-guide.husj-guide .husj-rules__title {
  margin-bottom: 1.25rem;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.045em;
  color: var(--husj-red);
}

.husj-guide.husj-guide .husj-rules .husj-list > li + li {
  margin-top: 0.8rem;
}

/* --------------------------------------------------------------------------
   10. Contact block
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-contact {
  display: grid;
  gap: var(--husj-gap);
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  margin-top: clamp(2rem, 1.4rem + 1.8vw, 3rem);
  padding-top: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  border-top: 1px solid var(--husj-rule);
}

.husj-guide.husj-guide .husj-contact__col {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.husj-guide.husj-guide .husj-contact__label {
  color: var(--husj-muted);
}

.husj-guide.husj-guide .husj-contact dl {
  margin: 0;
}

.husj-guide.husj-guide .husj-contact dt {
  color: var(--husj-muted);
}

.husj-guide.husj-guide .husj-contact dd a {
  overflow-wrap: anywhere;
}

.husj-guide.husj-guide .husj-contact dd {
  margin: 0 0 0.55rem;
}

.husj-guide.husj-guide .husj-contact__line + .husj-contact__line {
  margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   11. Hero (cover)
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-hero {
  position: relative;
  background: var(--husj-paper);
}

.husj-guide.husj-guide .husj-hero__media {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  overflow: hidden;
  background: var(--husj-blue);
  /* diagonal bottom edge, echoing the printed cover */
  clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%);
}

.husj-guide.husj-guide .husj-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}

.husj-guide.husj-guide .husj-hero__edge {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #b9c4cf;
  clip-path: polygon(0 calc(100% - 9px), 100% calc(84% - 9px), 100% 84%, 0 100%);
}

.husj-guide.husj-guide .husj-hero__badge {
  position: absolute;
  z-index: 2;
  left: clamp(1.25rem, 4vw, 4rem);
  bottom: clamp(-1rem, -0.5vw, 0rem);
  display: grid;
  place-items: center;
  width: clamp(6.5rem, 12vw, 10rem);
  padding: clamp(1rem, 2vw, 1.75rem) clamp(0.75rem, 1.5vw, 1.25rem);
  background: var(--husj-blue);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 86%);
}

.husj-guide.husj-guide .husj-hero__badge img {
  width: 100%;
}

.husj-guide.husj-guide .husj-hero__body {
  padding-top: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  padding-bottom: var(--husj-section-y);
  text-align: center;
}

.husj-guide.husj-guide .husj-hero__lettering {
  width: min(100%, 34rem);
  margin-inline: auto;
}

.husj-guide.husj-guide .husj-hero__title {
  margin-top: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-hero__order {
  margin-top: clamp(1rem, 0.7rem + 1vw, 1.5rem);
  font-size: clamp(0.95rem, 0.9rem + 0.28vw, 1.1rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-hero__centre {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 1rem 0.4rem;
  font-size: clamp(0.85rem, 0.8rem + 0.25vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--husj-paper);
  background: var(--husj-red);
}

/* Values line: Confiance ♥ Sérénité ♥ Bienveillance */
.husj-guide.husj-guide .husj-values {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem);
  font-weight: 400;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-values img {
  width: 0.85em;
}

.husj-guide.husj-guide .husj-mission {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-accred {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
}

.husj-guide.husj-guide .husj-accred img {
  width: clamp(4.5rem, 8vw, 6rem);
}

.husj-guide.husj-guide .husj-accred p {
  font-size: 0.95rem;
  color: var(--husj-blue);
}

/* --------------------------------------------------------------------------
   12. Closing section
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-closing {
  text-align: center;
  background: var(--husj-tint);
}

.husj-guide.husj-guide .husj-closing__quote {
  width: min(100%, 40rem);
  margin-inline: auto;
}

.husj-guide.husj-guide .husj-closing__logo {
  width: clamp(5rem, 9vw, 7rem);
  margin: clamp(2rem, 1.4rem + 2vw, 3.5rem) auto clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
}

.husj-guide.husj-guide .husj-closing__name {
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 400;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-closing__centre {
  margin-top: 0.35rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--husj-red);
}

/* --------------------------------------------------------------------------
   12b. In-page navigation — the single-page guide (guide.php)

   A sticky bar of section links plus a sommaire at the top. Both are plain
   anchors, so the page works with JavaScript off; the script only moves the
   `aria-current` marker as you scroll.

   --husj-sticky-top pushes the bar clear of a fixed site header. Set it once
   on .husj-guide if the theme's header overlays the page:
       .husj-guide { --husj-sticky-top: 72px; }
   --husj-nav-h is measured at runtime and used for the scroll offsets.
   -------------------------------------------------------------------------- */

.husj-guide.husj-guide .husj-nav {
  position: sticky;
  top: var(--husj-sticky-top);
  z-index: 100;
  background: var(--husj-paper);
  border-bottom: 1px solid var(--husj-rule);
}

/* Pinned by the script once the bar reaches the top of the viewport, and it
   stays there for the rest of the document — past the end of the guide and
   over the footer, which `position: sticky` alone cannot do since it releases
   at the end of its container. Fixed positioning also survives a host theme
   wrapper with `overflow: hidden`, which silently kills sticky.

   `left` and `width` are set inline from the bar's own measured box, so it
   keeps the width the theme gives the guide rather than spanning the viewport.
   The sticky rule above stays as the no-JavaScript fallback. */
.husj-guide.husj-guide .husj-nav--pinned {
  position: fixed;
  top: var(--husj-sticky-top);
}

/* Holds the bar's place in the flow while it is pinned, so nothing jumps. */
.husj-guide.husj-guide .husj-nav__spacer {
  display: block;
}

.husj-guide.husj-guide .husj-nav__inner {
  position: relative;
  width: min(100% - 2.5rem, var(--husj-max));
  margin-inline: auto;
}

/* The list scrolls sideways when the sections outrun the viewport, and a
   trackpad leaves no scrollbar to say so. These fades appear only on the side
   that has more to reveal; the script toggles the classes. */
.husj-guide.husj-guide .husj-nav__inner::before,
.husj-guide.husj-guide .husj-nav__inner::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3rem;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.husj-guide.husj-guide .husj-nav__inner::before {
  left: 0;
  background: linear-gradient(to right, var(--husj-paper), transparent);
}

.husj-guide.husj-guide .husj-nav__inner::after {
  right: 0;
  background: linear-gradient(to left, var(--husj-paper), transparent);
}

.husj-guide.husj-guide .husj-nav--more-start .husj-nav__inner::before,
.husj-guide.husj-guide .husj-nav--more-end .husj-nav__inner::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .husj-guide.husj-guide .husj-nav__inner::before,
  .husj-guide.husj-guide .husj-nav__inner::after {
    transition: none;
  }
}

.husj-guide.husj-guide .husj-nav__list {
  display: flex;
  gap: clamp(0.9rem, 0.55rem + 0.85vw, 1.5rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.husj-guide.husj-guide .husj-nav__list::-webkit-scrollbar {
  display: none;
}

.husj-guide.husj-guide .husj-nav__link {
  display: block;
  padding: 0.7rem 0 calc(0.7rem - 2px);
  white-space: nowrap;
  font-size: 0.85rem;
  line-height: 1.45;
  letter-spacing: 0.015em;
  color: var(--husj-muted);
  border-bottom: 2px solid transparent;
  text-decoration-line: none !important;
}

.husj-guide.husj-guide .husj-nav__link:hover,
.husj-guide.husj-guide .husj-nav__link:focus-visible {
  color: var(--husj-red);
}

.husj-guide.husj-guide .husj-nav__link[aria-current="true"] {
  color: var(--husj-red);
  font-weight: 700;
  border-bottom-color: var(--husj-red);
}

/* Anchor targets clear the sticky bar. */
.husj-guide.husj-guide .husj-section[id] {
  scroll-margin-top: calc(var(--husj-sticky-top) + var(--husj-nav-h) + 1rem);
}

/* Sommaire */
.husj-guide.husj-guide .husj-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 1rem + 1.6vw, 2.75rem);
  margin-top: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  counter-reset: husj-toc;
}

.husj-guide.husj-guide .husj-toc__link {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0 0.85rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--husj-rule);
  text-decoration-line: none !important;
}

.husj-guide.husj-guide .husj-toc__link:hover .husj-toc__label,
.husj-guide.husj-guide .husj-toc__link:focus-visible .husj-toc__label {
  color: var(--husj-red);
}

.husj-guide.husj-guide .husj-toc__num {
  counter-increment: husj-toc;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.9;
  color: var(--husj-red);
  font-variant-numeric: tabular-nums;
}

.husj-guide.husj-guide .husj-toc__num::before {
  content: counter(husj-toc, decimal-leading-zero);
}

.husj-guide.husj-guide .husj-toc__label {
  font-weight: 700;
  line-height: 1.4;
  color: var(--husj-blue);
}

.husj-guide.husj-guide .husj-toc__sub {
  display: block;
  grid-column: 2;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--husj-muted);
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .husj-guide.husj-guide {
    --husj-max: 100%;
  }

  .husj-guide.husj-guide .husj-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .husj-guide.husj-guide .husj-hero__media {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  .husj-guide.husj-guide .husj-wrap {
    width: min(100% - 2rem, var(--husj-max));
  }

  .husj-guide.husj-guide .husj-grid,
  .husj-guide.husj-guide .husj-features,
  .husj-guide.husj-guide .husj-hours,
  .husj-guide.husj-guide .husj-toc {
    grid-template-columns: minmax(0, 1fr);
  }

  .husj-guide.husj-guide .husj-hours {
    gap: 0.75rem;
  }

  .husj-guide.husj-guide .husj-hours__item {
    border-radius: var(--husj-radius);
  }

  .husj-guide.husj-guide .husj-callout {
    flex-direction: column;
    gap: 1rem;
  }

  .husj-guide.husj-guide .husj-row {
    grid-template-columns: 2.75rem minmax(0, 1fr);
  }

  .husj-guide.husj-guide .husj-row .husj-icon {
    --husj-icon-size: 2.75rem;
  }

  .husj-guide.husj-guide .husj-hero__media {
    aspect-ratio: 3 / 4;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  }

  .husj-guide.husj-guide .husj-hero__edge {
    clip-path: polygon(0 calc(100% - 7px), 100% calc(90% - 7px), 100% 90%, 0 100%);
  }

  .husj-guide.husj-guide .husj-hero__img {
    object-position: center 58%;
  }

  .husj-guide.husj-guide .husj-step {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0 0.9rem;
  }

  .husj-guide.husj-guide .husj-step__num {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   14. Print
   -------------------------------------------------------------------------- */

@media print {
  .husj-guide.husj-guide .husj-nav {
    display: none;
  }

  .husj-guide.husj-guide {
    color: #000;
  }

  .husj-guide.husj-guide .husj-section {
    break-inside: avoid;
    border-top: 1px solid #ccc;
  }

  .husj-guide.husj-guide .husj-card,
  .husj-guide.husj-guide .husj-callout,
  .husj-guide.husj-guide .husj-rows,
  .husj-guide.husj-guide .husj-hours__item {
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* --------------------------------------------------------------------------
   15. Colour notes

   The palette is the host site's, not the print PDF's. Four of the site's
   :root tokens map onto the guide directly (--dark-blue, --red, --gray,
   --white); --purple and --dark are used to mix the three roles the site has
   no token for. Two site tokens go unused: --color-header-bg is a translucent
   header overlay with no counterpart here, and --dark is only used as a
   mixing ingredient rather than as a text colour, since the guide sets its
   body copy in --dark-blue by design.

   Measured contrast, all clearing WCAG AA for normal text:

     blue on white / on tint            13.0 : 1   /  11.6 : 1
     white on blue                      13.0 : 1
     red on white / on tint              5.5 : 1   /   4.9 : 1
     muted on white / on tint            5.4 : 1   /   4.8 : 1
     muted-on-blue on blue               5.0 : 1
     red-on-blue on blue                 4.6 : 1

   The last three are the mixed values. Using --purple and --red unmixed in
   those places gives 4.5/4.0, 2.9 and 2.4 respectively, so they would fail on
   the tinted cards and fail badly on the blue panels. If the brand team wants
   the flat site colours regardless, drop the color-mix() wrappers in the token
   block — the page will match the site's swatches exactly and fail an
   accessibility audit on those elements.
   -------------------------------------------------------------------------- */
