/* Styles CSS */
/* Police Inter (variable) — utilisée par certaines pages */
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

body {
    font-family: Arial, system-ui, Roboto sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Empêcher le débordement horizontal */
}

header {
    background-color: #355379fc;
    color: #fff;
    padding: 5px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-sizing: border-box; /* Inclure le padding dans la largeur */
}

.logo {
    font-size: 1.1em;
    font-weight: bold;
}
/*
.search-bar {
    display: flex;
    align-items: center;
    margin-right: 20px; 
}
*/
.search-bar input {
    padding: 5px;
    border-radius: 5px;
    border: none;
}

.search-bar button {
    padding: 5px 10px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    margin-left: 5px;
    cursor: pointer;
}

.search-bar button:hover {
    background-color: #0056b3;
}

/* Styles pour la SearchBar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 200px;
}

.search-form button[type="submit"] {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-form button[type="submit"]:hover {
    background-color: #0056b3;
}

/* Styles pour le bouton login/logout */
.login-logout {
    position: relative;
    cursor: pointer;
}

.login-logout .avatar,
.login-logout span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    font-size: 18px;
}

.login-logout .avatar {
    object-fit: cover; /* Pour que l'avatar s'adapte au cercle */
}

/* Styles pour le menu déroulant */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

/* Afficher le menu déroulant au survol ou au clic */
.login-logout:hover .dropdown-menu,
.login-logout:focus-within .dropdown-menu {
    display: block;
}

.login-logout {
    margin-left: 10px;
    cursor: pointer;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 0; /* Réinitialiser la marge */
    padding-right: 0; /* Réinitialiser le padding */
    z-index: 1001; /* S'assurer que le hamburger est au-dessus */
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
}

.nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav li {
    margin: 0 10px;
    position: relative; /* Pour positionner le sous-menu correctement */
}

.nav li a {
    color: #fff;
    text-decoration: none;
}

.nav li a:hover {
    text-decoration: underline;
}

.submenu {
    display: none;
    position: absolute;
    background-color: #425062fc;
    padding: 10px;
    border-radius: 5px;
    top: 100%; /* Positionner le sous-menu sous l'élément parent */
    left: 0; /* Aligner le sous-menu à gauche */
    z-index: 1002; /* S'assurer que le sous-menu est au-dessus */
}

.nav li:hover .submenu {
    display: block;
}

@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute; /* Positionner le menu par rapport à la navbar */
        top: 100%; /* Positionner le menu juste en dessous de la navbar */
        left: 0; /* Aligner le menu à gauche */
        background-color: #355379fc; /* Même fond que la navbar */
        z-index: 1000; /* S'assurer que le menu est au-dessus du contenu */
    }

    .nav.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .nav li {
        margin: 0; /* Réinitialiser la marge */
        padding: 10px 20px; /* Ajouter du padding pour espacer les éléments */
        text-align: center; /* Centrer le texte */
    }
}

main {
    padding: 2px;
    font-family: Arial, system-ui, Roboto sans-serif;
    margin: 0;
    padding-top: 40px; /* Marge en haut pour éviter la superposition */
    background-color: #fff9f9;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px; /* Marge pour éviter la superposition */
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: calc(100% - 4px);
    box-sizing: border-box;
}

.product-image {
    width: 100%;
    height: auto;
}

.product-details {
    padding: 2px;
}

.product-name {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.product-price {
    color: #FF0000;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.load-more {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
}

.load-more:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .product-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .product-item {
        width: 100%;
    }
}

footer {
    background-color: #355379fc;
    color: #fff;
    padding: 20px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-column {
    flex: 1;
    min-width: 25%;
    box-sizing: border-box;
    padding: 10px;
}

.footer-column h3 {
    margin-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 5px;
}

.footer-column ul li a {
    color: #fff;
    text-decoration: none;
}

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

@media (max-width: 768px) {
    .footer-column {
        min-width: 100%;
    }
}

.exchange-form {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    padding: 2px;
    border-radius: 8px;
    max-width: 400px;
    margin: 2px auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.exchange-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.exchange-form input,
.exchange-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.exchange-form button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.exchange-form button:hover {
    background-color: #0056b3;
}

#trading-chart,
#chart {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    padding: 2px;
    border-radius: 8px;
    margin: 2px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#trading-chart iframe,
#chart canvas {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
}

#module_sponsor {
    margin: 2px 0;
    padding: 2px;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sponsor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.sponsor-item {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    width: calc(25% - 20px);
    box-sizing: border-box;
    text-align: center;
}

.sponsor-image {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sponsor-image:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .sponsor-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .sponsor-item {
        width: 100%;
    }
}

#crypto-prices,
#crypto-list {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    padding: 2px;
    border-radius: 8px;
    margin: 2px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#crypto-prices table {
    width: 100%;
    border-collapse: collapse;
}

#crypto-prices th,
#crypto-prices td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #d1d5db;
}

#crypto-prices th {
    background-color: #e5e7eb;
    font-weight: bold;
}

#crypto-list ul {
    list-style: none;
    padding: 0;
}

#crypto-list li {
    padding: 10px;
    border-bottom: 1px solid #d1d5db;
}

#crypto-list li:last-child {
    border-bottom: none;
}

.content,
.activity-stream {
    padding: 2px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin: 2px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.activity-stream h2 {
    margin-top: 0;
    font-size: 1.5em;
    color: #333;
}

.activity-stream p {
    color: #666;
    line-height: 1.6;
}

#exchange-result {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    padding: 2px;
    border-radius: 8px;
    margin: 2px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 1.2em;
    color: #333;
}

#main-content {
    padding: 2px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin: 2px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/* Styles généraux */
#module_announcements {
    margin: 2px 0;
    padding: 2px;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.announcement-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.announcement-item {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
    width: calc(25% - 20px); /* 4 colonnes sur grand écran */
}

.announcement-image {
    width: 250px; /* Forcer une largeur fixe de 250px */
    height: 250px; /* Forcer une hauteur fixe de 250px */
    object-fit: cover; /* Conserver les proportions et recadrer si nécessaire */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.announcement-details {
    padding: 10px;
}

.announcement-image:hover {
    transform: scale(1.1);
}

/* Styles pour les petits écrans (smartphones) */
@media (max-width: 768px) {
    .announcement-item {
        width: 100%; /* Une seule colonne sur smartphone */
    }

    .announcement-image {
        width: 100%; /* Adapter la largeur à 100% sur smartphone */
        height: auto; /* Autoriser la hauteur à s'adapter */
    }
}

#module_services {
    margin: 2px 0;
    padding: 2px;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.services-item {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    width: calc(25% - 20px);
    box-sizing: border-box;
    text-align: center;
}

.services-image {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.services-details {
    padding: 2px;
}
.services-image:hover {
    transform: scale(1.1);
}

/* Styles pour les séparateurs entre modules */
.module-separator {
    text-align: center;
    margin: 20px 0;
    padding: 10px 0;
    border-top: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
    background-color: #f9fafb;
}

/* Styles pour les boutons "Voir plus" */
.see-more-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.see-more-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Adaptation pour les petits écrans */
@media (max-width: 768px) {
    .module-separator {
        padding: 15px 0;
    }

    .see-more-button {
        font-size: 0.9em;
        padding: 8px 16px;
    }
}

/* Grille générique pour les items */
.module-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Item générique dans une grille */
.module-item {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    width: calc(25% - 20px); /* 4 colonnes sur grand écran */
    box-sizing: border-box;
    text-align: center;
}

.module-image {
    width: 250px; /* Largeur fixe pour les images */
    height: 250px; /* Hauteur fixe pour les images */
    object-fit: cover; /* Conserver les proportions */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.module-details {
    padding: 10px;
}

.module-image:hover {
    transform: scale(1.1);
}

/* Adaptation pour les petits écrans */
@media (max-width: 768px) {
    .module-item {
        width: 100%; /* Une seule colonne sur smartphone */
    }

    .module-image {
        width: 100%; /* Adapter la largeur à 100% */
        height: auto; /* Autoriser la hauteur à s'adapter */
    }
}

/* Adaptation pour CTT_Editeur */
.btn {
    padding: 10px 20px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

.delete-btn {
    background-color: #FF4D4D;
}

.delete-btn:hover {
    background-color: #CC0000;
}

/* Styles pour les résultats de recherche */
.result-item {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

.result-item p {
    margin: 5px 0;
}

.result-item strong {
    color: #007bff;
}


/* Style pour l'avatar flottant */
.chatbot-avatar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #4CAF50;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

.chatbot-avatar img {
  width: 80%;
  height: 80%;
  border-radius: 50%;
}

.chatbot-tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background-color: #333;
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  display: none;
}

.chatbot-avatar:hover .chatbot-tooltip {
  display: block;
}

/* Animation pour flotter */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}