* {
    font-family: "Inter", sans-serif;
}

body {
    background-color: #f9fafb;
}

header + main {
    padding-top: 96px;
}

header {
    background-color: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 50;
}

.search-container {
    position: relative;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: black;
    color: white;
    padding: 8px;
    border-radius: 6px;
}

@media (max-width: 767px) {
    .search-input {
        font-size: 14px;
        padding-left: 12px;
    }

    .search-button {
        padding: 6px;
    }
}

@keyframes shake {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    15% {
        transform: translateX(-2px) translateY(-3px) rotate(-3deg);
    }
    30% {
        transform: translateX(2px) translateY(3px) rotate(3deg);
    }
    45% {
        transform: translateX(0px) translateY(-2px) rotate(-2deg);
    }
    60% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
}

.shake-icon {
    animation: shake 2s ease-in-out 0s infinite;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

.info-box {
    background-color: #fffae6;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-bar {
    background-color: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

@media (min-width: 768px) {
    .stats-bar {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.filters {
    background-color: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.filters label {
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
}
.filters input,
.filters select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
}

.categories-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.categories-nav button {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.categories-nav button:hover {
    background-color: #f3f3f3;
}

.chargement {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.roue {
    border: 8px solid rgba(0, 0, 0, 0.1);
    border-top: 8px solid rgb(0, 0, 0);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: tourne 1s linear infinite;
    margin-top: 10px;
    margin-bottom: 10px;
}

@keyframes tourne {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

footer {
    background-color: white;
    padding: 16px;
    text-align: center;
    border-top: 1px solid #ddd;
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    .search-input {
        font-size: 14px;
    }

    .search-button {
        font-size: 12px;
    }

    .btn-category {
        font-size: 14px;
    }

    .info-box {
        font-size: 14px;
    }

    .stats-bar {
        font-size: 14px;
    }

    .filters label {
        font-size: 12px;
    }

    .filters input,
    .filters select {
        font-size: 14px;
    }

    footer {
        font-size: 14px;
    }

    .categories-nav button {
        font-size: 14px;
    }
}

.mobile-button {
    order: 1;
    width: auto;
}

@media (max-width: 767px) {
    .mobile-button {
        order: 2;
        margin-top: 10px;
        width: 100%;
    }

    .flex.items-center.space-x-2:last-child {
        margin-bottom: 10px;
    }
}

.bg-noise {
    background-image: url('https://www.transparenttextures.com/patterns/noise-texture.png');
}

#blur-overlay {
    background-color: #f9fafb;

    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    
    backdrop-filter: blur(8px);
    
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    z-index: 20;
}

@media (max-width: 768px) {
    #blur-overlay {
        width: 100%;
        height: auto;
        -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
        mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
    }
}

#filters-section.opacity-30, #categories-nav.opacity-30 {
    opacity: 0.3 !important;
    pointer-events: none;
}

#filters-section.transition-opacity, #categories-nav.transition-opacity {
    transition: opacity 0.3s ease;
}

#scroll-to-top {
    display: none;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
}

#scroll-to-top.show {
    display: flex;
    opacity: 1;
}

#scroll-to-top:hover {
    background-color: #f3f4f6;
}

#notification-container {
    position: fixed;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    visibility: hidden;
    z-index: 9999; /* Toujours devant */
    background-color: #323232;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-size: 16px;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#notification-container.visible {
    visibility: visible;
    opacity: 1;
}

/* Conteneur principal du bouton glissant */
.toggle-btn-container {
    position: relative;
    display: flex;
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 50px;
    overflow: hidden;
    height: 50px; /* Taille du bouton glissant */
}

/* Les boutons (inscription/connexion) */
.toggle-btn {
    width: 50%;
    height: 100%;
    text-align: center;
    line-height: 50px; /* Centrer verticalement le texte */
    font-weight: bold;
    background-color: #f0f0f0; /* Gris de fond par défaut pour "Inscription" */
    color: #333; /* Gris du texte */
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
    border: none;
    border-radius: 50px; /* Bords arrondis */
    position: relative; /* Permet d'ajouter un z-index pour les boutons */
    z-index: 1; /* Les boutons seront au-dessus de l'arrière-plan */
}

/* Fond noir qui glisse */
.toggle-btn-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-color: #000;
    transition: transform 0.3s ease;
    border-radius: 50px; /* Bords arrondis */
    z-index: 0; /* L'arrière-plan doit être derrière les boutons */
}

/* Style pour le bouton actif (le bouton sélectionné) */
.toggle-btn.active {
    background-color: #000;
    color: white;
}

/* Cacher la section d'inscription/connexion par défaut */
#register-container, #login-container {
    display: none;
}

/* Afficher la section active */
#register-container:not(.hidden), #login-container:not(.hidden) {
    display: block;
}

/* Afficher la section de connexion par défaut */
#login-container {
    display: block;
}

/* Modifier la couleur de fond du bouton actif "Connexion" au démarrage */
#login-btn.active {
    background-color: #000;
    color: white;
}

/* Fond sombre légèrement animé */
.animated-bg {
    background: linear-gradient(-45deg, #121212, #1e1e1e, #181818, #0d0d0d);
    background-size: 300% 300%;
    animation: gradientAnimation 6s ease infinite;
    position: relative;
}

/* Animation du dégradé */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Effet de lumière "flair" avec dégradé du noir au gris */
.flair {
    position: absolute;
    top: -50%;
    left: -150%;
    width: 250%;
    height: 250%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.8) 10%, rgba(40, 40, 40, 0.4) 40%, rgba(80, 80, 80, 0) 80%);
    transform: rotate(25deg);
    animation: flairAnimation 6s infinite linear;
}

/* Animation du flair lumineux */
@keyframes flairAnimation {
    0% { left: -150%; top: -50%; }
    100% { left: 100%; top: 50%; }
}

/* Pour Chrome, Safari, Edge */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
  }
  
  /* Pour Firefox */
  input[type="search"]::-moz-search-clear {
    display: none;
  }