/* ═══════════════════════════════════════════════════════════
   VARIABLES & RESET
   ═══════════════════════════════════════════════════════════ */
:root {
  --accent: #FF6B1A;
  --accent-dark: #e05a12;
  --dark: #111111;
  --dark-2: #1a1a1a;
  --dark-3: #2a2a2a;
  --mid: #555555;
  --light: #f5f5f5;
  --border: #e8e8e8;
  --white: #ffffff;
  --error: #d32f2f;
  --success: #1b8a4a;
  --warning-bg: #fff8f0;
  --warning-border: #ffd4a8;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', monospace;

  --container: 720px;
  --container-wide: 960px;
}

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

/* L'attribut HTML `hidden` doit toujours prendre le dessus sur display:flex/grid */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════
   ÉTATS (SPA)
   ═══════════════════════════════════════════════════════════ */
.state {
  display: none;
  min-height: 100dvh;
}
.state.active {
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--container-wide);
}

.site-header--dark {
  background: var(--dark);
  border-bottom-color: var(--dark-3);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.logo--white { color: var(--white); }

.logo-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--dark);
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}
.logo-dot::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 2px;
  background: var(--accent);
}
.logo--white .logo-dot {
  background: var(--white);
}
.logo--white .logo-dot::after {
  background: var(--accent);
}

.logo-accent { color: var(--accent); }

.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mid);
  background: var(--light);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
  padding: 56px 0 48px;
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255,107,26,0.08);
  border: 1px solid rgba(255,107,26,0.2);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 20px;
}

.accent { color: var(--accent); }

.hero-subtitle {
  font-size: 17px;
  color: var(--mid);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Preuves sociales */
.social-proof {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.proof-item {
  display: flex;
  flex-direction: column;
}
.proof-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.03em;
}
.proof-label {
  font-size: 12px;
  color: var(--mid);
}
.proof-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ═══════════════════════════════════════════════════════════
   FORMULAIRE
   ═══════════════════════════════════════════════════════════ */
.form-section {
  padding: 48px 0 64px;
  background: var(--white);
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.form-section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Champs */
.field-group {
  margin-bottom: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.required {
  color: var(--accent);
  margin-left: 2px;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,26,0.12);
}
.field-input.has-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(211,47,47,0.08);
}
.field-input::placeholder { color: #aaa; }

/* Select custom arrow */
.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Input avec suffixe */
.input-with-suffix {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-with-suffix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,26,0.12);
}
.input-with-suffix.has-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(211,47,47,0.08);
}
.input-with-suffix .field-input {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}
.input-with-suffix .field-input:focus {
  outline: none;
  box-shadow: none;
}
.input-suffix {
  background: var(--light);
  color: var(--mid);
  font-size: 13px;
  font-weight: 600;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-left: 1.5px solid var(--border);
  min-height: 48px;
}

/* Erreurs */
.field-error {
  font-size: 13px;
  color: var(--error);
  margin-top: 5px;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-error:empty { display: none; }

/* Radios */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.radio-card {
  position: relative;
  cursor: pointer;
}
.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.radio-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 16px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.radio-card input[type="radio"]:checked + .radio-content {
  border-color: var(--accent);
  background: rgba(255,107,26,0.04);
  box-shadow: 0 0 0 3px rgba(255,107,26,0.10);
}
.radio-card input[type="radio"]:focus-visible + .radio-content {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.radio-card:hover .radio-content {
  border-color: var(--accent);
  background: rgba(255,107,26,0.02);
}
.radio-icon { font-size: 22px; line-height: 1; }
.radio-title { font-size: 14px; font-weight: 700; color: var(--dark); }
.radio-desc { font-size: 11px; color: var(--mid); }

/* RGPD */
.rgpd-notice {
  font-size: 12px;
  color: var(--mid);
  line-height: 1.5;
  margin-bottom: 20px;
  margin-top: -4px;
}

/* Bouton principal */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font);
  color: var(--white);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(255,107,26,0.30);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 20px rgba(255,107,26,0.40);
}
.btn-primary:active { transform: scale(0.99); }
.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-icon { flex-shrink: 0; }

.submit-reassurance {
  text-align: center;
  font-size: 12px;
  color: var(--mid);
  margin-top: 12px;
}

/* Bouton secondaire */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--white);
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}
.btn-secondary:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   SECTION CONFIANCE
   ═══════════════════════════════════════════════════════════ */
.trust-section {
  background: var(--light);
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.trust-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--dark);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.trust-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
}
.trust-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.trust-item h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}
.trust-item p { font-size: 13px; color: var(--mid); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   BANNIÈRE ERREUR
   ═══════════════════════════════════════════════════════════ */
.error-banner {
  background: #fdecea;
  border: 1px solid #f5c6c6;
  color: var(--error);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.2s ease;
}
.error-banner a { color: var(--error); font-weight: 700; }
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   ÉTAT CHARGEMENT
   ═══════════════════════════════════════════════════════════ */
#state-loading {
  background: var(--dark);
  align-items: center;
  justify-content: center;
}
#state-loading.active { display: flex; }

.loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px 20px;
  text-align: center;
}

.loading-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--dark-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-dot-anim {
  animation: pulseDot 1.5s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.loading-spinner {
  width: 56px;
  height: 56px;
}
.spinner-svg {
  animation: rotateSpin 1s linear infinite;
}
@keyframes rotateSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loading-message {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  transition: opacity 0.3s ease;
}
.loading-message.fade { opacity: 0; }

.loading-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
}

/* ═══════════════════════════════════════════════════════════
   RÉSULTATS
   ═══════════════════════════════════════════════════════════ */
.results-wrapper {
  padding: 48px 0 80px;
  background: var(--light);
  min-height: calc(100dvh - 60px);
}
#state-results .container {
  max-width: var(--container-wide);
}

/* Hero résultats */
.results-hero {
  margin-bottom: 40px;
}
.results-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  background: rgba(255,107,26,0.08);
  border: 1px solid rgba(255,107,26,0.2);
  padding: 4px 10px;
  border-radius: 20px;
}
.results-title {
  font-size: clamp(18px, 3.5vw, 26px);
  font-weight: 700;
  line-height: 1.5;
  color: var(--dark);
  letter-spacing: -0.02em;
}
.results-title strong { font-weight: 800; }

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.kpi-card--accent {
  border-color: rgba(255,107,26,0.2);
  background: rgba(255,107,26,0.02);
}
.kpi-card--highlight {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

.kpi-icon { font-size: 24px; margin-bottom: 10px; display: block; }
.kpi-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dark);
  margin-bottom: 6px;
  line-height: 1.1;
}
.kpi-card--highlight .kpi-value { color: var(--white); }
.kpi-label {
  font-size: 12px;
  color: var(--mid);
  font-weight: 500;
}
.kpi-card--highlight .kpi-label { color: rgba(255,255,255,0.75); }

/* Alerte capacité */
.capacity-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #7a4400;
  line-height: 1.5;
}
.capacity-warning svg { flex-shrink: 0; margin-top: 1px; }

/* Comparaison */
.comparison-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.comparison-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
}
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}
.comparison-arrow {
  font-size: 22px;
  color: var(--mid);
  text-align: center;
  font-weight: 300;
}
.comparison-header { margin-bottom: 16px; }
.comparison-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}
.comparison-badge--before {
  background: var(--light);
  color: var(--mid);
}
.comparison-badge--after {
  background: rgba(255,107,26,0.1);
  color: var(--accent);
}
.comparison-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.comparison-row:last-child { border-bottom: none; }
.comparison-label { font-size: 13px; color: var(--mid); }
.comparison-value { font-size: 14px; font-weight: 700; color: var(--dark); text-align: right; }
.comparison-positive { color: var(--success); }
.comparison-neutral { color: var(--mid); }

/* Pipeline détail */
.pipeline-detail {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}
.pipeline-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
}
.pipeline-steps { display: flex; flex-direction: column; }
.pipeline-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--light);
  border: 1px solid var(--border);
}
.pipeline-step--highlight {
  background: rgba(255,107,26,0.05);
  border-color: rgba(255,107,26,0.25);
}
.pipeline-arrow {
  text-align: center;
  padding: 4px 0;
  color: var(--mid);
  font-size: 18px;
  margin-left: 20px;
}
.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pipeline-step--highlight .step-number { background: var(--accent); }
.step-body { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.step-label { font-size: 13px; color: var(--mid); }
.step-value { font-size: 16px; font-weight: 800; color: var(--dark); }
.pipeline-step--highlight .step-value { color: var(--accent); }

/* Bloc Calendly */
.calendly-block {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.calendly-cta-text h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.2;
}
.calendly-cta-text p {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 24px;
}
.cta-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cta-benefits li {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendly-inline-widget {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--dark);
  border-top: 1px solid var(--dark-3);
  padding: 20px 0;
  text-align: center;
}
.site-footer p {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}
.site-footer a { color: rgba(255,255,255,0.55); }
.site-footer a:hover { color: var(--white); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .hero { padding: 36px 0 32px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 15px; }

  .form-card { padding: 24px 18px; }

  .field-row { grid-template-columns: 1fr; }

  .radio-grid { grid-template-columns: repeat(2, 1fr); }

  .social-proof { gap: 16px; }
  .proof-divider { display: none; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); }

  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .comparison-arrow {
    transform: rotate(90deg);
    margin: 0;
  }

  .calendly-block {
    grid-template-columns: 1fr;
    padding: 32px 20px;
    gap: 32px;
  }
  .calendly-inline-widget { height: 600px !important; }

  .step-body { flex-direction: column; align-items: flex-start; gap: 4px; }

  .pipeline-detail, .comparison-block { padding: 24px 16px; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .calendly-block { grid-template-columns: 1fr; }
  .calendly-inline-widget { height: 600px !important; }
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITÉ — FOCUS & MOTION
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Visually hidden pour screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Animation d'entrée pour les résultats */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.results-hero,
.kpi-grid,
.comparison-block,
.pipeline-detail,
.calendly-block {
  animation: fadeInUp 0.4s ease both;
}
.kpi-grid { animation-delay: 0.05s; }
.comparison-block { animation-delay: 0.1s; }
.pipeline-detail { animation-delay: 0.15s; }
.calendly-block { animation-delay: 0.2s; }
