/* Variables faciles à personnaliser */
    :root{
      --bg: #f6f8fa;
      --card: #ffffff;
      --muted: #6b7280;
      --accent: #3F2A56;
      --accent-contrast: #fff;
      --radius: 12px;
      --flow: 1.1rem;
      --max-width: 880px;
      --gap: 1rem;
      --shadow: 0 6px 20px rgba(16,24,40,0.08);
    }

    /* Reset simple */
    *{box-sizing:border-box}
    html,body{height:100%}
    body{
      margin:0;
      font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
      background:linear-gradient(180deg,var(--bg),#eef2ff 60%);
      color:#111827;
      -webkit-font-smoothing:antialiased;
      -moz-osx-font-smoothing:grayscale;
      padding:40px 24px;
      display:flex;
      align-items:center;
      justify-content:center;
      user-select: none;
    }
    
    [contenteditable] {
      user-select: text;
    }

    .container{
      width:100%;
      max-width:var(--max-width);
      background:var(--card);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      padding:28px;
      display:grid;
      gap:var(--gap);
      
      grid-template-columns: 320px 1fr;
      grid-template-rows: 300px auto;
      grid-template-areas:
        "side form"
        "side btn";
    }

    /* Left column (brand / summary) */
    .brand{
      padding:18px;
      border-radius:8px;
      background:linear-gradient(180deg, rgba(37,99,235,0.06), rgba(99,102,241,0.02));
      display:flex;
      flex-direction:column;
      gap:12px;
      align-items:flex-start;
      grid-area: side;
    }

    .logo{
      width:177px;
      height:80px;
      border-radius:10px;
      display:flex;
      align-items:center;
      justify-content:center;
    }
    .logo img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* ou contain */
        border-radius: 10px; /* optionnel si tu veux que l'image suive l'arrondi */
    }

    .title{font-size:18px;font-weight:600}
    .subtitle{font-size:13px;color:var(--muted)}

    .progress{
      width:100%;height:10px;border-radius:999px;background:#e6eefc;overflow:hidden;margin-top:6px
    }
    .progress > span{display:block;height:100%;background:var(--accent);width:0%;transition:width .28s ease}

    /* Form area */
    form{padding:6px 6px 0 6px;grid-area: form;}
    fieldset{border:0;margin:0;padding:0}

    .step{
      display:none;
      padding-right:6px;
    }
    .step.active{display:block}

    .row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
    .col{margin-bottom:14px}

    label{display:block;font-size:13px;margin-bottom:6px;color:#374151}
    input[type=text], input[type=tel], input[type=email], select, textarea{
      width:100%;padding:10px 12px;border:1px solid #e6e9ef;border-radius:8px;font-size:14px;background:transparent;
    }
    textarea{min-height:100px;resize:none}

    .actions{display:flex;gap:8px;justify-content:flex-end;align-items:center;margin-top:18px;grid-area:btn;}
    .btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:10px;border:0;cursor:pointer;font-weight:600}
    .btn.prev{background:transparent;border:1px solid #e6e9ef;color:var(--muted)}
    .btn.next{background:var(--accent);color:var(--accent-contrast)}
    .btn.disabled {
      opacity: 0.4;
      cursor: not-allowed;
      pointer-events: none; /* empêche les clics */
    }
    .btn.disabled:hover {
      opacity: 0.4;
    }

    /* small link button in-line */
    .small{font-size:13px;padding:8px 10px;border-radius:8px}

    /* helper */
    .muted{color:var(--muted);font-size:13px}
    .hr{height:1px;background:#f1f5f9;margin:12px 0;border-radius:2px}

    .missingStep{
      display:none;
      color:red;
    }
    .missingStep.missing{display:block}

#driving-info { border:0; padding:0; margin:0 0 14px 0; }
  #driving-info legend { font-weight:600; margin-bottom:8px; color:#111827; }
  .choice {
    display:flex;
    align-items:center;
    gap:10px;
    padding:4px 10px;
    border:1px solid #e6e9ef;
    border-radius:8px;
    margin-bottom:8px;
    cursor:pointer;
  }
  .choice input[type="checkbox"] { width:16px; height:16px; }
  .choice span { font-size:14px; color:#374151; }

  .compact-label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.compact-textarea {
  width: 100%;
  min-height: 60px;
  padding: 6px 8px;
  font-size: 14px;
  resize: none;
}
.car-places {
  margin: 10px 0 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.car-places label {
  white-space: nowrap;
}

#car_places {
  width: 120px; /* compact */
}

#car_places_value {
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}


  .checkbox {
    display:flex;
    align-items:center;
    gap:10px;
    padding:4px 10px;
    border:1px solid #e6e9ef;
    border-radius:8px;
    margin-bottom:8px;
    cursor:pointer;
  }
  .checkbox input[type="checkbox"] { width:16px; height:16px; }
  .checkbox span { font-size:14px; color:#374151; }

      /* responsive */
/* Mobile friendly improvements */
@media (max-width: 600px) {

    body {
    display: block; /* au lieu de flex */
    padding: 20px 12px;
    height: auto; /* permet au contenu de dépasser la hauteur de l'écran */
  }

  :root {
    overflow: auto; /* pour être sûr que le scroll fonctionne */
  }

  .container {
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    max-width: 100%;
  }

  .brand {
    grid-area: auto;
    width: 100%;
    margin-bottom: 20px;
    padding: 16px;
  }

  #form-container {
    width: 100%;
  }

  form {
    padding: 0;
    width: 100%;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .choices,
  .car-places {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .checkbox{
    display: block;
  }

  .car-places label {
    margin-bottom: 4px;
  }

  .actions {
    flex-direction: column;
    gap: 8px;
  }

  .btn {
    width: 100%;
  }

  input[type=text],
  input[type=tel],
  input[type=email],
  select,
  textarea,
  input[type=range] {
    font-size: 14px;
  }

  h3, h4, h5 {
    font-size: 16px;
  }
}
