/* =========================
   DIAGNOSTIC FORM
   Scopé sous .diag-wrap
   Variables héritées de main.css
   ========================= */

   .diag-wrap {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--color-text);
  }
  
  .diag-wrap * {
    box-sizing: border-box;
  }
  
  /* ── Card ── */
  .diag-card {
    background: #fff;
    border: 1px solid rgba(50, 108, 240, 0.14);
    border-radius: var(--radius-16);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-soft);
  }
  
  /* ── Progress bar ── */
  .diag-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
  }
  
  .diag-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    background: rgba(50, 108, 240, 0.08);
    color: var(--color-blue);
    border: 1.5px solid rgba(50, 108, 240, 0.2);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }
  
  .diag-step-dot.active {
    background: var(--grad-main);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(50, 108, 240, 0.3);
  }
  
  .diag-step-dot.done {
    background: linear-gradient(135deg, #326cf0, #7c43e6);
    color: #fff;
    border-color: transparent;
  }
  
  .diag-step-line {
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(50, 108, 240, 0.15), rgba(124, 67, 230, 0.15));
  }
  
  /* ── Fieldset / Labels ── */
  .diag-wrap fieldset {
    border: 0;
    margin: 0 0 1.25rem;
    padding: 0;
  }
  
  .diag-wrap legend {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-blue);
    margin-bottom: 0.6rem;
    font-family: "Inter", sans-serif;
  }
  
  .diag-wrap label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-title);
    margin-bottom: 0.35rem;
  }
  
  .diag-hint {
    font-size: 0.8rem;
    color: var(--color-text);
    opacity: 0.7;
    margin: 0 0 0.5rem;
  }
  
  .diag-wrap .req::after {
    content: " *";
    color: #d93025;
    font-weight: 700;
  }
  
  /* ── Inputs ── */
  .diag-wrap input[type="text"],
  .diag-wrap input[type="email"],
  .diag-wrap input[type="url"],
  .diag-wrap textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1.5px solid rgba(50, 108, 240, 0.2);
    border-radius: var(--radius-btn);
    font: inherit;
    font-size: 0.95rem;
    color: var(--color-title);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  .diag-wrap input[type="text"]:hover,
  .diag-wrap input[type="email"]:hover,
  .diag-wrap input[type="url"]:hover,
  .diag-wrap textarea:hover {
    border-color: rgba(50, 108, 240, 0.4);
  }
  
  .diag-wrap input[type="text"]:focus,
  .diag-wrap input[type="email"]:focus,
  .diag-wrap input[type="url"]:focus,
  .diag-wrap textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(50, 108, 240, 0.12);
  }
  
  .diag-wrap textarea {
    min-height: 6.5rem;
    resize: vertical;
    line-height: 1.5;
  }
  
  /* ── SIRET row ── */
  .diag-row-siret {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .diag-row-siret input {
    flex: 1 1 12rem;
  }
  
  /* ── Buttons ── */
  .diag-wrap .diag-btn-verify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 1.1rem;
    border-radius: var(--radius-btn);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    background: #fff;
    color: var(--color-blue);
    border: 1.5px solid var(--color-blue);
    box-shadow: 0 4px 12px rgba(50, 108, 240, 0.1);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  }
  
  .diag-wrap .diag-btn-verify:hover:not(:disabled) {
    background: #f5f8ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(50, 108, 240, 0.18);
  }
  
  .diag-wrap .diag-btn-next,
  .diag-wrap .diag-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-btn);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    color: #fff;
    background: var(--grad-main);
    box-shadow: var(--shadow-primary);
    transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  }
  
  .diag-wrap .diag-btn-next:hover:not(:disabled),
  .diag-wrap .diag-btn-submit:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-2px);
  }
  
  .diag-wrap .diag-btn-next:active,
  .diag-wrap .diag-btn-submit:active {
    transform: translateY(0);
  }
  
  .diag-wrap button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: none;
    transform: none;
  }
  
  /* ── Feedback SIRET ── */
  .diag-feedback {
    margin-top: 0.45rem;
    font-size: 0.88rem;
    min-height: 1.3em;
    font-weight: 500;
  }
  
  .diag-feedback.ok {
    color: #1a7a4a;
  }
  
  .diag-feedback.err {
    color: #d93025;
  }
  
  .diag-feedback.wait {
    color: var(--color-blue);
    opacity: 0.8;
  }
  
  /* ── Step 1 feedback (nosiret) ── */
  .diag-step1-feedback {
    margin-top: 0.45rem;
    font-size: 0.88rem;
    min-height: 1.3em;
    font-weight: 500;
    color: #d93025;
  }
  
  /* ── Checkbox consentements ── */
  .diag-check {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-bottom: 0.65rem;
  }
  
  .diag-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--color-blue);
    cursor: pointer;
  }
  
  .diag-check label {
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--color-text);
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
  }
  
  /* ── Honeypot ── */
  .diag-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }
  
  /* ── Status message ── */
  .diag-status {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-btn);
    font-size: 0.92rem;
    line-height: 1.45;
    display: none;
  }
  
  .diag-status.show {
    display: block;
  }
  
  .diag-status.wait {
    background: rgba(50, 108, 240, 0.06);
    border: 1px solid rgba(50, 108, 240, 0.2);
    color: var(--color-blue);
  }
  
  .diag-status.err {
    background: rgba(217, 48, 37, 0.05);
    border: 1px solid rgba(217, 48, 37, 0.2);
    color: #d93025;
  }
  
  /* ── Confirmation step 3 ── */
  .diag-confirm {
    text-align: center;
    padding: 1rem 0 0.5rem;
  }
  
  .diag-confirm-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    line-height: 1;
  }
  
  .diag-confirm h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
    color: var(--color-title);
    letter-spacing: -0.02em;
  }
  
  .diag-confirm > p {
    color: var(--color-text);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    line-height: 1.5;
  }
  
  .diag-meeting-box {
    background: linear-gradient(135deg, rgba(50, 108, 240, 0.04) 0%, rgba(124, 67, 230, 0.04) 100%);
    border: 1px solid rgba(50, 108, 240, 0.18);
    border-radius: var(--radius-12);
    padding: 1.25rem 1.35rem;
    text-align: left;
    margin-bottom: 0.5rem;
  }
  
  .diag-meeting-box strong {
    display: block;
    font-size: 0.97rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--color-title);
  }
  
  .diag-meeting-box p {
    font-size: 0.88rem;
    margin: 0 0 1rem;
    color: var(--color-text);
    line-height: 1.45;
  }
  
  .diag-btn-calendly {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-btn);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--grad-main);
    box-shadow: var(--shadow-primary);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.15s ease;
  }
  
  .diag-btn-calendly:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
  }
  
  /* ── Spacing utils internes ── */
  .diag-mt { margin-top: 1rem; }
  
  /* ── Responsive ── */
  @media (max-width: 768px) {
    .diag-card {
      padding: 1.35rem 1.1rem;
    }
  
    .diag-row-siret {
      flex-direction: column;
    }
  
    .diag-row-siret input {
      flex: 1 1 auto;
    }
  
    .diag-wrap .diag-btn-verify {
      width: 100%;
    }
  }