/* styles.css */
@font-face {
    font-family: 'Zaghawa Beria';
    src: url('/static/fonts/ZaghawaBeria.woff2') format('woff2'),
         url('/static/fonts/ZaghawaBeria.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@keyframes alterner {
    0%, 50% { opacity: 1; }
    50.1%, 100% { opacity: 0; }
  }
  button{
    width: 6em;
    


  }
  
  audio {
    width: clamp(7em, 12vw, 16em); /* min 8em, adaptatif jusqu’à 16em */
    height: 2em;
    max-width: 100%;
    display: block;
    margin: auto;
  }
  
  
    
    

  
  .texte-alterne {
    /*animation: alterner 4s infinite;*/
        display: grid; 
       
           
  }
  
  .texte-alterne span {
    
    opacity: 0;
    transition: opacity 4s ease-in-out;

    
  }
  .texte-alterne span.active {
    position: absolute;
    opacity: 1;
    
  }
  
/*@font-face {
    font-family: 'Zaghawa Beria';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/ZaghawaBeria.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }*/

html{
height: 90vh;
}
body {
    /*font-family: 'Roboto', sans-serif;*/
    top: 0 !important; /* Corriger l'espace laissé par la barre */
    color: #070707;
    width:100vw
    
    
    
}

main{
    position: relative;
    
    z-index: 2;

}
.tete{
    margin-top: 0;
    position: fixed;
    width: 100%;
    z-index: 3;

    
}
header { 
    position:relative;
    background-color: #333;
    color: #fff;
    width: 100%;
    z-index: 3;
    margin-top: 0;
    padding-top: 10px;
    
}

header h1 {
    margin-top: 0;
    text-align: center;
}
nav {
    position:relative;
    justify-content: center;
    width: 100%;
    z-index: 3;
    height: auto;
}
ul.lang{
    margin-top: 10px;
    list-style-type: none;
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
    width: 100%;
}

section  {
    position: relative;
    
    border: solid 2px var(--color1);
    box-shadow: 10px 10px 10px var(--color1);
    background-color: #EEE;
    border-radius: 10px;
    margin:  50px;
    min-height: 90px;
}



section  h2 {
    position:relative;    
    background-color: #EEE;
    color:#007BFF;
    border-radius: 0 10px 0 0;
    height: 28px;
    line-height: 20px;
    margin-bottom: 10px;

}

ul > li > ul {

    font-weight:300;
 
}

 ul li.top1{


    font-weight: bold;

}
header h6,header h4 {
  text-align: left;
  font-size: clamp(0.8rem, 2vw, 1.8rem);
  line-height: 1.3;
  margin-bottom: 0.5rem;
  font-family: serif;


}
li span.spanb {
    font-weight:500
}
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: Arial, sans-serif;
}
body.ltr {
    direction: ltr;
    text-align: left;
    font-family: Arial, sans-serif;
}



nav ul li {
    
    color: #ffffff;
    justify-content: center;
    
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
}

section {
    padding: 2rem 1rem;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    height: 30px;
    padding-bottom: 0px;
    direction: ltr;
    

}
.zaghawa {
    font-family: 'Zaghawa Beria';
}
.latin{
    font-family: 'arial';
}
/*#keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
  }
  
  .row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
  }
  
  .key.cle {
    font-size: 20px;
    padding: 20px;
    margin: 5px;
    width: 50px;
    height: 50px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .key:hover {
    background-color: #ddd;
  }
  
  .key.shift {
    width: 80px;
  }
  
  .key.backspace {
    width: 100px;
  }
  
  .key.space {
    width: 200px;
  }
  
  input {
    margin-top: 20px;
    padding: 10px;
    width: 300px;
    font-size: 18px;
  }
  .simple-keyboard .hg-button {
    font-family: 'Arial', sans-serif; Police personnalisée 
    font-size: 18px; /* Taille de la police 
}*/
#keyboard {
    margin-top: 20px;
    
}
#output {
    font-size: 16px;
    padding: 10px;
   
    margin: 20px;
}
.chat-message-input {
    width: 100%;
    min-height: 1.5em; /* hauteur d’une ligne */
    line-height: 1.5em;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 20px;
    box-sizing: border-box;
    overflow: hidden;
    resize: none;
    font-family: 'Zaghawa Beria'; /* Remplacez 'Arial' par la police de votre choix */
    
}
#chat-log div {
  margin-bottom: 6px;
  border-radius: 5px;
}
#chat-log {
  margin-bottom: 6px;
  background-image: url('/static/images/back.jpg');
  border-radius: 10px;
  background-size: cover;             /* ✅ couvre tout l'écran */
  background-position: center center; /* ✅ centrée */
  background-attachment: fixed;
  background-repeat: no-repeat;       /* ✅ pas de répétition */
}
  
  .simple-keyboard {
        width: 100%;
        display: none;
    
  }
  
  #lagchat,#lagchat1,#lagchat2{
    background-color: #e6b340;
  }
 #lagchat, .simple-keyboard .hg-button {
    font-family: 'Zaghawa Beria'; /* Remplacez 'Arial' par la police de votre choix */
}
.input-group{
  background: rgb(232, 5, 5);
  border-radius: 24px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  width: 100%;
  box-shadow: 0 2px 4px rgba(14, 13, 13, 0.1);
}

.username-form {
      margin-top: 20px;
      background: white;
      padding: 24px;
      border-radius: 12px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      text-align: center;
    }

    .username-form input {
      padding: 10px;
      font-size: 16px;
      width: 250px;
      margin-top: 10px;
      border: 1px solid #ccc;
      border-radius: 8px;
    }

    .username-form button {
      margin-top: 16px;
      padding: 10px 20px;
      background: #25D366;
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 16px;
    }

    /* Section principale */
section#contact {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', sans-serif;
}

/* Titre */
section#contact h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

/* Style des champs du formulaire */
section#contact form input,
section#contact form textarea,
section#contact form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    background-color: #fff;
}

/* Bouton submit */
section#contact button[type="submit"] {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

section#contact button[type="submit"]:hover {
    background-color: #0056b3;
}

/* Message de confirmation */
section#contact p {
    margin-top: 20px;
    color: green;
    font-weight: bold;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    section#contact {
        padding: 20px;
    }

    section#contact h2 {
        font-size: 22px;
    }

    section#contact form input,
    section#contact form textarea {
        font-size: 14px;
    }
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 15px;
  border-radius: 20px;
  position: relative;
  transition: background-color 0.3s ease;
  word-break: break-word;
}

.message-actions {
  background-color: #fff;
  display: none;
}


.message-text {
  flex: 1;
}

.message-container.selected .message-content {
  border: 2px solid lab(53.37% 21.92 -73.11);
  background-color: lab(32.92% 70.88 -85.67);
}
.message-content {
  background-color: #c2f899;
  color: #000;
  width: 50%;
}
.bubble {
  position: relative;
  padding: 10px 15px;
  border-radius: 20px;
  max-width: 75%;
  word-wrap: break-word;
  display: inline-block;
  font-size: 14px;
}

/* Bulle gauche (autres utilisateurs) */
.bubble-left {
  background-color: #ffffff;
  color: #000;
  border-color: #ffffff;
}

.bubble-left::before {
  content: "";
  position: absolute;
  top: 0px;
  left: -9px;
  width: 0;
  height: 0;
  /*border-top: 10px solid transparent;*/
  border-right: 10px solid rgba(255, 255, 255, 0.3);
  border-bottom: 10px solid transparent;
}

/* Bulle droite (moi) */
.bubble-right {
  background-color:#dcf8c6;
  color: #000;
}

.bubble-right::before {
  content: "";
  position: absolute;
  top: 0px;
  right: -10px;
  width: 0;
  height: 0;
 /* border-top: 10px solid transparent;*/
  border-left: 10px solid rgba(220, 248, 198, 0.5);
  border-bottom: 10px solid transparent;
}

.ms-right {
  background-color: #dcf8c6; /* Vert clair style WhatsApp */
  align-self: flex-end;
}

.ms-left {
  background-color: #ffffff; /* Blanc pour l'autre partie */
  align-self: flex-start;
}
.message-input {
    resize: none;
    overflow-y: hidden;
    transition: height 0.2s ease-out;
    line-height: 1.5;
    padding: 10px 15px;
    max-height: 120px;
  }
  .recording-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  padding: 12px 16px;
  border-radius: 24px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  max-width: 90%;
  animation: slide-up 0.3s ease-in-out;
}

.recording-animation {
  width: 12px;
  height: 12px;
  background-color: red;
  border-radius: 50%;
  animation: move-blink 1s infinite ease-in-out;
  position: relative;
}

@keyframes move-blink {
  0% {
    left: 0;
    opacity: 1;
  }
  10% {
    left: 10px;
    opacity: 0.3;
  }
  20% {
    left: 20px;
    opacity: 1;
  }
  30% {
    left: 30px;
    opacity: 1;
  }
  40% {
    left: 40px;
    opacity: 0.3;
  }
  50% {
    left: 50px;
    opacity: 1;
  }
  60% {
    left: 60px;
    opacity: 1;
  }
  70% {
    left: 70px;
    opacity: 0.3;
  }
  80% {
    left: 80px;
    opacity: 1;
  }
  90% {
    left: 90px;
    opacity: 1;
  }
  100% {
    left: 100px;
    opacity: 0.3;
  }
  
}

.recording-text {
  font-size: 14px;
  color: #333;
  flex: 1;
}

#recordButton  {
  margin-left: 8px;
  border: none;
  color: white;
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 40px;
  background-color: green;

}

#cancelRecording{width: 50px;
  background-color: white;
  color:red;
  width: 40px;
  margin: 10px;
  border: none;
}

#sendAudio{
  background-color: white;
  color: green;
  margin: 10px;
  border: none;
}

.cancel-btn:hover {
  background-color: #d32f2f;
}

.send-btn:hover {
  background-color: #388e3c;
}

@keyframes slide-up {
  from {
    transform: translateX(-50%) translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.recording-indicator {
  display: inline-flex;
  align-items: center;
  background-color: #0084ff;
  color: white;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  gap: 10px;
  max-width: 90%;
}

.sound-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 30px;
}

.bar {
  width: 4px;
  height: 10px;
  background: #007bff;
  animation: sound-wave 1s infinite ease-in-out;
}

.bar:nth-child(1) { animation-delay: 0.1s; }
.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.3s; }
.bar:nth-child(4) { animation-delay: 0.4s; }
.bar:nth-child(5) { animation-delay: 0.1s; }
.bar:nth-child(6) { animation-delay: 0.2s; }
.bar:nth-child(7) { animation-delay: 0.3s; }
.bar:nth-child(8) { animation-delay: 0.4s; }
.bar:nth-child(9) { animation-delay: 0.1s; }
.bar:nth-child(10) { animation-delay: 0.2s; }
.bar:nth-child(11) { animation-delay: 0.3s; }
.bar:nth-child(12) { animation-delay: 0.4s; }
.bar:nth-child(13) { animation-delay: 0.1s; }
.bar:nth-child(14) { animation-delay: 0.2s; }
.bar:nth-child(15) { animation-delay: 0.3s; }
.bar:nth-child(16) { animation-delay: 0.4s; }
.bar:nth-child(17) { animation-delay: 0.1s; }
.bar:nth-child(18) { animation-delay: 0.2s; }
.bar:nth-child(19) { animation-delay: 0.3s; }
.bar:nth-child(20) { animation-delay: 0.4s; }
.bar:nth-child(21) { animation-delay: 0.1s; }
.bar:nth-child(22) { animation-delay: 0.2s; }
.bar:nth-child(23) { animation-delay: 0.3s; }
.bar:nth-child(24) { animation-delay: 0.4s; }

@keyframes sound-wave {
  0%, 100% { height: 10px; }
  50% { height: 20px; }
}
.card-title {
  font-size: 1.1rem;
}
.card-text {
  font-size: 0.95rem;
}

 #emai_sumit {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    margin-top: 15px;
    font-weight: bold;
    width: auto;
  }

  #emai_sumit:hover {
    background-color: #218838;
  }
#keyboardz {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
  }

  #toggle-case-btn,.letter-btn {
    position: relative;
    font-family: 'Zaghawa Beria', Arial, sans-serif;
    font-size: 24px;
    padding: 12px 18px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background-color: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    min-width: 60px;
    text-align: center;
  }

  #toggle-case-btn:hover,.letter-btn:hover {
    background-color: #198754;
    color: white;
    border-color: #198754;
    transform: scale(1.05);
  }

  @media (max-width: 576px) {
    #toggle-case-btn,.letter-btn {
      font-size: 20px;
      padding: 10px 14px;
      min-width: 50px;
    }
     h2 {
      font-size: 18px;
    }
    
  }

  
