@font-face {
    font-family: 'Monofonto';
    src: url('assets/monofonto-rg.otf') format('opentype');
}

body {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    color: white;
    overflow: hidden;
    position: relative;
    animation: backgroundAnimation 5s infinite alternate ease-in-out;
}

/* Dégradé animé avec vagues fluides */
.waves-container {
    z-index: -1000;
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.gradient {
    --size: 750px;
    --speed: 20s;
    --easing: cubic-bezier(0.8, 0.2, 0.2, 0.8);

    position: absolute;
    width: var(--size);
    height: var(--size);
    filter: blur(calc(var(--size) / 10)); /* Réduction du blur */
    will-change: transform, opacity; /* Optimisation GPU */
    backface-visibility: hidden;
    transform-origin: center;
    background-image: linear-gradient(45deg, hsl(270, 80%, 50%), hsl(290, 70%, 60%), hsl(250, 90%, 40%));
    animation: rotate var(--speed) var(--easing) infinite, morph 10s ease-in-out infinite alternate;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.6;
    transform: translate3d(0, 0, 0);
}


.gradient:nth-child(2) {
    --size: 600px;
    --speed: 25s;
    background-image: linear-gradient(45deg, hsl(260, 70%, 55%), hsl(280, 80%, 45%));
    animation-duration: 30s;
    opacity: 0.5;
}

.gradient:nth-child(3) {
    --size: 900px;
    --speed: 40s;
    background-image: linear-gradient(45deg, hsl(250, 80%, 45%), hsl(270, 60%, 50%));
    animation-duration: 35s;
    opacity: 0.3;
}

/* Animations */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes backgroundAnimation {
    0% {
        background-color: #2c003e;
        opacity: 1;
    }
    50% {
        background-color: #4a0072;
        opacity: 0.9;
    }
    100% {
        background-color: #2c003e;
        opacity: 1;
    }
}

/* Effet de bruit pour texture */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><filter id="grainy"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(#grainy)" opacity="0.15"/></svg>');
    pointer-events: none;
    z-index: -1;
}

/* Bouton Menu */
#settingsMenu {
    position: fixed;
    left: -250px;
    height: 100%;
    width: 250px;
    background: rgba(20, 20, 20, 0.95);
    padding: 20px;
    transition: left 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.menu-open #settingsMenu {
    left: 0;
    opacity: 1;
}

.menu-toggle,
.full-screen-button {
    position: fixed;
    top: 10px;
    width: 50px;
    height: 50px;
    background: transparent; /* Initial background transparent */
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.3s ease; /* Transition pour background et transform */
}

.menu-toggle {
    left: 10px;
}

.menu-toggle::after {
    content: '☰';
    transform: rotate(0);
    transition: transform 0.3s ease;
}

.menu-open .menu-toggle::after {
    content: 'X';
    transform: rotate(180deg);
}

/* Survol du menu burger et du bouton plein écran */
.menu-toggle:hover,
.full-screen-button:hover {
    background-color: #ff4081; /* Couleur rose au survol */
    transform: scale(1.05);
}

/* Transition du bouton plein écran */
.full-screen-button {
    right: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease; /* Transition similaire */
}

.full-screen-button:hover {
    background-color: #ff4081; /* Couleur rose au survol */
    transform: scale(1.05);
}

#settingsMenu h3 {
    margin: 0;
    padding-top: 33px;
    text-align: center;
    position: absolute;
    top: 10px;
    left: 53%;
    transform: translateX(-50%);
}

/* Timer */
#timer {
    font-family: 'Monofonto', monospace;
    font-size: 6em;
    font-weight: normal;
    color: #ffffff;
    transition: color 0.5s ease-out;
}

.timer-running {
    color: #ffccd5;
}

/* Boutons */
.buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
    font-weight: bold;
    background: #e6006f;
    color: white;
    transition: background-color 0.3s, transform 0.2s ease-in-out;
    font-size: 1em;
}

button:hover {
    background-color: #ff4081;
    transform: scale(1.05);
}

#removeButtons {
    max-height: 50px;
    margin-top: 10px;
    padding: 6px 20px;
    height: auto;
    background: #e6006f;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s;
    width: 100%;
    font-size: 1em;
    text-align: center;
}

#removeButtons:hover {
    background-color: #ff4081;
    transform: scale(1.05);
}

#removeBookmarks {
    max-height: 50px;
    margin-top: 10px;
    padding: 6px 20px;
    height: auto;
    background: #e6006f;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s;
    width: 100%;
    font-size: 1em;
    text-align: center;
}

#removeBookmarks:hover {
    background-color: #ff4081;
    transform: scale(1.05);
}

.buttons button:hover {
    background-color: #ff4081;
    transform: scale(1.05);
}

.menu-toggle:hover::after,
.full-screen-button:hover {
    color: white;
}

/* Animation du slide et de l'opacité des boutons */
#buttonsContainer {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.hide-buttons {
    transform: translateY(-100%);
    opacity: 0;
}

.show-buttons {
    transform: translateY(0);
    opacity: 1;
}

.signet-list {
    margin-top: 20px;
    color: white;
    max-height: 300px;  /* Limite la hauteur visible */
    overflow-y: auto;   /* Permet de défiler */
}

.signet-item {
    justify-content: space-between;
    align-items: center;
    background-color: #f4f4f421;
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.signet-item span {
    margin-left: 10px;
    color: #ff4081;
    font-style: italic;
}

.signet-item button {
    margin-left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.signet-item button:hover {
    transform: scale(1.1);
}

.signet-item.signet-deleted {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Styles pour le bouton signet */
.signet-button {
    font-size: 1em;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
}

.signet-button span {
    margin-left: 5px;
}

.signet-button:hover {
    background-color: #ff4081;
    transform: scale(1.05);
}

#bookmarksContainer {
    position: relative;
    max-height: 300px;  /* Ajuste la hauteur de ton conteneur */
    overflow-y: auto;   /* Permet de faire défiler le contenu */
    scrollbar-width: thin;  /* Masque la barre de défilement pour Firefox */
    scrollbar-color: transparent transparent;  /* Masque la barre de défilement pour Firefox */
}

#bookmarksContainer::-webkit-scrollbar {
    width: 0px;  /* Cache la barre de défilement horizontale */
    height: 0px; /* Cache la barre de défilement verticale */
}

#bookmarksContainer::-webkit-scrollbar-thumb {
    background-color: transparent; /* Cache le "pouce" de la barre de défilement */
}

#bookmarkButton:disabled {
    background-color: #db5093af;  /* Gris clair */
    cursor: not-allowed;        /* Souris normale */
    pointer-events: none;       /* Désactive les événements de clic */
}

/* Optionnel : désactiver l'effet hover lorsque le bouton est désactivé */
#bookmarkButton:disabled:hover {
    background-color: #db5093af;  /* Maintient la couleur grise même en hover */
}

#resetButton:disabled {
    background-color: #db5093af;  /* Gris clair */
    cursor: not-allowed;        /* Souris normale */
    pointer-events: none;       /* Désactive les événements de clic */
}

/* Optionnel : désactiver l'effet hover lorsque le bouton est désactivé */
#resetButton:disabled:hover {
    background-color: #db5093af;  /* Maintient la couleur grise même en hover */
}

#bookmarksContainer.overflow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px; /* Ajuste cette valeur pour obtenir l'effet de fondu désiré */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.26)); /* Dégradé de transparent à blanc */
}