/* Fira Sans : ajuster les chemins vers vos fichiers webfont */
@font-face { font-family: "Fira Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/FiraSans-Light.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/FiraSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/FiraSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/FiraSans-Bold.woff2") format("woff2"); }

:root {
  --navy: #04283B;          /* bleu pétrole Fast Lease */
  --navy-600: #0b3d57;
  --accent: #FF4C34;        /* rouge-orangé Fast Lease */
  --accent-600: #e63d26;
  --blue-50: #F3F4F5;       /* fond de page */
  --blue-100: #E6EDF1;
  --blue-200: #C9D7E0;
  --border: #C4CBD1;
  --text: #04283B;
  --muted: #5a6b78;
  --error: #c62a15;
  --radius: 6px;
  --font: "Fira Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--blue-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- En-tête ---------- */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 56px 20px 104px;
}
.hero > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.hero .logo { display: block; width: 150px; height: auto; margin-bottom: 36px; margin-left: max(0px, calc((100% - 760px) / 2)); }
@media (max-width: 600px) { .hero .logo { width: 120px; margin-bottom: 28px; } }
.hero .brand {
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  margin-top: 0;
  margin-bottom: 14px;
  font-weight: 600;
  color: var(--accent);
}
.hero p { font-size: 1.05rem; font-weight: 300; }
.hero p strong { font-weight: 600; }

/* ---------- Carte formulaire ---------- */
.card {
  max-width: 760px;
  margin: -56px auto 48px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(23, 54, 93, .12);
  padding: 8px 32px 32px;
}
@media (max-width: 600px) {
  .card { margin: -56px 12px 32px; padding: 4px 18px 24px; }
}

section.q {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
section.q:last-of-type { border-bottom: 0; }

.q h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 6px;
}
.q h2 .num {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .85rem;
  margin-right: 10px;
  vertical-align: 1px;
}
.q .hint { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.req { color: var(--error); }
.optional { color: var(--muted); font-weight: 400; font-size: .9rem; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* ---------- Choix (radio / checkbox en tuiles) ---------- */
/* Flex plutôt que grid : permet de centrer les cases d'une ligne incomplète.
   Largeur d'une case = (100% - espaces entre colonnes) / nombre de colonnes */
.choices {
  --cols: 3;
  --gap: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.choices.cols-2 { --cols: 2; }                                   /* 2 colonnes fixes */
@media (max-width: 700px) { .choices { --cols: 2; } }
@media (max-width: 480px) { .choices, .choices.cols-2 { --cols: 1; } }
.choice {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  position: relative;
  display: block;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  height: 100%; /* toutes les cases d'une ligne ont la hauteur de la plus haute */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .15s, background .15s;
}
.choice span::before {
  content: "";
  flex: none;
  width: 18px; height: 18px;
  border: 2px solid #9aa8b8;
  border-radius: 50%;
  transition: all .15s;
}
.choice:hover span { border-color: var(--navy-600); }
.choice input:checked + span {
  border-color: var(--navy);
  background: var(--blue-100);
}
.choice input:checked + span::before {
  border-color: var(--navy);
  background: radial-gradient(var(--navy) 45%, transparent 50%);
}
.choice input:focus-visible + span { outline: 3px solid var(--blue-200); outline-offset: 2px; }

/* TEST : sans bouton radio, la case entière sert de sélecteur (supprimer ce bloc pour revenir en arrière) */
.choice span::before { display: none; }
.choice span { justify-content: center; text-align: center; }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }

/* ---------- Échelles de notes (1-5, 0-10) ---------- */
.scale {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.scale label { flex: 1; position: relative; cursor: pointer; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  transition: all .15s;
  font-size: .95rem;
  user-select: none;
}
.scale label:hover span { border-color: var(--navy-600); }
.scale input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.scale input:focus-visible + span { outline: 3px solid var(--blue-200); outline-offset: 2px; }
.scale .nc span { font-weight: 500; font-size: .85rem; color: var(--muted); }
.scale .nc input:checked + span { background: var(--muted); border-color: var(--muted); color: #fff; }

.scale-legend {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Échelle avec libellés longs (satisfaction globale) */
.scale.labelled span { min-height: 56px; padding: 6px; text-align: center; font-size: .82rem; line-height: 1.2; }
@media (max-width: 600px) {
  .scale.labelled { flex-direction: column; }
  .scale.labelled span { min-height: 44px; }
}

/* ---------- Grille de critères ---------- */
.criteria { display: grid; gap: 6px; }
.crit {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--blue-50);
}
.crit:nth-child(even) { background: #fff; }
.crit legend { float: left; padding: 0; font-size: .95rem; }
.crit .scale span { min-height: 36px; }
@media (max-width: 640px) {
  .crit { grid-template-columns: 1fr; }
}

/* ---------- Champs texte ---------- */
.field { margin-top: 14px; }
.field label { display: block; font-size: .92rem; margin-bottom: 6px; color: var(--muted); }
input[type="text"], textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input[type="text"]:focus, textarea:focus {
  outline: 0;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--blue-200);
}

[hidden] { display: none !important; }

/* Honeypot anti-spam */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Envoi ---------- */
.actions { padding-top: 24px; text-align: center; }
button[type="submit"] {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .02em;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 14px 40px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
button[type="submit"]:hover { background: var(--accent-600); }
button[type="submit"]:active { transform: translateY(1px); }
button[type="submit"]:disabled { opacity: .6; cursor: wait; }

.privacy { font-size: .8rem; color: var(--muted); margin-top: 16px; }

.form-error {
  background: #fef3f2;
  color: var(--error);
  border: 1px solid #fecdca;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 20px;
}
section.q.invalid h2 { color: var(--error); }
section.q.invalid .choice span,
section.q.invalid .scale span { border-color: #f2b8b5; }

/* ---------- Merci ---------- */
.thanks { text-align: center; padding: 48px 12px; }
.thanks .check {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--navy);
  display: grid; place-items: center;
  font-size: 2rem;
}
.thanks h2 { color: var(--navy); margin: 0 0 8px; }
.thanks p { color: var(--muted); margin: 0; }

footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 20px 32px; }

/* ---------- Page d'accueil (domaine sans lien) ---------- */
.thanks .cta { margin-top: 28px; }
.btn {
  display: inline-block;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 14px 40px;
  text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--accent-600); }
.btn:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 2px; }
