/* Reset et base responsive */
* {
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style-type: none;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-color: #dde3ef;
    min-width: 320px;
    font-size: 16px;
}

/* Structure principale responsive */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.main-content {
    flex: 1;
    width: 100%;
    padding: 1rem;
}

/* Couleurs et typographie */
.bg-perso {
    background-color: #14345efb;
    color: white;
}

.color-perso {
    color: #14345efb;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.out-text {
    font-family: Montserrat, sans-serif;
}

.bg-perso-white, .bg-whites {
    background-color: white;
}

.text-persos {
    font-style: italic;
    color: #4f5454fb;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.text-perso {
    color: #cecfcffb;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.text-color {
    color: #6d7777fb;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.bg-footer {
    background-color: #36393dfb;
}

/* Cartes responsive */
.card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
    margin-bottom: 1rem;
}

/* Bouton service client responsive */
.client-service {
    position: fixed;
    bottom: 4%;
    right: 20px;
    background-color: #e4ad18;
    padding: clamp(8px, 2vw, 12px);
    border-radius: 50%;
    color: #14345efb;
    font-size: clamp(20px, 4vw, 24px);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
}

.client-service:hover {
    background-color: #d6bb23;
}

/* Utilitaires texte */
.capitalize-first-letter::first-letter {
    text-transform: uppercase;
}

.custom-hover:hover {
    color: #e4ad18 !important;
}

/* Boutons responsive - Version optimisée pour éviter l'étirement */
.btn-outline-perso,
.btn-perso-whatsapp,
.btn-perso-outline,
.btn-perso-primary {
    font-weight: bold;
    border-radius: 8px;
    padding: 0.5rem 1.25rem; /* Padding fixe pour éviter l'étirement */
    transition: all 0.3s ease-in-out;
    display: inline-block;
    min-width: fit-content;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 1rem; /* Taille fixe */
    margin: 0.25rem;
    text-align: center;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}

.btn-outline-perso {
    color: #cecfcffb;
    border: 2px solid #14345efb;
    background-color: #254268fb;
}

.btn-outline-perso:hover {
    color: rgb(192, 188, 188);
    background-color: #2e4f7afb;
    border-color: #254268fb;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-perso-outline {
    color: #e4ad18;
    border: 2px solid #e4ad18;
    background-color: transparent;
}

.btn-perso-outline:hover {
    box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.2);
}

.btn-perso-primary {
    background-color: #e4ad18;
    border: 2px solid #e4ad18;
    color: black;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-perso-primary:hover {
    background-color: #bb9223;
    border-color: #bb9223;
    color: #f7f2f2;
}
.btn-perso-whatsapp {
    background-color: #25D366;
    border: 2px solid #25D366;
    color: black;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-perso-whatsapp:hover {
    background-color: #25D366;
    border-color: #25D366;
    color: #f7f2f2;
}

/* Navigation par étapes responsive */
.step-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.step-nav-item {
    cursor: pointer;
    padding: 0.5rem 1rem; /* Padding réduit */
    border-radius: 5px;
    font-size: 0.9rem; /* Taille fixe */
    text-align: center;
    flex-grow: 1;
    min-width: 120px;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-nav-item.bg-perso {
    background-color: #14345efb;
}

.step-nav-item.bg-secondary {
    background-color: #6c757d;
}

.step {
    margin-top: 1rem;
}

/* Tableaux responsive */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    overflow-x: auto;
    display: block;
}

.styled-table th, .styled-table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Media Queries spécifiques */
@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
    }
    
    .step-navigation {
        flex-direction: column;
    }
    
    .step-nav-item {
        width: 100%;
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .styled-table {
        display: block;
        overflow-x: auto;
    }
    
    /* Boutons légèrement plus petits sur mobile */
    .btn-outline-perso,
    .btn-perso-whatsapp,    
    .btn-perso-outline,
    .btn-perso-primary {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .client-service {
        right: 10px;
        bottom: 2%;
        font-size: 18px;
        padding: 10px;
    }
    
    /* Boutons encore plus compacts sur très petits écrans */
    .btn-outline-perso,
    .btn-perso-whatsapp,
    .btn-perso-outline,
    .btn-perso-primary {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Styles pour les champs de formulaire */
.form-check {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    font-size: 1rem;
}

/* Styles spécifiques pour les selects */
/* .custom-select select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: white;
    font-size: 1rem;
} */

/* Validation */
.is-invalid {
    border-color: red;
    background-color: #f8d7da;
}

.is-valid {
    border-color: rgb(51, 160, 15);
    background-color: #def3c0;
}

/* Modales */
.modal-content {
    border-radius: 0.5rem;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Styles pour les messages d'alerte */
.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.step-nav-item {
    font-size: clamp(0.8rem, 2vw, 0.8rem);
}
/* WhatsApp Widget Styles */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
    /* Garantit la position même avec scrolling */
    transform: translateZ(0);
    will-change: transform;
    z-index: 99999;
}
  
.whatsapp-icon {
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid white;
    /* Positionnement absolu par rapport au widget */
    position: relative;
    right: 0;
}
  
  .whatsapp-icon:hover {
    transform: scale(1.1);
    background-color: #128C7E;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  }
  
  .chat-window {
    display: none;
    flex-direction: column;
    width: 320px;
    height: 450px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    border: 1px solid #e0e0e0;
  }
  .chat-window {
    /* Positionnement par rapport à l'icône */
    position: absolute;
    bottom: 100px;
    right: 0;
}
.whatsapp-widget {
    left: auto !important;
    right: 30px !important;
}

  .chat-header {
    background-color: #14345efb;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
  }
  
  .chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #ece5dd;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  }
  
  .message {
    margin-bottom: 12px;
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 8px;
    word-wrap: break-word;
    font-size: 1rem;
    line-height: 1.4;
    position: relative;
  }
  
  .message.received {
    background-color: white;
    align-self: flex-start;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  }
  
  .message.sent {
    background-color: #DCF8C6;
    align-self: flex-end;
    border-top-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  }
  
  .chat-input {
    display: flex;
    padding: 8px;
    border-top: 1px solid #e0e0e0;
    background-color: white;
  }
  
  .chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
  }
  
  .send-btn {
    margin-left: 10px;
    padding: 10px 18px;
    background-color: #14345efb;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
  }
  
  .send-btn:hover {
    background-color: #054d44;
  }
  
  /* Animation */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .message {
    animation: fadeIn 0.3s ease-out;
  }
  
  /* Scrollbar personnalisée */
  .chat-messages::-webkit-scrollbar {
    width: 6px;
  }
  
  .chat-messages::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
  }
  
  .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
  }
  
  /* Responsive */
  @media (max-width: 480px) {
    .whatsapp-widget {
      bottom: 20px;
      right: 15px;
    }
    
    .whatsapp-icon {
      width: 54px;
      height: 54px;
      font-size: 26px;
    }
    
    .chat-window {
      width: calc(100vw - 80px);
      right: 5px;
      bottom: 20px;
      height: 60vh;
    }
  }