/* ==========================================================
   Composant diagnostic-tool — bilan-patrimonial-gratuit.fr
   À terme : fusionner dans assets/css/style.css. En attendant,
   ce fichier est chargé séparément pour ne pas alourdir le
   style.css global avec un composant encore en test.
   Convention de nommage alignée sur les autres composants
   (stat-grid, compare-grid, warning-list...).
========================================================== */

.diagnostic-tool {
  max-width: 640px;
  margin: 2.5rem auto;
  padding: 2.25rem;
  border: 1px solid #e5e7e6;
  border-radius: 16px;
  background: #fff;
}

.diag-progress {
  margin-bottom: 1.75rem;
}

.diag-progress-bar {
  height: 4px;
  background: #e9ebea;
  border-radius: 999px;
  overflow: hidden;
}

.diag-progress-fill {
  height: 100%;
  width: 14.3%;
  background: var(--accent, #1f5f4a);
  transition: width 0.3s ease;
}

.diag-progress-label {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #8a8f8d;
  letter-spacing: 0.01em;
}

/* Reset complet : sans ça le navigateur applique son style par défaut
   (bordure "groove" autour du fieldset + legend qui la coupe), ce qui
   créait l'effet de double boîte cheap. */
.diag-step {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.diag-step legend {
  all: unset;
  display: block;
  width: 100%;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1a1a;
  margin-bottom: 1.4rem;
}

.diag-hint {
  font-size: 0.85rem;
  color: #8a8f8d;
  margin: -1rem 0 1.1rem;
}

.diag-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.55rem;
  border: 1px solid #e5e7e6;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.diag-option:last-child {
  margin-bottom: 0;
}

.diag-option:hover {
  border-color: #c6cdc9;
}

.diag-option input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent, #1f5f4a);
  cursor: pointer;
}

.diag-option span {
  font-size: 0.96rem;
  line-height: 1.4;
  color: #2a2a2a;
}

.diag-option input:checked ~ span {
  font-weight: 600;
  color: #1a1a1a;
}

.diag-option:has(input:checked) {
  border-color: var(--accent, #1f5f4a);
  background: #f4f8f6;
  box-shadow: inset 0 0 0 1px var(--accent, #1f5f4a);
}

.diag-option-neutral {
  border-style: dashed;
}

.diag-option-neutral span {
  color: #6b706e;
}

.diag-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
}

.diag-btn {
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.diag-btn:focus-visible {
  outline: 2px solid var(--accent, #1f5f4a);
  outline-offset: 2px;
}

.diag-btn-primary {
  background: var(--accent, #1f5f4a);
  color: #fff;
  margin-left: auto;
}

.diag-btn-primary:hover {
  opacity: 0.92;
}

.diag-btn-primary:disabled {
  background: #b7c7c1;
  cursor: not-allowed;
}

.diag-btn-ghost {
  background: transparent;
  color: #6b706e;
  border: 1px solid #dcdfdd;
  font-weight: 500;
}

.diag-btn-ghost:hover {
  border-color: #c6cdc9;
  color: #2a2a2a;
}

/* Résultat */

.diag-result-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.diag-result-badge.tier-fort { background: #fdeceb; color: #b13a2f; }
.diag-result-badge.tier-modere { background: #fdf3e2; color: #96700e; }
.diag-result-badge.tier-faible { background: #eaf3ee; color: #1f5f4a; }

.diag-result h3 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
}

.diag-reason {
  margin: 0 0 0.9rem;
}

.diag-locked {
  position: relative;
  margin-top: 1rem;
}

.diag-locked-fade {
  position: relative;
}

.diag-reason-blur {
  filter: blur(4px);
  user-select: none;
}

.diag-locked-fade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(250,250,250,0) 0%, #fafafa 90%);
}

.diag-unlock {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #ddd;
}

.diag-email-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.diag-email-form input[type="email"] {
  flex: 1 1 220px;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

.diag-email-status {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #1f5f4a;
  min-height: 1.2em;
}

.diag-disclaimer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e2e2;
  font-size: 0.8rem;
  color: #888;
}

@media (max-width: 600px) {
  .diagnostic-tool {
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 8px;
  }
}

/* ==========================================================
   Hero à deux colonnes — titre/punchline à gauche, quiz à droite
========================================================== */

.hero-split {
  background: #f4f6f5;
  border-bottom: 1px solid #e2e2e2;
  padding: 3rem 1.5rem;
}

.hero-split-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero-copy h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 1.1rem;
}

.hero-punchline {
  font-size: 1.15rem;
  line-height: 1.55;
  color: #333;
  margin: 0;
  max-width: 46ch;
}

.hero-tool .diagnostic-tool {
  margin: 0;
  background: #fff;
  box-shadow: 0 4px 24px rgba(20, 40, 32, 0.06);
}

@media (max-width: 880px) {
  .hero-split-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-punchline {
    max-width: none;
  }
  .hero-arrow {
    display: none;
  }
}

/* Flèche décorative : du haut du texte vers le coin haut-gauche de la carte */
.hero-arrow {
  position: absolute;
  width: 160px;
  height: auto;
  left: calc(50% - 105px);
  top: -0.5rem;
  pointer-events: none;
}

/* Surlignage "stabilo" sur un mot — bande de couleur derrière le texte,
   façon marqueur, plutôt qu'un simple soulignement fin */
.stabilo {
  background-image: linear-gradient(var(--accent, #dd6b4f), var(--accent, #dd6b4f));
  background-repeat: no-repeat;
  background-size: 100% 0.3em;
  background-position: 0 88%;
}

/* ==========================================================
   Grille des 4 hubs
========================================================== */

.hub-grid-section {
  margin: 3rem 0 2.5rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.hub-card {
  display: block;
  padding: 1.4rem;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.hub-card:hover {
  border-color: var(--accent, #1f5f4a);
  transform: translateY(-2px);
}

.hub-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--accent, #1f5f4a);
}

.hub-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.45;
}

@media (max-width: 880px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hub-grid {
    grid-template-columns: 1fr;
  }
}
