/* ==================================================================
   ERPC — questionnaire de satisfaction
   Reprend les variables, polices et composants de www.erpc.be
   (src/assets/css/style.css du site vitrine).
   ================================================================== */

@font-face { font-family: "Archivo"; src: url("fonts/archivo-variable.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #16181B;
  --graphite: #22262B;
  --line-dark: #33373D;
  --muted: #5B6068;
  --soft: #C9CCD1;
  --soft-2: #B9BDC4;
  --line: #DEDAD1;
  --ground: #F3F1EC;
  --white: #FFFFFF;
  --red: #C4161C;
  --red-dark: #9A1015;
  --red-tint: #FBE9E9;
  --red-on-dark: #F07F83;
  --ok-bg: #E6F2EA;
  --ok-ink: #1E5631;

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(16px, 4.5vw, 64px);
  --section: clamp(40px, 6vw, 88px);
  --maxw: 1440px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 88%; font-weight: 800; line-height: 1.06; margin: 0; letter-spacing: -0.005em; overflow-wrap: break-word; }
h2 { font-size: clamp(26px, 2.6vw, 34px); }
p { margin: 0; }
address { font-style: normal; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--white); padding: 12px 18px; }
.skip-link:focus { top: 12px; color: var(--white); }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.lead { font-size: clamp(17px, 1.3vw, 18px); line-height: 1.6; color: var(--muted); }
.eyebrow { font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.eyebrow--on-dark { color: var(--red-on-dark); }

/* ---------- Boutons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; font: 600 16px/1.2 var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, color .15s; }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-dark); color: var(--white); }
.btn--lg { min-height: 56px; padding: 14px 32px; font-size: 17px; }
.btn[disabled] { opacity: .65; cursor: wait; }

/* ---------- En-tête ---------- */
.topbar { background: var(--ink); color: var(--soft-2); font-size: 13px; }
.topbar__inner { display: flex; align-items: center; gap: 32px; min-height: 40px; }
.topbar__phone { margin-left: auto; color: var(--white); text-decoration: none; font-weight: 500; }
.topbar__phone:hover { color: var(--white); text-decoration: underline; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; min-height: 88px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 52px; height: 52px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--red); color: var(--white); font: 800 16px/1 var(--font-display); letter-spacing: 0.04em; }
.brand__text { display: flex; flex-direction: column; gap: 2px; }
.brand__name { font: 700 18px/1.15 var(--font-display); font-stretch: 88%; }
.brand__tag { font-size: 13px; color: var(--muted); }
/* Choix de la langue, comme sur www.erpc.be. */
.lang-switch { display: flex; gap: 2px; list-style: none; margin: 0 0 0 auto; padding: 0; font-family: var(--font-mono); font-size: 13px; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--ink); background: var(--ground); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--white); }

.page-hero { background: var(--ink); color: var(--white); padding-block: clamp(44px, 6vw, 80px); }
.page-hero__title { font-size: clamp(32px, 5vw, 60px); line-height: 1.02; }
.page-hero__lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--soft); max-width: 42em; }

/* ---------- Questionnaire ---------- */
.section { padding-block: var(--section); }
.quest { max-width: 960px; display: flex; flex-direction: column; gap: 32px; }
.quest-form { display: flex; flex-direction: column; gap: 32px; }

.block { background: var(--white); border: 1px solid var(--line); padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; gap: 20px; }
/* float : la légende devient un élément normal (sinon elle se pose sur le bord du cadre). */
.block__head, .criterion__label { float: left; width: 100%; }
.block__head { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.block__letter { width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--red); color: var(--white); font: 800 22px/1 var(--font-display); }
.block__title { font: 800 clamp(24px, 2.4vw, 32px)/1.1 var(--font-display); font-stretch: 88%; }
.block--submit { align-items: flex-start; gap: 14px; border-top: 4px solid var(--red); }

.scale-legend { display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-bottom: 4px; }

.criteria { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.criterion { padding: 22px 0; border-top: 1px solid var(--line); }
.criterion:last-child { border-bottom: 1px solid var(--line); }
.criterion__label { display: flex; gap: 14px; align-items: baseline; font-size: 17px; font-weight: 500; margin-bottom: 14px; }
.criterion__num { flex-shrink: 0; min-width: 24px; font: 800 26px/1 var(--font-display); font-stretch: 88%; color: var(--red); }
.criterion__error { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--red-dark); }
.criterion.is-invalid { background: var(--red-tint); margin-inline: calc(-1 * clamp(20px, 3vw, 40px)); padding-inline: clamp(20px, 3vw, 40px); }

/* Notes 0 à 10 : vrais boutons radio, masqués, avec étiquettes cliquables. */
.rating { clear: both; position: relative; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.rating input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rating label { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid #8F8A80; background: var(--white); font: 600 17px/1 var(--font-body); cursor: pointer; user-select: none; transition: background-color .12s, color .12s, border-color .12s; }
.rating label:hover { border-color: var(--ink); background: var(--ground); }
.rating input:focus-visible + label { outline: 3px solid var(--red); outline-offset: 2px; }
.rating input:checked + label { background: var(--red); border-color: var(--red); color: var(--white); }
.criterion.is-invalid .rating label { border-color: var(--red); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 16px; font-weight: 600; }
.field__letter { color: var(--red); font-family: var(--font-display); font-weight: 800; }
.field__optional { font-weight: 400; color: var(--muted); }
.field input { font: inherit; min-height: 48px; padding: 10px 14px; border: 1px solid #8F8A80; border-radius: 0; background: var(--white); color: var(--ink); width: 100%; max-width: 520px; }
.field input:focus { outline: 3px solid var(--red); outline-offset: 0; border-color: var(--red); }
.req { color: var(--red); }
.id-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.id-grid .field input { max-width: none; }
.field--wide { grid-column: 1 / -1; }
.field__error { font-size: 14px; font-weight: 600; color: var(--red-dark); }
.field.is-invalid input { border-color: var(--red); background: var(--red-tint); }
.field textarea { font: inherit; min-height: 110px; padding: 12px 14px; border: 1px solid #8F8A80; border-radius: 0; background: var(--white); color: var(--ink); width: 100%; resize: vertical; }
.field textarea:focus { outline: 3px solid var(--red); outline-offset: 0; border-color: var(--red); }

.progress { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.progress.is-complete { color: var(--ok-ink); }
.form__note { font-size: 14px; color: var(--muted); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { padding: 14px 18px; font-weight: 500; }
.form__status--error { background: var(--red-tint); color: var(--red-dark); border-left: 4px solid var(--red); }
.form__status--diag { background: #FFF6D6; color: var(--ink); border-left: 4px solid #C9A400; font-family: var(--font-mono); font-size: 14px; }

.panel { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--ink); padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 20px; }
.panel--ok { border-top-color: var(--ok-ink); }
.panel--ok h2 { color: var(--ok-ink); }
.signature { color: var(--muted); }
.signature strong { color: var(--ink); }

.contact-box { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.contact-box strong { color: var(--ink); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: var(--soft-2); font-size: 14px; padding: 32px 0; }
.site-footer a { color: var(--soft-2); }
.site-footer a:hover { color: var(--white); }
.site-footer__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.site-footer__name { color: var(--white); font-weight: 600; }
.site-footer__copy { margin-left: auto; color: #9EA3AA; }
/* Mention discrète du développeur, sous le pied de page. */
.fontsoft-ad { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-dark); font-size: 12px; color: #8A8F96; }
.site-footer .fontsoft-ad a { color: #B9BDC4; text-decoration: none; font-weight: 500; }
.site-footer .fontsoft-ad a:hover { color: var(--white); text-decoration: underline; }

/* ==================================================================
   Tablettes et smartphones
   ================================================================== */
@media (max-width: 720px) {
  .topbar { display: none; }
  .site-header__inner { min-height: 72px; }
  .brand__mark { width: 44px; height: 44px; font-size: 13px; }
  .brand__name { font-size: 15px; }
  .brand__tag { display: none; }
  .site-header__inner { gap: 12px; }
  .lang-switch a { min-width: 36px; min-height: 44px; }
  .page-hero__title { font-size: clamp(30px, 8.6vw, 40px); }
  .criterion__label { font-size: 16px; }
  .id-grid { grid-template-columns: minmax(0, 1fr); }
  .block--submit { align-items: stretch; }
  .block--submit .btn { width: 100%; }
  .site-footer__copy { margin-left: 0; }
}

/* Petits téléphones : 0 à 5 sur la 1re ligne, 6 à 10 sur la 2e. */
@media (max-width: 480px) {
  .rating { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .rating label { min-height: 46px; }
  .scale-legend { flex-direction: column; gap: 0; }
}
