/* ============================================================
   akt — Mon diagnostic (/mon-diagnostic)
   Trois écrans dans une même page : parcours (une question à la fois),
   coordonnées, résultats. Le HTML de la page reste lisible sans JavaScript ;
   js/diagnostic.js rend le contenu de .dg-stage.
   ============================================================ */

.dg-btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1rem 1.7rem; border: none; border-radius: 999px;
  background: var(--green); color: var(--white);
  font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-bold);
  letter-spacing: 0.01em; cursor: pointer; text-decoration: none;
  transition: background var(--t-fast, 0.2s ease), transform var(--t-fast, 0.2s ease);
}
.dg-btn svg { width: 1.05em; height: 1.05em; flex: none; }
.dg-btn:hover { background: var(--green-deep); transform: translateY(-1px); }
.dg-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.dg-btn--go { background: var(--accent); color: var(--green-deep); }
.dg-btn--go:hover { background: var(--accent-soft); }
.dg-btn--light { background: var(--white); color: var(--green-deep); }
.dg-btn--light:hover { background: var(--green-tint); }
.dg-btn--ghost {
  background: transparent; color: var(--ink-60);
  border: 1px solid var(--line); padding: 0.85rem 1.4rem;
}
.dg-btn--ghost:hover { background: transparent; color: var(--ink); border-color: var(--ink-40); }

/* ─── Hero ─── */
.dg-hero {
  position: relative; background: var(--green-deep); color: var(--white);
  padding: clamp(8rem, 14vw, 11rem) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.dg-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 20%, transparent 78%);
}
.dg-hero-inner { position: relative; max-width: 1080px; }
.dg-hero .fo-crumbs, .dg-hero .fo-crumbs a { color: var(--white-45); }
.dg-hero .fo-crumbs a:hover { color: var(--white); }
.dg-kicker {
  margin: 2.2rem 0 1rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs); letter-spacing: var(--ls-label); color: var(--accent-soft);
}
.dg-title {
  margin: 0; color: var(--white); font-size: var(--fs-h1); font-weight: var(--fw-black);
  letter-spacing: var(--ls-display); line-height: 1.02; text-wrap: balance;
}
.dg-lead {
  margin: 1.6rem 0 0; max-width: 62ch;
  font-size: var(--fs-lead); line-height: 1.55; color: var(--white-70);
}
.dg-hero-actions {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem;
}
.dg-hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0; }
.dg-hero-meta span {
  position: relative; font-size: var(--fs-xs); color: var(--white-45);
  letter-spacing: 0.04em;
}
.dg-hero-meta span + span::before {
  content: ''; position: absolute; left: -0.8rem; top: 50%;
  width: 3px; height: 3px; border-radius: 50%; background: currentColor;
}
.dg-hero-dims {
  list-style: none; margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.dg-hero-dims li {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 1rem 0.55rem 0.6rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--fs-xs); color: var(--white-70); white-space: nowrap;
}
.dg-hero-dim-ico { display: inline-flex; color: var(--accent-soft); }
.dg-hero-dim-ico svg { width: 17px; height: 17px; }

/* ─── Scène du parcours ─── */
.dg-stage { background: var(--gray-100); padding: clamp(6.5rem, 11vw, 9rem) 0 clamp(4rem, 8vw, 7rem); }
.dg-stage[hidden] { display: none; }
.dg-stage-inner { max-width: 880px; }

.dg-progress { margin-bottom: clamp(1.8rem, 3vw, 2.6rem); }
.dg-progress[hidden] { display: none; }
.dg-progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-bottom: 0.7rem;
}
.dg-progress-dim {
  margin: 0; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--green);
}
.dg-progress-count { margin: 0; font-size: var(--fs-xs); color: var(--ink-40); font-variant-numeric: tabular-nums; }
.dg-progress-bar { height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; }
.dg-progress-bar span {
  display: block; height: 100%; width: 0; background: var(--green);
  border-radius: 999px; transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.dg-panel { animation: dg-fade 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes dg-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .dg-panel { animation: none; }
  .dg-progress-bar span { transition: none; }
}

/* ─── Question ─── */
.dg-q-text {
  margin: 0 0 clamp(1.5rem, 3vw, 2.2rem); color: var(--ink);
  font-size: clamp(1.35rem, 1rem + 1.5vw, 2.1rem); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-title); line-height: 1.22; text-wrap: balance;
}
.dg-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.dg-opt {
  display: flex; align-items: flex-start; gap: 0.9rem; width: 100%;
  padding: 1.05rem 1.2rem; text-align: left;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: var(--fs-body); line-height: 1.45; color: var(--ink);
  cursor: pointer; transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.dg-opt:hover { border-color: var(--green); transform: translateX(2px); }
.dg-opt:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.dg-opt-key {
  flex: none; width: 26px; height: 26px; margin-top: 0.1rem;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--gray-100);
  font-size: 0.72rem; font-weight: var(--fw-bold); color: var(--ink-40);
  transition: inherit;
}
.dg-opt:hover .dg-opt-key { border-color: var(--green); color: var(--green); }
.dg-opt.is-on { border-color: var(--green); background: var(--green-tint); }
.dg-opt.is-on .dg-opt-key { background: var(--green); border-color: var(--green); color: var(--white); }

.dg-nav {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.dg-hint { margin: 0; font-size: var(--fs-xs); color: var(--ink-40); }
@media (max-width: 640px) { .dg-hint { display: none; } }

/* ─── Coordonnées ─── */
.dg-gate-head { margin-bottom: clamp(1.6rem, 3vw, 2.2rem); }
.dg-gate-head h2 {
  margin: 0 0 0.8rem; color: var(--ink); font-size: var(--fs-h2); font-weight: var(--fw-black);
  letter-spacing: var(--ls-title); line-height: 1.06; text-wrap: balance;
}
.dg-gate-head p { margin: 0; max-width: 56ch; font-size: var(--fs-body); line-height: 1.6; color: var(--ink-60); }
.dg-form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
.dg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.4rem; }
.dg-field { display: flex; flex-direction: column; gap: 0.35rem; }
.dg-field--wide { grid-column: 1 / -1; }
.dg-field label { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: 0.04em; color: var(--ink-60); }
.dg-field input {
  font: inherit; font-size: var(--fs-body); color: var(--ink);
  padding: 0.6rem 0; background: transparent;
  border: none; border-bottom: 1px solid var(--line); border-radius: 0;
  transition: border-color 0.2s ease;
}
.dg-field input:focus { outline: none; border-bottom-color: var(--green); }
.dg-field input:user-invalid { border-bottom-color: #b83228; }
@media (max-width: 640px) { .dg-fields { grid-template-columns: 1fr; } }

.dg-honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dg-rgpd { margin: 1.4rem 0 0; font-size: var(--fs-xs); line-height: 1.6; color: var(--ink-40); }
.dg-rgpd a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dg-form-actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.dg-feedback { margin: 0; font-size: var(--fs-xs); line-height: 1.5; }
.dg-feedback.is-error { color: #b83228; }
.dg-feedback.is-loading { color: var(--ink-40); }

/* ─── Résultats ─── */
.dg-score {
  background: var(--green-deep); color: var(--white); border-radius: var(--radius-sm);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 2.6rem);
  align-items: center;
}
.dg-gauge { position: relative; width: clamp(104px, 22vw, 148px); aspect-ratio: 1; }
.dg-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dg-gauge circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.dg-gauge .dg-gauge-bg { stroke: rgba(255, 255, 255, 0.14); }
.dg-gauge .dg-gauge-fg { stroke: var(--accent-soft); transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
.dg-gauge-num {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: var(--fw-black); letter-spacing: -0.04em;
}
.dg-gauge-num sup { font-size: 0.45em; font-weight: var(--fw-med); vertical-align: super; color: var(--white-45); }
.dg-score-body h2 {
  margin: 0 0 0.6rem; color: var(--white); font-size: var(--fs-h3); font-weight: var(--fw-black);
  letter-spacing: var(--ls-title); line-height: 1.1;
}
.dg-score-body p { margin: 0; font-size: var(--fs-body); line-height: 1.6; color: var(--white-70); }
.dg-score-name { margin: 0 0 0.5rem !important; font-size: var(--fs-xs) !important; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--accent-soft) !important; }
@media (max-width: 640px) { .dg-score { grid-template-columns: 1fr; justify-items: start; } }

/* Confirmation d'envoi : n'apparaît que si le webhook a accepté le lead */
.dg-sent {
  margin: 0.8rem 0 0; padding: 0.9rem 1.1rem; border-radius: var(--radius-sm);
  background: var(--green-tint); border: 1px solid #c4ddd6;
  font-size: var(--fs-sm); line-height: 1.55; color: var(--green);
}
.dg-sent--echec { background: #fff5f0; border-color: rgba(184, 50, 40, 0.25); color: #b83228; }
.dg-sent--echec a { color: inherit; }
.dg-res-title {
  color: var(--green); margin: clamp(2.2rem, 5vw, 3.4rem) 0 1.2rem;
  font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--green);
}
.dg-bars { display: grid; gap: 0.55rem; }
.dg-bar {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
}
.dg-bar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.dg-bar-label { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink); }
.dg-bar-label svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.dg-bar-val { font-size: var(--fs-sm); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; color: var(--ink-40); }
.dg-bar-track { height: 6px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.dg-bar-fill {
  display: block; height: 100%; width: 0; border-radius: 999px; background: var(--green);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.dg-bar[data-niveau="bas"] .dg-bar-fill { background: #b83228; }
.dg-bar[data-niveau="bas"] .dg-bar-val { color: #b83228; }
.dg-bar[data-niveau="moyen"] .dg-bar-fill { background: #b06010; }
.dg-bar-note { margin: 0.75rem 0 0; font-size: var(--fs-xs); line-height: 1.6; color: var(--ink-60); }
.dg-bar-reco { margin: 0.6rem 0 0; font-size: var(--fs-xs); line-height: 1.6; color: var(--ink-60); }
.dg-bar-reco strong { color: var(--ink); font-weight: var(--fw-bold); }
.dg-bar-coach { margin: 0.8rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.dg-bar-coach li { display: flex; gap: 0.5rem; font-size: var(--fs-xs); line-height: 1.55; color: var(--ink-60); }
.dg-bar-coach li::before { content: '→'; color: var(--green); flex: none; }
.dg-bar-link {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.9rem;
  font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--green); text-decoration: none;
}
.dg-bar-link svg { width: 1em; height: 1em; transition: transform 0.2s ease; }
.dg-bar-link:hover svg { transform: translateX(3px); }
.dg-bar-more { margin-top: 0.85rem; border-top: 1px solid var(--line); padding-top: 0.85rem; }

.dg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 640px) { .dg-two { grid-template-columns: 1fr; } }
.dg-card { border-radius: var(--radius-sm); padding: 1.2rem 1.3rem; }
.dg-card h3 { margin: 0 0 0.8rem; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-label); text-transform: uppercase; }
.dg-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.dg-card li { display: flex; align-items: baseline; gap: 0.5rem; font-size: var(--fs-sm); }
.dg-card li b { font-weight: var(--fw-bold); }
.dg-card li span { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-40); font-size: var(--fs-xs); }
.dg-card--forces { background: var(--green-tint); border: 1px solid #c4ddd6; }
.dg-card--forces h3, .dg-card--forces li b { color: var(--green); }
.dg-card--vigilance { background: #fff5f0; border: 1px solid rgba(184, 50, 40, 0.2); }
.dg-card--vigilance h3, .dg-card--vigilance li b { color: #b83228; }

.dg-res-cta {
  margin-top: clamp(2rem, 4vw, 3rem); background: var(--green); color: var(--white);
  border-radius: var(--radius-sm); padding: clamp(1.6rem, 4vw, 2.4rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem;
}
.dg-res-cta h2 { color: var(--white); margin: 0 0 0.5rem; font-size: var(--fs-h3); font-weight: var(--fw-black); letter-spacing: var(--ls-title); line-height: 1.1; }
.dg-res-cta p { margin: 0; max-width: 46ch; font-size: var(--fs-sm); line-height: 1.6; color: var(--white-70); }
.dg-res-foot { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ─── Les 5 dimensions (contenu permanent, sans JavaScript) ─── */
.dg-dims { padding: var(--section-y) 0; background: var(--white); }
.dg-sec-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.dg-sec-head h2 {
  margin: 0.8rem 0 1rem; color: var(--ink); font-size: var(--fs-h2); font-weight: var(--fw-black);
  letter-spacing: var(--ls-title); line-height: 1.04; text-wrap: balance;
}
.dg-sec-head > p { margin: 0; font-size: var(--fs-body); line-height: 1.65; color: var(--ink-60); }
.dg-dim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.dg-dim {
  background: var(--white); padding: clamp(1.3rem, 3vw, 2rem) 0;
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0 clamp(1rem, 2.5vw, 2rem); align-items: start;
}
.dg-dim-num { margin: 0; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-40); font-variant-numeric: tabular-nums; padding-top: 0.35rem; }
.dg-dim-ico { display: inline-flex; color: var(--green); }
.dg-dim-ico svg { width: 24px; height: 24px; }
.dg-dim-body h3 { margin: 0 0 0.35rem; font-size: var(--fs-h3); font-weight: var(--fw-bold); letter-spacing: var(--ls-title); line-height: 1.15; }
.dg-dim-desc { margin: 0 0 0.6rem; font-size: var(--fs-body); color: var(--ink); }
.dg-dim-reco { margin: 0; max-width: 62ch; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-60); }
.dg-dim-link {
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--green); text-decoration: none; padding-top: 0.35rem;
}
.dg-dim-link svg { width: 1em; height: 1em; transition: transform 0.2s ease; }
.dg-dim-link:hover svg { transform: translateX(3px); }
@media (max-width: 900px) {
  .dg-dim { grid-template-columns: auto minmax(0, 1fr); row-gap: 0.8rem; }
  .dg-dim-num { grid-column: 1; }
  .dg-dim-ico { grid-column: 1; grid-row: 2; }
  .dg-dim-body { grid-column: 2; grid-row: 1 / 3; }
  .dg-dim-link { grid-column: 2; padding-top: 0; }
}

/* ─── FAQ ─── */
.dg-faq { padding: var(--section-y) 0; background: var(--gray-100); }
.dg-faq-inner { max-width: 880px; }
.dg-faq-inner h2 { margin: 0 0 clamp(1.6rem, 3vw, 2.4rem); font-size: var(--fs-h2); font-weight: var(--fw-black); letter-spacing: var(--ls-title); line-height: 1.05; }
.dg-faq-list { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.dg-faq-item { background: var(--gray-100); padding: 1.2rem 0; }
.dg-faq-item summary {
  cursor: pointer; list-style: none; font-size: var(--fs-body); font-weight: var(--fw-bold);
  color: var(--ink); display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.dg-faq-item summary::-webkit-details-marker { display: none; }
.dg-faq-item summary::after { content: '+'; color: var(--green); font-weight: var(--fw-bold); flex: none; }
.dg-faq-item[open] summary::after { content: '–'; }
.dg-faq-item p { margin: 0.8rem 0 0; max-width: 68ch; font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-60); }

/* ─── CTA de fin ─── */
.dg-cta { background: var(--green-deep); color: var(--white); padding: var(--section-y) 0; }
.dg-cta-inner { max-width: 760px; }
.dg-cta h2 { color: var(--white); margin: 0 0 1rem; font-size: var(--fs-h2); font-weight: var(--fw-black); letter-spacing: var(--ls-title); line-height: 1.04; text-wrap: balance; }
.dg-cta p { margin: 0 0 clamp(1.6rem, 3vw, 2.2rem); font-size: var(--fs-body); line-height: 1.65; color: var(--white-70); }
