:root {
  color-scheme: dark;
  --bg: #09131d;
  --panel: #111e2b;
  --field: #1b2c3b;
  --line: #304455;
  --text: #f4f8fc;
  --muted: #aebdcc;
  --accent: #32d4cf;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.site-header {
  height: 86px;
  padding: 16px 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #101d2a;
}

.brand img { width: 205px; max-height: 60px; object-fit: contain; }
.secure-label { color: var(--muted); font-size: 13px; }

.registration-layout {
  display: grid;
  grid-template-columns: minmax(320px, 39%) minmax(0, 61%);
  min-height: calc(100vh - 86px);
}

.presentation {
  position: relative;
  display: flex;
  padding: 55px 8%;
  background:
    linear-gradient(180deg, rgba(5,18,29,.88), rgba(5,18,29,.5) 58%, #07131f),
    linear-gradient(135deg, #0c3445, #101d2a);
  overflow: hidden;
}

.presentation::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 80% 65%, rgba(50,212,207,.12), transparent 45%);
}

.presentation-content { position: relative; z-index: 1; max-width: 480px; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .15em; font-weight: 700; }
.presentation h1 { font-size: clamp(30px, 3vw, 46px); line-height: 1.14; margin: 22px 0; }
.presentation h1 span { color: var(--accent); }
.presentation p { color: #d0dce6; }
.benefits { margin-top: 46px; display: grid; gap: 20px; }
.benefits p { padding-left: 20px; border-left: 2px solid var(--accent); margin: 0; }
.benefits strong, .benefits small { display: block; }
.benefits strong { color: white; font-size: 16px; }
.benefits small { color: var(--muted); margin-top: 4px; }

.form-panel { padding: 36px clamp(20px, 3vw, 58px) 60px; max-width: 1120px; width: 100%; margin: auto; }
.panel-heading h2 { font-size: clamp(25px, 2.3vw, 36px); margin: 8px 0; }
.panel-heading > p:last-child { color: var(--muted); margin-top: 0; }

.steps {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.steps .active { color: var(--accent); font-weight: 700; }

.form-section {
  min-width: 0;
  margin: 0 0 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, #172837, #101d29);
}
.form-section legend { color: white; font-size: 17px; font-weight: 700; padding: 0 8px; }
.field-label { margin: 4px 0 10px; font-weight: 600; font-size: 13px; }

.activity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.activity-grid label { cursor: pointer; position: relative; }
.activity-grid input { position: absolute; opacity: 0; }
.activity-grid span {
  min-height: 66px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #192b3b;
  font-size: 13px;
  transition: .2s ease;
}
.activity-grid input:checked + span { border-color: var(--accent); background: #12454b; color: white; }
.activity-grid input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }

.fields { display: grid; gap: 14px; margin-top: 14px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields label { font-size: 12px; font-weight: 600; color: #e1eaf2; }

.fields input, .fields select, .activity-specific input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 43px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid #3b5062;
  border-radius: 7px;
  outline: none;
  background: var(--field);
  color: white;
  font: inherit;
  font-size: 13px;
}
input:focus, select:focus { border-color: var(--accent); }
input::placeholder { color: #8193a3; }
.muted, .notice { color: var(--muted); font-size: 12px; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; font-size: 12px; }
.consent input { accent-color: var(--accent); margin-top: 3px; }
#submit-button {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #06252b;
  font-weight: 800;
  font-size: 14px;
}
#submit-button:disabled { opacity: .55; cursor: not-allowed; }
#form-message { margin-top: 12px; }
.notice { text-align: center; }

@media (max-width: 1050px) {
  .registration-layout { grid-template-columns: 1fr; }
  .presentation { padding: 32px 6%; }
  .benefits { grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 20px; }
  .form-panel { max-width: 850px; }
}

@media (max-width: 650px) {
  .site-header { height: 72px; }
  .brand img { width: 150px; }
  .secure-label { font-size: 10px; text-align: right; }
  .presentation { padding: 28px 20px; }
  .benefits { grid-template-columns: 1fr; }
  .form-panel { padding: 24px 14px; }
  .form-section { padding: 18px 12px; }
  .activity-grid { grid-template-columns: repeat(2, 1fr); }
  .fields.two, .fields.three { grid-template-columns: 1fr; }
  .steps { font-size: 10px; }
}

/* MEDIFAC — Présentation fixe */
@media (min-width: 900px) {
  .presentation-content { position: sticky; top: 45px; align-self: start; }
}

@media (min-width: 900px) {
  .presentation { overflow: visible; }
}

@media (min-width: 900px) {
  .presentation { position: sticky; top: 0; height: 100vh; align-self: start; overflow: hidden; }
  .presentation-content { position: relative; top: auto; }
}

.presentation { background: linear-gradient(90deg, rgba(5,16,27,.88), rgba(5,16,27,.48)), url("/medifac-hopital-ambulance.webp") center / cover no-repeat; }

/* MEDIFAC - Ajustements visuels */
.presentation { background-position: 40% center; }
.presentation-content { text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.presentation h1 { font-size: clamp(28px, 2.6vw, 40px); }
