/* ==========================================================================
   CertiExpress Maroc — site de recrutement
   Identité : indigo nuit, terre cuite, safran, ivoire. Motif zellige (étoile
   à huit branches) en SVG, posé en masque pour suivre les couleurs du thème.
   Mobile d'abord. Toutes les couleurs sont des variables de :root.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Fonds */
  --bg: #fbf7f0;
  --bg-alt: #f4ecdf;
  --surface: #ffffff;
  --surface-soft: #fffaf3;
  --line: #e8dcc8;
  --field-bg: #ffffff;
  --field-border: #7f8299;

  /* Texte */
  --text: #1b2142;
  --muted: #595e7c;

  /* Indigo nuit : en-tête, héros, parcours, pied de page */
  --night: #161d47;
  --night-2: #232d6e;
  --night-deep: #0f1538;
  --night-line: #343d7a;
  --night-chip: rgb(248 241 228 / .07);
  --on-night: #f8f1e4;
  --on-night-muted: #c9cce1;

  /* Terre cuite : action */
  --accent: #bf4f2c;
  --accent-hover: #a54220;
  --accent-ink: #ffffff;
  --accent-text: #a53f1e;
  --accent-soft: #f9e4d9;
  --accent-line: #e3b29e;
  --accent-shadow: rgb(191 79 44 / .45);

  /* Safran : ornement */
  --gold: #e6a531;
  --gold-text: #8a5a00;
  --gold-soft: #fbefd3;
  --gold-ring: rgb(230 165 49 / .25);

  /* Indigo clair : pictogrammes sur fond clair */
  --indigo: #2a3690;
  --indigo-soft: #e8ebfa;

  /* États */
  --ok: #19684e;
  --ok-soft: #e2f3eb;
  --ok-line: #a9d6c3;
  --err: #b3261e;
  --err-soft: #fbe8e5;
  --err-line: #eab5af;
  --focus: #2a3690;

  /* Décor */
  --ornament: #e6d8bf;
  --tile: #161d47;
  --num: #cdbd9f;
  --glow: rgb(191 79 44 / .42);
  --ghost-hover: rgb(248 241 228 / .12);
  --mask: #000;

  /* Papier des cartes flottantes du héros (identique dans les deux thèmes) */
  --paper: #fffaf1;
  --paper-ink: #1b2142;
  --paper-tint: #f9e4d9;
  --paper-accent: #a53f1e;

  /* Ombres */
  --shadow-sm: 0 1px 2px rgb(27 33 66 / .05), 0 6px 16px -8px rgb(27 33 66 / .14);
  --shadow: 0 2px 4px rgb(27 33 66 / .05), 0 22px 44px -20px rgb(27 33 66 / .3);
  --shadow-float: 0 2px 6px rgb(8 11 32 / .25), 0 18px 34px -12px rgb(8 11 32 / .55);

  /* Typographie */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Motifs (masques : seule l'opacité du tracé compte) */
  --zellige: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M80 40 68.28 51.72v16.56H51.72L40 80 28.28 68.28H11.72V51.72L0 40l11.72-11.72V11.72h16.56L40 0l11.72 11.72h16.56v16.56z'/%3E%3Cpath d='M58 40l-5.27 5.27v7.46h-7.46L40 58l-5.27-5.27h-7.46v-7.46L22 40l5.27-5.27v-7.46h7.46L40 22l5.27 5.27h7.46v7.46z'/%3E%3Cpath d='M0-6l6 6-6 6-6-6zM80-6l6 6-6 6-6-6zM0 74l6 6-6 6-6-6zM80 74l6 6-6 6-6-6z'/%3E%3C/g%3E%3C/svg%3E");
  --frise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M20 7l-1.76 1.76v2.48h-2.48L14 13l-1.76-1.76H9.76V8.76L8 7l1.76-1.76V2.76h2.48L14 1l1.76 1.76h2.48v2.48zM0 5l2 2-2 2-2-2zM28 5l2 2-2 2-2-2z'/%3E%3C/svg%3E");
  --khatam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23000' stroke-width='.7' stroke-linejoin='round'%3E%3Cpath d='M96 50 82.53 63.47v19.06H63.47L50 96 36.53 82.53H17.47V63.47L4 50l13.47-13.47V17.47h19.06L50 4l13.47 13.47h19.06v19.06z'/%3E%3Cpath transform='translate(50 50) scale(.68) translate(-50 -50)' d='M96 50 82.53 63.47v19.06H63.47L50 96 36.53 82.53H17.47V63.47L4 50l13.47-13.47V17.47h19.06L50 4l13.47 13.47h19.06v19.06z'/%3E%3Ccircle cx='50' cy='50' r='17'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1027;
    --bg-alt: #111633;
    --surface: #181f45;
    --surface-soft: #141a3b;
    --line: #2b3364;
    --field-bg: #0f1431;
    --field-border: #6f78a9;

    --text: #f5efe3;
    --muted: #b9bdd6;

    --night: #171f4f;
    --night-2: #253079;
    --night-deep: #080b1f;
    --night-line: #37407e;

    --accent-text: #f4a584;
    --accent-soft: #4a252c;
    --accent-line: #7a3f33;
    --accent-shadow: rgb(0 0 0 / .5);

    --gold: #efb84c;
    --gold-text: #f2c467;
    --gold-soft: #403313;

    --indigo: #b5bdff;
    --indigo-soft: #232c5f;

    --ok: #79d8b5;
    --ok-soft: #11342c;
    --ok-line: #24604f;
    --err: #ffa69d;
    --err-soft: #401b1e;
    --err-line: #7c3035;
    --focus: #efb84c;

    --ornament: #1d2554;
    --tile: #2e3a8f;
    --num: #414a85;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / .3), 0 6px 16px -8px rgb(0 0 0 / .5);
    --shadow: 0 2px 4px rgb(0 0 0 / .3), 0 22px 44px -20px rgb(0 0 0 / .7);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
svg { display: block; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent-text); text-underline-offset: .2em; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.85rem, 1.35rem + 2.2vw, 2.8rem); }
h3 { font-size: 1.28rem; line-height: 1.2; }
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, 1160px); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--paper); color: var(--paper-ink); font-weight: 650;
}
.skip:focus { top: 12px; }

/* Pictogrammes */
.ic {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-fill { fill: currentColor; stroke: none; }
.logo-star { fill: var(--accent); }
.logo-check { fill: none; stroke: var(--accent-ink); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px -10px var(--accent-shadow);
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn .ic { transition: transform .2s; }
.btn:hover .ic { transform: translateX(3px); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-small { min-height: 42px; padding: 8px 20px; font-size: .95rem; box-shadow: none; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: var(--ghost-hover); }
.btn-block { width: 100%; }

/* ---------- En-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--night); color: var(--on-night);
  border-bottom: 1px solid var(--night-line);
  --focus: var(--gold);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
  font-family: var(--font-display); font-size: 1.16rem; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap;
}
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand strong { font-weight: 600; font-style: italic; color: var(--gold); }
.top nav { display: flex; align-items: center; gap: 2px; }
.top nav a:not(.btn) { display: none; }
@media (max-width: 379.98px) {
  .top-in { gap: 8px; }
  .brand { gap: 8px; font-size: 1.02rem; }
  .brand-mark { width: 30px; height: 30px; }
  .btn-small { padding-inline: 16px; }
}

/* ---------- Héros ---------- */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  padding: 44px 0 96px;
  background: var(--night); color: var(--on-night);
  --focus: var(--gold);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(80% 60% at 100% 0%, var(--glow), transparent 70%),
    linear-gradient(165deg, var(--night-2), var(--night) 48%);
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background: var(--on-night); opacity: .1;
  -webkit-mask-image: var(--zellige), linear-gradient(250deg, var(--mask) 0%, transparent 62%);
  -webkit-mask-size: 84px 84px, 100% 100%;
  -webkit-mask-position: top right, 0 0;
  -webkit-mask-composite: source-in;
  mask-image: var(--zellige), linear-gradient(250deg, var(--mask) 0%, transparent 62%);
  mask-size: 84px 84px, 100% 100%;
  mask-position: top right, 0 0;
  mask-composite: intersect;
}
.hero-grid { display: grid; gap: 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 20px; padding: 7px 14px 7px 12px;
  border: 1px solid var(--night-line); border-radius: 999px;
  background: var(--night-chip); color: var(--gold);
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--gold-ring); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
h1 { font-size: clamp(2.05rem, 1.25rem + 3.6vw, 3.7rem); line-height: 1.06; letter-spacing: -.022em; max-width: 15em; }
h1 em { font-style: italic; font-weight: 500; color: var(--gold); }
.lead { margin: 22px 0 0; max-width: 36em; font-size: 1.06rem; color: var(--on-night-muted); }
.hero-cta { display: grid; gap: 12px; margin-top: 30px; }
.hero-place { display: flex; align-items: center; gap: 10px; margin: 26px 0 0; font-size: .95rem; color: var(--on-night-muted); }
.hero-place .ic { color: var(--gold); }
.place-text { display: grid; line-height: 1.45; }
.place-sep { display: none; }
.hero-art { display: none; }

/* ---------- Sections ---------- */
.block { position: relative; padding: 64px 0; }
.alt { background: var(--bg-alt); }
.section-head { margin-bottom: 32px; }
.kicker {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.kicker .ic { width: 14px; height: 14px; color: var(--gold); }

/* ---------- La société ---------- */
.societe { padding-top: 0; }
.facts {
  position: relative; z-index: 2;
  list-style: none; margin: -52px 0 0; padding: 6px 18px;
  display: grid;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow);
}
.facts li { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.facts li + li { border-top: 1px solid var(--line); }
.fact-ic {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--indigo-soft); color: var(--indigo);
}
.fact-ic .ic { width: 22px; height: 22px; }
.fact-text { display: grid; line-height: 1.4; }
.fact-text strong { font-weight: 650; }
.fact-text span { color: var(--muted); font-size: .94rem; }

.two { display: grid; gap: 32px; margin-top: 56px; }
.prose p { font-size: 1.06rem; }
.prose h2 { margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }

.plaque {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; justify-items: start;
  padding: 28px 24px;
  border-radius: 26px;
  background: linear-gradient(150deg, var(--night-2), var(--night) 60%);
  color: var(--on-night); font-style: normal;
  box-shadow: var(--shadow);
}
.plaque-pattern {
  position: absolute; inset: 0; z-index: -1;
  background: var(--gold); opacity: .32;
  -webkit-mask-image: var(--zellige), radial-gradient(110% 110% at 100% 0%, var(--mask) 0%, transparent 66%);
  -webkit-mask-size: 72px 72px, 100% 100%;
  -webkit-mask-position: top right, 0 0;
  -webkit-mask-composite: source-in;
  mask-image: var(--zellige), radial-gradient(110% 110% at 100% 0%, var(--mask) 0%, transparent 66%);
  mask-size: 72px 72px, 100% 100%;
  mask-position: top right, 0 0;
  mask-composite: intersect;
}
.plaque-pin {
  display: grid; place-items: center;
  width: 50px; height: 50px; margin-bottom: 18px;
  border-radius: 50%; background: var(--gold); color: var(--night-deep);
}
.plaque-pin .ic { width: 24px; height: 24px; stroke-width: 2; }
.plaque-kicker { margin-bottom: 8px; color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.plaque-street { font-family: var(--font-display); font-size: clamp(1.65rem, 1.2rem + 2vw, 2.25rem); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; }
.plaque-floor { margin-top: 4px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.plaque-city {
  justify-self: stretch;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--night-line);
  color: var(--on-night-muted); font-weight: 600;
}

.role { margin-top: 48px; }
.role-lead {
  max-width: 24em; margin: 0 0 22px;
  font-family: var(--font-display); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); font-style: italic; font-weight: 500; line-height: 1.3;
  text-wrap: balance;
}
.chain {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-sm);
}
.chain li {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px;
  padding: 16px 18px;
  font-weight: 600; line-height: 1.35;
}
.chain li + li { border-top: 1px dashed var(--line); }
.chain li + li::before {
  content: ""; position: absolute; left: 29px; top: -12px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
}
.chain li + li::after {
  content: ""; position: absolute; left: 37px; top: -6px;
  width: 6px; height: 6px;
  border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg);
}
.chain-ic {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--gold-soft); color: var(--gold-text);
}
.chain-ic .ic { width: 22px; height: 22px; }

/* ---------- Cartes ---------- */
.cards { display: grid; gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card p, .perk p { margin: 0; color: var(--muted); }

/* Les postes */
.postes { overflow: clip; }
.ornament {
  position: absolute; right: -96px; top: -84px;
  width: 250px; height: 250px;
  background: var(--ornament);
  -webkit-mask: var(--khatam) center / contain no-repeat;
  mask: var(--khatam) center / contain no-repeat;
  pointer-events: none;
}
.postes .wrap { position: relative; }
.job { display: flex; flex-direction: column; gap: 12px; }
.job:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent-line); }
.job-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tile { position: relative; display: grid; place-items: center; width: 60px; height: 60px; color: var(--gold); }
.tile::before, .tile::after {
  content: ""; position: absolute; inset: 8px;
  border-radius: 7px; background: var(--tile);
}
.tile::after { transform: rotate(45deg); }
.tile .ic { position: relative; z-index: 1; width: 24px; height: 24px; }
.num { font-family: var(--font-display); font-size: 2rem; font-style: italic; font-weight: 500; line-height: 1; color: var(--num); }
.more {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  min-height: 44px; margin-top: auto;
  color: var(--accent-text); font-weight: 650; text-decoration: none;
}
.more:hover { text-decoration: underline; }
.more .ic { transition: transform .2s; }
.more:hover .ic { transform: translateX(4px); }

.profil {
  display: grid; gap: 22px;
  margin-top: 20px; padding: 26px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-sm);
}
.profil-head { display: grid; gap: 14px; align-content: start; }
.profil-mark { width: 52px; height: 52px; fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sub { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px; }
.check-ic {
  display: grid; place-items: center;
  width: 28px; height: 28px; margin-top: -1px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok);
}
.check-ic .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.checks .plus .check-ic { background: var(--gold-soft); color: var(--gold-text); }

/* Ce que nous offrons : colonnes ouvertes, sans cadre, pour varier le rythme */
.offre .cards { gap: 0; }
.perk {
  display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 8px 18px;
  padding: 26px 0;
}
.perk > :not(.niche) { grid-column: 2; }
.perk h3 { margin-top: 4px; }
.perk + .perk { border-top: 1px solid var(--line); }
.perk:first-child { padding-top: 0; }
.perk:last-child { padding-bottom: 0; }
.niche {
  display: grid; place-items: center;
  grid-row: 1 / span 2;
  width: 68px; height: 86px; padding-top: 18px;
  clip-path: url(#arch);
  background: linear-gradient(180deg, var(--accent-soft), var(--gold-soft));
  color: var(--accent-text);
}
.niche .ic { width: 26px; height: 26px; }

/* ---------- Le parcours (bande sombre) ---------- */
.night { isolation: isolate; overflow: clip; background: var(--night); color: var(--on-night); --focus: var(--gold); }
.night .kicker { color: var(--gold); }
.night-bg {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(200deg, var(--night-2), var(--night) 55%);
}
.night-bg::before {
  content: ""; position: absolute; inset: 0;
  background: var(--on-night); opacity: .08;
  -webkit-mask-image: var(--zellige), linear-gradient(240deg, var(--mask) 0%, transparent 58%);
  -webkit-mask-size: 84px 84px, 100% 100%;
  -webkit-mask-position: top right, 0 0;
  -webkit-mask-composite: source-in;
  mask-image: var(--zellige), linear-gradient(240deg, var(--mask) 0%, transparent 58%);
  mask-size: 84px 84px, 100% 100%;
  mask-position: top right, 0 0;
  mask-composite: intersect;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding-bottom: 30px; }
.steps li:last-child { padding-bottom: 0; }
.steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 27px; top: 62px; bottom: 6px;
  border-left: 2px dashed var(--night-line);
}
.step-n {
  position: relative; display: grid; place-items: center;
  width: 56px; height: 56px;
  font-family: var(--font-display); font-size: 1.45rem; font-style: italic; font-weight: 600; color: var(--gold);
}
.step-n::before, .step-n::after {
  content: ""; position: absolute; inset: 8px;
  border: 1.5px solid var(--gold); border-radius: 5px;
}
.step-n::after { transform: rotate(45deg); }
.steps h3 { margin: 6px 0 6px; font-size: 1.32rem; }
.steps p { margin: 0; color: var(--on-night-muted); }
.steps-cta { margin: 40px 0 0; }
.steps-cta .btn { width: 100%; }

/* ---------- Postuler ---------- */
.apply-grid { display: grid; gap: 30px; }
.apply-lead { margin: 16px 0 0; font-size: 1.06rem; color: var(--muted); }
.assure { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.assure li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; font-size: .96rem; line-height: 1.45; }
.assure-ic {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line); color: var(--indigo);
}
.assure-ic .ic { width: 20px; height: 20px; }

.form {
  position: relative; overflow: hidden;
  display: grid; gap: 22px;
  padding: 0 18px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow);
}
.form::before {
  content: ""; height: 14px; margin: 14px 0 -6px;
  background: var(--accent);
  -webkit-mask: var(--frise) center / 28px 14px repeat-x;
  mask: var(--frise) center / 28px 14px repeat-x;
}
fieldset { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
legend {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 0; margin-bottom: 14px;
  font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; letter-spacing: -.01em;
}
legend::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.row { display: grid; gap: 16px; }
.row-duo { grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 7px; font-size: .95rem; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--text);
  background: var(--field-bg);
  border: 1.5px solid var(--field-border); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--text); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--err); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--focus); border-radius: 12px; }
.select { position: relative; display: block; }
.select::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select { -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer; }

/* CV : une zone entière cliquable, le champ natif reste dessous (clavier, validation) */
.file {
  position: relative;
  grid-template-columns: auto 1fr; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--surface-soft);
  border: 2px dashed var(--field-border); border-radius: 16px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.file:hover { border-color: var(--accent); background: var(--accent-soft); }
.file:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.file input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.file-ic {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-text);
  transition: background-color .15s, color .15s;
}
.file:hover .file-ic { background: var(--surface); }
.file-ic .ic { width: 26px; height: 26px; }
.file-ic-ok { display: none; }
.file-text { display: grid; gap: 2px; min-width: 0; }
.file-title { font-weight: 650; }
.file-hint { font-size: .92rem; font-weight: 400; color: var(--muted); }
.file-done { display: none; font-size: .92rem; font-weight: 650; color: var(--ok); overflow-wrap: anywhere; }
.file-name { font-weight: 400; color: var(--text); }
.file.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.file.has-file .file-ic { background: var(--ok); color: var(--ok-soft); }
.file.has-file .file-ic-up, .file.has-file .file-hint { display: none; }
.file.has-file .file-ic-ok, .file.has-file .file-done { display: block; }
.file.has-file .file-ic-ok { stroke-width: 2.6; }

.hp { position: absolute; left: -9999px; }
.consent {
  grid-template-columns: auto 1fr; align-items: start; gap: 12px;
  padding: 14px 16px;
  background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px;
  font-weight: 400; line-height: 1.5;
  cursor: pointer;
}
.consent input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.status { margin: 0; font-size: .98rem; color: var(--muted); }
.status:not(:empty) { margin-top: 14px; }
.status.ok, .status.err { padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.status.ok { background: var(--ok-soft); border: 1px solid var(--ok-line); color: var(--ok); }
.status.err { background: var(--err-soft); border: 1px solid var(--err-line); color: var(--err); }

/* ---------- Pied de page ---------- */
.foot {
  background: var(--night-deep); color: var(--on-night-muted);
  padding-bottom: 36px; font-size: .95rem;
  --focus: var(--gold);
}
.frise {
  height: 14px; margin-bottom: 44px;
  background: var(--gold); opacity: .75;
  -webkit-mask: var(--frise) center / 28px 14px repeat-x;
  mask: var(--frise) center / 28px 14px repeat-x;
}
.foot-grid { display: grid; gap: 24px; }
.foot .brand { color: var(--on-night); margin-bottom: 12px; }
.foot p { margin: 0; }
.foot strong { color: var(--on-night); }
.foot-address { display: flex; align-items: flex-start; gap: 10px; font-style: normal; color: var(--on-night); font-weight: 600; }
.foot-address .ic { margin-top: .2em; color: var(--gold); }
.foot-legal { display: grid; gap: 12px; padding-top: 24px; border-top: 1px solid var(--night-line); font-size: .9rem; }
.muted { color: var(--on-night-muted); }

/* ==========================================================================
   Écrans plus larges
   ========================================================================== */
@media (min-width: 560px) {
  .hero-cta { display: flex; flex-wrap: wrap; }
  .place-text { display: inline; }
  .place-sep { display: inline; }
  .steps-cta .btn { width: auto; }
  .row { grid-template-columns: 1fr 1fr; }
  .form { padding: 0 28px 30px; }
  .file { padding: 20px; }
}

@media (min-width: 700px) {
  body { font-size: 1.0625rem; }
  .wrap { width: min(100% - 48px, 1160px); }
  .facts { grid-template-columns: repeat(3, 1fr); padding: 10px; }
  .facts li { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 18px; }
  .facts li + li { border-top: 0; border-left: 1px solid var(--line); }
  .job { padding: 28px 26px; }
  .plaque { padding: 36px 32px; }
}

/* Tablette : cartes en ligne, pictogramme à gauche */
@media (min-width: 620px) and (max-width: 899.98px) {
  .job { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px 24px; }
  .job-top { grid-row: 1 / span 3; flex-direction: column; justify-content: flex-start; gap: 12px; margin: 0; }
  .job > :not(.job-top) { grid-column: 2; }
  .perk { column-gap: 24px; }
}

@media (min-width: 900px) {
  html { scroll-padding-top: 96px; }
  .top-in { min-height: 72px; }
  .brand { font-size: 1.28rem; }
  .brand-mark { width: 38px; height: 38px; }
  .top nav { gap: 4px; }
  .top nav a:not(.btn) {
    display: inline-block; padding: 8px 12px; border-radius: 8px;
    color: var(--on-night-muted); font-size: .95rem; font-weight: 500; text-decoration: none;
    transition: color .15s;
  }
  .top nav a:not(.btn):hover { color: var(--on-night); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .45em; }
  .top nav .btn { margin-left: 10px; }

  .block { padding: 104px 0; }
  .societe { padding-top: 0; }
  .facts li { flex-direction: row; gap: 14px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .offre .cards { gap: 0; }
  .perk, .perk:first-child, .perk:last-child { grid-template-columns: 1fr; align-content: start; gap: 12px; padding: 4px 36px; }
  .perk:first-child { padding-left: 0; }
  .perk:last-child { padding-right: 0; }
  .perk + .perk { border-top: 0; border-left: 1px solid var(--line); }
  .perk > :not(.niche) { grid-column: auto; }
  .perk .niche { grid-row: auto; margin-bottom: 4px; }
  .perk h3 { margin-top: 0; font-size: 1.4rem; }
  .section-head { margin-bottom: 44px; }
  .ornament { right: -110px; top: -90px; width: 360px; height: 360px; }
  .row-duo { gap: 16px; }
  .hero { padding: 76px 0 128px; }
  .lead { font-size: 1.14rem; }

  .two { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 64px; margin-top: 88px; }
  .role { margin-top: 72px; }
  .chain { grid-template-columns: repeat(4, 1fr); }
  .chain li { grid-template-columns: 1fr; align-content: start; align-items: start; gap: 16px; padding: 24px 22px 26px; }
  .chain li + li { border-top: 0; border-left: 1px dashed var(--line); }
  .chain li + li::before { left: -12px; top: 35px; }
  .chain li + li::after { left: -6px; top: 42px; transform: rotate(-45deg); }

  .profil { grid-template-columns: .8fr 1.2fr; align-items: center; gap: 56px; margin-top: 24px; padding: 44px 48px; }
  .checks { gap: 16px; }

  .steps { grid-template-columns: repeat(4, 1fr); gap: 36px; }
  .steps li { grid-template-columns: 1fr; align-content: start; gap: 18px; padding-bottom: 0; }
  .steps li:not(:last-child)::before {
    left: 66px; right: -26px; top: 27px; bottom: auto;
    border-left: 0; border-top: 2px dashed var(--night-line);
  }
  .steps-cta { margin-top: 56px; }

  .foot-grid { grid-template-columns: 1.2fr 1fr; align-items: start; gap: 32px 64px; }
  .foot-address { justify-self: end; max-width: 22em; padding-top: 6px; }
  .foot-legal { grid-column: 1 / -1; grid-template-columns: 1fr auto; gap: 32px; align-items: start; }
  .foot-legal p:first-child { max-width: 46em; }
}

@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 72px; }
  .hero-art {
    display: block; position: relative; justify-self: center;
    width: min(84%, 380px); aspect-ratio: 10 / 13.6;
  }
  .arch-line, .arch {
    -webkit-mask-image: linear-gradient(180deg, var(--mask) 62%, transparent 97%);
    mask-image: linear-gradient(180deg, var(--mask) 62%, transparent 97%);
  }
  .arch-line { position: absolute; inset: 0; clip-path: url(#arch); background: linear-gradient(180deg, var(--gold), var(--night-line) 75%); }
  .arch-line::before { content: ""; position: absolute; inset: 1.5px; clip-path: url(#arch); background: var(--night); }
  .arch { position: absolute; inset: 16px 16px 0; clip-path: url(#arch); background: linear-gradient(180deg, var(--night-2), var(--night-deep)); }
  .arch::before {
    content: ""; position: absolute; inset: 0;
    background: var(--gold); opacity: .3;
    -webkit-mask-image: var(--zellige), linear-gradient(180deg, var(--mask) 30%, transparent 92%);
    -webkit-mask-size: 70px 70px, 100% 100%;
    -webkit-mask-position: center top, 0 0;
    -webkit-mask-composite: source-in;
    mask-image: var(--zellige), linear-gradient(180deg, var(--mask) 30%, transparent 92%);
    mask-size: 70px 70px, 100% 100%;
    mask-position: center top, 0 0;
    mask-composite: intersect;
  }
  .arch-mark {
    position: absolute; left: 50%; top: 14%; width: 34%; aspect-ratio: 1;
    transform: translateX(-50%);
    fill: var(--night); stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  }
  .route {
    position: absolute; left: 9%; right: 9%; bottom: 3%; z-index: 2;
    display: flex; align-items: center; gap: 10px;
    color: var(--on-night); font-size: .82rem; font-weight: 650; letter-spacing: .05em;
  }
  .route-end { display: inline-flex; align-items: center; gap: 8px; }
  .route-end::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-ring); }
  .route-dash { flex: 1; border-top: 2px dashed var(--gold); opacity: .7; }
  .tasks { list-style: none; margin: 0; padding: 0; }
  .tasks li {
    position: absolute; z-index: 2;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 18px 10px 10px; border-radius: 16px;
    background: var(--paper); color: var(--paper-ink);
    font-size: .98rem; font-weight: 650; white-space: nowrap;
    box-shadow: var(--shadow-float);
    animation: float 7s ease-in-out infinite alternate;
  }
  .tasks li:nth-child(1) { top: 43%; left: -14%; }
  .tasks li:nth-child(2) { top: 58.5%; right: -15%; animation-delay: -2.3s; }
  .tasks li:nth-child(3) { top: 74%; left: -5%; animation-delay: -4.6s; }
  .task-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--paper-tint); color: var(--paper-accent); }
  @keyframes float { from { transform: translateY(-5px); } to { transform: translateY(5px); } }

  .apply-grid { grid-template-columns: .8fr 1.2fr; align-items: start; gap: 72px; }
  .apply-intro { position: sticky; top: 112px; }
  .form { padding: 0 36px 36px; gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
