/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f6f9;
    color: #333;
  }
  
  .container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative;
  }
  
  h1, h2 {
    text-align: center;
    margin-bottom: 20px;
  }
  
  h1 {
    font-size: 2.5em;
    color: #2c3e50;
  }
  
  h2 {
    font-size: 2em;
    color: #34495e;
  }
  
  
  /* Styles des formulaires */
  .user-form, #pdf-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
  }
  
  .user-form label, #pdf-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
  }
  
  .user-form input[type="text"],
  .user-form select,
  #pdf-form select,
  .select-search {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
  }
  
  .user-form input[type="text"]:focus,
  .user-form select:focus,
  #pdf-form select:focus,
  .select-search:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 8px rgba(52,152,219,0.2);
  }
  
  .checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
  }
  
  .checkbox-label input[type="checkbox"] {
    margin-right: 10px;
  }
  
  .btn {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
  }
  
  .btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  
  .delete-btn {
    background-color: #e74c3c;
  }
  
  .delete-btn:hover {
    background-color: #c0392b;
  }
  
  .mode-switch-container {
    text-align: center;
    margin-top: 20px;
  }
  
  .mode-switch-text {
    color: #3498db;
    cursor: pointer;
    margin-bottom: 10px;
    font-weight: 500;
  }
  
  .mode-switch-text:hover {
    text-decoration: underline;
  }
  
  /* Styles de la signature */
  .signature-preview {
    display: flex;
    align-items: center; /* Aligner verticalement les éléments */
    justify-content: center; /* Centrer horizontalement les éléments */
    flex-direction: column; /* Empiler les éléments verticalement */
  }
  
  .signature-display {
    margin-bottom: 20px;
  }
  
  .signature-image {
    max-width: 100%;
    max-height: 200px;
    height: auto;
    margin-bottom: 20px;
    border: 2px solid #ccc;
    border-radius: 8px;
  }
  
  #no-signature-text {
    color: #7f8c8d;
  }
  
 
  .modify-btn {
    /* Supprimez tout style pouvant affecter le positionnement */
    margin: 0 auto;
  }
  
  .modify-btn:hover {
    background-color: #d35400;
  }
  
  /* Styles des onglets */
  .signature-tabs {
    margin-top: 20px;
  }
  
  .tab {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
  }
  
  .tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 20px;
    transition: background-color 0.3s ease;
    font-size: 1em;
    color: #34495e;
  }
  
  .tab button:hover {
    background-color: #ecf0f1;
  }
  
  .tab button.active {
    border-bottom: 3px solid #3498db;
    color: #3498db;
    font-weight: 500;
  }
  
  .tabcontent {
    display: none;
    padding: 20px 0;
  }
  
  /* Styles pour la signature */
  .signature-pad {
    border: 2px dashed #ccc;
    border-radius: 8px;
    width: 250px;
    height: 150px;
    cursor: crosshair;
    background-color: #fff;
    display: block;
    margin: 0 auto 20px auto;
  }
  
  .signature-container {
    text-align: center;
  }
  
  .signature-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .signature-buttons .btn {
    margin-top: 10px;
  }
  
  @media (max-width: 768px) {
    .signature-pad {
      width: 100%;
      max-width: 250px;
    }
  }
  
  /* Styles des boutons */
  .clear-btn, .save-btn {
    /* Styles déjà définis dans .btn */
  }
  
  .clear-btn {
    background-color: #95a5a6;
  }
  
  .clear-btn:hover {
    background-color: #7f8c8d;
  }
  
  .navigation-buttons {
    text-align: center;
    margin-top: 20px;
  }
  
  .prev-btn {
    background-color: #95a5a6;
  }
  
  .prev-btn:hover {
    background-color: #7f8c8d;
  }
  
  .next-btn {
    background-color: #2ecc71;
  }
  
  .next-btn:hover {
    background-color: #27ae60;
  }
  
  .create-pdf-btn {
    background-color: #3498db;
  }
  
  .create-pdf-btn:hover {
    background-color: #2980b9;
  }
  
  /* Animation de chargement */
  .loading-animation {
    text-align: center;
    margin-top: 20px;
  }
  
  .loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
  }
  
  @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  
  /* Message de remerciement */
  .thank-you-message {
    text-align: center;
  }
  
  .thank-you-message h2 {
    margin-bottom: 20px;
  }
  
  .thank-you-message p {
    margin-bottom: 20px;
  }
  
  .download-btn {
    background-color: #2ecc71;
  }
  
  .download-btn:hover {
    background-color: #27ae60;
  }

    /* Centrer le bouton Valider */
    .submit-btn {
        display: block;
        margin: 0 auto; /* Centre le bouton horizontalement */
    }
  

/* Appliquer les styles au conteneur principal de Select2 */
.select2-container .select2-selection--single {
    margin-bottom: 20px;
    width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    font-size: 1em !important;
    transition: all 0.3s ease !important;
    height: auto !important; /* S'assurer que la hauteur est cohérente */
  }
  
  /* Appliquer les styles à la zone affichant l'option sélectionnée */
  .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    font-size: 1em !important;
    line-height: 1.5 !important; /* Ajuster la hauteur de ligne pour correspondre aux autres éléments */
  }
  
  /* Appliquer les styles à la flèche de Select2 */
  .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 35% !important;
    transform: translateY(-50%) !important;
  }
  
  /* Style pour le focus, similaire aux autres éléments */
  .select2-container .select2-selection--single:focus {
    border-color: #3498db !important;
    outline: none !important;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.2) !important;
  }
  
  /* Appliquer les styles au menu déroulant */
  .select2-dropdown {
    border-radius: 8px !important;
    border: 1px solid #ccc !important;
    font-size: 1em !important;
  }
  
  /* Styles pour les options dans la liste déroulante */
  .select2-results__option {
    padding: 12px 15px !important;
    font-size: 1em !important;
  }
  
  /* Ajuster la couleur du fond et de la bordure lors du focus */
  .select2-container--default .select2-selection--single:focus {
    border-color: #3498db !important;
  }
  
  
/* Keyframes */
@keyframes slideInFromRight {
    from { transform: translateX(120%); opacity: 0;}
    to { transform: translateX(0); opacity: 100; }
  }
  
  @keyframes slideOutToLeft {
    from { transform: translateX(0); opacity: 100; }
    to { transform: translateX(-120%); opacity: 0; }
  }
  
  @keyframes slideInFromLeft {
    from { transform: translateX(-120%); opacity: 0; }
    to { transform: translateX(0); opacity: 100;}
  }
  
  @keyframes slideOutToRight {
    from { transform: translateX(0); opacity: 100; }
    to { transform: translateX(120%); opacity: 0; }
  }

/* Animation classes */
.step.animate-in-from-right {
    animation: slideInFromRight 0.5s forwards;
  }
  
  .step.animate-out-to-left {
    animation: slideOutToLeft 0.5s forwards;
  }
  
  .step.animate-in-from-left {
    animation: slideInFromLeft 0.5s forwards;
  }
  
  .step.animate-out-to-right {
    animation: slideOutToRight 0.5s forwards;
  }


/* Étapes */
.step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: none;
    opacity: 0;
  }
  
  .step.active-step {
    display: block;
    opacity: 1;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    h1 {
      font-size: 1.5em;
    }

    h2{
      font-size: 1.2em;
    }

    .user-form, #pdf-form {
      padding: 20px;
    }
  
    .btn {
      width: 100%;
      margin-bottom: 10px;
    }
  
    .navigation-buttons {
      display: flex;
      flex-direction: column;
    }
  
    .tab button {
      width: 50%;
    }
  }
  
  .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
  }
  