/* ===================================
   Safar - CSS
   Template Front-End
   ================================== */

/* Variables CSS pour le Design System */
:root {
    /* Couleurs principales */
    --primary-color: #0EACB8;
    --primary-light: #48CAE4;
    --primary-dark: #1169a7;

    /* Couleurs secondaires */
    --secondary-color: #EE7044 ;
    --secondary-light: #fbbf24;
    --secondary-dark: #d97706;

    /* Couleurs neutres */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Couleurs d'Ã©tat */
    --success-color: #28A745;
    --warning-color: #FD7E14;
    --danger-color: #DC3545;
    --info-color: #1169a7;


    /* Typographie */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Espacement */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Bordures et ombres */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
  }
  .header-chat{
      text-align: center;
      padding: 2rem 1rem;
      background-color: var(--primary-color);
      color: white;

  }

  .header-chat h1{
      font-size: 2rem;
      font-weight: 800;
      margin-bottom: 1rem;
  }
  .header-chat h2{
      font-size: 1.2rem;
      font-weight: 400;
  }
  /* Reset et base */
  * {
    box-sizing: border-box;
  }
  .bg-primary {
    background-color: var(--primary-color) !important;
  }
  .mya.bg-primary {

    background-color:rgba(0, 124, 145, 0.3) !important;
    padding: 4px 4px 0 4px !important  ;
  }
  .mya.bg-primary img{
      border-radius: 50% !important;
  }

  .bg-primary:hover {
    background-color: var(--primary-color) !important;
  }
  .bg-primary:active {
    background-color: var(--primary-dark) !important;
  }
  .bg-primary:focus {
    background-color: var(--primary-dark) !important;
  }
  .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--primary-color) !important;
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0077a3;
    --bs-btn-hover-border-color: #006f99;
    --bs-btn-focus-shadow-rgb: 0 , 124, 145;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #006f99;
    --bs-btn-active-border-color: #00678f;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--primary-color);
    --bs-btn-disabled-border-color: var(--primary-color);
  }
  .btn-outline-primary {
   color: var(--primary-color) !important;;
   border: 1px solid var(--primary-color) !important;
   background-color: white;
  }
  .btn-outline-primary:hover {
   background-color:var(--primary-color) !important;
   border: var(--primary-color);
   color:white !important;
  }
  .btn-safar-cta{
    background-color:#FF8A33;
    border: #FF8A33;
    color:white;
  }
  .btn-safar-cta:hover{
    color:#FF8A33 !important;

   background-color:white;
  }
  .btn-outline-safar-cta:hover{
    background-color:#FF8A33 ;
    border:1px solid #FF8A33;
    color:white;
  }
  .btn-outline-safar-cta{
    color:#FF8A33 ;
    border:1px solid #FF8A33 !important;

    background-color:white;
  }

  .btn-safar-cta-stop{
        background-color:#dc3546;
        border: #dc3546;
        color:white;
    }

  body {
    background-color: #fdf4e5;
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden !important ;
  }

  /* ===================================
     NAVIGATION
     ================================== */

  .nav-link::after{
    content: none !important;
    display: none !important;
  }
  /* SÃ©lecteur de langue */
  #languageDropdown {

    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  #languageDropdown .bi-globe {
    font-size: 1rem;
  }

  .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    padding: 8px 0;
    min-width: 60px;
  }

  .dropdown-item {
    padding: 10px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
  }

  .dropdown-item:hover {
    background-color: rgba(0, 124, 145, 0.1);
    color: var(--primary-color);
  }

  .dropdown-item.active {
    background-color: rgba(0, 124, 145, 0.15);
    color: var(--primary-color);
    font-weight: 600;
  }

  .dropdown-item .bi-flag {
    font-size: 1.1rem;
    color: var(--primary-color);
  }

  /* Responsive pour le sÃ©lecteur de langue */
  @media (max-width: 768px) {
     .header-chat h1{
         font-size: 1.2rem;
         font-weight: 800;
         margin-bottom: 0.5rem;
     }
      .header-chat h2{
          font-size: 0.8rem;
          font-weight: 400;
      }
    #languageDropdown {
      min-width: 60px;
      font-size: 0.85rem;
      padding: 0.4rem 0.6rem;
    }

    #languageDropdown .bi-globe {
      font-size: 0.9rem;
    }

    .dropdown-menu {
      min-width: 60px;
    }

    .dropdown-item {
      font-size: 0.9rem;
      padding: 8px 12px;
    }
  }

  .navbar {
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
  }

  .navbar-brand {
    font-size: var(--font-size-xl);
    transition: var(--transition-fast);
  }

  .navbar-brand:hover {
    transform: scale(1.05);
  }

  /* ===================================
     INTERFACE CHAT MODERNE
     ================================== */

  .modern-chat-section {
    padding: 24px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 50%;
  }
  /* ===================================
     CONTAINER DE CHAT MODERNE
     ================================== */

  .modern-chat-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
    min-height: 50%;
  }

  .modern-chat-messages {
    flex: 1;
    /*padding: 24px;*/
    overflow-y: auto;
    background: linear-gradient(to bottom, #f8f9fa 0%, white 20%);
  }
  .modern-chat-messages h2{
    font-size: 1.2rem;
    font-weight: 700;
  }
  .modern-chat-messages h3{
    font-size: 1rem;
    font-weight: 600;
  }

  /* Container pour le scroll horizontal */
  .modern-chat-messages .table-responsive {
    width: 95%;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling sur iOS */
    margin: 20px 0;
  }

  /* Styles de base du tableau */
  .modern-chat-messages .table {
    width: 100%;
    min-width: 600px; /* Largeur minimale pour Ã©viter que le tableau soit trop compressÃ© */
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
  }

  /* Bordures du tableau */
  .modern-chat-messages .table-bordered {
    border: 1px solid #ddd;
  }

  .modern-chat-messages .table-bordered th,
  .modern-chat-messages .table-bordered td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
  }

  /* En-tÃªte du tableau */
  .modern-chat-messages .table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    white-space: nowrap; /* Ã‰vite le retour Ã  la ligne dans les en-tÃªtes */
  }

  /* Corps du tableau */
  .modern-chat-messages .table tbody tr {
    background-color: #fff;
    transition: background-color 0.2s ease;
  }

  .modern-chat-messages.table tbody tr:hover {
    background-color: #f5f5f5;
  }

  .modern-chat-messages .table tbody td {
    color: #555;
  }

  /* Responsive pour petits Ã©crans */
  @media screen and (max-width: 768px) {
    .modern-chat-messages .table {
      font-size: 13px;
      min-width: 500px;
    }

    .modern-chat-messages .table-bordered th,
    .modern-chat-messages .table-bordered td {
      padding: 10px 12px;
    }
  }

  @media screen and (max-width: 480px) {
    .modern-chat-messages .table {
      font-size: 12px;
      min-width: 450px;
    }

    .modern-chat-messages .table-bordered th,
    .modern-chat-messages .table-bordered td {
      padding: 8px 10px;
    }
  }

  /* Indicateur visuel pour le scroll */
  .modern-chat-messages .table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(255,255,255,0.9), rgba(255,255,255,0));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .modern-chat-messages.table-responsive:not(:hover)::after {
    opacity: 1;
  }

  /* Style de la scrollbar (pour navigateurs WebKit) */
  .modern-chat-messages .table-responsive::-webkit-scrollbar {
    height: 8px;
  }

  .modern-chat-messages.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .modern-chat-messages .table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }

  .modern-chat-messages .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

  /* ===================================
     MESSAGES MODERNES
     ================================== */

  .modern-message-wrapper {
    margin-bottom: 24px;
    display: flex;
    animation: slideInMessage 0.4s ease-out;
  }

  .modern-message-wrapper.bot {
    justify-content: flex-start;
  }

  .modern-message-wrapper.user {
    justify-content: flex-end;
  }

  .modern-message {
    display: flex;
    gap: 12px;
    max-width: 95%;
  }

  .modern-message-wrapper.user .modern-message {
    flex-direction: row-reverse;
  }

  .message-avatar-modern {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .message-avatar-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .message-bubble {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-100);
    max-width: 98%;
  }

  .modern-message-wrapper.user .message-bubble {
    background:rgba(0, 124, 145, 0.1);
    color:rgb(0, 0, 0);
  }

  .message-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
  }

  .modern-message-wrapper.user .message-author {
    border-bottom-color: var(--primary-color);
  }

  .author-badge {
    background: rgba(0, 124, 145, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
  }

  .modern-message-wrapper.user .author-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--gray-700);
  }

  .message-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-700);
  }

  .modern-message-wrapper.user .message-body {
    color: var(--gray-700);
  }

  .welcome-intro {
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 1px;
  }

  /* ===================================
     OPTIONS DE VISITEUR MODERNES
     ================================== */

  .visitor-options-modern {
    margin-top: 0px;
    padding: 8px;
    background: rgb(249, 250, 251);
    border-radius: 12px;
  }

  .options-label {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    font-size: 0.95rem;
  }

  .options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }

  .option-btn {
    background: white;
    border: 2px solid var(--gray-200);

    border-radius: 12px;
    width: auto;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
  }

  .option-btn i {
    font-size: 1rem;
    color: var(--primary-color);
  }

  .option-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 145, 0.2);
  }

  .option-btn:hover i {
    color: white;
  }

  .option-btn.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
  }

  .option-btn.selected i {
    color: white;
  }

  .sub-options-container {
    margin-top: 12px;
  }

  /* ===================================
     ZONE DE SAISIE MODERNE
     ================================== */

  .modern-input-zone {
    padding: 20px 24px;
    background: white;
  }

  .modern-input-form {
    width: 100%;
  }

  .input-wrapper-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 8px 12px;
    border-radius: 50px;
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .input-wrapper-modern:focus-within {
    border:1px solid #007b91b2;
    box-shadow: 0 4px 16px rgba(0, 124, 145, 0.15);
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .icon-btn.voice {
    background: linear-gradient(135deg, #FF8A33 0%, var(--secondary-color) 100%);
    color: white;
  }

  .icon-btn.voice:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 138, 51, 0.3);
  }

  .icon-btn.send {
    background: linear-gradient(135deg, #FF8A33 0%, var(--secondary-color) 100%);
    color: white;
  }

  .icon-btn.send:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 12px rgba(0, 124, 145, 0.3);
    color:white !important;
  }

  .modern-text-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--gray-700);
    background: transparent;
    font-family: var(--font-primary);
    max-height: 300px ;
  }

  .modern-text-input::placeholder {
    color: var(--gray-400);
  }

  /* ===================================
     ANIMATIONS
     ================================== */

  @keyframes slideInMessage {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* ===================================
     ANCIEN STYLE (compatibilitÃ©)
     ================================== */

  /* Container principal du chat */
  .chat-container {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    min-height: 500px;
    max-height:650px;
    height: 100%;
    margin: 0rem 0;
  }

  /* ===================================
     FORMULAIRE CHAT MODERNE
     ================================== */

  .modern-chat-form {
    width: 100%;
  }

  .chat-form-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    padding: 12px 16px;
    border-radius: 60px;
    box-shadow: 0 8px 32px rgba(0, 124, 145, 0.12);
    border: 2px solid transparent;
    transition: all 0.3s ease;
  }

  .chat-form-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 12px 40px rgba(0, 124, 145, 0.2);
    transform: translateY(-2px);
  }

  .voice-btn {
    background: linear-gradient(135deg, #FF8A33 0%, var(--secondary-color) 100%);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 138, 51, 0.3);
  }

  .voice-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 138, 51, 0.4);
  }

  .voice-btn:active {
    transform: scale(0.95);
  }

  .modern-chat-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--gray-800);
    background: transparent;
    padding: 12px 8px;
    font-family: var(--font-primary);
  }

  .modern-chat-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
  }

  .send-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0098b3 100%);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 124, 145, 0.3);
  }

  .send-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(0, 124, 145, 0.4);
    color:white !important;
  }

  .send-btn:active {
    transform: scale(0.95) rotate(15deg);
  }

  /* Animation pour le bouton voice en mode actif */
  .voice-btn.active {
    animation: pulse-voice 1.5s infinite;
  }

  @keyframes pulse-voice {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 4px 12px rgba(255, 138, 51, 0.3);
    }
    50% {
      transform: scale(1.05);
      box-shadow: 0 6px 24px rgba(255, 138, 51, 0.5);
    }
  }

  /* Responsive pour le formulaire moderne */
  @media (max-width: 767.98px) {
    .chat-form-wrapper {
      padding: 10px 12px;
      gap: 8px;
      border-radius: 50px;
    }

    .voice-btn, .send-btn {
      width: 42px;
      height: 42px;
      font-size: 1rem;
    }

    .modern-chat-input {
      font-size: 0.95rem;
      padding: 10px 6px;
    }
  }

  /* Zone des messages */
  .chat-messages {
    padding: 2rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: var(--white);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
  }

  /* Wrapper des messages */
  .message-wrapper {
    margin-bottom: 1.5rem;
    animation: messageSlideIn 0.3s ease-out;
  }

  .message-wrapper:last-child {
    margin-bottom: 0;
  }


  /* ===================================
     RESPONSIVE CHAT MODERNE
     ================================== */

  @media (max-width: 991.98px) {


    .modern-chat-container {
      height: calc(100vh - 100px);
    }
  }

  @media (max-width: 767.98px) {
    .modern-chat-section {
      padding: 16px 0;
    }


    .selector-icon {
      width: 36px;
      height: 36px;
      font-size: 1rem;
    }

    .modern-select {
      font-size: 0.9rem;
      padding: 8px 12px;
    }

    .modern-chat-container {
      border-radius: 16px;
      height: 90%;
    }

    .modern-message {
      max-width: 99%;
    }

    .message-avatar-modern {
      display:none;
      width: 36px;
      height: 36px;
    }

    .message-bubble {
      padding: 12px 16px;
      border-radius: 12px;
    }

    .message-body {
      font-size: 0.9rem;
    }

    .options-grid {
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 8px;
    }

    .option-btn {
      padding: 4px 6px;
      font-size: 0.7rem;
      margin-bottom: 5px;
    }

    .option-btn i {
      font-size: 0.9rem;
    }

    .modern-input-zone {
      padding: 16px;
    }

    .input-wrapper-modern {
      padding: 6px 10px;
      gap: 10px;
    }

    .icon-btn {
      width: 36px;
      height: 36px;
    }

    .modern-text-input {
      font-size: 0.9rem;
      padding: 8px 10px;
    }
  }

  @media (max-width: 575.98px) {
    .options-grid {
      grid-template-columns: 1fr;
      gap: 6px;
    }

    .modern-chat-container {
      height: 90%;
    }

    .visitor-options-modern {
      padding: 12px;
    }
  }


  /* Animations */
  @keyframes messageSlideIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Indicateur de frappe */
  .typing-indicator-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
  }

  .typing-indicator-message {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) var(--border-radius-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .typing-dots {
    display: flex;
    gap: 0.25rem;
  }

  .typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray-400);
    animation: typingBounce 1.4s infinite ease-in-out;
  }

  .typing-dot:nth-child(1) { animation-delay: -0.32s; }
  .typing-dot:nth-child(2) { animation-delay: -0.16s; }
  .typing-dot:nth-child(3) { animation-delay: 0s; }

  @keyframes typingBounce {
    0%, 80%, 100% {
      transform: scale(0.8);
      opacity: 0.5;
    }
    40% {
      transform: scale(1);
      opacity: 1;
    }
  }

  /* ===================================
     CHATBOT FLOTTANT (pour autres pages)
     ================================== */

  .chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1050;
  }

  .chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
  }

  .chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
  }

  .chatbot-input {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
  }

  .chatbot-input .form-control {
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    padding: 0.75rem 1rem;
  }

  .chatbot-input .btn {
    border-radius: 50px;
    padding: 0.75rem 1rem;
  }

  /* Animation pour le chatbot */
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
      box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
  }

  /* Typing indicator */
  .typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
  }

  .typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray-400);
    animation: typing 1.4s infinite ease-in-out;
  }

  .typing-dot:nth-child(1) { animation-delay: -0.32s; }
  .typing-dot:nth-child(2) { animation-delay: -0.16s; }

  @keyframes typing {
    0%, 80%, 100% {
      transform: scale(0.8);
      opacity: 0.5;
    }
    40% {
      transform: scale(1);
      opacity: 1;
    }
  }

  @media (max-width: 991.98px) {
    .navbar-collapse {
      margin-top: 1rem;
      padding-top: 1rem;
      border-top: 1px solid var(--gray-200);
    }

  }

  /* AmÃ©liorations pour tablettes */
  @media (min-width: 768px) and (max-width: 991.98px) {

    .chatbot-window {
      width: 360px;
    }
  }

  /* Desktop et Ã©crans larges */
  @media (min-width: 1200px) {
    .container {
      max-width: 1140px;
    }
  }

  /* ===================================
     ANIMATIONS ET TRANSITIONS
     ================================== */

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  /* Loading spinner pour les Ã©tats de chargement */
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  /* ===================================
     ACCESSIBILITÃ‰
     ================================== */

  /* Focus visible pour la navigation au clavier */
  .btn:focus-visible,
  .form-control:focus-visible,
  .form-select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }

  /* AmÃ©lioration du contraste pour les liens */
  a {
    color: var(--primary-color);
  }

  a:hover {
    color: var(--primary-dark);
  }


  /* ===================================
     PRINT STYLES
     ================================== */

  @media print {
    .chatbot-container,
    .navbar,
    .hero-section,
    .btn,
    .filter-tabs {
      display: none !important;
    }

    .activity-card,
    .card {
      break-inside: avoid;
      box-shadow: none;
      border: 1px solid var(--gray-300);
    }

    body {
      font-size: 12pt;
      line-height: 1.4;
    }

    h1, h2, h3, h4, h5, h6 {
      color: var(--gray-900);
    }
  }


  /* Animation d'apparition */
  @keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
  }

  /* ====================================
     SCROLLBARS MODERNES - THÃˆME SAFAR
     ==================================== */

  /* Pour les navigateurs WebKit (Chrome, Safari, Edge) */
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  ::-webkit-scrollbar-track {
    background: rgba(0, 124, 145, 0.05);
    border-radius: 10px;
  }

  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 124, 145, 0.4);
  }

  ::-webkit-scrollbar-thumb:active {
    background: var(--primary-dark);
    box-shadow: 0 0 15px rgba(0, 124, 145, 0.6);
  }

  /* Scrollbar pour la zone de chat (plus fine et discrÃ¨te) */
  .modern-chat-messages::-webkit-scrollbar {
    width: 3px;
  }

  .modern-chat-messages::-webkit-scrollbar-track {
    background: transparent;
  }

  .modern-chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(72, 202, 228, 0.6) 0%, rgba(0, 124, 145, 0.6) 100%);
    border-radius: 6px;
    border: none;
  }

  .modern-chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(72, 202, 228, 0.9) 0%, rgba(0, 124, 145, 0.9) 100%);
    box-shadow: 0 0 8px rgba(72, 202, 228, 0.4);
  }

  /* Scrollbar pour la sidebar (suggestions) */
  .modern-sidebar::-webkit-scrollbar {
    width: 3px;
  }

  .modern-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 124, 145, 0.03);
    border-radius: 6px;
  }

  .modern-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #48CAE4 0%, var(--primary-color) 100%);
    border-radius: 6px;
  }

  .modern-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-color) 0%, #1169a7 100%);
    box-shadow: 0 0 8px rgba(0, 124, 145, 0.3);
  }

  /* Pour Firefox */
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 124, 145, 0.05);
  }

  .modern-chat-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 124, 145, 0.6) transparent;
  }

  .modern-sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 124, 145, 0.03);
  }

  /* Scrollbar avec effet smooth */
  html {
    scroll-behavior: smooth;
  }

  /* Personnalisation pour les modales ou containers spÃ©cifiques */
  .modal-body::-webkit-scrollbar,
  .dropdown-menu::-webkit-scrollbar {
    width: 3px;
  }

  .modal-body::-webkit-scrollbar-thumb,
  .dropdown-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #48CAE4 0%, var(--primary-color) 100%);
    border-radius: 6px;
  }

  .modal-body::-webkit-scrollbar-thumb:hover,
  .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-color) 0%, #1169a7 100%);
  }

  /* Style pour les zones avec overflow horizontal */
  .overflow-x-auto::-webkit-scrollbar {
    height: 6px;
  }

  .overflow-x-auto::-webkit-scrollbar-track {
    background: rgba(0, 124, 145, 0.05);
    border-radius: 6px;
  }

  .overflow-x-auto::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #48CAE4 0%, var(--primary-color) 100%);
    border-radius: 6px;
  }

  .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--primary-color) 0%, #1169a7 100%);
  }

  /* Animation subtile au scroll (optionnel) */
  @keyframes scrollGlowSafar {
    0%, 100% {
        box-shadow: 0 0 5px rgba(72, 202, 228, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(72, 202, 228, 0.6);
    }
  }
  @media (min-width: 1200px) {
    .container {
      max-width: 1320px;
    }
  }

  /* ===================================
     Text-to-Speech Button Styles
     ================================== */

  .tts-message-btn {
    transition: all var(--transition-fast);
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 0.375rem 0.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    margin-right: 0.25rem;
  }

  .tts-message-btn:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: scale(1.05);
  }

  .tts-message-btn:active {
    transform: scale(0.95);
  }

  .tts-message-btn.tts-loading {
    pointer-events: none;
    background: var(--primary-color);
    color: var(--white);
    animation: tts-loading-pulse 1s ease-in-out infinite;
  }

  .tts-message-btn.tts-loading i {
    animation: tts-loading-wave 0.6s ease-in-out infinite alternate;
  }

  @keyframes tts-loading-pulse {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 14, 172, 184), 0.4);
    }
    50% {
      transform: scale(1.1);
      box-shadow: 0 0 0 8px rgba(var(--primary-rgb, 14, 172, 184), 0);
    }
  }

  @keyframes tts-loading-wave {
    0% {
      transform: scaleY(0.8);
      opacity: 0.7;
    }
    100% {
      transform: scaleY(1.2);
      opacity: 1;
    }
  }

  .tts-message-btn.tts-playing {
    background: var(--primary-color);
    color: var(--white);
    animation: pulse-tts 1.5s ease-in-out infinite;
  }

  .tts-message-btn.tts-playing:hover {
    background: var(--danger-color);
  }

  .tts-message-btn.tts-paused {
    background: var(--warning-color, #f59e0b);
    color: var(--white);
  }

  .tts-message-btn.tts-paused:hover {
    background: var(--primary-color);
  }

  /* ========================================
     TTS AVATAR POPUP STYLES
     ======================================== */

  .tts-avatar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
  }

  .tts-avatar-overlay.visible {
    opacity: 1;
  }

  .tts-avatar-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
  }

  .tts-avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(var(--primary-rgb, 79, 70, 229), 0.2);
    background: transparent;
  }

  .tts-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
  }

  /* Speaking state - static glow effect (no vibration) */
  .tts-avatar-wrapper.speaking {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 50px rgba(var(--primary-rgb, 79, 70, 229), 0.3);
  }

  /* Paused state */
  .tts-avatar-wrapper.paused {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(var(--primary-rgb, 79, 70, 229), 0.2);
  }

  /* Speaking indicator */
  .tts-avatar-speaking-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    backdrop-filter: blur(10px);
  }

  .tts-avatar-speaking-indicator span {
    width: 4px;
    height: 16px;
    background: var(--primary-color, #4f46e5);
    border-radius: 2px;
    animation: sound-wave 0.5s ease-in-out infinite;
  }

  .tts-avatar-speaking-indicator span:nth-child(1) { animation-delay: 0s; }
  .tts-avatar-speaking-indicator span:nth-child(2) { animation-delay: 0.1s; }
  .tts-avatar-speaking-indicator span:nth-child(3) { animation-delay: 0.2s; }
  .tts-avatar-speaking-indicator span:nth-child(4) { animation-delay: 0.3s; }
  .tts-avatar-speaking-indicator span:nth-child(5) { animation-delay: 0.15s; }

  .tts-avatar-speaking-indicator.paused span {
    animation-play-state: paused;
  }

  /* Stop button - compact and visible */
  .tts-avatar-stop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-top: 16px;
    background: var(--danger-color, #ef4444);
    color: white;
    border: 2px solid white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 3px 15px rgba(239, 68, 68, 0.4);
  }

  .tts-avatar-play-pause-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-top: 16px;
    background: var(--warning-color, #FD7E14);
    color: white;
    border: 2px solid white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 3px 15px rgba(239, 68, 68, 0.4);
  }

  .tts-avatar-play-pause-btn.pause{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-top: 16px;
    background: var(--success-color, #28A745);
    color: white;
    border: 2px solid white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 3px 15px rgba(239, 68, 68, 0.4);
  }

  .tts-avatar-stop-btn i,
  .tts-avatar-play-pause-btn i {
    font-size: 14px;
  }



  .tts-avatar-play-pause-btn:hover {

    transform: scale(1.05);

  }


  .tts-avatar-stop-btn:active,
  .tts-avatar-play-pause-btn:active {
    transform: scale(0.95);
  }

  /* Animations */
  @keyframes sound-wave {
    0%, 100% {

      opacity: 0.5;
    }
    50% {

      opacity: 1;
    }
  }

  /* Responsive */
  @media (max-width: 480px) {
    .tts-avatar-wrapper {
      width: 150px;
      height: 150px;
    }

    .tts-avatar-speaking-indicator {
      padding: 6px 12px;
    }

    .tts-avatar-speaking-indicator span {
      width: 3px;
      height: 12px;
    }
  }

  /* Voice Input Button Styles */
  .btn-voice-input {
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-600);
  }

  .btn-voice-input:hover {
    background: var(--gray-200);
    color: var(--primary-color);
  }

  .btn-voice-input:active {
    transform: scale(0.95);
  }

  .btn-voice-input.recording {
    background: var(--danger-color);
    color: white;
    animation: pulse-recording 1s ease-in-out infinite;
  }

  .btn-voice-input.recording:hover {
    background: #c82333;
  }

  .btn-voice-input.processing {
    background: var(--primary-color);
    color: white;
    cursor: wait;
  }

  .btn-voice-input.processing i {
    animation: spin 1s linear infinite;
  }

  .btn-voice-input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  @keyframes pulse-recording {
    0%, 100% {
      box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
      box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
  }

  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes pulse-tts {
    0%, 100% {
      box-shadow: 0 0 0 0 rgba(14, 172, 184, 0.4);
    }
    50% {
      box-shadow: 0 0 0 8px rgba(14, 172, 184, 0);
    }
  }

  @media (min-width: 1200px) {
    .container {
      max-width: 1320px;
    }
  }

  @include color-mode(dark) {

        .visitor-options-modern {
            margin-top: 0px;
            padding: 8px;
            background: var(--gray-50);
            border-radius: 12px;
        }

  }
