/* Styles généraux */
body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #000000;
    background: url('../images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    width: auto;
    color: #333;
    margin: 0;
    padding: 0;
}

.navbar {
    box-shadow: 0 2px 4px rgb(255, 255, 255);
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    padding: 10px;
    z-index: 1000;
    background-color: rgb(0, 0, 0);
}

.navbar-brand {
    font-weight: bold;
}

/* Styles de la navigation */
.navbar-nav .nav-link {
    padding: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* État hover */
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    background-color: #007bff;
    border-radius: 20px;
}


.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 4px;
    background-color: #007bff;
    transition: width 1s ease;
}

.nav-link:hover::after {
    width: 100%;
}

ul li {
    display: inline;
    margin-right: 15px;
}

#date-time {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 12px; /* Taille réduite */
    color: #333;
    background-color: rgba(0, 0, 0, 0.7); /* Fond semi-transparent */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    display: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#date-time.show {
    display: block;
    opacity: 1;
}

#date-time .time {
    font-size: 1.2em; /* Taille plus grande pour l'heure */
    font-weight: bold;
}

#date-time .date {
    display: block;
    font-size: 0.8em; /* Taille plus petite pour la date */
    font-weight: normal;
}



/* Carte */
.card {
    margin-bottom: 20px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.card-body {
    flex-grow: 1;
}

.card:hover {
    transform: translateY(-40px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    color: #007bff;
}

.card-text {
    text-align: center;
    font-size: 0.9rem;
}

.card-img-top {
    width: auto;
}

/* Section profil */
.profile-img {
    position: relative;
    display: block;
    margin: auto;
    margin-bottom: 120px;
    margin-top: -60px;
    top: 200px;
    right: 35%;
    max-width: 250px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgb(255, 255, 255);
    background-color: #fff;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.profile-img:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 18px rgb(255, 255, 255);
    content: url('../images/profile2.jpg');
}

/* Titre stylisé */
 h2 {
    color: #007bff;
    font-size: 2rem;
    font-weight: bold;
    margin-top: 50px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Paragraphe */
.text-center p {
    line-height: 1.5;
    color: #5a5c60;
    margin: 20px auto;
}

/* Ajout d'effets modernes */
.text-center p::before {
    content: "“";
    font-size: 2rem;
    color: #007bff;
    position: absolute;
    margin-left: -20px;
    margin-top: -10px;
}

.text-center p::after {
    content: "”";
    font-size: 2rem;
    color: #007bff;
    position: absolute;
    margin-left: 5px;
    margin-top: 5px;
}

/* Réactivité */
@media (max-width: 768px) {
    .profile-img {
        top: 20px;
        max-width: 200px;
    }

    .text-center h2 {
        font-size: 1.5rem;
    }

    .text-center p {
        font-size: 1rem;
        max-width: 90%;
    }
}


/* Section projet */
.projects h2 {
    margin-top: 100px;
    margin-bottom: 40px;
    color: #007bff;
}

/* Footer */
.footer {
    color: #fff;
    padding: 10px 0;
    text-align: center;
    margin-top: 30px;
}

.footer a {
    color: #007bff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.loader img {
    width: 100px;
    animation: spin 1s linear infinite;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgb(255, 255, 255);
    background-color: #fff;
}

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

/* Cacher l'élément par défaut */
.hidden {
    display: none;
}
 /* Animation de secousse */
 @keyframes natural-shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); } /* Légère rotation vers la gauche */
    50% { transform: rotate(10deg); }  /* Rotation vers la droite */
    75% { transform: rotate(-10deg); } /* Retour à gauche */
    100% { transform: rotate(0deg); }  /* Retour à la position initiale */
}

.shake {
    display: inline-block;
    font-size: 50px; /* Taille de l'emoji */
    animation: natural-shake 0.6s ease-in-out infinite; /* Animation avec demi-rotation */
}

/* Contacts */
.contacts {
    display: grid;
    place-items: center;
    margin-top: 60px;
}

.social-links {
    list-style-type: none;
    padding: 0;
    display: flex;
    gap: 15px;
}

.social-links li {
    font-size: 24px;
}

.social-links a {
    text-decoration: none;
    color: inherit;
}

.social-links a:hover {
    color: #0077b5; /* Exemple de couleur au survol */
}

.icon {
    width: 40px;
}

/* Animation de l'icône de chat au survol */
#chat-icon {
    position: fixed;
    bottom: 50px;
    left: 20px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#chat-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: float 3s infinite ease-in-out;
}

#chat-icon::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5), 0 0 40px rgba(0, 123, 255, 0.3);
    animation: particle-pulse 2s infinite alternate;
    bottom: -50px;
    left: -10px;
    transform: translate(-50%, -50%);
    z-index: -1;
}

/* Particules flottantes */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes particle-pulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.2);
    }
}


/* Effet au survol */
#chat-icon:hover {
    transform: scale(1.1); /* Agrandit légèrement l'icône */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2); /* Ajoute une ombre plus prononcée */
}

/* Boîte de discussion */
#chat-box {
    margin: 20px;
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 300px;
    height: 400px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex; /* Toujours présent, mais masqué */
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); /* Position initiale masquée */
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

/* État visible */
#chat-box.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Position visible */
}

#chat-header {
    background: #007bff;
    color: white;
    padding: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

/* Style pour le bouton de fermeture */
.chat-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border: none;
    background-color: transparent;
    color: #555;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
    font-weight: bold;
}

.chat-close-btn:hover {
    color: red;
}

#chat-content {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

#chat-content::-webkit-scrollbar {
    width: 6px;
}

#chat-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* Zone de saisie */
#chat-input {
    font-family: Arial, sans-serif;;
    width: calc(100% - 50px); /* Prend en compte le bouton */
    margin: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

/* Bouton avec l'icône */
#chat-send-button {
    background-color: #007bff;
    position: absolute;
    right: 10px;
    bottom: 15px;
    border: none;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Style de l'icône */
#chat-send-button i {
    font-size: 16px;
}

/* Effet de survol */
#chat-send-button:hover {
    background-color: #0056b3;
}

/* Indicateur de saisie */
#typing-indicator {
    font-style: italic;
    color: #888;
    margin: 10px 0;
    text-align: left;
}

/* Animation pour l'ouverture/fermeture */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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


#chat-content {
    display: flex;
    flex-direction: column;
    padding: 10px;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f9f9f9;
    height: 100%; /* Assurez-vous que la hauteur est définie */
}

.user-message {
    position: relative;
    text-align: left;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border-radius: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    max-width: 60%;
    word-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    align-self: flex-end; /* Aligne les messages de l'utilisateur à droite */
}

.bot-message {
    position: relative;
    text-align: left;
    margin-bottom: 10px;
    margin-left: 30px;
    padding: 10px;
    background-color: #f1f1f1;
    color: #333;
    border-radius: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    max-width: 60%;
    word-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    align-self: flex-start; /* Aligne les messages du bot à gauche */
}

.bot-message .bot-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: absolute;
    bottom: 0px;
    left: -35px;
}

.bot-message .bot-text {
    word-wrap: break-word;
}


@keyframes fadeIn {
    100% {
        opacity: 1;
    }
}

/* Media Queries pour l'adaptation sur différents appareils */

/* Pour les écrans larges (grands écrans de bureau) */
@media (min-width: 1200px) {
    .card1 {
        margin-left: 350px;
        margin-top: -240px;
    }

    .container {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

/* Pour les tablettes et petits écrans (768px - 1200px) */
@media (max-width: 1200px) and (min-width: 768px) {
    .navbar {
        padding: 8px;
    }

    .card1 {
        margin-left: 200px;
    }

    .card {
        margin: 10px;
    }

    .profile-img {
        position: relative;
        left: 100px;
        top: 100px;
        max-width: 200px;
    }

    .social-links {
        flex-wrap: wrap;
    }
}

/* Pour les petits écrans (mobiles) */
@media (max-width: 767px) {
    body {
        font-size: 14px;
        margin: 0;
        padding: 0;
        background: none;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('../images/mobile-background.jpg') no-repeat center center;
        background-size: cover;
        z-index: -1;
    }

    .navbar {
        padding: 5px;
    }

    .card1 {
        margin-left: 0;
    }

    .card {
        margin: 15px 0;
        box-shadow: none;
    }

    .profile-img {
        position: relative;
        max-width: 150px;
        left: 0;
        top: 100px;
    }

    .text-center h2 {
        font-size: 1.2rem;
        margin-top: 50px;
    }
    .text-center{
        position: relative;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Flex pour la section des projets */
.projects .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.projects .col-md-4 {
    flex: 1 1 30%;
    margin: 10px;
}

/* Pour les petits écrans */
@media (max-width: 768px) {
    .projects .col-md-4 {
        flex: 1 1 100%;
        margin: 15px 0;
    }
}

