html { scroll-behavior: smooth;}

@media (prefers-color-scheme: dark) {
  :where(html:not([data-theme])) body,
:where(html:not([data-theme])) .w3-sidebar,
:where(html:not([data-theme])) .force-bg {
    color: #FFFFFF !important;
    background-color: #111111 !important;}
  :where(html:not([data-theme])) input,
  :where(html:not([data-theme])) textarea {background-color: #444444 !important; color: #FFFFFF;}
  :where(html:not([data-theme])) .fill-bg-color {
    fill: #111111 !important;}}
/* the same, when the visitor chose dark mode (theme.js) */
:where(html[data-theme="dark"]) body,
:where(html[data-theme="dark"]) .w3-sidebar,
:where(html[data-theme="dark"]) .force-bg {
    color: #FFFFFF !important;
    background-color: #111111 !important;}
:where(html[data-theme="dark"]) input,
:where(html[data-theme="dark"]) textarea {background-color: #444444 !important; color: #FFFFFF;}
:where(html[data-theme="dark"]) .fill-bg-color {
    fill: #111111 !important;}

@media (prefers-color-scheme: light) {
  :where(html:not([data-theme])) body,
:where(html:not([data-theme])) .w3-sidebar,
:where(html:not([data-theme])) .force-bg {
    color: #111111 !important;
    background-color: #FFFFFF !important;}
  :where(html:not([data-theme])) .fill-bg-color {
    fill: #FFFFFF !important;}}
/* the same, when the visitor chose light mode (theme.js) */
:where(html[data-theme="light"]) body,
:where(html[data-theme="light"]) .w3-sidebar,
:where(html[data-theme="light"]) .force-bg {
    color: #111111 !important;
    background-color: #FFFFFF !important;}
:where(html[data-theme="light"]) .fill-bg-color {
    fill: #FFFFFF !important;}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  25% {
    transform: scale(1.1);
    opacity: 1;
  }
  50% {
    transform: scale(0.95);
    opacity: 0.85;
  }
  75% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.heartbeat {
  animation: heartbeat 1.8s ease-in-out infinite;
  display: inline-block;
  transition: transform 0.3s ease;
}

.heartbeat:hover {
  animation: heartbeat 1.2s ease-in-out infinite;
}

/* w3-sidebar is position:fixed at 200px, but w3-col.l2 only reserves 16.66%,
   so between 993px and ~1200px the sidebar overlaps the content column. Pin
   the in-flow column to match the sidebar width. */
@media (min-width: 993px) {
  #left-menu-placeholder { width: 200px; }
  #article-content       { width: calc(100% - 200px); }
  /* A gap between the menu panel and the content, wider on wider screens. */
  #article-content       { padding-left: clamp(1.5rem, 4vw, 5rem); }
}

/* Left menu: a light panel, sections, the current page marked. */
#menu-sidebar {
  padding: 1.5em 0.75em !important;
  border-right: 1px solid #e3e6ea;}
#menu-sidebar .menu-section {
  margin: 1.4em 12px 0.4em;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a9099;}
@media (prefers-color-scheme: light) {
  :where(html:not([data-theme])) #menu-sidebar .menu-section {
    color: #5c636d;}}
/* the same, when the visitor chose light mode (theme.js) */
:where(html[data-theme="light"]) #menu-sidebar .menu-section {
    color: #5c636d;}
#menu-sidebar .w3-bar-item {
  margin: 2px 0;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: background-color 0.15s, border-color 0.15s;}
#menu-sidebar .w3-bar-item i {
  margin-right: 6px;
  color: #f44336;}
#menu-sidebar .w3-bar-item:hover {
  background-color: rgba(244, 67, 54, 0.08) !important;
  border-left-color: rgba(244, 67, 54, 0.5);}
#menu-sidebar .w3-bar-item[aria-current="page"] {
  background-color: rgba(244, 67, 54, 0.12) !important;
  border-left-color: #f44336;
  font-weight: 600;}
@media (prefers-color-scheme: light) {
  :where(html:not([data-theme])) #menu-sidebar {
    background-color: #f7f8fa !important;}}
/* the same, when the visitor chose light mode (theme.js) */
:where(html[data-theme="light"]) #menu-sidebar {
    background-color: #f7f8fa !important;}
@media (prefers-color-scheme: dark) {
  :where(html:not([data-theme])) #menu-sidebar {
    background-color: #1b1d22 !important;
    border-right-color: #2a2d33;}}
/* the same, when the visitor chose dark mode (theme.js) */
:where(html[data-theme="dark"]) #menu-sidebar {
    background-color: #1b1d22 !important;
    border-right-color: #2a2d33;}

/* Link to the reviews on Trustpilot: plain link, nothing loaded from
   Trustpilot until the visitor clicks. Readable in light and dark mode. */
.review-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin: 0.5em 0 1em;
  padding: 0.6em 1.3em;
  border: 2px solid #00b67a;
  border-radius: 999px;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;}
.review-link .fa-star {
  color: #00b67a;}
.review-link:hover {
  background-color: rgba(0, 182, 122, 0.12);}

/* Who runs an offer: round portraits with the first name underneath. */
.person-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2em;}
.person-thumb {
  margin: 0;
  text-align: center;}
.person-thumb img {
  display: block;
  width: 6.5em;
  height: 6.5em;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 3px #ff9800, 0 10px 24px rgba(0, 0, 0, 0.2);}
.person-thumb figcaption {
  margin-top: 0.6em;
  font-size: 0.85em;
  font-weight: 600;}

/* Small screens: the opened menu must sit above the page header (burger and
   language switch), or the header swallows the clicks on the menu's first
   links and on its close cross. */
@media (max-width: 992px) {
  #menu-sidebar { z-index: 10 !important; }}

/* Contrast (REQ-AFF-003, REQ-ACC-002). The w3 orange, red and grey are too light on a light
   background, so light mode uses darker shades reaching 4.5:1; on dark backgrounds (dark mode,
   midnight-blue blocks) the original shades already do. */
@media (prefers-color-scheme: light) {
  :where(html:not([data-theme])) .w3-text-orange {color: #b35900 !important;}
  :where(html:not([data-theme])) .w3-text-red {color: #c62828 !important;}
  :where(html:not([data-theme])) .w3-text-grey {color: #616161 !important;}
  :where(html:not([data-theme])) .w3-text-green {color: #2e7d32 !important;}}
/* the same, when the visitor chose light mode (theme.js) */
:where(html[data-theme="light"]) .w3-text-orange {color: #b35900 !important;}
:where(html[data-theme="light"]) .w3-text-red {color: #c62828 !important;}
:where(html[data-theme="light"]) .w3-text-grey {color: #616161 !important;}
:where(html[data-theme="light"]) .w3-text-green {color: #2e7d32 !important;}
.w3-flat-midnight-blue .w3-text-orange {color: #ff9800 !important;}
.w3-flat-midnight-blue .w3-text-red {color: #ff8a80 !important;}
/* Dark mode: the w3 grey is too dark on a dark background; the lighter shade reaches 4.5:1. */
@media (prefers-color-scheme: dark) {
  :where(html:not([data-theme])) .w3-text-grey {color: #9e9e9e !important;}}
:where(html[data-theme="dark"]) .w3-text-grey {color: #9e9e9e !important;}
/* A white card stays white in dark mode: inside it, the light-mode shades apply in every mode. */
.w3-white .w3-text-orange {color: #b35900 !important;}
.w3-white .w3-text-red {color: #c62828 !important;}
.w3-white .w3-text-grey {color: #616161 !important;}
.w3-red {background-color: #c62828 !important;}
.w3-blue {background-color: #1565c0 !important;}
/* Field borders at 3:1 against the page, in both modes. */
input.w3-border, textarea.w3-border, select.w3-border {border-color: #767676 !important;}

/* A link inside running text is underlined: its colour alone does not set it apart (REQ-ACC-003). */
p a:link, p a:visited, li a:link, li a:visited, td a:link, td a:visited, dd a:link, dd a:visited {
  text-decoration: underline;}
p a.w3-button, li a.w3-button, p a.review-link, li a.w3-bar-item {text-decoration: none;}

/* Forced colours (REQ-WAC-004): the system palette replaces the backgrounds, so buttons and cards
   keep a border to stay visible as such. */
@media (forced-colors: active) {
  .w3-button, .home-button, .review-link, .w3-card, .home-offer__label {border: 1px solid ButtonText;}}

/* --- external links: an arrow, and a text read by screen readers ----------- */

a.external::after {
  content: "\2197" / "";
  display: inline-block;
  margin-left: 0.15em;
  font-size: 0.75em;
  text-decoration: none;
}

.ext-note {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Performances: the measures of the version (build.clj), scrolled sideways on a narrow screen --- */

.measures {overflow-x: auto;}
.measures table {border-collapse: collapse; width: 100%;}
.measures th, .measures td {padding: 0.4em 0.6em; border-bottom: 1px solid currentColor; text-align: left;}
.measures td:not(:first-child) {white-space: nowrap;}

/* --- who-are-we: the resume and the certifications, side by side --------------------------------- */

.profile-docs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5em;
}

.profile-docs__resume {width: 12.5em; max-width: 100%; text-align: center;}

/* The degree and the certifications: a short list beside the resume, in the text size of the page. */
.credentials {max-width: 24em;}
.credentials__title {margin: 0 0 0.4em; font-weight: bold;}
.credentials ul {margin: 0; padding: 0; list-style: none;}
.credentials li {margin-bottom: 0.6em; padding-left: 0.6em; border-left: 3px solid currentColor;}
.credentials__name {font-weight: bold;}
.credentials__detail {display: block; font-size: 0.85em;}

/* --- the « Printable version » button (js/printable.js), at the end of the footer --- */

.print-toggle {
  display: block;
  margin: 0 auto 0.6em;
  padding: 0.3em 0.8em;
  border: 1px solid currentColor;
  border-radius: 0.3em;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* --- keyboard: visible focus, skip link, menu without JavaScript ------------------------------- */

/* A dark outline with a light ring inside: visible on light and dark backgrounds alike. */
:focus-visible {
  outline: 3px solid #111 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px #fff !important;
}

.skip-link {
  position: absolute;
  left: -999em;
}

.skip-link:focus {
  left: 0.5em;
  top: 0.5em;
  z-index: 100;
  padding: 0.5em 1em;
  background: #fff;
  color: #111;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Without JavaScript, « Open the menu » goes to #menu-sidebar. */
#menu-sidebar:target {
  display: block;
  z-index: 10 !important;
}

/* --- footer social links: the network's name always shown, not only on hover --- */

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.home p.home-offer__label {
  margin: 0;
}

/* --- font sizes follow the browser's setting (REQ-AFF-012) ------------------------------------
   w3_schools.css sizes text in px, which ignores the font size a visitor sets in the browser. The
   same sizes in rem: identical at the default 16px, and they grow with the visitor's setting. */

html,
body {
  font-size: 0.9375rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.w3-tiny { font-size: 0.625rem !important; }
.w3-small { font-size: 0.75rem !important; }
.w3-medium { font-size: 0.9375rem !important; }
.w3-large { font-size: 1.125rem !important; }
.w3-xlarge { font-size: 1.5rem !important; }
.w3-xxlarge { font-size: 2.25rem !important; }
.w3-xxxlarge { font-size: 3rem !important; }
.w3-jumbo { font-size: 4rem !important; }

/* --- reduced motion (REQ-ACC-018): no heartbeat, no entrance animation, no smooth scrolling --- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .heartbeat,
  [class*="w3-animate-"] {
    animation: none !important;
  }
}

/* --- reading width (REQ-ACC-019): running text lines stay under about 80 characters ---------- */

.text p,
.text li {
  max-width: 80ch;
}

/* Images carry width and height so the browser reserves their place before they load (REQ-AFF-013);
   their displayed size still comes from the stylesheet. */
img {
  height: auto;
}

/* Mode chosen by the visitor (theme.js): native controls and scrollbars follow it. */
:root[data-theme="dark"] {color-scheme: dark;}
:root[data-theme="light"] {color-scheme: light;}
.theme-choice {margin: 8px 4px; padding: 4px; border-radius: 4px; font: inherit;}
@media print {.theme-choice {display: none !important;}}
html.printable .theme-choice {display: none !important;}
.cf-message {resize: vertical; min-height: 6em;}
