
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}
.tool-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 14px;
}
.tool-hero h1 span { color: var(--blue); }
.tool-hero .subtitle {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 0;
}
.tool-meta {
  display: flex;
  gap: 20px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.tool-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--gray-500, #6b7280);
  font-weight: 500;
}
.tool-meta-item svg { color: var(--green); flex-shrink: 0; }

/* ─── LAYOUT PRINCIPAL ─── */
.tool-layout {
  max-width: 860px;
  margin: 36px auto 0;
  padding: 0 24px 100px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ─── WIDGET PRINCIPAL ─── */
.tool-widget {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

/* Header widget */
.widget-header {
  background: linear-gradient(135deg, var(--blue) 0%, #2563eb 100%);
  padding: 24px 28px;
  color: #fff;
}
.widget-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.widget-header p {
  font-size: 0.88rem;
  opacity: 0.85;
  line-height: 1.5;
  margin: 0;
}

/* Champ adresse */
.address-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--gray-200);
}
.address-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.address-input-wrap {
  position: relative;
  display: flex;
  gap: 10px;
}
.address-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 0.97rem;
  font-family: inherit;
  color: var(--gray-800);
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--gray-50);
}
.address-input:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}
.address-input::placeholder { color: var(--gray-400); }
.search-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.address-hint {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Étapes */
.steps-section { padding: 0 28px 8px; }
.steps-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 20px 0 16px;
  border-top: 1px solid var(--gray-200);
  margin-top: 0;
}

.step-item {
  display: flex;
  gap: 14px;
  margin-bottom: 6px;
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1.5px solid transparent;
  position: relative;
}
.step-item:hover { background: var(--gray-50); }
.step-item.active {
  background: var(--blue-light);
  border-color: rgba(26, 86, 219, 0.2);
}
.step-item.completed .step-num {
  background: var(--green);
  color: #fff;
}
.step-item.completed .step-num::after {
  content: '✓';
  font-size: 0.75rem;
}
.step-item.completed .step-num span { display: none; }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.2s, color 0.2s;
}
.step-item.active .step-num {
  background: var(--blue);
  color: #fff;
}

.step-content { flex: 1; }
.step-content strong {
  display: block;
  font-size: 0.93rem;
  color: var(--gray-900);
  margin-bottom: 3px;
}
.step-content p {
  font-size: 0.82rem;
  color: var(--gray-500, #6b7280);
  line-height: 1.5;
  margin: 0;
}
.step-item.active .step-content strong { color: var(--blue); }

/* Panel d'instruction détaillée */
.step-detail {
  display: none;
  margin: 0 28px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 16px 18px;
  animation: fadeSlide 0.2s ease;
}
.step-detail.show { display: block; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.step-detail p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0 0 10px;
}
.step-detail p:last-child { margin-bottom: 0; }
.step-detail .tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: #92400e;
  margin-top: 10px;
}
.step-detail .tip svg { flex-shrink: 0; margin-top: 1px; }

.open-registre-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.2s;
}
.open-registre-btn:hover { background: var(--blue-dark); }
.open-registre-btn svg { flex-shrink: 0; }

/* Progress bar */
.progress-bar-wrap {
  padding: 16px 28px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 7px;
  font-weight: 600;
}
.progress-track {
  height: 5px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--green) 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

/* Résultat / CTA final */
.result-section {
  display: none;
  padding: 24px 28px;
  border-top: 1px solid var(--gray-200);
  background: var(--green-light);
  animation: fadeSlide 0.3s ease;
}
.result-section.show { display: block; }
.result-section h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.result-section p {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 14px;
}
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result-actions a {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-result-primary {
  background: var(--blue);
  color: #fff;
}
.btn-result-primary:hover { background: var(--blue-dark); }
.btn-result-secondary {
  background: #fff;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}
.btn-result-secondary:hover { background: var(--gray-50); }

/* ─── SIDEBAR ─── */
.tool-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.sidebar-card h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sidebar-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-card ul li {
  font-size: 0.83rem;
  color: var(--gray-600);
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.4;
}
.sidebar-card ul li:last-child { border-bottom: none; }
.sidebar-card ul li::before {
  content: '•';
  color: var(--blue);
  font-weight: 800;
  flex-shrink: 0;
}

.alert-card {
  border-color: #fde68a;
  background: #fffbeb;
}
.alert-card h3 { color: #92400e; }
.alert-card ul li::before { color: var(--orange); }
.alert-card ul li { color: #78350f; }

.cta-card {
  background: linear-gradient(135deg, var(--blue) 0%, #2563eb 100%);
  border: none;
  color: #fff;
}
.cta-card h3 { color: #fff; }
.cta-card p {
  font-size: 0.83rem;
  opacity: 0.85;
  line-height: 1.55;
  margin-bottom: 14px;
}
.cta-card a {
  display: block;
  background: #fff;
  color: var(--blue);
  text-align: center;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.cta-card a:hover { background: var(--gray-100); }

.info-stat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.info-stat {
  flex: 1;
  background: var(--gray-50);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.info-stat .num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--blue);
  display: block;
}
.info-stat .desc {
  font-size: 0.68rem;
  color: var(--gray-400);
  line-height: 1.3;
  margin-top: 2px;
}

/* ─── SECTION ARTICLE ─── */
.article-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.article-section h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 48px 0 14px;
  padding-top: 40px;
  border-top: 2px solid var(--gray-100);
}
.article-section h2:first-child { border-top: none; padding-top: 0; }
.article-section h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 28px 0 10px;
}
.article-section p {
  font-size: 0.96rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 16px;
}
.article-section ul, .article-section ol {
  margin: 0 0 16px 22px;
}
.article-section li {
  font-size: 0.96rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 7px;
}
.article-section strong { color: var(--gray-800); }

.callout {
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 20px 0;
  background: var(--blue-light);
}
.callout p { color: var(--gray-700) !important; margin: 0 !important; font-size: 0.9rem !important; }
.callout.warning { background: #fffbeb; border-color: var(--orange); }
.callout.danger { background: #fef2f2; border-color: var(--red); }
.callout.success { background: var(--green-light); border-color: var(--green); }

/* FAQ */
.faq-section { margin: 48px 0 0; }
.faq-section h2 { border-bottom: 2px solid var(--gray-200); padding-bottom: 12px; margin-bottom: 20px; }
details { border: 1px solid var(--gray-200); border-radius: 8px; margin-bottom: 10px; }
summary {
  padding: 15px 18px;
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-800);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.1rem; color: var(--blue); }
details[open] summary::after { content: "−"; }
details .faq-answer { padding: 0 18px 14px; font-size: 0.91rem; color: var(--gray-600); line-height: 1.7; }

/* Related */
.related { margin-top: 52px; padding-top: 36px; border-top: 2px solid var(--gray-200); }
.related h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 18px; color: var(--gray-900); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.related-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  display: block;
  transition: box-shadow 0.2s, transform 0.2s;
}
.related-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.related-thumb {
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--gray-100);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-card h4 { font-size: 0.84rem; font-weight: 700; color: var(--gray-900); line-height: 1.35; }

/* ─── MOBILE ─── */
@media (max-width: 720px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .tool-sidebar {
    order: -1;
  }
  .address-input-wrap {
    flex-direction: column;
  }
  .search-btn { width: 100%; justify-content: center; }
  .info-stat-row { flex-wrap: wrap; }
}