/* Skalib — site de recrutement. Styles propres à la surface.
   Les couleurs/typos viennent de ../shared/tokens.css (thème clair premium,
   saison figée « été indien »). Mobile-first, accessibilité AA. */

* { box-sizing: border-box; }
body { margin: 0; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }

/* Cible d'ancre : évite que l'en-tête collant masque les sections */
:target { scroll-margin-top: 84px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------ En-tête ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-word { font-size: 24px; }
.brand-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.navlinks { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 500; }
.navlinks a:not(.sk-btn) { color: var(--text-dim); }
.navlinks a:not(.sk-btn):hover { color: var(--text); }
/* Masque les liens de navigation textuels sur très petit écran (bouton conservé) */
@media (max-width: 560px) { .navlinks a:not(.sk-btn) { display: none; } }

/* ------------------------------ Héro ------------------------------ */
.hero { padding: 64px 0 48px; }
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent-cold);
  margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 7vw, 58px); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 18px; max-width: 16ch;
}
.hero h1 .hl { color: var(--accent-cold); }
.lede { font-size: clamp(16px, 2.4vw, 19px); color: var(--text-dim); max-width: 58ch; margin: 0 0 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sk-btn { display: inline-block; text-align: center; }

/* Grille de valeurs */
.value-grid {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.value {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.value h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0 0 6px; }
.value p { color: var(--text-dim); font-size: 14px; margin: 0; }

/* ------------------------------ Sections ------------------------------ */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.shead { margin-bottom: 28px; }
.shead h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.01em; margin: 0; }
.shead p { color: var(--text-dim); margin: 8px 0 0; }

/* Étapes */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: none;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.section-alt .step { background: var(--bg); }
.step .num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent-cold) 16%, transparent);
  color: var(--accent-cold); font-family: var(--font-display); font-weight: 700; font-size: 18px;
  margin-bottom: 14px;
}
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0 0 6px; }
.step p { color: var(--text-dim); font-size: 14px; margin: 0; }

/* Métiers */
.trades { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.trade {
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; font-size: 14px; font-weight: 500;
}

/* ------------------------------ Formulaire ------------------------------ */
.formwrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 36px); max-width: 780px; margin: 0 auto;
}
fieldset { border: none; margin: 0 0 8px; padding: 0; }
legend {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 20px 0 14px; margin-top: 12px; width: 100%;
  border-top: 1px solid var(--border);
}
fieldset:first-of-type legend { border: none; padding-top: 0; margin-top: 0; }

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.field label .opt { color: var(--muted); font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-family: var(--font-body); font-size: 15px;
}
textarea { resize: vertical; min-height: 84px; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent-cold); outline-offset: 1px; border-color: var(--accent-cold);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.err { font-size: 12.5px; color: var(--danger); margin: 6px 0 0; font-weight: 500; }

/* Chips (cases à cocher stylisées) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  background: var(--bg); border: 1px solid var(--border); border-radius: 11px;
  padding: 9px 15px; font-size: 14px;
}
.chip input { accent-color: var(--accent-cold); width: 16px; height: 16px; margin: 0; }
.chip:has(input:checked) {
  border-color: var(--accent-cold);
  background: color-mix(in srgb, var(--accent-cold) 12%, transparent);
  color: var(--accent-cold);
}
.chip:has(input:focus-visible) { outline: 3px solid var(--accent-cold); outline-offset: 2px; }

/* Cases à cocher standards (assurance, consentement) */
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-dim); margin: 12px 0; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent-cold); flex: 0 0 auto; }
.check input:focus-visible { outline: 3px solid var(--accent-cold); outline-offset: 2px; }

.consent {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin: 20px 0 24px;
}
.consent .check { margin: 0; }
.consent .req { color: var(--danger); font-weight: 600; }

/* Bouton d'envoi (ambre) : pleine largeur, action chaude */
.submit-btn { width: 100%; padding: 15px; font-size: 15.5px; }
.submit-btn:disabled, .submit-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.submit-btn:disabled:hover { background: var(--ember); }

.form-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.form-error {
  margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 500;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
}

/* Écran de confirmation (remplace le formulaire après succès) */
.success { text-align: center; padding: 24px 8px; }
.success .ok {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); font-size: 32px;
}
.success h2 { font-family: var(--font-display); font-weight: 600; font-size: 26px; margin: 0 0 10px; }
.success p { color: var(--text-dim); max-width: 46ch; margin: 0 auto 8px; }

/* ------------------------------ Pied de page ------------------------------ */
.site-footer { border-top: 1px solid var(--border); padding: 34px 0; margin-top: 20px; }
.fbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.foot-word { font-size: 20px; }
.foot-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.foot-links a { color: var(--accent-cold); }
.foot-links a:hover { text-decoration: underline; }
.foot-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ------------------------------ Toasts ------------------------------ */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent-cold);
  border-radius: 10px; padding: 12px 16px; font-size: 14px; max-width: 320px;
  box-shadow: 0 10px 30px rgba(23, 48, 43, .12);
}
.toast.ok { border-left-color: var(--green); }
.toast.bad { border-left-color: var(--danger); }
