/* ====================================================================
   BAFRIX – ACTIVA – SHELL RECRUITMENT PORTAL
   REVAMPED WITH ReUI DESIGN SYSTEM & BAFRIX CHARTE
   Based on "Bafrix Recruitment Redesign"
   ==================================================================== */

:root {
  --background: #ffffff;
  --foreground: #10272d;
  --card: #ffffff;
  --primary: #025869;          /* Teal Foncé Principal */
  --primary-hover: #03697d;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f3;        /* Fond neutre doux */
  --muted: #f1f5f3;
  --muted-foreground: #54686d;
  --border: #dfe7e3;
  --input: #cfdbd6;
  --ring: #09999b;
  --brand-orange: #e67d1a;     /* Orange Vif Action */
  --brand-copper: #aa501e;     /* Marron Cuivré */
  --brand-teal: #09999b;       /* Teal Secondaire */
  --brand-sage: #b6cfc3;       /* Vert Sage Doux */
  --destructive: #e7000b;
  --destructive-foreground: #9f0712;
  --success: #00bc7d;
  --success-foreground: #004e3b;
  --info: #09999b;
  --info-foreground: #054c52;
  --warning: #f0b100;
  --warning-foreground: #733e0a;
  --invert: #18181b;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl: 20px;

  --font-body: "Montserrat", "Helvetica Neue", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-head: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, dt, figure, fieldset, legend {
  margin: 0;
  padding: 0;
  border: 0;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ====================================================================
   Typography & Utilities
   ==================================================================== */
.display {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.015em;
}

.h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.01em;
}

.h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
}

.muted {
  color: var(--muted-foreground);
}

.meta {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted-foreground);
}

.eyebrow {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--brand-copper);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.strong {
  font-weight: 600;
}

.num {
  font-variant-numeric: tabular-nums;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link:hover {
  color: var(--brand-orange);
}

.dot-sep {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(84, 104, 109, 0.45);
  flex: none;
}

.sep {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
  flex: none;
}

.req {
  color: var(--destructive);
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ====================================================================
   Icons (Strict sizing so icons never blow up without CSS)
   ==================================================================== */
svg {
  max-width: 100%;
}
svg.i, .i {
  width: 16px !important;
  height: 16px !important;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
}
svg.i-12, .i-12 { width: 12px !important; height: 12px !important; }
svg.i-14, .i-14 { width: 14px !important; height: 14px !important; }
svg.i-16, .i-16 { width: 16px !important; height: 16px !important; }
svg.i-18, .i-18 { width: 18px !important; height: 18px !important; }
svg.i-20, .i-20 { width: 20px !important; height: 20px !important; }
svg.i-24, .i-24 { width: 24px !important; height: 24px !important; }
svg.i-32, .i-32 { width: 32px !important; height: 32px !important; stroke-width: 1.75; }

/* ====================================================================
   Buttons
   ==================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  flex: none;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(2, 88, 105, 0.25);
}

.btn-accent {
  background: var(--brand-orange);
  color: #ffffff;
}
.btn-accent:hover {
  background: #d47012;
  box-shadow: 0 2px 8px rgba(230, 125, 26, 0.3);
}

.btn-outline {
  background: var(--background);
  border-color: var(--border);
  color: var(--foreground);
}
.btn-outline:hover {
  background: var(--muted);
  border-color: var(--input);
}

.btn-ghost {
  color: var(--foreground);
}
.btn-ghost:hover {
  background: var(--muted);
}

.btn-destructive {
  background: rgba(231, 0, 11, 0.1);
  color: var(--destructive-foreground);
}
.btn-destructive:hover {
  background: rgba(231, 0, 11, 0.18);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: var(--radius-md);
}

.btn-lg {
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-icon {
  width: 36px;
  padding: 0;
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-touch {
  height: 48px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
}

.btn-touch-icon {
  width: 48px;
  padding: 0;
}

.btn-block {
  width: 100%;
  flex: 1 1 auto;
}

.btn-on-teal {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.btn-on-teal:hover {
  background: #eaf1ee;
  color: var(--primary-hover);
}

.btn-outline-on-teal {
  border-color: rgba(182, 207, 195, 0.55);
  color: #ffffff;
}
.btn-outline-on-teal:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ====================================================================
   Forms & Fields
   ==================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.label {
  font-size: 13.5px;
  line-height: 18px;
  font-weight: 600;
  color: var(--foreground);
}

.hint {
  font-size: 12.5px;
  line-height: 17px;
  color: var(--muted-foreground);
}

.field-error {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  line-height: 16px;
  color: var(--destructive);
  font-weight: 500;
}

.input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: var(--radius-lg);
  background: var(--background);
  font-family: var(--font-body);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder, textarea::placeholder {
  color: var(--muted-foreground);
  opacity: 0.8;
}

.input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(9, 153, 155, 0.22);
}

.input-touch {
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
  border-radius: 12px;
}

textarea.input {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  line-height: 22px;
  resize: vertical;
}

.input-invalid, .input-invalid:focus {
  border-color: var(--destructive) !important;
  box-shadow: 0 0 0 3px rgba(231, 0, 11, 0.14) !important;
}

.input-group {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--input);
  border-radius: var(--radius-lg);
  background: var(--background);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-group:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(9, 153, 155, 0.22);
}

.input-group-touch {
  height: 48px;
  border-radius: 12px;
  font-size: 15px;
}

.input-group.input-invalid {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px rgba(231, 0, 11, 0.14);
}

.input-group input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  padding: 0 12px;
  font-size: inherit;
}

.input-group .addon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 14px;
  color: var(--muted-foreground);
  flex: none;
  font-weight: 600;
  font-size: 14px;
}

.select-touch {
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid var(--input);
  background: var(--background);
  width: 100%;
  outline: none;
  cursor: pointer;
}
.select-touch:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(9, 153, 155, 0.22);
}

.check {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--primary);
  margin: 0;
  cursor: pointer;
}

.check-touch {
  width: 20px;
  height: 20px;
}

/* Selectable options (Radio Cards) */
.option {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 64px;
  padding: 16px;
  border: 1px solid var(--input);
  border-radius: 12px;
  background: var(--background);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.option:hover {
  border-color: var(--primary);
  background: rgba(2, 88, 105, 0.02);
}

.option-on {
  border-color: var(--primary) !important;
  background: rgba(2, 88, 105, 0.05) !important;
  box-shadow: 0 0 0 1.5px var(--primary);
}

.option input[type="radio"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ====================================================================
   Upload & Dropzone Components
   ==================================================================== */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px 14px;
  min-height: 152px;
  border: 2px dashed var(--input);
  border-radius: 12px;
  background: rgba(241, 245, 243, 0.55);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(2, 88, 105, 0.06);
  color: var(--primary);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 152px;
  border: 1px solid var(--input);
  border-radius: 12px;
  overflow: hidden;
  background: var(--background);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 98px;
  background: #e7efeb;
  color: var(--primary);
  overflow: hidden;
  position: relative;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  min-width: 0;
  box-shadow: 0 1px 2px rgba(16, 39, 45, 0.04);
}

.file-row-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.3s ease;
}

/* ====================================================================
   Card, Frame, Panel
   ==================================================================== */
.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(16, 39, 45, 0.08), 0 2px 8px rgba(16, 39, 45, 0.04);
}

.card-flush {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.frame {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 3px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(241, 245, 243, 0.6);
}

.panel {
  position: relative;
  flex-grow: 1;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(16, 39, 45, 0.05);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  height: 22px;
  min-width: 20px;
  padding: 0 7px;
  flex: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.b-outline {
  border-color: var(--border);
  color: var(--foreground);
}

.b-primary {
  border-color: rgba(2, 88, 105, 0.12);
  background: rgba(2, 88, 105, 0.1);
  color: var(--primary);
}

.b-info {
  border-color: rgba(9, 153, 155, 0.18);
  background: rgba(9, 153, 155, 0.12);
  color: var(--info-foreground);
}

.b-success {
  border-color: rgba(0, 188, 125, 0.2);
  background: rgba(0, 188, 125, 0.12);
  color: var(--success-foreground);
}

.b-warning {
  border-color: rgba(240, 177, 0, 0.2);
  background: rgba(240, 177, 0, 0.12);
  color: var(--warning-foreground);
}

.b-destructive {
  border-color: rgba(231, 0, 11, 0.15);
  background: rgba(231, 0, 11, 0.08);
  color: var(--destructive-foreground);
}

/* Alerts */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 18px;
}

.alert-info {
  border-color: rgba(9, 153, 155, 0.25);
  background: rgba(9, 153, 155, 0.08);
  color: var(--info-foreground);
}

.alert-success {
  border-color: rgba(0, 188, 125, 0.25);
  background: rgba(0, 188, 125, 0.08);
  color: var(--success-foreground);
}

/* Avatar and icon tile */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 999px;
  background: #e7efeb;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--radius-lg);
  background: #e7efeb;
  color: var(--primary);
}

/* Tabs */
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 3px;
  border-radius: var(--radius-lg);
  background: var(--muted);
  max-width: 100%;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab:hover {
  color: var(--foreground);
}

.tab-on {
  background: #ffffff;
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(16, 39, 45, 0.08);
  font-weight: 600;
}

/* ====================================================================
   Signature BAFRIX Motif: Corner Bracket & Globe Dot (.bracket)
   ==================================================================== */
.bracket {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 58%;
  height: 68%;
  border-top: 2.5px solid var(--brand-orange);
  border-right: 2.5px solid var(--brand-orange);
  pointer-events: none;
  z-index: 1;
}

.bracket::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -12px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--brand-orange);
}

.bracket-copper {
  border-color: var(--brand-copper);
}

.bracket-copper::after {
  background: var(--brand-copper);
}

/* ====================================================================
   Candidate Stepper & Rail (.tl-rail, .segments)
   ==================================================================== */
.tl-item {
  display: flex;
  gap: 14px;
}

.tl-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 24px;
}

.tl-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tl-dot-done {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.tl-dot-now {
  border: 2px solid var(--brand-orange);
  color: var(--brand-copper);
  font-weight: 700;
}

.tl-line {
  flex: 1 1 auto;
  width: 1px;
  min-height: 20px;
  background: var(--border);
  transition: background 0.2s ease;
}

.tl-line-done {
  background: var(--primary);
}

.segments {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.segments > span {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.25s ease;
}

.segments > .done {
  background: var(--primary);
}

.segments > .now {
  background: var(--brand-orange);
}

.saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  line-height: 16px;
  color: var(--muted-foreground);
}

.definition {
  display: grid;
  grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
  gap: 10px 14px;
  font-size: 13.5px;
  line-height: 19px;
}

.definition dt {
  color: var(--muted-foreground);
  font-weight: 500;
}

.definition dd {
  font-weight: 600;
  min-width: 0;
  word-break: break-word;
}

/* ====================================================================
   Public Portal Header & Hero
   ==================================================================== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding-block: 12px;
}

.header-brand-logos {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-partner-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.hero-banner {
  background: var(--primary);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 450px;
  height: 450px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(9, 153, 155, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 48px 64px;
  align-items: center;
  padding-block: 60px 72px;
  position: relative;
  z-index: 2;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(182, 207, 195, 0.45);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(230, 125, 26, 0.35);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 0 5px rgba(230, 125, 26, 0.5); }
  100% { transform: scale(0.95); opacity: 0.85; }
}

.hero-heading {
  font-size: 44px;
  line-height: 50px;
  color: #ffffff;
}

.hero-desc {
  font-size: 17px;
  line-height: 26px;
  color: var(--brand-sage);
  max-width: 34em;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--brand-sage);
  font-size: 13.5px;
  font-weight: 500;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ====================================================================
   Dedicated Form Wizard & Split Screen (.form-split-layout)
   Matches Screen 01_formulaire_documents & Mobile 03-07
   ==================================================================== */
.form-page-body {
  background: #ffffff;
  min-height: 100vh;
}

.form-split-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  align-items: stretch;
}

.form-aside-stepper {
  flex: 0 0 340px;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 36px 30px;
  background: #f8faf9;
  border-right: 1px solid var(--border);
}

.form-main-area {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 24px;
  background: #ffffff;
}

.mobile-wizard-header {
  display: none;
  width: 100%;
  max-width: 740px;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-step-pane {
  display: none;
  flex-direction: column;
  width: 100%;
}

.form-step-pane.active {
  display: flex;
}

.step-card-header {
  padding: 24px 26px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-card-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 26px;
  background: rgba(241, 245, 243, 0.6);
  border-top: 1px solid var(--border);
}

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 13px;
}

/* ====================================================================
   Confirmation Screen (.confirmation-container)
   Matches Screen 08_confirmation_envoyee
   ==================================================================== */
.confirmation-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 40px 20px;
  background: #f8faf9;
}

.confirmation-inner {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #ffffff;
  padding: 36px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(16, 39, 45, 0.08);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====================================================================
   Tracking & Confirmation Modals
   ==================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 39, 45, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 24px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted-foreground);
  transition: background 0.15s;
}
.modal-close-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  background: var(--foreground);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* ====================================================================
   Site header (home and tracking pages)
   ==================================================================== */
.site-header {
  --header-brand-h: 44px;
  --header-activa-h: 38px;
  --header-shell-h: 34px;
  --header-pad-y: 12px;
  --header-gap-x: 20px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}
.site-header--tracking {
  --header-brand-h: 42px;
  --header-activa-h: 34px;
  --header-shell-h: 30px;
  --header-pad-y: 14px;
  --header-gap-x: 14px;
}
.site-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px var(--header-gap-x);
  padding-block: var(--header-pad-y);
}
.site-header-brand {
  margin-right: auto;
}
.site-header-brand img {
  height: var(--header-brand-h);
  width: auto;
}
.site-header-partners {
  display: flex;
  align-items: center;
  gap: 14px var(--header-gap-x);
}
.site-header-partners .meta {
  font-weight: 500;
}
.site-header-partners img {
  height: var(--header-activa-h);
  width: auto;
}
.site-header-partners img + img {
  height: var(--header-shell-h);
}

/* Phones (and the narrow tablets where the header used to wrap): logo and button on one line,
   the partners on a slim line under them */
@media (max-width: 680px) {
  .site-header {
    --header-brand-h: 32px;
    --header-activa-h: 26px;
    --header-shell-h: 24px;
    --header-pad-y: 10px;
  }
  .site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand action" "partners partners";
    gap: 8px 12px;
  }
  .site-header-brand {
    grid-area: brand;
    display: flex;
    margin-right: 0;
  }
  .site-header-action {
    grid-area: action;
    height: 34px;
    padding: 0 12px;
  }
  .site-header-partners {
    grid-area: partners;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  /* The tracking page has no "En partenariat avec" label: everything fits on one line */
  .site-header--tracking .site-header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand partners action";
  }
  .site-header--tracking .site-header-partners {
    justify-self: center;
    padding-top: 0;
    border-top: 0;
  }
}

/* ====================================================================
   Responsive Breakpoints
   ==================================================================== */
@media (max-width: 900px) {
  .hero-heading {
    font-size: 36px;
    line-height: 42px;
  }
}

@media (max-width: 840px) {
  .form-split-layout {
    flex-direction: column;
  }
  .form-aside-stepper {
    display: none !important;
  }
  .mobile-wizard-header {
    display: flex !important;
  }
  .form-main-area {
    padding: 16px 12px 32px;
  }
  .step-card-header {
    padding: 20px 16px 0;
  }
  .step-card-body {
    padding: 20px 16px;
    gap: 16px;
  }
  .step-card-footer {
    padding: 12px 16px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-inline: 16px;
  }
  .hero-grid {
    padding-block: 40px 48px;
    gap: 36px;
  }
  .hero-heading {
    font-size: 28px;
    line-height: 34px;
  }
  .hero-desc {
    font-size: 15px;
    line-height: 23px;
  }
  .btn-touch {
    height: 46px;
    font-size: 14.5px;
  }
  .definition {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .definition dt {
    font-size: 12px;
  }
}
