﻿.audit-page {
  background:
    radial-gradient(circle at 78% 8%, rgba(25, 199, 223, 0.18), transparent 28%),
    linear-gradient(180deg, #07152b 0, #0c1c35 360px, #f5f8fc 361px, #f5f8fc 100%);
}

.audit-page .site-header.scrolled .nav,
.audit-page .nav {
  background: rgba(7, 21, 43, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.audit-page .site-header.scrolled .logo-hero { opacity: 1; }
.audit-page .site-header.scrolled .logo-scrolled { opacity: 0; }
.audit-page .site-header.scrolled .nav-panel a { color: rgba(255, 255, 255, 0.76); }
.audit-page .nav-panel a.is-active { color: var(--cyan); }

.audit-hero {
  position: relative;
  min-height: 100vh;
  padding: 132px 0 76px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 18%, rgba(43, 212, 159, 0.24), transparent 30%),
    radial-gradient(circle at 10% 80%, rgba(37, 99, 235, 0.22), transparent 30%),
    linear-gradient(135deg, #07152b 0%, #0e2342 48%, #102f4d 100%);
}

.audit-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(430px, 1.05fr);
  gap: 54px;
  align-items: center;
}


.audit-hero-copy h1 {
  max-width: 760px;
  color: var(--white);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.audit-hero-copy .hero-text {
  max-width: 660px;
}

.audit-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 700px;
  margin-top: 28px;
}

.audit-metrics div {
  min-height: 88px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.audit-metrics strong,
.audit-metrics span {
  display: block;
}

.audit-metrics strong {
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}

.audit-metrics span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
}

.audit-hero-card {
  position: relative;
  min-height: 540px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
}


.audit-visual-slider,
.audit-slide {
  position: absolute;
  inset: 0;
}

.audit-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.98) contrast(1.02);
  transition: opacity 0.72s ease-in-out;
}

.audit-slide.is-active {
  opacity: 1;
}

.audit-slide--server {
  object-position: 82% 50%;
}

.audit-slide--workstation {
  object-position: 74% 50%;
}

.audit-slide--infra {
  object-position: 80% 50%;
}

.audit-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 21, 43, 0.2), transparent 32%, rgba(7, 21, 43, 0.08)),
    linear-gradient(180deg, transparent 45%, rgba(7, 21, 43, 0.4));
}

.audit-floating-card {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(360px, calc(100% - 44px));
  padding: 15px 16px;
  border: 1px solid rgba(25, 199, 223, 0.28);
  border-radius: 18px;
  background: rgba(7, 21, 43, 0.86);
  backdrop-filter: blur(14px);
}

.audit-floating-card svg {
  width: 24px;
  height: 24px;
  color: var(--cyan);
}

.audit-floating-card strong,
.audit-floating-card span {
  display: block;
}

.audit-floating-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}
.audit-slide-dots {
  position: absolute;
  z-index: 4;
  right: 28px;
  top: 26px;
  display: flex;
  gap: 9px;
}

.audit-slide-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.audit-slide-dots button.is-active {
  width: 30px;
  background: var(--cyan);
}

.audit-intro {
  background: #f5f8fc;
}

.audit-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.audit-benefits article {
  min-height: 210px;
  padding: 26px;
  border: 1px solid #e7edf5;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.audit-benefits article:hover {
  transform: translateY(-4px);
  border-color: rgba(25, 199, 223, 0.34);
  box-shadow: 0 24px 58px rgba(16, 24, 40, 0.1);
}

.audit-benefits svg {
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
  color: var(--cyan);
}

.audit-benefits h3 {
  margin-bottom: 9px;
  color: var(--navy);
}

.audit-benefits p {
  margin: 0;
  color: var(--muted);
}

/* =========================================================================
   Formulaire de diagnostic — assistant en 4 etapes
   Mobile-first : chaque bloc reste lisible et cliquable au pouce.
   ========================================================================= */

.audit-form-section {
  padding-top: 0;
  background: #f5f8fc;
}

.diagnostic-form {
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.form-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.form-heading h2 {
  color: var(--navy);
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.12;
  margin: 4px 0 0;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ------------------------------------------------------------- progression */

.wizard-progress {
  scroll-margin-top: 96px; /* le header est fixe : sans cela il masque la barre */
  background: #ffffff;
  border: 1px solid #e6edf6;
  border-radius: 18px;
  padding: 16px 18px 14px;
  box-shadow: 0 10px 26px rgba(11, 35, 64, 0.05);
}

.wizard-progress__track {
  height: 6px;
  border-radius: 999px;
  background: #e8eff7;
  overflow: hidden;
}

.wizard-progress__bar {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  transition: width 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.wizard-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: #93a3b8;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
}

.wizard-steps b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef3f9;
  color: #93a3b8;
  font-size: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.wizard-steps li.is-done b {
  background: rgba(43, 212, 159, 0.16);
  color: #17916c;
}

.wizard-steps li.is-current {
  color: var(--navy);
}

.wizard-steps li.is-current b {
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: #032129;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(25, 199, 223, 0.32);
}

.wizard-live {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

/* ------------------------------------------------------------- etape / carte */

.form-section {
  scroll-margin-top: 96px;
  background: #ffffff;
  border: 1px solid #e6edf6;
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 14px 34px rgba(11, 35, 64, 0.06);
  animation: stepIn 0.32s ease both;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.form-section__title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef3f9;
}

.section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(25, 199, 223, 0.16), rgba(43, 212, 159, 0.16));
  color: #0b7f95;
}

.section-icon svg { width: 21px; height: 21px; }

.form-section h3 {
  margin: 0;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.25;
}

.form-section__title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------------ champs */

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field--full { grid-column: 1 / -1; }
.field--half { max-width: 320px; margin-top: 18px; }

.field > span {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  color: #34455a;
  font-size: 13.5px;
  font-weight: 700;
}

.field > span strong { color: var(--coral); }

.field-hint {
  color: #9aa8b8;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid #dde5ef;
  border-radius: 13px;
  background: #fbfcfe;
  color: var(--ink);
  font: inherit;
  font-size: 15px; /* >=16px evite le zoom iOS, 15px reste acceptable avec la meta viewport */
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367788c' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  padding-right: 42px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(25, 199, 223, 0.16);
}

.field input::placeholder,
.field textarea::placeholder { color: #a9b6c5; }

.error-message {
  display: none;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--coral);
  background: #fffafa;
  box-shadow: 0 0 0 4px rgba(242, 109, 91, 0.12);
}

.field.is-invalid .error-message { display: block; }

/* ------------------------------------------------------------------- chips */

.q {
  border: 0;
  margin: 0 0 26px;
  padding: 0;
  min-width: 0;
}

/* :last-child et non :last-of-type — une question suivie d'un .q-row ou d'un
   champ libre restait sinon collee au bloc suivant. */
.q:last-child { margin-bottom: 0; }

/* Dans une rangee, c'est le gap de la grille qui gere l'espacement. */
.q-row .q { margin-bottom: 0; }

.q legend {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin-bottom: 12px;
  color: #34455a;
  font-size: 14.5px;
  font-weight: 800;
}

.q-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
  align-items: start;
  margin-bottom: 26px;
}

.q-row:last-child { margin-bottom: 0; }

/* Champ libre place apres des questions : il lui faut le meme rythme. */
.form-section > .field--full { margin-top: 2px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip { display: inline-flex; min-width: 0; }

.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chip > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 16px;
  border: 1.5px solid #dde5ef;
  border-radius: 13px;
  background: #fbfcfe;
  color: #3b4c60;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.chip > span svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  opacity: 0.62;
}

.chip:hover > span {
  border-color: #b9cddf;
  background: #f4f9fd;
}

.chip input:focus-visible ~ span {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(25, 199, 223, 0.18);
}

.chip input:checked ~ span {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(25, 199, 223, 0.14), rgba(43, 212, 159, 0.14));
  color: #06576a;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(25, 199, 223, 0.18);
}

.chip input:checked ~ span svg { opacity: 1; color: #0b7f95; }

.chip input:active ~ span { transform: scale(0.98); }

/* ------------------------------------------------------------- navigation */

.wizard-nav {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid #e6edf6;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 -6px 26px rgba(11, 35, 64, 0.08);
}

.wizard-nav__count {
  flex: 1 1 auto;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.ghost-button,
.whatsapp-button,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  font-size: 14.5px;
  font-family: inherit;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.whatsapp-button svg { width: 18px; height: 18px; }

.primary-button,
.secondary-button,
button[type="submit"] {
  border: 0;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: #032129;
  box-shadow: 0 14px 30px rgba(25, 199, 223, 0.24);
}

.ghost-button {
  border: 1px solid #d9e3ef;
  background: #ffffff;
  color: var(--navy);
}

.whatsapp-button {
  border: 0;
  background: #25d366;
  color: #062815;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.2);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.whatsapp-button:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(25, 199, 223, 0.26);
}

.primary-button:disabled,
button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

/* ---------------------------------------------------------------- resultat */

.audit-result { display: grid; gap: 16px; }

.success-message {
  padding: 18px 20px;
  border: 1px solid rgba(43, 212, 159, 0.3);
  border-radius: 18px;
  background: rgba(43, 212, 159, 0.1);
  color: #0a5c46;
  font-size: 14.5px;
  line-height: 1.55;
}

.success-message strong { color: #064e3b; }

.success-message.is-warning {
  border-color: rgba(245, 173, 46, 0.36);
  background: rgba(245, 173, 46, 0.12);
  color: #7c5306;
}

.success-message.is-warning strong { color: #6b4605; }

.result-card {
  border: 1px solid #e6edf6;
  border-radius: 20px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(11, 35, 64, 0.06);
}

.result-card__head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.result-card__head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
}

.result-card__head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.result-badge {
  flex: 0 0 auto;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(43, 212, 159, 0.16);
  color: #12805f;
}

.result-badge.is-medium { background: rgba(245, 173, 46, 0.18); color: #8a5d08; }
.result-badge.is-high   { background: rgba(242, 109, 91, 0.16); color: #b13d2e; }

.result-flags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.result-flags li {
  position: relative;
  padding-left: 20px;
  color: #47586c;
  font-size: 13.5px;
  line-height: 1.5;
}

.result-flags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

.result-flags li.is-medium::before { background: #f5ad2e; }
.result-flags li.is-high::before   { background: var(--coral); }

.result-flags .result-summary {
  padding-left: 0;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.result-flags .result-summary::before { display: none; }

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #eef3f9;
  color: var(--muted);
  font-size: 13px;
}

.privacy-note svg { width: 16px; height: 16px; flex: 0 0 auto; }

[hidden] { display: none !important; }

/* ------------------------------------------------------------- responsive */

@media (min-width: 681px) {
  .form-section { padding: 30px 28px; }
  .form-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
  }
  .form-heading p { max-width: 320px; text-align: right; }
  .wizard-progress { padding: 18px 22px 16px; }
  .wizard-steps li { font-size: 12.5px; }
  .wizard-nav { padding: 14px 20px; }
}

@media (max-width: 680px) {
  .audit-form-section { padding-bottom: 40px; }

  .diagnostic-form { gap: 14px; }

  .form-section {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .form-section__title {
    gap: 11px;
    margin-bottom: 17px;
    padding-bottom: 14px;
  }

  .section-icon { width: 38px; height: 38px; border-radius: 11px; }
  .form-section h3 { font-size: 17px; }
  .form-section__title p { font-size: 12.5px; }

  /* Une colonne : les champs cote a cote deviennent illisibles au pouce. */
  .field-grid,
  .q-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .q-row { gap: 24px; margin-bottom: 24px; }
  .field--half { max-width: none; }

  /* Les chips passent en pleine largeur pour une cible de clic confortable. */
  .chips { gap: 8px; }

  .chip { width: 100%; }

  .chip > span {
    width: 100%;
    min-height: 50px;
    padding: 13px 16px;
    font-size: 14.5px;
  }

  .wizard-steps { gap: 4px; }
  .wizard-steps li span { display: none; }
  .wizard-steps b { width: 30px; height: 30px; }
  .wizard-progress { padding: 14px 14px 12px; border-radius: 16px; }
  .wizard-live { font-size: 12px; }

  /* Barre de navigation collee au bas de l'ecran, toujours atteignable. */
  .wizard-nav {
    position: sticky;
    bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 16px;
  }

  .wizard-nav__count {
    order: -1;
    flex: 1 0 100%;
    text-align: center;
    font-size: 11.5px;
  }

  .wizard-nav .ghost-button { flex: 0 0 auto; padding: 0 16px; }
  .wizard-nav .primary-button { flex: 1 1 auto; }

  .report-actions { flex-direction: column; align-items: stretch; }

  .report-actions .secondary-button,
  .report-actions .ghost-button,
  .report-actions .whatsapp-button { width: 100%; }

  .success-message { padding: 16px; border-radius: 16px; font-size: 14px; }
  .result-card { padding: 17px 16px; border-radius: 18px; }
  .result-card__head { gap: 10px; }
  .result-badge { order: -1; }
}

@media (max-width: 380px) {
  .form-section { padding: 17px 13px; }
  .chip > span { font-size: 14px; padding: 12px 13px; }
  .wizard-nav .ghost-button span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .form-section { animation: none; }
  .wizard-progress__bar { transition: none; }
  .primary-button:hover,
  .secondary-button:hover,
  .ghost-button:hover,
  .whatsapp-button:hover { transform: none; }
}

/* ------------------------------------------------- responsive hero / intro */

@media (max-width: 980px) {
  .audit-hero-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .audit-hero-card {
    min-height: 380px;
  }

  /* La grille 3 colonnes fixe ecrasait les cartes des l'iPad. */
  .audit-benefits {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 680px) {
  .audit-hero {
    min-height: auto;
    padding: 118px 0 56px;
  }

  .audit-metrics,
  .audit-benefits {
    grid-template-columns: 1fr;
  }

  .audit-benefits article {
    min-height: 0;
    padding: 20px;
    border-radius: 18px;
  }

  .audit-benefits svg { margin-bottom: 12px; }

  .audit-hero-card {
    min-height: 300px;
    border-radius: 20px;
  }

  .audit-floating-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
}
