@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=Space+Grotesk:wght@400;600&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@48,400,0,0&display=swap');

:root {
    --bg-color-1: #f8fafc;
    --bg-color-2: #e2e8f0;
    --container-bg: rgba(255, 255, 255, 0.98);
    --anecdote-bg: rgba(241, 245, 249, 0.9);
    --text-color: #1e293b;
    --title-color: #0f172a;
    --serie-color: #2563eb;
    --theme-filter: invert(0);
    --border-color: rgba(0, 0, 0, 0.08);
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06),
                  0 2px 4px rgba(0, 0, 0, 0.03);
    --accent-rgb: 37, 99, 235;
    --hover-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color-1: #0f172a;
    --bg-color-2: #1e293b;
    --container-bg: rgba(30, 41, 59, 0.98);
    --anecdote-bg: rgba(51, 65, 85, 0.4);
    --text-color: #e2e8f0;
    --title-color: #f8fafc;
    --serie-color: #60a5fa;
    --theme-filter: invert(1);
    --border-color: rgba(255, 255, 255, 0.08);
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
                  0 2px 4px rgba(0, 0, 0, 0.2);
    --accent-rgb: 96, 165, 250;
    --hover-shadow: 0 8px 20px rgba(96, 165, 250, 0.25);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-color-1) 0%, var(--bg-color-2) 100%);
    color: var(--text-color);
    text-align: center;
    transition: background-color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.4s;
}

.container {
    background: var(--container-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    max-width: 550px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 0.5s ease-in-out;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    margin: 60px 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.3s;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .container:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--title-color);
    letter-spacing: -0.5px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.1s;
}

/* Animations pour le changement d'anecdotes */
@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Animations */
@keyframes slideLeftOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideLeftIn {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRightOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes slideRightIn {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotateOut {
    0% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: rotate(-360deg) scale(0.5);
    }
}

@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: rotate(360deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes categoryChangeOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes categoryChangeIn {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.anecdote-box {
    position: relative;
    margin-bottom: 20px;
    padding: 25px;
    background: var(--anecdote-bg);
    backdrop-filter: blur(12px);
    border-radius: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    will-change: transform, opacity;
}

/* Classes d'animation */
.anecdote-box.slide-left-out {
    animation: slideLeftOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.anecdote-box.slide-right-out {
    animation: slideRightOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.anecdote-box.rotate-out {
    animation: rotateOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.anecdote-box.category-change-out {
    animation: categoryChangeOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.anecdote-box.slide-left-in {
    animation: slideLeftIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.anecdote-box.slide-right-in {
    animation: slideRightIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.anecdote-box.rotate-in {
    animation: rotateIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.anecdote-box.category-change-in {
    animation: categoryChangeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.date-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    width: 100%;
}

.date {
    font-weight: bold;
    font-size: 16px;
    color: #bdbdbd;
}

#date-picker {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.date-btn {
    background: var(--container-bg);
    backdrop-filter: blur(12px);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    min-width: 200px;
}

.date-btn:hover {
    transform: translateY(-2px);
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    box-shadow: var(--hover-shadow);
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        min-height: 250px;
        margin: 40px 0;
        max-width: 90%;
        padding: 20px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .date-btn {
        font-size: 16px;
        padding: 14px 20px;
        min-width: 260px;
    }

    .date-container {
        padding: 15px 0;
    }

    .serie {
        font-size: 20px;
        margin: 20px 0;
    }

    .anecdote {
        font-size: 17px;
        line-height: 1.6;
        padding: 0 5px;
    }

    .no-anecdote {
        font-size: 17px;
        padding: 25px 15px;
    }

    .category-btn {
        font-size: 15px;
        padding: 12px 18px;
    }

    .nav-btn, .control-btn {
        font-size: 15px;
        padding: 12px 20px;
    }

    footer {
        font-size: 15px;
        margin: 20px 0;
    }

    .arrow-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .navigation {
        height: 50px;
    }

    #random-btn span {
        display: none;  /* Cacher le texte */
    }

    #random-btn::before {
        content: "🎲";  /* Afficher uniquement l'emoji */
    }

    .control-btn {
        padding: 12px;  /* Réduire le padding pour un bouton plus compact */
    }
}

.serie {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--serie-color);
    margin: 15px 0;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background: linear-gradient(120deg, var(--serie-color), var(--serie-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideInFade 0.6s ease-out forwards;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.1s;
}

.anecdote {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    font-weight: 400;
    animation: slideInFade 0.6s ease-out forwards;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0s;
}

/* Navigation */
.navigation {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    height: 60px;
    justify-content: center;
}

.arrow-btn {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    background: var(--container-bg);
    backdrop-filter: blur(12px);
    color: var(--text-color);
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

.arrow-btn:hover {
    transform: translateY(-2px);
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.hidden {
    display: none;
}

/* Footer */
footer {
    margin-top: 30px;
    margin-bottom: 30px;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
}

footer:hover {
    opacity: 1;
}

footer a {
    text-decoration: none;
    color: var(--serie-color);
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 6px;
    background: linear-gradient(120deg, var(--serie-color), var(--serie-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer a:hover {
    background: var(--serie-color);
    -webkit-text-fill-color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.copyright {
    margin-top: 30px;
    font-size: 13px;
    color: var(--text-color);
    opacity: 0.7;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.2px;
    padding: 10px 15px;
    border-radius: 8px;
    background: var(--anecdote-bg);
    backdrop-filter: blur(12px);
}

.tiktok-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    background: var(--container-bg);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 42px;
    height: 42px;
    position: relative;
    backdrop-filter: blur(8px);
}

.tiktok-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(45deg, rgba(32, 240, 240, 0.6), rgba(246, 3, 111, 0.6));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.tiktok-logo svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.tiktok-logo span {
    position: absolute;
    left: 38px;
    opacity: 0;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    transform: translateY(-50%);
    top: 50%;
    color: white;
    z-index: 1;
}

.tiktok-logo:hover {
    width: 170px;
    background: linear-gradient(45deg, #20F0F0, #F6036F);
    box-shadow: 0 4px 15px rgba(32, 240, 240, 0.3);
}

.tiktok-logo:hover::before {
    opacity: 0;
}

.tiktok-logo:hover svg {
    color: white;
}

.tiktok-logo:hover span {
    opacity: 1;
}

@media (max-width: 600px) {
    .tiktok-logo {
        width: 36px;
        height: 36px;
    }

    .tiktok-logo svg {
        width: 18px;
        height: 18px;
        left: 9px;
    }

    .tiktok-logo span {
        left: 34px;
        font-size: 13px;
    }

    .tiktok-logo:hover {
        width: 150px;
    }
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#return-today {
    margin-top: 15px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    border-radius: 10px;
    background: var(--container-bg);
    backdrop-filter: blur(12px);
    color: var(--text-color);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
}

#return-today:hover {
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.no-anecdote {
    padding: 20px;
    background: var(--anecdote-bg);
    border-radius: 12px;
    box-shadow: inset 0px 0px 15px rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 16px;
}

.no-anecdote p {
    color: var(--text-color);
}

/* Masquer l'élément */
.hidden {
    display: none;
}

/* Adaptation mobile */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        min-height: 250px;
        margin: 40px 0;
        max-width: 90%;
        padding: 20px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .date-container {
        padding: 15px 0;
    }

    .serie {
        font-size: 20px;
        margin: 20px 0;
    }

    .anecdote {
        font-size: 17px;
        line-height: 1.6;
        padding: 0 5px;
    }

    .no-anecdote {
        font-size: 17px;
        padding: 25px 15px;
    }

    .category-btn {
        font-size: 15px;
        padding: 12px 18px;
    }

    .nav-btn, .control-btn {
        font-size: 15px;
        padding: 12px 20px;
    }

    footer {
        font-size: 15px;
        margin: 20px 0;
    }

    .arrow-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .navigation {
        height: 50px;
    }

    #random-btn span {
        display: none;  /* Cacher le texte */
    }

    #random-btn::before {
        content: "🎲";  /* Afficher uniquement l'emoji */
    }

    .control-btn {
        padding: 12px;  /* Réduire le padding pour un bouton plus compact */
    }
}

.theme-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--container-bg);
    backdrop-filter: blur(12px);
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
    padding: 0;
    line-height: 1;
}

.theme-btn:hover {
    transform: translateY(-2px);
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    box-shadow: var(--hover-shadow);
}

/* Suppression de l'effet de brillance qui causait le problème */
.arrow-btn:after, .theme-btn:after, #return-today:after {
    display: none;
}

/* Amélioration de l'effet hover des boutons */
.arrow-btn:hover, .theme-btn:hover, #return-today:hover {
    transform: translateY(-2px);
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.control-btn {
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--container-bg);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.control-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    box-shadow: var(--hover-shadow);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .control-btn {
        font-size: 16px;
        width: 40px;
        height: 40px;
    }
}

/* Styles de base communs */
.blur-backdrop {
    background: var(--container-bg);
    backdrop-filter: blur(12px);
}

.interactive {
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.interactive:hover {
    transform: translateY(-2px);
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    box-shadow: var(--hover-shadow);
}

/* Boutons et contrôles */
.btn {
    composes: interactive blur-backdrop;
    box-shadow: var(--box-shadow);
}

.arrow-btn {
    composes: btn;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn {
    composes: btn;
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px;
    border-radius: 50%;
    font-size: 20px;
}

.speed-select {
    composes: interactive blur-backdrop;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

/* États spéciaux */
.control-btn.active {
    background: var(--container-bg);
    color: var(--serie-color);
    border: 2px solid var(--serie-color);
    padding: 7px 14px;
    font-weight: 600;
}

.hidden {
    display: none;
}

/* Conteneurs */
.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.autoplay-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Boutons de catégorie */
.category-btn {
    padding: 15px 25px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: var(--container-bg);
    backdrop-filter: blur(12px);
    color: var(--text-color);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
    width: 160px;
    opacity: 0.8;
}

/* Menu catégories desktop */
.category-nav {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.category-btn:hover {
    transform: translateX(10px);
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    opacity: 1;
    box-shadow: 0 5px 20px rgba(var(--accent-rgb), 0.2);
}

.category-btn.active {
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    opacity: 1;
    transform: translateX(10px);
}

/* Menu catégories mobile */
.category-nav-mobile {
    display: none;

    width: calc(100% - 30px); /* Largeur totale moins les marges */
}

@media (max-width: 768px) {
    .category-nav {
        display: none;
    }

    .category-btn.active {
        transform: translateX(0px);
        transform: translateY(-5px);
    }

    .category-nav-mobile {
        display: flex;
        justify-content: space-around;
        gap: 10px;
        margin-bottom: 20px;  /* Ajouter une marge en bas du menu mobile */
    }

    .category-btn {
        width: auto;
        font-size: 13px;
        padding: 10px 15px;
    }

    .container {
        margin-top: 20px;     /* Ajouter une marge en haut du container */
    }

    footer {
        margin-top: 10px; /* Ajuster la marge du footer */
    }
}

/* Ajouter ces styles et supprimer les styles .navigation et .arrow-btn */
.navigation-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 25px 0;
    padding: 0;
    height: 50px;
}

.nav-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--container-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    font-family: 'Material Symbols Rounded';
    font-size: 24px;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--box-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    padding: 0;
    margin: 0;
    line-height: 46px;
    text-align: center;
    position: relative;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    background: var(--serie-color);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.3);
}

.nav-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(var(--accent-rgb), 0.2);
}

#random-btn {
    width: 46px !important;
    height: 46px !important;
    font-size: 24px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 46px !important;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24 !important;
}

#random-btn span, #random-btn::before {
    display: none !important;
}

@media (max-width: 768px) {
    .navigation-buttons {
        gap: 16px;
        height: 44px;
    }

    .nav-btn, #random-btn {
        width: 42px !important;
        height: 42px !important;
        font-size: 22px !important;
        line-height: 42px !important;
    }
}

/* Animation du bouton de thème */
@keyframes themeSwitch {
    0% {
        transform: scale(1) rotate(0);
    }
    50% {
        transform: scale(0.9) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

/* Transitions séquentielles pour le changement de thème */
.theme-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0s;
}

.theme-btn.switching {
    animation: themeSwitch 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ordre des transitions */
.anecdote, #date-picker {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0s;
}

h1, .serie {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.1s;
}

.anecdote-box {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.2s;
}

.container {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.3s;
}

body {
    transition: background-color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.4s;
}

.control-btn, .category-btn, #random-btn, .tiktok-logo {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.5s;
}

/* Classe pour réinitialiser les délais */
[data-theme-reset] * {
    transition-delay: 0s !important;
}

#random-btn span, #random-btn::before {
    display: none !important;
}

#random-btn {
    width: 45px !important;
    height: 45px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
}

@media (max-width: 768px) {
    .copyright {
        margin-top: 0px;
        font-size: 11px;
    }

    .nav-btn, .control-btn {
        padding: 10px 20px;
        font-size: 13px;
        width: auto;
        height: auto;
    }
    
    #random-btn {
        padding: 10px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
    }
}

.burger-menu {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(12px);
}

.burger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-color);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.burger-menu span:nth-child(1) { top: 14px; }
.burger-menu span:nth-child(2) { top: 19px; }
.burger-menu span:nth-child(3) { top: 24px; }

.burger-menu.active span:nth-child(1) {
    transform: translateX(-50%) rotate(45deg);
    top: 19px;
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: translateX(-50%) rotate(-45deg);
    top: 19px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--container-bg);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    width: 85%;
    max-width: 300px;
}

.mobile-menu-item {
    padding: 15px 20px;
    border-radius: 12px;
    background: var(--anecdote-bg);
    color: var(--text-color);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    border: 1px solid var(--border-color);
}

.mobile-menu.active .mobile-menu-item {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-item.active {
    background: var(--serie-color);
    color: white;
    border-color: transparent;
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .category-nav {
        display: none;
    }

    .category-nav-mobile {
        display: none;
    }
}

/* Style des boutons de navigation */
.nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    background: var(--bg-color-2) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
    box-shadow: none !important;
    transform: none !important;
    filter: grayscale(1);
}

/* Suppression des styles du logo */
.logo, .logo img {
    display: none;
}

@media (min-width: 769px) {
    .logo {
        top: 20px;
        left: 20px;
    }

    .theme-btn {
        right: 20px;
    }

    .burger-menu {
        left: 80px;
    }
}

@media (max-width: 768px) {
    .logo {
        width: 42px;
        height: 42px;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo img {
        width: 36px;
        height: 36px;
    }

    .theme-btn {
        top: 20px;
        right: 20px;
    }

    .burger-menu {
        left: 20px;
    }
}

