/* Design tokens */
:root {
  --color-bg: #1A2C38;        /* fond principal */
  --color-surface: #435B6F;    /* secondaire */
  --color-primary: #1675E1;    /* bouton */
  --color-text: #FFFFFF;       /* police blanche */
  --color-text-dim: #E6EDF5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(0,0,0,0.25);
  --shadow-soft: 0 6px 14px rgba(0,0,0,0.18);
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Proxima Nova", Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.45;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0));
}
.site-header .logo {
  display: inline-flex;
  align-items: center;
  margin-left: 16px;
}
.site-header .logo img {
  height: 36px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  background: center/cover no-repeat var(--color-bg);
}
.hero { background-image: var(--hero-image); }
.hero__overlay {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(110% 60% at 20% 40%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.55) 100%),
              linear-gradient(180deg, rgba(26,44,56,0.25) 0%, rgba(26,44,56,0.85) 100%);
}
.hero__content {
  position: relative; z-index: 1;
  padding: 120px 0 80px;
}
.hero__title {
  font-weight: 800;
  font-size: clamp(36px, 6vw, 72px);
  margin: 0 0 16px;
}
.hero__subtitle {
  color: var(--color-text-dim);
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 650px;
  margin: 0 0 28px;
}

/* Buttons */
.btn {
  --pad-x: 22px;
  --pad-y: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform .06s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn-lg { --pad-x: 28px; --pad-y: 16px; font-size: 18px; }
.btn-primary { background: var(--color-primary); color: white; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); filter: brightness(.98); }

/* Footer */
.site-footer { padding: 24px 0; text-align: center; background: rgba(0,0,0,0.35); }
.site-footer small { color: #cfe0f1; }

/* FORM PAGE */
.form-shell {
  /* Override palette for the form (light theme) */
  --color-bg: #FFFFFF;       /* couleur principale (fond) */
  --color-surface: #74EFA7;  /* secondaire (vert) */
  --color-primary: #161637;  /* bouton et accents (bleu principal) */
  --color-text: #1A2C38;     /* écriture */
  --color-text-dim: #314c5f; /* texte atténué */

  min-height: 100vh;
  background: #f7f9fb;
  color: var(--color-text);
}
.form-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.7);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.form-header .bar { height: 4px; background: var(--color-surface); width: 10%; }

.form-wrapper { padding: 32px 0; min-height: calc(100vh - 96px); display: grid; place-items: center; }
.form-wrapper > .container { width: min(1100px, 92%); display:grid; place-items:center; align-content:center; }
.form-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(18px, 2.5vw, 28px);
  width: 100%;
  max-width: 860px;
}
.form-hero { text-align: center; margin: 6px 0 18px; font-weight: 800; font-size: clamp(20px, 3.8vw, 32px); color: var(--color-primary); }
.form-title { text-align: center; margin: 8px 0 22px; font-weight: 800; font-size: clamp(22px, 3.6vw, 28px); }

.options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2.2vw, 18px);
}
@media (max-width: 1000px) { .options { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .options { grid-template-columns: 1fr; } }

.option {
  position: relative;
  display: grid; grid-auto-rows: auto 1fr auto; align-items: start;
  gap: 10px;
  padding: 16px 16px 18px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
  transition: border-color .2s ease, transform .06s ease, background .2s ease, box-shadow .2s ease;
}
.option:hover { transform: translateY(-1px); border-color: rgba(0,0,0,0.2); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.option.selected { border-color: var(--color-primary); box-shadow: 0 8px 22px rgba(26,44,56,0.18); background: rgba(255,242,100,0.18); }

.option .icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 26px;
  background: rgba(255,242,100,0.25);
  border: 1px solid rgba(0,0,0,0.06);
}
.option h3 { margin: 4px 0 6px; font-size: 16px; }
.option p { margin: 0; color: var(--color-text-dim); font-size: 14px; }

.option input[type="radio"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.option .tick {
  position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #b0b8c2; display: grid; place-items: center; background: rgba(0,0,0,0.02);
}
.option.selected .tick { background: var(--color-primary); border-color: var(--color-primary); }
.option.selected .tick::after { content: '\2713'; color: #fff; font-size: 14px; }

.form-actions {
  margin-top: 22px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.btn-outline { background: #fff; color: var(--color-primary); border: 1px solid var(--color-primary); border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.btn-outline:hover { filter: brightness(1.02); box-shadow: 0 3px 8px rgba(0,0,0,0.06); }

/* Square buttons */
.btn-primary { border-radius: 10px; }
.btn { border-radius: 10px; }

/* Inputs */
.field {
  display: grid; gap: 8px; margin: 14px auto 6px; max-width: 520px; width: 100%;
}
.field label { font-weight: 700; }
.field input, .field select { padding: 14px 16px; border: 1px solid rgba(0,0,0,0.18); border-radius: 12px; font-size: 16px; color: var(--color-text); background:#fff; }
.hint { color: var(--color-text-dim); text-align: center; font-size: 13px; margin-top: 6px; }

/* Errors */
.error-text { color: #e03131; font-size: 12.5px; margin-top: 4px; text-align: left; }
.field input.invalid { border-color: #e03131; background: #fff5f5; }

/* Aid line + logos under the form */
.aid-line { text-align:center; color: var(--color-text-dim); font-weight: 700; margin: 14px 0 10px; }
.logo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: center;
  width: min(980px, 96%); margin: 8px auto 0;
}
.logo-grid img, .logo-grid .logo-slot {
  width: 100%; height: 64px; object-fit: contain; background: transparent; border: none; border-radius: 0; box-shadow: none;
}
.logo-grid .logo-slot { display:flex; align-items:center; justify-content:center; color:#7a8a99; font-size: 13px; }
@media (max-width: 760px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } }

/* Spinner */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Recap styles (inspiration) */
.recap { display: grid; gap: 14px; }
.recap__header { display:flex; align-items:center; gap:10px; }
.recap__ribbon { background:#0f2a3a; color:#fff; padding:10px 14px; border-radius:12px; font-weight:800; }
.recap__pill { background: var(--color-surface); color:#0f2a3a; padding:8px 12px; border-radius:999px; font-weight:800; }
.recap__section { background:#fff; border:1px solid rgba(0,0,0,0.06); border-radius:12px; padding:14px; }
.recap__grid { display:grid; gap:10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .recap__grid { grid-template-columns: 1fr; } }
.recap__item h4 { margin:0 0 4px; font-size:14px; color:#506b7d; }
.recap__item p { margin:0; font-weight:700; }

/* Inline editable tokens in recap */
.editable {
  font-weight: 800;
  border-bottom: 2px dotted rgba(0,0,0,0.25);
  cursor: text;
}
.editable:focus { outline: 2px solid var(--color-primary); border-bottom-color: transparent; border-radius: 6px; padding-inline: 2px; }

/* Transitions (fade/slide) */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}
.fade-in { animation: fadeSlideIn .35s ease both; }
.fade-out { animation: fadeSlideOut .28s ease both; }

/* Lateral slide (right -> left) */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-25px); }
}
.slide-in-right { animation: slideInRight .55s cubic-bezier(.22,.61,.36,1) both; }
.slide-out-left { animation: slideOutLeft .50s cubic-bezier(.22,.61,.36,1) both; }
