* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* On met un fond noir par défaut au cas où le GIF met du temps à charger */
    background-color: #000;
    /* Remplace 'ton-image.gif' par le nom exact de ton fichier GIF */
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
        url('https://media0.giphy.com/media/v1.Y2lkPWVjZjA1ZTQ3NjEzNHZhdXVweWNqN3I3dDV1dnl4OWt6cnk3NHFmbDZiYnptM3lnYiZlcD12MV9naWZzX3JlbGF0ZWQmY3Q9Zw/C9VLSOoxiC4FYkbUxW/giphy.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: white;
    font-size: clamp(2em, 5vw, 3.5em);
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
    animation: bounce 2s ease-in-out infinite;
    margin: 30px 0;
    font-weight: 900;
    letter-spacing: 2px;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    padding: 35px;
    margin: 25px 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(-0.5deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #fffd6b, #c0906c, #ffd700, #ff8c00);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: rotate(0deg) scale(1.03) translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
        0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 107, 157, 0.3);
}

.card:hover::before {
    opacity: 0.1;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.8em;
    position: relative;
    display: inline-block;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, black, orange);
    transition: width 0.3s ease;
}

.card:hover h2::after {
    width: 100%;
}

.card p {
    line-height: 1.6;
    color: #555;
    margin: 10px 0;
}

.card ul {
    margin-left: 25px;
    margin-top: 10px;
    color: #555;
}

.card ul li {
    margin: 8px 0;
    position: relative;
    padding-left: 10px;
}

.card ul li::before {
    content: '→';
    position: absolute;
    left: -15px;
    color: #ffd56b;
    font-weight: bold;
}

.card video {
    width: 100%;
    max-width: 100%;
    border-radius: 15px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.card video:hover {
    transform: scale(1.02);
}

.card img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.card img:hover {
    transform: scale(1.05) rotate(2deg);
    filter: brightness(1.1);
}

.btn {
    background: linear-gradient(135deg, orange, darkorange, black);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 16px 35px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.5);
    background-position: 100% 0;
}

.btn:active {
    transform: scale(0.98) translateY(0);
}

.emoji {
    font-size: 2em;
    display: inline-block;
    animation: spin 3s linear infinite;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fact {
    background: linear-gradient(135deg, #fffacd 0%, #fff9c4 100%);
    padding: 20px;
    border-left: 6px solid #ffd700;
    margin: 15px 0;
    border-radius: 10px;
    display: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.joke {
    font-size: 1.3em;
    color: #2c5f7d;
    text-align: center;
    margin: 20px 0;
    font-weight: 500;
}

.floating {
    position: fixed;
    animation: float 4s ease-in-out infinite;
    font-size: 3em;
    z-index: 0;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-30px) rotate(5deg);
    }

    50% {
        transform: translateY(-15px) rotate(-5deg);
    }

    75% {
        transform: translateY(-25px) rotate(3deg);
    }
}

#rickrollVideo {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 90%;
    max-width: 800px;
    height: auto;
    aspect-ratio: 16 / 9;
    box-shadow: 0 0 60px rgba(183, 121, 5, 0.8),
        0 0 100px rgba(192, 160, 108, 0.6);
    border-radius: 15px;
    border: 4px solid #fff;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9998;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Compteur de clics stylisé */
#counter {
    display: inline-block;
    background: linear-gradient(135deg, #ffe46b, rgb(10, 10, 10));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3em;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 1s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .card {
        padding: 25px;
        margin: 20px 0;
    }

    .btn {
        padding: 14px 28px;
        font-size: 16px;
    }

    .floating {
        font-size: 2em;
    }

    #rickrollVideo {
        width: 95%;
    }
}

/* Animations pour les liens */
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    filter: brightness(1.1);
}

/* Amélioration du focus pour l'accessibilité */
button:focus,
a:focus {
    outline: 3px solid orange;
    outline-offset: 3px;
}