
* {
    box-sizing: border-box;
}


  

        body {
            text-align: center;
            width: 100%;
            background: linear-gradient(135deg, #f3e7e9, #e3e6f3);
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
           
        }

        .chatbox {
            background-color: white;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
           
           
            border-radius: 15px;
            width: 90%;
            border-bottom: 1px solid #ddd;
        }

        
        #text {
            flex: 1;
            padding: 30px 10px;
            border: 1px solid #ccc;
            border-radius: 10px;
            outline: none;
            font-size: 16px;
            margin-right: 10px;
            position: relative;
            overflow-y: scroll;  /* scroller   */
            white-space:normal; 
            
           
        }

        #button,.button2,.button-sect{
            background-color: #6b6ce9;
            color: white;
            border: none;
            border-radius: 10px;
            padding: 10px 30px;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            margin: 10px;
        }

        .btn-sect{
            display: flex;
            justify-content: center;
            gap: 10px;
            margin: 20px 0;
        }

        .button-sect{
            background-color: #e0e0f5;
            color: black;
        }

        .button-sect:hover{
            background-color: #b6b6f0;
            color: white;
        }

        /* Sections */
        .disc-sect,
        .sect-image,
        .sect-video {
            width: 100%;
            min-height: 100vh;
        }

        .gradient-title {
            font-weight: bold;
            background: linear-gradient(to right, #9333ea, #ec4899);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: inline-block;
            padding: 10px;
            border-radius: 10px;
            margin-top: 20px;
            margin-bottom: 40px;
        }

        

        .questions-reponses {
            padding: 20px;
            height: 65dvh;
            overflow-y: auto;
            border-bottom: 1px solid #ddd;
            scroll-behavior: smooth;
            margin-top: 1%;
            
        }

        .p1 {
            padding: 10px 15px;
            border-radius: 20px;
            margin: 10px;
            display: inline-block;
            max-width: 95%;
            word-wrap: break-word;
            margin-top: 20px;
            background-color: #b3b5fe;
            
            
        }

        .reponses .p1 {
            background-color: #b3b5fe;
            color: #333;
            text-align: left;
        }

        .mesreponses .p1 {
            background-color: #b3b5fe;
            color: #333;
            /*text-align:left; */
        }

        .p2-quest {
            background-color: #d3d3d3;
            color: #333;
            /* text-align:left;  */
            padding: 5px 15px;
            border-radius: 20px;
            margin: 10px;
            display: inline-block;
            max-width: 80%;
            word-wrap: break-word;
            margin-top: 20px;
           
            
        }

        .bubble-blue{
            display: flex;
            flex-direction: row;
        }
        .robot-icon{
            margin-top: 20px;
        }

        .champ-texte {
            position: relative;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            background: #f7f7f7;
            
        }

        #button:hover {
            background-color: #5658d0;

        }

        /* Navigation buttons */
        #btn-nav {
            background-color: #6b6ce9;
            border-radius: 15px;
            position: fixed;
            left: 20px;
            top: 20px;
            cursor: pointer;
            padding: 10px 20px;
            border: none;
        
            color: white;
            max-width: 15%; /* Pour éviter le débordement */
        }

        #btn-profil {
            background-color: #6b6ce9;
            border-radius: 50%;
            position: fixed;
            right: 30px;
            top: 20px;
            cursor: pointer;
            padding: 10px 20px;
            border: none;
            color: white;

        }


        #btn-nav:hover, #btn-profil:hover {
            transform: scale(1.1);
        }


        /* Sidebars */
       
        .barre-reponse {
            position: fixed;
    top: 0;
    left: 0;
    width: 22vw; /* Largeur relative à la taille de l’écran */
    max-width: 320px; /* Limite la largeur max pour les grands écrans */
    min-width: 200px; /* Limite la largeur min sur les petits écrans */
    max-height: 80vh;
    background: #ddd;
    box-shadow: 1px 8px 8px rgba(226, 166, 166, 0.2);
    transition: transform 0.5s ease;
    z-index: 10;
    overflow-y: auto;
    transform: translateX(-100%);
    border-radius: 10px;
    height: auto;
           
            }
            

        .barreprofil{
            position: fixed;
            top: 0;
            width: 30%;
            height: auto;
            max-height: 38%;
            background: #ddd;
            box-shadow: 1px 8px 8px rgba(226, 166, 166, 0.2);
            transition: transform 0.5s ease;
            z-index: 10;
            overflow-y: auto;
            right: 0;
            transform: translateX(100%);
            border-radius: 10px;
        }


        
        

        .barre-reponse.active,
        .barreprofil.active {
            transform: translateX(0);
        }


    .p3 {
    border-radius: 8px;
    margin: 5px 0;
    padding: 8px 10px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    background: #f0f0f0;
    border: none;
    display: block;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
            
            
           
        }

        .p3:hover {
            background-color: #6b6ce9;
            padding:  15px;
            color: white;
        }

        
.loading {
  opacity: 0.5;
  pointer-events: none;
}

#button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

img{
    
    margin-top:10px;
    width: 5%;
    height: 5%;
    border-radius: 50px;

}


.p4{
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    border-radius: 25px;
    text-align: center;
   /* degradé background: linear-gradient(90deg, #4b544c, #d6dde2); */

}

.zoneaudio{
    left:0;
    top:0;
    position: fixed;
   
    background:rgb(240,240,240,0.95);
    box-shadow: 1px 8px 8px rgba(226, 166, 166, 0.2);
    transition: transform 0.5 ease;
    display: flex;  /* Centrer le elements */
    flex-direction: column; /* Aligner les éléments verticalement */
    justify-content: center; /* Centrer verticalement */
    align-items: center; /* Centrer horizontalement */
    gap: 50px; /* l'espace entre les elements*/
    width: 100%;
    height: 100%;
    transform: translateX(-100%);/*cache toute la largeur au debut*/

}

.zone_audioapparait{

transform: translateX(0);  /*apparait(quitter de -100 à 0 */

}

#i1{
    color: #6b6ce9;
    font-size: 100px;
    
}


.i1audio_encours{
    animation: pulse 1s infinite;
}

@keyframes pulse{
    0%{
        transform:scale(1);
    }

    50%{
       transform: scale(1.2); 
    }
    100%{
        transform: scale(1);
    }
}

#i2{
    
    background-color: #6b6ce9;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px;
}

#i2:hover{
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    padding: 21px;
}


.a{
    text-decoration: none; 
    color:#0e0efc;
   margin-top: 30px;
   
}



.p6{
    display: none;
}




.p-conver{
   
    background-color:#f4f4f9;
    border: 1px solid #ccc;
    margin-top: 20px;
    color: #333;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    text-align: left;
    position: relative;
    transition: all 0.3s ease;
}

.p-conver:hover{
    
    background-color: #6b6ce9;
    /*padding: 10px 10px; */
    transform: translateY(-2px);
   
}

.p-conver:active{
    background-color: #d1bfbf;
    padding: 10px 10px;
}

.titre-button{
    margin-top: 30px;
}

#btn-profil i { /*passe le clic sur i au parent*/
    pointer-events: none;
}

#btn-nav i {
    pointer-events: none;
}

@media screen and  (max-width: 1290px) {
    .chatbox {
        width: 80%;  /* Réduit la largeur pour les écrans plus petits */
    } 

    #btn-profil{
        right: 30px;
    }

    .barre-reponse {
        width: 25%;
        height: 80%;
    }
    
    .barreprofil {
        width: 20%;
        height: 38%;
    }

    
       
    }



@media screen and  (max-width: 1200px) {
    .chatbox {
        width: 90%;  /* Réduit la largeur pour les écrans plus petits */
        
       
    }

    img{
        width: 6%;
    }
    

    .barreprofil {
        height: 20%;
    }

    .barre-reponse {
        height: 30%;
        width: 33%;
    }


    .champ-texte{
        
        padding: 10px;

    }

    .questions-reponses {
        
        padding: 15px 10px;
        margin-top: 2%;
    }

    #text{
        width: 100%;
        padding: 20px 10px;
        
    }

    .barre-reponse {
        width: 30%;
        height: 80%;
        bottom: 70px; /* Stops above the text input area */
    }
    
    .barreprofil {
        width: 20%;
        height: auto;
        max-height: 35%;
    }

   
   
}



@media screen and (max-width: 768px) {
    .chatbox {
        width: 90%;  /* Encore plus petite pour les tablettes ou petits écrans */
       
        border-radius: 10px;  /* Bordures légèrement arrondies */
    }



    

   

    .barre-reponse {
        width: 40%;
        height: 50%;
    }
    
    .barreprofil {
        width: 30%;
        height: auto; /* Auto height to fit content */
        max-height: 45%;
        padding: 10px;
    }
    
    .barreprofil .p3 {
        padding: 6px 8px;
        margin: 3px 0;
        font-size: 14px;
    }


    .questions-reponses {
        
        
    }


    .champ-texte{
        flex-direction: column;
        padding: 10px;

    }

    #text{
        width: 100%;
        padding: 15px 10px;
        
    }

    #button,.button2{
        width: 30%;
        
    }

    #btn-nav{
       
        position: fixed;
        top:0;
        left:0;
        padding: 10px 15px;
    }

    #btn-profil{
       
        position: fixed;
        top:0;
        right:0;
        padding: 10px 15px;
        
    }


    .bouton-quest{
        display: flex;
        flex-direction: row;
        margin-left: 20%;
        gap:20px;
    }

    
    img{
    
        margin-top: 0px;
        width: 7%;
        border-radius: 50px;
    
    }

    .button-css{
        width: 50% !important;
        
    }

     .bouton-videos{
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
   
 .button-sect{
           
            padding: 10px 10px;

        }   
    

}



@media (max-width: 600px) {

    


    .chatbox {
        width: 90%;  /* Encore plus petite pour les tablettes ou petits écrans */
       
        border-radius: 10px;  /* Bordures légèrement arrondies */
    }


    

    
    .barre-reponse {
        height: calc(100% - 150px);
    }
    
    .barreprofil {
        width: 20%;
        max-height: 50%;
    }

    .questions-reponses {
       
        
    }

    .champ-texte{
        flex-direction: column;
        padding: 10px;

    }

    #text{
        width: 100%;
        padding: 15px 10px;
        
    }

    #button,.button2{
        width: 30%;
        
    }

    #btn-nav{
       
        position: fixed;
        top:0;
        left:0;
        padding: 10px 15px;
    }

    #btn-profil{
       
        position: fixed;
        top:0;
        right:0;
        padding: 10px 15px;
        
    }


    .bouton-quest{
        display: flex;
        flex-direction: row;
        margin-left: 20%;
        gap:20px;
    }

    
    img{
    
        margin-top: 0px;
        width: 7%;
        border-radius: 50px;
    
    }


    .button-css{
        width: 50% !important;
        
    }

     .bouton-videos{
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
   

    #button-sect{
           
            padding: 10px 10px;

        }
   
}








@media (max-width: 480px) {

    


    .chatbox {
        width: 90%;  /* Prend toute la largeur disponible sur les écrans très petits */
       
        border-radius: 5px;  /* Bords encore plus arrondis sur les petits écrans */
    }

   


    .questions-reponses {
        
        padding: 15px 10px;
        margin-top: 2%;
    }

    
    #text{
        width: 95%;
    }

    .bouton-quest{
        display: flex;
        flex-direction: row;
    }

   

    .p1, .p2-quest {
        font-size: 14px;
        padding: 8px 12px;
    }

    #btn-nav {
        left: 0;
        top:0;
        padding: 10px 15px;
    }

    #btn-profil {
        right: 0;
        top:0;
        padding: 10px 15px;
        
    }

    .zoneaudio {
        width: 100%;
    }

    

    .champ-texte {
        padding: 8px;
    }


    img{
    
        margin-top: 0px;
        width: 12%;
        border-radius: 50px;
    
    }

    .bouton-micro{
        display: flex;
        flex-direction: row;
        margin-top: 10px;

    }


    #i2{
        padding: 7px 30px;
    }


    .barre-reponse {
        
            width: 40%;
            height: 60%;
       
    }
    
    .barreprofil {
        width: 40%;
        height: auto;
        max-height: 33%;
        padding: 8px;
    }
    
    .barreprofil .p3 {
        padding: 5px;
        margin: 2px 0;
        font-size: 14px;
    }

    .button-css{
        width: 50% !important;
        
    }

     .bouton-videos{
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

 
    
    #button-sect{
           
            padding: 10px 10px;

        }


 }






@media (max-width: 434px) {

        .button-sect{
           
            font-size: 15px;

        }

}

 



 /* Additional improvements for very small screens */
@media (max-width: 320px) {
    .barre-reponse {
        width: 90%;
        height: calc(100% - 200px);
    }
    
    .barreprofil {
        width: 50%;
        max-height: 40%;
    }

    


    .bouton-quest{
        display: flex;
        flex-direction: row;
    }

    




    .chatbox {
        width: 90%;  
       
        border-radius: 5px;  /* Bords encore plus arrondis sur les petits écrans */
    }

    .questions-reponses {
       
        padding: 15px 10px;
        margin-top: 2%;
    }

    
    #text{
        width: 95%;
    }

    .bouton-quest{
        display: flex;
        flex-direction: row;
    }

   

    .p1, .p2-quest {
        font-size: 14px;
        padding: 8px 12px;
    }

    #btn-nav {
        left: 0;
        top:0;
        padding: 10px 15px;
    }

    #btn-profil {
        right: 0;
        top:0;
        padding: 10px 15px;
        
    }

    .zoneaudio {
        width: 100%;
    }

    

    .champ-texte {
        padding: 8px;
    }


    img{
    
        margin-top: 0px;
        width: 12%;
        border-radius: 50px;
    
    }

    .bouton-micro{
        display: flex;
        flex-direction: row;
        margin-top: 10px;

    }


    #i2{
        padding: 7px 30px;
    }


       .button-css{
        width: 50% !important;   
    }


     .bouton-videos{
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

  

 #button-sect{
           
            padding: 10px 10px;

        }

}










.i-delete{
    position: absolute;
    right: 1px;
    background: transparent;
   
    border: none;
    color:#ff4d4d;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    padding: 6px 10px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-top: 15px;
    
}

.i-delete:hover{
    transform: scale(1.1);
    background-color: rgba(255, 77, 77, 0.1); /* léger fond rouge */
}

.gros-poubelle{
    
    position: fixed;
    right: 5px;
    top:20px;
    font-size: 20px;
    color:#ff4d4d;
    cursor: pointer;
    border-radius: 50%;
    background: #ddd;
    border: none;
    padding: 6px 10px;
    transition: background-color 0.2s ease, transform 0.2s ease;

}

.gros-poubelle:hover{
    background-color: rgba(255, 77, 77, 0.1); 
    transform: scale(1.1);
}

.voir{
    display: block;
}


.checkbox{
    position: relative;
    right: 20%;
}

#disc-sect-btn{
            background-color: #b6b6f0;
        }

#lang_afri{
    width: 10%;
}



.skeleton_image,.skeleton_video {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}



@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}



.lock-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(174, 216, 221, 0.5);
  color: black;
  display: none; 
  flex-direction: column;
  justify-content: center; align-items: center;
  z-index: 9999;
}
