/* Styles du conteneur global */
#smartisi_div {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 30px auto;
    width: 90%;
    max-width: 700px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px 30px;
  }
  
  /* Titres */
  #smartisi_div h1.form-title {
    font-size: 1.5rem;
    text-align: center;
    color: #007bff;
    margin-bottom: 25px;
  }
  
  #smartisi_div h2 {
    font-size: 1.1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-top: 20px;
    margin-bottom: 15px;
    color: #222;
  }
  
  /* Grille d'organisation */
  #smartisi_prospect .smartisi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px 30px;
  }
  
  #smartisi_prospect .smartisi-row {
    display: flex;
    flex-direction: column;
  }
  
  #smartisi_prospect .smartisi-row label {
    margin-bottom: 4px;
    font-weight: 500;
    color: #333;
  }
  
  #smartisi_prospect .smartisi-row label.required::after {
    content: " *";
    color: #dc3545;
  }
  
  #smartisi_prospect .smartisi-row input[type="text"],
  #smartisi_prospect .smartisi-row input[type="email"],
  #smartisi_prospect .smartisi-row textarea,
  #smartisi_prospect .smartisi-row select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.95rem;
    transition: border 0.2s ease-in-out;
    box-sizing: border-box;
  }
  
  #smartisi_prospect .smartisi-row input:focus,
  #smartisi_prospect .smartisi-row textarea:focus,
  #smartisi_prospect .smartisi-row select:focus {
    border-color: #007bff;
    outline: none;
  }
  
  #smartisi_prospect .smartisi-row textarea {
    resize: vertical;
    min-height: 80px;
  }
  
  /* Grille des prestations */
  #smartisi_prospect .prestations-grid.align-left .smartisi-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }
  
  /* Switch toggle */
  #smartisi_prospect .switch-wrapper {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    vertical-align: middle;
  }
  
  #smartisi_prospect .switch-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  #smartisi_prospect .switch {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
  }
  
  #smartisi_prospect .switch::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
  }
  
  #smartisi_prospect .switch-wrapper input:checked + .switch {
    background-color: #319EFB;
  }
  
  #smartisi_prospect .switch-wrapper input:checked + .switch::before {
    transform: translateX(22px);
  }
  
  /* Bouton principal */
  #smartisi_prospect .save-button {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 10px 22px;
    font-size: 0.95rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
  }
  
  #smartisi_prospect .save-button:hover {
    background-color: #0056b3;
  }
  
  #smartisi_prospect .actions-zone {
    margin-top: 25px;
    text-align: center;
  }

  #smartisi_prospect .tooltip-icon {
    font-size: 0.8rem;
    cursor: help;
    margin-left: 5px;
    color: #007bff;
  }
  
  
  /* Popup d'erreur */
  #smartisi_popup {
    display: none;
    background: #007bff;
    color: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    width: 340px;
    max-width: 90%;
    text-align: center;
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    animation: popupFadeIn 0.3s ease-out;
  }
  
  @keyframes popupFadeIn {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
  }
  
  #smartisi_popup.display {
    display: block;
  }
  
  .smartisi_message {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
  }
  
  .smartisi_actions button {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: #fff;
    color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease-in-out;
  }
  
  .smartisi_actions button:hover {
    background: #e9ecef;
  }
  
  /* Loader */
  #smartisi_wrapper {
    display: none;
  }

  #smartisi_wrapper.display {
    z-index: 1000;
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
  }
  
  .smartisi-lds-roller {
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
  }
  .smartisi-lds-roller div {
    animation: smartisi-lds-roller 1.2s linear infinite;
    transform-origin: 40px 40px;
  }
  .smartisi-lds-roller div:after {
    content: " ";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: white;
    margin: -4px 0 0 -4px;
  }
  .smartisi-lds-roller div:nth-child(1) { animation-delay: -0.036s; top: 63px; left: 63px; }
  .smartisi-lds-roller div:nth-child(2) { animation-delay: -0.072s; top: 68px; left: 56px; }
  .smartisi-lds-roller div:nth-child(3) { animation-delay: -0.108s; top: 71px; left: 48px; }
  .smartisi-lds-roller div:nth-child(4) { animation-delay: -0.144s; top: 72px; left: 40px; }
  .smartisi-lds-roller div:nth-child(5) { animation-delay: -0.180s; top: 71px; left: 32px; }
  .smartisi-lds-roller div:nth-child(6) { animation-delay: -0.216s; top: 68px; left: 24px; }
  .smartisi-lds-roller div:nth-child(7) { animation-delay: -0.252s; top: 63px; left: 17px; }
  .smartisi-lds-roller div:nth-child(8) { animation-delay: -0.288s; top: 56px; left: 12px; }
  
  @keyframes smartisi-lds-roller {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Empêche bordure rouge sur chargement */
  #smartisi_prospect input:required:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ccc;
  }
  
