/* Réinitialisation de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #1e1e2f; /* Gris foncé */
    color: #ffffff;
    line-height: 1.6;
}

/* Header */
header {
    background: linear-gradient(135deg, #2a2a3c 0%, #3b3b4f 100%);
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

header img {
    max-width: 150px;
    transition: transform 0.3s ease;
}

header img:hover {
    transform: scale(1.05);
}

.search-bar {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 0 1rem;
}

.search-bar input {
    padding: 0.75rem 1.25rem;
    border: 2px solid #a855f7;
    border-radius: 25px;
    background-color: #3b3b4f;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 250px;
}

.search-bar input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    background-color: #4a4a5f;
}

.search-bar input::placeholder {
    color: #999;
}

.search-bar button {
    padding: 0.75rem 2rem;
    background-color: #a855f7;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background-color: #9333ea;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 0.25rem;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #a855f7;
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: #a855f7;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, #2a2a3c 0%, #3b3b4f 50%, #2a2a3c 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.1), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #a855f7; /* Violet clair */
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.2rem;
    color: #d1d1e0; /* Gris clair */
    margin-bottom: 1.5rem;
}

.hero-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    margin: 1.5rem auto 0;
}

/* Content Section */
.content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.content h2 {
    text-align: center;
}

.card {
    background: #2a2a3c; /* Gris foncé */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card img {
    width: 100%;
    height: auto;
    border-bottom: 3px solid #a855f7; /* Violet clair */
}

.card h3 {
    margin: 0;
    padding: 1rem;
    background: #3b3b4f; /* Gris intermédiaire */
    color: #ffffff;
}

.card p {
    padding: 0.5rem 1rem;
    color: #d1d1e0; /* Gris clair */
}

/* Section All Animes */
.all-animes {
    padding: 3rem 2rem;
    background-color: #1e1e2f; /* Gris foncé */
}

.all-animes h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #a855f7; /* Violet clair */
}

/* Section Content */
.section-content {
    padding: 3rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    margin: 0;
    font-size: 2rem;
    color: #a855f7;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.section-underline {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #a855f7; /* Violet clair */
}

.anime-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.anime-list .card {
    background: #2a2a3c; /* Gris foncé */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-align: center;
    padding: 1rem;
    max-width: 250px;
    width: 100%;
    margin: 0 auto;
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 85, 247, 0.1);
    position: relative;
}

.anime-list .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.3);
}

.anime-list .card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    border-bottom: 3px solid #a855f7; /* Violet clair */
    transition: transform 0.3s ease;
}

.anime-list .card:hover img {
    transform: scale(1.05);
}

.anime-list .card h3 {
    margin: 0.75rem 0;
    font-size: 1.2rem;
    color: #ffffff;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anime-list .card p {
    font-size: 0.9rem;
    color: #d1d1e0; /* Gris clair */
    min-height: 3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #2a2a3c 0%, #3b3b4f 100%);
    color: #ffffff;
    margin-top: 3rem;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

footer p {
    margin: 0.5rem 0;
    color: #d1d1e0; /* Gris clair */
    transition: color 0.3s ease;
}

footer a {
    color: #a855f7;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #d1a8ff;
    text-decoration: underline;
}

/* Media Queries */

/* Pour les écrans de moins de 768px */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 0.5rem;
    }

    .search-bar {
        flex-direction: column;
        align-items: center;
    }

    .search-bar input {
        min-width: 200px;
    }

    .hero {
        padding: 2.5rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .content, .anime-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .anime-list .card {
        max-width: 100%;
    }
}

/* Pour les écrans de moins de 480px */
@media (max-width: 480px) {
    header {
        padding: 0.75rem 0;
    }

    header img {
        max-width: 100px;
    }

    nav ul {
        gap: 0.5rem;
    }

    .search-bar input {
        min-width: 100%;
        font-size: 0.9rem;
    }

    .search-bar button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .content, .anime-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card h3 {
        font-size: 1rem;
    }

    .tags-container {
        gap: 0.75rem;
    }

    .tag-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

#iframe-container iframe {
    width: 100%;
    height: 60vh;
    max-width: 1080px;
    max-height: 720px;
}

@media (max-width: 768px) {
    #iframe-container iframe {
        height: 50vh;
    }
}

@media (max-width: 480px) {
    #iframe-container iframe {
        height: 40vh;
    }
}

/* Styles pour les tags */
.tags-section {
    background: linear-gradient(135deg, #2a2a3c 0%, #3b3b4f 100%);
    padding: 3rem 1rem;
    margin: 2rem 0;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.tags-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

.tags-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.tags-section h2 {
    text-align: center;
    color: #a855f7;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.tag-button {
    padding: 0.75rem 1.5rem;
    background-color: #3b3b4f;
    color: #ffffff;
    border: 2px solid #a855f7;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.tag-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #a855f7;
    transition: left 0.3s ease;
    z-index: -1;
}

.tag-button:hover {
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(168, 85, 247, 0.4);
}

.tag-button:hover::before {
    left: 0;
}

.tag-button.active {
    background-color: #a855f7;
    color: #ffffff;
}

/* Style pour afficher la moyenne des notes sur les cartes */
.card {
    position: relative;
}

.anime-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.anime-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.anime-tag {
    display: inline-block;
    background-color: rgba(168, 85, 247, 0.3);
    color: #a855f7;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.anime-tag:hover {
    background-color: rgba(168, 85, 247, 0.6);
}

/* Styles pour les emplacements de publicité */
#container-143a85b419d078b830da61a1f5c64c59,
[id^="container-"] {
    background: linear-gradient(135deg, #a855f7, #8b4fc7);
    border: 2px solid #a855f7;
    border-radius: 8px;
    padding: 2rem 1rem;
    margin: 2rem auto;
    max-width: 1456px;
    text-align: center;
    color: #ffffff;
    font-size: 0.9rem;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

#container-143a85b419d078b830da61a1f5c64c59::before,
[id^="container-"]::before {
    content: '📢 PUBLICITÉ';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #ffd700;
    color: #000000;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
}

#container-143a85b419d078b830da61a1f5c64c59::after,
[id^="container-"]::after {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    font-size: 0.65rem;
}

/* Sur mobile, rendre les pubs plus compactes */
@media (max-width: 768px) {
    #container-143a85b419d078b830da61a1f5c64c59,
    [id^="container-"] {
        padding: 1.5rem 0.75rem;
        margin: 1rem 0.5rem;
        min-height: 90px;
        max-width: 100%;
    }
    
    #container-143a85b419d078b830da61a1f5c64c59::after,
    [id^="container-"]::after {
        font-size: 0.6rem;
    }
}