body {
    background-color: #f4f4f4;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

a {
    color: #af4c4c;
}

a:visited {
    color: #277c2a;
}

.content {
    margin: 0.5rem;
}

.top {
    background-color: #f4f4f4;
    padding: 1rem 0;
}

.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: auto;
    gap: 5px;
    background-color: white;
    border-radius: 2rem;
    padding: 0.5rem;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}
search-box:focus {
    border-color: #4CAF50;
    outline: none;
}

.search-box input {
    width: 100%;
    border: none;
    padding: 0.6rem 1rem;
    padding-left: 2rem;
    border-radius: 2rem;
    font-size: 1rem;
    outline: none;

}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 10px;
    font-size: 1.2rem;
    opacity: 0.6;
}

#clearSearch {
    background: #f4f4f4;
    border: none;
    color: #ff5c5c;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 2rem;
    cursor: pointer;
    display: none;
}

/* Grid des cartes */
.card-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    padding-bottom: 80px;
}

/* Style des cartes */
.card-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #ffffff, #e0e0e0);
    border-radius: 1rem;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    max-width : 45vw;
    aspect-ratio: 16/9;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.card-item:hover {
    transform: scale(1.05);
}

.card-item.hidden {
    opacity: 0.2;  /* Devient semi-transparent d'abord */
    transform: translateY(5px);
}

.card-item.fully-hidden {
    display: none; /* Disparition complète après le délai */
}
.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* Texte des cartes */
.card-title {
    font-weight: bold;
    color: #333;
    text-align: center;
    font-size: 1rem;
}

.bottom-menu {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.menu-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1c1c1c;
    border-radius: 12px;
    transition: transform 0.2s ease-in-out;
}

.menu-item img {
    width: 24px;
    height: 24px;
}

.menu-item.active {
    background: #4CAF50; /* Couleur de l'élément actif */
}

.menu-item:hover {
    transform: scale(1.1);
}

/* Masquer l'icône "Utilisateurs" si l'utilisateur n'a pas les droits */
.admin-only {
    display: none;
}

/* Ajoute une classe pour afficher l'icône si l'utilisateur est admin */
.admin .admin-only {
    display: flex;
}

#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Contenu de la popup */
#popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 80vw;
    max-height: 80vh;
    text-align: center;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out;
}

/* Affichage actif */
#popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

#popup-overlay.active #popup-content {
    transform: scale(1);
}

/* Bouton de fermeture */
#popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.code-container svg {
    display: block !important;
    visibility: visible !important;
    width: auto !important;
    height: 180px !important;
    border: 1px solid red;
    filter: brightness(0) saturate(100%) invert(58%) sepia(32%) saturate(762%) hue-rotate(73deg) brightness(94%) contrast(90%);
}
