@font-face {
  font-family: "Pokemon Classic";
  src: url(fonts/Pokemon_Classic.ttf) format("truetype");	
}

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
body {
            font-family: 'Pokemon Classic';
            background: linear-gradient(135deg, #e4f7ff 0%, #bdf9ff 100%);
            line-height: 1.6;
            min-height: 100vh;
			font-size: 12px;
        }

/* Barre de navigation */
nav { 
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Style de la liste de navigation (bordeau ex) */
ul#line {
    list-style: none;
    display: flex;
    gap: 15px;
    align-items: center;
    background-color: #89b5d93c;
    padding: 6px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- LE CONTENEUR PRINCIPAL --- */
.dropdown-container {
    position: relative; /* Indispensable pour positionner la liste en dessous */
    display: inline-block;
    cursor: pointer;
}
.dropdown-content li {
    font-size: 10px; /* Adapte la taille de police si besoin */
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}
/* Style du lien "Types de Pokémon" */
.menu-title {
    text-decoration: none;
    color: rgb(0, 0, 0); /* Adapte selon ton thème */
    padding: 10px;
    font-size: 1.2rem;
}

/* --- LA LISTE DÉROULANTE (Cachée par défaut) --- */
.dropdown-content {
    display: none; /* CORRECTION 1 : On cache la liste par défaut */
    position: absolute;
    top: 100%; /* S'affiche juste en dessous du titre */
    background-color: white;
    min-width: 200px; /* On élargit la boîte */
    box-shadow: 0px 8px 16px rgba(0,0,0,0.3); /* Jolie ombre */
    z-index: 1000; /* S'assure que ça passe DEVANT les autres éléments */
    border-radius: 8px;
    padding: 10px 0;
    
    /* CORRECTION 2 : On force l'affichage en colonne (1 par ligne) */
    flex-direction: column; 
    list-style: none;
}

/* --- L'EFFET DE SURVOL (HOVER) --- */
/* Quand on survole le conteneur, on affiche le contenu */
.dropdown-container:hover .dropdown-content {
    display: flex; /* On passe de 'none' à 'flex' pour l'afficher */
}

/* --- LES ÉLÉMENTS DE LA LISTE --- */
.dropdown-content li {
    padding: 2px 10px;
    text-align: center; /* Centre les images */
    transition: background-color 0.2s;
}

.dropdown-content li:hover {
    background-color: #c3e5fb; /* Effet au survol */
    background-clip: padding-box;
}

/* Déplacer uniquement l'icône au survol, pas le bloc li */
.dropdown-content li img {
    transition: transform 0.2s;
}
.dropdown-content li:hover img {
    transform: translateX(8px);
}

/* --- CORRECTION 3 : TAILLE DES IMAGES --- */
/* On cible les images générées par le JS */
.dropdown-content img {
    width: 120px; /* On force une largeur plus grande (ajuste selon tes goûts) */
    height: auto; /* Garde les proportions */
    display: block; /* Évite les espaces fantômes sous l'image */
    margin: 0 auto; /* Centre l'image */
}


/* mess de bienvenu */
h1 { 
	text-align: center;
	margin-top: 20px;
	margin-bottom: 20px;
	color: #000000;
}

/* description des types lors de recherche filtré */
h2 { 
	text-align: center;
	margin-top: 20px;
	margin-bottom: 20px;
	color: #000000;
    font-size: small;
    margin-left: 30%;
    margin-right: 30%;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    background-color: rgb(255, 255, 255);
    border: 1px solid #b2dcfb;
    border-radius: 30px;
    padding: 10px;
}

/* STYLES DU FOOTER DE L'INDEX */
footer{
        flex-shrink:0;
        position: relative;
        width: 100%;
        background: rgb(208, 242, 254);
        box-shadow: #a4d6ed 0px -4px 6px -1px;
}
.contenu-footer{
        width: 70%;
        margin: 0 auto;
        display: flex;
        font-size:18px;
        padding: 30px 0 30px;
}
footer .bloc {
        width: 50%;
        margin:0 10% 0 10%;
}

footer img {
        width: 35%;
        height: auto;
        margin-bottom: 10px;
}


/* Styles de la liste des pokémons */
#liste-pokemon { /* changer en div peut-être */
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin-bottom: 40px;
    margin-left: 20%;
    margin-right: 20%;
	list-style: none;
}

#liste-pokemon li { /* Box pour chaque Pokémon */
	background-color: #ffffff;
	border: 1px solid #91d3fc;
	border-radius: 8px;
	width: 150px;
	text-align: center;
	padding: 10px;
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s;
}


/* Styles pour le système de déroulement (les flèches de bas de page) */
.pokemon-visible {
    display: list-item;
}

.pokemon-hidden {
    display: none;
}

/* effet au survol https://codepen.io/wahidullah_karimi/pen/ByyXGdq modifié */
#liste-pokemon li:hover {
	transform: scale(1.05);
	transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(100, 181, 246, 0.3);
    border-color: rgba(100, 181, 246, 0.5);
}

/* image des pokémons */
#liste-pokemon li img { 
	width: 100px;
	height: 100px;
	object-fit: contain;
	margin-bottom: 10px;
    object-position: center;
}

/* Bloc clickable par dessus l'image */
#liste-pokemon li a { 
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

/* Call de la barre de recherche par le CSS */
#search-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Style de la barre de recherche */
#search-input {
    width: 70%;
    max-width: 600px;
    font-size: 16px;
    border: 1px solid #91d3fc;
    border-radius: 5px;
    padding: 8px 10px;
    background: #fff;
    color: #000;
}

/* Part 1 : Style des boutons de navigation - Placement des bloc */
div#boutons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin-bottom: 40px;
    margin-left: 20%;
    margin-right: 20%;
	list-style: none;
}

/* Part 2 : Style des boutons */
div#boutons button {
    background-color: #f2f2f2;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100px;
    height: 40px;
    text-align: center;
    padding: 10px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    cursor: pointer;
    font-size: 16px;
}

/* Part 3.1 : Effet au survol gauche */
div#boutons button.moins:hover {
    transform: scale(1.05);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(100, 181, 246, 0.3);
    border-color: rgba(100, 181, 246, 0.5);
}

/* Part 3.2 : Effet au survol droit */
div#boutons button.plus:hover {
    transform: scale(1.05);
    transform: translateY(5px);
    box-shadow: 0 8px 30px rgba(100, 181, 246, 0.3);
    border-color: rgba(100, 181, 246, 0.5);
}


/* STYLES SPÉCIFIQUES À LA PAGE POKÉMON */

html.pokemon-page body {
            font-family: 'Pokemon Classic';
            line-height: 1.6;
            padding: 20px;
            min-height: 100vh;
            display: block;
}

/* Carte de fond de pokemon */
html.pokemon-page .container {
            background: #f0f0f0;
            border-radius: 30px;
            padding: 40px;
            max-width: 1200px;
            margin: 30px auto 0 auto;
            box-shadow: 0 8px 30px rgba(100, 181, 246, 0.3);
}

/* Le header contient le nom et le tag */
html.pokemon-page .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Le numéro du Pokémon */
html.pokemon-page .pokemon-number {
    color: #666;
    font-size: 18px;
    margin-bottom: 5px;
}

/* Le nom du Pokémon */
html.pokemon-page .pokemon-name {
    color: #2d3561;
    font-size: 42px;
    font-weight: bold;
}

/* Styles du tag type de Pokémon */
html.pokemon-page .types {
    margin-top: 8px;
    align-items: right;
    flex-wrap: nowrap;
    height: 50px;
    width: auto;
    scale: 0.5;
    flex: none; 
}

/* Forcer l'affichage horizontal des types et des évolutions */
html.pokemon-page #evolutions {
    display: flex;
    gap: 20px;
}

/* Met la page en mode grid (évite d'avoir une page déffilable sur pc) */
html.pokemon-page .main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Style de l'image du Pokémon */
html.pokemon-page .pokemon-image {
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* Styles des onglets des détails */
html.pokemon-page .tabs {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
}

/* Styles de l'onglets 'détails' */
html.pokemon-page .tab {
    padding: 10px 0;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    position: relative;
}

/* La barre de la tab 'détails' */
html.pokemon-page .tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #2d3561;
}

/* Système de changement de couleur du texte selon la couleur de la page pokemon*/
/* Le JS de pokemon.js ajoute une variable CSS --primary-color avec la couleur principale du pokémon */
html.pokemon-page {--primary-text-color: var(--primary-color, #2d3561);}
html.pokemon-page .pokemon-name,
html.pokemon-page .desc-section h3,
html.pokemon-page .tab.active {color: var(--primary-text-color);}

/* ----------------------------------- */
/* ------------PARTIE WITP ----------- */
/* ----------------------------------- */
html.witp body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden; /* IMPORTANT : Empêche le scroll causé par la rotation */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Nécessaire pour placer le fond par rapport au body */
}

/* 2. Le style du grand fond animé */
html.witp .page-background {
    position: fixed; /* Reste fixe même si on scrolle (si jamais) */
    top: -100%;       /* On le décale pour bien le centrer */
    left: -100%;
    width: 300%;     /* Il doit être immensément grand pour couvrir les coins */
    height: 300%;
    z-index: -1;     /* On le met tout au fond, derrière tout le reste */
    
    /* Le dégradé "Soleil Levant" */
    background: repeating-conic-gradient(
        from 0deg,
        #f5f7fa 0deg 10deg,   /* Couleur claire (blanc/gris) */
        #ddefff 10deg 20deg   /* Couleur un peu plus foncée (bleu gris) */
    );
    
    /* Animation TRES lente (60s) */
    animation: spin-bg 60s linear infinite;
}

/* 3. On garde la game-container bien visible au-dessus */
html.witp .game-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3); /* Ombre un peu plus marquée */
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 10; /* S'assure que le jeu est AU-DESSUS du fond */
}

/* 4. L'animation de rotation */
@keyframes spin-bg {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

html.witp .logo {
    width: 150px;
    margin-bottom: 10px;
}

/* 1. Ajustement du conteneur parent */
html.witp .image-wrapper {
    position: relative; /* Nécessaire pour positionner le fond */
    overflow: hidden;   /* Coupe ce qui dépasse du cadre */
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3c5aa6; /* Une couleur de fond de base (bleu Pokémon) */
    border-radius: 20px;       /* Optionnel : arrondir les coins */
    margin-bottom: 20px;
}

/* 2. Création des bandes qui tournent */
html.witp .rotating-background {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;  /* Doit être plus grand que le conteneur pour couvrir les coins */
    height: 200%;
    z-index: 0;   /* Place le fond DERRIÈRE le Pokémon */
    
    /* C'est ici que la magie opère : les bandes */
    background: repeating-conic-gradient(
        from 0deg,
        #3c5aa6 0deg 15deg,  /* Couleur 1 (Bleu foncé) */
        #5a7bc2 15deg 30deg  /* Couleur 2 (Bleu plus clair) */
    );
    
    /* L'animation de rotation */
    animation: spin 10s linear infinite;
}

/* 3. Assurer que le Pokémon est DEVANT le fond */
html.witp #pokemon-image {
    position: relative;
    z-index: 1; /* Place l'image AU-DESSUS du fond */
    max-height: 200px; /* Ajuste selon tes besoins */
    width: auto;
}

/* 4. Définition de l'animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* LA MAGIE EST ICI : Rend l'image noire */
html.witp .silhouette {
    filter: brightness(0) contrast(0);
    pointer-events: none; /* Empêche le clic droit triche */
}

/* Quand le pokémon est trouvé */
html.witp .revealed {
    filter: brightness(1) contrast(1);
    transform: scale(1.1);
}
html.witp .revealed {
    filter: brightness(1) contrast(1);
    transform: scale(1.1);
}

/* Inputs et Boutons */
html.witp .input-area {
    
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

html.witp input {
    font-family: Pokemon Classic;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    width: 60%;
}

html.witp button {
    font-family: Pokemon Classic;
    padding: 10px 20px;
    background-color: #ffffff; /* Jaune Pokémon */
    border: 2px solid #3c5aa6; /* Bleu Pokémon */
    color: #3c5aa6;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

html.witp button:hover {
    background-color: #ffdb4d;
}

html.witp #next-btn {
    background-color: #3c5aa6;
    color: white;
    margin-top: 15px;
    width: 100%;
}

html.witp .hidden {
    display: none;
}

/* Messages de succès/erreur */
html.witp .success {
    color: #2ecc71;
    font-weight: bold;
    font-size: 1.2rem;
}

html.witp .error {
    color: #e74c3c;
    font-weight: bold;
}
