/* =====================================================================
   JEEMANIA - feuille de style "à l'ancienne" (esprit portail de jeux 2005-2010)
   ===================================================================== */

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 15px 0 30px;
  font: 12px/1.5 Verdana, Tahoma, Geneva, sans-serif;
  color: #222;
  background: #140800 url("../fonds/etoiles-acier.svg") repeat;
}
body.fond-perso { background-color: #000; background-repeat: repeat; }

a { color: #c03a00; }
a:hover { color: #ff6600; text-decoration: none; }
img { border: 0; }
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; }
code { font-family: "Courier New", monospace; background: #eee; padding: 0 3px; }

.petit { font-size: 11px; color: #666; }
.centre { text-align: center; }
.en-ligne { display: inline; margin: 0; }

/* ---------- Cadre de la page ---------- */
#page {
  width: 980px;
  max-width: 100%;
  margin: 0 auto;
  background: #f2f2f2;
  border: 1px solid #000;
  box-shadow: 0 0 25px rgba(0, 0, 0, .9), 0 0 0 4px rgba(255, 102, 0, .35);
}

/* ---------- Bandeau ---------- */
#bandeau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08) 0, rgba(255, 255, 255, 0) 50%),
    radial-gradient(ellipse at 20% 100%, #a32000 0, rgba(163, 32, 0, 0) 60%),
    linear-gradient(180deg, #2b0a00 0, #0d0300 100%);
  border-bottom: 3px solid #ff6600;
}
.logo img { display: block; width: 252px; height: auto; filter: drop-shadow(0 0 6px rgba(255, 120, 0, .6)); }
.bandeau-droite { text-align: right; }
.slogan {
  font: italic bold 20px "Trebuchet MS", sans-serif;
  color: #ffcc00;
  text-shadow: 2px 2px 0 #000, 0 0 10px #ff4400;
  margin-bottom: 12px;
}
.boite-membre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  color: #fff;
  font-size: 11px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid #ff6600;
  border-radius: 4px;
}
.boite-membre a, .lien-bouton { color: #ffcc00; font-weight: bold; }
.lien-bouton { background: none; border: 0; padding: 0; font: inherit; font-weight: bold; text-decoration: underline; cursor: pointer; }
.lien-bouton:hover { color: #fff; }

/* ---------- Menu à onglets brillants ---------- */
#menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 8px;
  background: linear-gradient(180deg, #ffb347 0, #ff8a00 49%, #e65c00 50%, #c94700 100%);
  border-top: 1px solid #ffd59e;
  border-bottom: 1px solid #6b2200;
}
#menu > a {
  padding: 9px 16px;
  color: #fff;
  font: bold 13px "Trebuchet MS", Verdana, sans-serif;
  text-decoration: none;
  text-shadow: 1px 1px 0 #7a2a00;
  border-right: 1px solid #b44200;
  border-left: 1px solid #ffb76b;
}
#menu > a:hover { background: rgba(255, 255, 255, .2); }
#menu > a.actif {
  background: linear-gradient(180deg, #5a1a00 0, #2b0a00 100%);
  color: #ffcc00;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6);
}
.recherche-menu { margin-left: auto; display: flex; gap: 4px; padding: 5px 0; }
.recherche-menu input { width: 190px; }

/* ---------- Texte défilant ---------- */
#defilant {
  overflow: hidden;
  white-space: nowrap;
  background: #000;
  color: #ffcc00;
  font: bold 12px "Courier New", monospace;
  padding: 4px 0;
  border-bottom: 1px solid #333;
}
.defilant-texte { display: inline-block; padding-left: 100%; animation: defiler 28s linear infinite; }
@keyframes defiler { to { transform: translateX(-100%); } }

/* ---------- Contenu ---------- */
#contenu { padding: 12px; }

.accroche {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: #fffbe6 linear-gradient(90deg, #fff4c2, #fffbe6);
  border: 1px solid #f0c040;
  border-left: 6px solid #ff6600;
}
.accroche h1 { margin: 0 0 4px; font-size: 22px; color: #c03a00; text-shadow: 1px 1px 0 #fff; }
.accroche p { margin: 0; font-size: 13px; }

.colonnes { display: grid; grid-template-columns: 1fr 250px; gap: 12px; align-items: start; }
.colonnes-egales { grid-template-columns: 1fr 1fr; }
.colonne-principale, .colonne-laterale { min-width: 0; }

/* ---------- Blocs avec barre de titre ---------- */
.bloc {
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 6px 6px 0 0;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .12);
}
.bloc-titre {
  margin: 0;
  padding: 6px 10px;
  font: bold 13px "Trebuchet MS", Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  background: linear-gradient(180deg, #555 0, #333 49%, #1a1a1a 50%, #2b2b2b 100%);
  border-bottom: 2px solid #ff6600;
  border-radius: 5px 5px 0 0;
}
.bloc-contenu { padding: 10px; }
.colonne-laterale .bloc-titre { background: linear-gradient(180deg, #ff9a2e 0, #ff7a00 49%, #e05a00 50%, #c94700 100%); border-bottom-color: #6b2200; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-block;
  padding: 4px 12px;
  font: bold 12px Verdana, sans-serif;
  color: #fff;
  text-decoration: none;
  text-shadow: 1px 1px 0 #7a2a00;
  cursor: pointer;
  background: linear-gradient(180deg, #ffb347 0, #ff8a00 49%, #e65c00 50%, #ff7b00 100%);
  border: 1px solid #a33a00;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.bouton:hover { color: #fff; filter: brightness(1.12); }
.bouton:active { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4); }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton-gros { padding: 8px 22px; font-size: 14px; }

/* ---------- Champs façon Windows XP ---------- */
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input:not([type]), select, textarea {
  padding: 3px 5px;
  font: 12px Verdana, sans-serif;
  color: #000;
  background: #fff;
  border: 1px solid #7f9db9;
}
input:focus, select:focus, textarea:focus { outline: 1px solid #ff8a00; border-color: #ff8a00; background: #fffdf0; }
textarea { width: 100%; resize: vertical; }

.formulaire { display: flex; flex-direction: column; gap: 4px; max-width: 360px; }
.formulaire label { font-weight: bold; margin-top: 6px; }
.formulaire .case { font-weight: normal; display: flex; gap: 6px; align-items: flex-start; }
.formulaire .bouton { margin-top: 10px; align-self: flex-start; }

fieldset { margin: 0 0 14px; padding: 8px 12px 12px; border: 1px solid #ccc; background: #fafafa; }
legend { padding: 0 6px; font-weight: bold; color: #c03a00; font-size: 13px; }

/* ---------- Messages ---------- */
.message {
  margin: 8px 12px;
  padding: 7px 10px 7px 30px;
  font-weight: bold;
  border: 1px solid;
  position: relative;
}
.message::before { position: absolute; left: 10px; }
.message.ok { background: #e9fbe0; border-color: #6c3; color: #2d6a00; }
.message.ok::before { content: "✔"; }
.message.erreur { background: #ffecec; border-color: #e33; color: #b00; }
.message.erreur::before { content: "✖"; }
.bloc-contenu .message { margin: 0 0 8px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 8px 16px;
  font-weight: bold;
  background: #ffffcc;
  border: 2px solid #f0c040;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 100;
}
#toast.visible { opacity: 1; }
#toast.erreur { background: #ffecec; border-color: #e33; color: #b00; }

/* ---------- Jaquettes générées ---------- */
.jaquette {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 2px 2px 0 rgba(0, 0, 0, .3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .25) 0, rgba(255, 255, 255, 0) 40%),
    radial-gradient(circle at 30% 25%, hsl(calc(var(--teinte) + 40), 90%, 60%), transparent 60%),
    linear-gradient(160deg, hsl(var(--teinte), 70%, 40%), hsl(calc(var(--teinte) - 30), 70%, 12%));
}
.jaquette > span {
  font: bold 34px Impact, "Arial Black", sans-serif;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
}
.jaquette.avec-image { overflow: hidden; background: #111; }
.jaquette.avec-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jaquette.mini { width: 38px; border-width: 1px; }
.jaquette.mini > span { font-size: 13px; letter-spacing: 0; }
.jaquette.grande { width: 200px; flex: none; }
.jaquette.grande > span { font-size: 60px; }

/* ---------- Vignettes (accueil, profil) ---------- */
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vignette {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px;
  text-align: center;
  color: #222;
  text-decoration: none;
  background: linear-gradient(180deg, #fff 0, #ececec 100%);
  border: 1px solid #ccc;
}
.vignette:hover { border-color: #ff8a00; background: linear-gradient(180deg, #fffdf0 0, #ffe9c7 100%); color: #222; }
.vignette .jaquette { width: 120px; margin-bottom: 4px; }
.vignette-titre { font-weight: bold; font-size: 13px; color: #c03a00; }
.vignette:hover .vignette-titre { text-decoration: underline; }
.vignette-note { margin-top: 3px; }
.vignette-vide { justify-content: center; min-height: 230px; border-style: dashed; background: #f8f8f8; }
.emplacement { font: bold 60px Impact, sans-serif; color: #ccc; }

.podium .rang-1 { border: 2px solid #e8b100; background: linear-gradient(180deg, #fffbe0, #ffe98a); }
.medaille {
  position: absolute;
  top: -1px;
  left: -1px;
  padding: 2px 8px;
  font: bold 12px Verdana, sans-serif;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  border: 1px solid #000;
}
.rang-1 .medaille { background: linear-gradient(#ffe066, #d4a000); }
.rang-2 .medaille { background: linear-gradient(#f0f0f0, #9a9a9a); }
.rang-3 .medaille { background: linear-gradient(#f0a060, #a0522d); }

.nouveau {
  display: inline-block;
  padding: 0 4px;
  font: bold 10px Verdana, sans-serif;
  color: #ff0;
  background: #e00;
  border: 1px solid #800;
  animation: clignoter 1s steps(1) infinite;
}
.vignette .nouveau { position: absolute; top: 6px; right: 6px; }
@keyframes clignoter { 50% { color: #fff; background: #ff6600; } }

/* ---------- Étoiles ---------- */
.etoiles { white-space: nowrap; font-size: 14px; letter-spacing: -1px; }
.etoile.pleine { color: #ffb400; text-shadow: 0 0 1px #a06000; }
.etoile.vide { color: #ccc; }
.etoile.demi { background: linear-gradient(90deg, #ffb400 50%, #ccc 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Barre latérale ---------- */
.liste-avis, .liste-stats { list-style: none; margin: 0; }
.liste-avis li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dotted #ccc; font-size: 11px; }
.liste-avis li:last-child { border-bottom: 0; }
.liste-avis .etoiles { font-size: 11px; }
.liste-stats li { padding: 3px 0 3px 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M0 0L8 4L0 8Z' fill='%23ff6600'/%3E%3C/svg%3E") no-repeat 2px 8px; }
.liste-stats b { color: #c03a00; font-size: 14px; }
.bloc-pub .bloc-contenu { background: repeating-linear-gradient(45deg, #fff8e0 0 10px, #fff 10px 20px); }

/* ---------- Avatars ---------- */
.avatar-mini, .avatar-moyen, .avatar-grand { image-rendering: pixelated; border: 1px solid #000; background: #000; flex: none; }
.avatar-mini { width: 24px; height: 24px; }
.avatar-moyen { width: 40px; height: 40px; }
.avatar-grand { width: 128px; height: 128px; border: 3px solid #fff; outline: 1px solid #000; box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); }

/* ---------- Catalogue ---------- */
.filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 8px; margin-bottom: 8px; background: #f0f0f0; border: 1px solid #ccc; }
.filtres label { display: flex; flex-direction: column; font-weight: bold; font-size: 11px; }
.filtres input[type="search"] { width: 260px; }

.nuage-categories { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.nuage-categories a {
  padding: 1px 7px;
  font-size: 11px;
  text-decoration: none;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.nuage-categories a:hover { background: #ffe9c7; border-color: #ff8a00; }
.nuage-categories a.actif { color: #fff; background: #ff7a00; border-color: #a33a00; font-weight: bold; }

.tableau-jeux { width: 100%; border-collapse: collapse; border: 1px solid #aaa; }
.tableau-jeux th {
  padding: 5px 6px;
  text-align: left;
  font-size: 11px;
  background: linear-gradient(180deg, #fdfdfd 0, #e2e2e2 100%);
  border: 1px solid #aaa;
}
.tableau-jeux th a { color: #000; text-decoration: none; }
.tableau-jeux th a:hover { color: #c03a00; text-decoration: underline; }
.tableau-jeux td { padding: 4px 6px; border-bottom: 1px solid #ddd; vertical-align: middle; }
.tableau-jeux tr.impaire td { background: #f5f5f5; }
.tableau-jeux tbody tr:hover td { background: #fff4d6; }
.tableau-jeux .ligne-groupe td {
  padding: 4px 8px;
  font-weight: bold;
  color: #fff;
  background: #555;
  text-shadow: 1px 1px 0 #000;
}
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin: 10px 0; font-size: 11px; }
.pagination a, .pagination span {
  min-width: 24px;
  padding: 2px 7px;
  text-align: center;
  border: 1px solid #ccc;
  background: linear-gradient(#fff, #e9e9e9);
}
.pagination a { text-decoration: none; }
.pagination a:hover { border-color: #ff8a00; background: #ffe9c7; }
.pagination .actuelle { color: #fff; font-weight: bold; background: #ff7a00; border-color: #a33a00; }
.pagination .inactif { color: #aaa; }
.pagination .points { border: 0; background: none; }

.col-jaquette { width: 48px; }
.col-note { white-space: nowrap; }
.titre-jeu { font-weight: bold; font-size: 13px; }

/* ---------- Bouton favori ---------- */
.btn-favori {
  width: 26px;
  height: 24px;
  font-size: 14px;
  line-height: 1;
  color: #bbb;
  background: linear-gradient(#fff, #e6e6e6);
  border: 1px solid #aaa;
  border-radius: 3px;
  cursor: pointer;
}
.btn-favori:hover { color: #ff3366; border-color: #ff3366; }
.btn-favori.actif { color: #fff; background: linear-gradient(#ff6b8e, #e0003a); border-color: #900028; }
.btn-favori.gros { width: auto; height: auto; padding: 6px 14px; font: bold 13px Verdana, sans-serif; }

/* ---------- Fiche jeu ---------- */
.fiche { display: flex; gap: 16px; align-items: flex-start; }
.fiche-infos { flex: 1; }
.infos { border-collapse: collapse; margin-bottom: 8px; }
.infos th, .infos td { padding: 4px 8px; border: 1px solid #ddd; text-align: left; vertical-align: top; }
.infos th { background: #f0f0f0; white-space: nowrap; }
.description { font-size: 13px; padding: 8px; background: #fafafa; border-left: 3px solid #ff8a00; }

.avis { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dotted #ccc; }
.avis:last-child { border-bottom: 0; }
.avis p { margin: 4px 0 0; }

#form-note { display: flex; flex-direction: column; gap: 6px; }
#form-note label { font-weight: bold; }
#form-note .bouton { align-self: flex-start; }
.choix-etoiles { display: flex; justify-content: center; }
.choix-etoiles button {
  padding: 0 1px;
  font-size: 30px;
  line-height: 1;
  color: #ccc;
  background: none;
  border: 0;
  cursor: pointer;
}
.choix-etoiles button.allumee { color: #ffb400; text-shadow: 0 0 2px #a06000; }
.choix-etoiles button:focus-visible { outline: 1px dotted #000; }

/* ---------- Profil ---------- */
.profil-entete { display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(180deg, #fff 0, #f0f0f0 100%); }
.profil-infos { flex: 1; min-width: 0; }
.profil-pseudo { font: bold 26px "Trebuchet MS", sans-serif; color: #c03a00; text-shadow: 1px 1px 0 #ffd59e; }
.profil-description { margin-top: 8px; padding: 8px 10px; background: #fff; border: 1px dashed #ccc; overflow-wrap: anywhere; }

.choix-images { display: flex; flex-wrap: wrap; gap: 6px; }
.choix-images label { position: relative; cursor: pointer; text-align: center; }
.choix-images input { position: absolute; opacity: 0; pointer-events: none; }
.choix-avatars img { display: block; width: 56px; height: 56px; image-rendering: pixelated; border: 2px solid #ccc; }
.choix-avatars label:hover img { border-color: #ff8a00; }
.choix-avatars input:checked + img { border-color: #ff6600; outline: 2px solid #ffcc00; transform: scale(1.08); }
.choix-fonds label { width: 92px; }
.apercu-fond { display: block; width: 92px; height: 56px; border: 2px solid #ccc; background-repeat: repeat; }
.choix-fonds label:hover .apercu-fond { border-color: #ff8a00; }
.choix-fonds input:checked + .apercu-fond { border-color: #ff6600; outline: 2px solid #ffcc00; }
.choix-images input:focus-visible + * { outline: 2px dotted #000; }

.compteur-caracteres { text-align: right; }
.compteur-caracteres.presque-plein { color: #d00; font-weight: bold; }

.liste-favoris { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.favori { display: flex; align-items: center; gap: 8px; padding: 5px; background: #fff; border: 1px solid #ddd; cursor: pointer; }
.favori:hover { border-color: #ff8a00; }
.favori:has(input:checked) { background: #fff4d6; border-color: #ff6600; }
.favori.desactive { opacity: .5; cursor: not-allowed; }

/* ---------- Page légale ---------- */
.legal h2 { margin: 22px 0 6px; padding-bottom: 3px; font-size: 17px; color: #c03a00; border-bottom: 1px solid #ff8a00; }
.legal h3 { margin: 12px 0 4px; font-size: 13px; }
.legal p, .legal li { font-size: 12px; }
.sommaire { padding: 6px 10px; background: #f0f0f0; border: 1px solid #ccc; }

/* ---------- Pied de page ---------- */
#pied {
  padding: 12px;
  text-align: center;
  color: #ccc;
  font-size: 11px;
  background: linear-gradient(180deg, #2b2b2b 0, #0d0d0d 100%);
  border-top: 3px solid #ff6600;
}
#pied a { color: #ffcc00; }
.pied-liens { margin-bottom: 10px; }
.compteur { margin-bottom: 10px; }
.compteur span {
  display: inline-block;
  width: 14px;
  margin: 0 1px;
  font: bold 14px "Courier New", monospace;
  color: #3f3;
  background: #000;
  border: 1px solid #555;
  text-shadow: 0 0 4px #3f3;
}
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 8px; }
.badge-88 {
  display: inline-flex;
  height: 15px;
  font: 9px/13px Verdana, sans-serif;
  color: #fff;
  border: 1px solid #000;
  white-space: nowrap;
}
.badge-88 { padding-left: 4px; background: #666; }
.badge-88 b { margin-left: 4px; padding: 0 4px; font-weight: normal; color: #000; }
.b-php b { background: #8892bf; color: #fff; }
.b-html b { background: #e44d26; color: #fff; }
.b-css b { background: #9c3; }
.b-1024 b { background: #fc0; }
.b-gamer { background: #000; }
.b-gamer b { background: #ff6600; color: #fff; }
.copyright { margin: 0; color: #888; }

/* ---------- Petits écrans ---------- */
@media (max-width: 800px) {
  body { padding: 0; }
  #page { border: 0; }
  #bandeau { flex-direction: column; }
  .bandeau-droite { text-align: center; }
  .slogan { font-size: 16px; margin-bottom: 6px; }
  #menu { padding: 0; }
  #menu > a { flex: 1; text-align: center; padding: 8px 6px; font-size: 12px; }
  .recherche-menu { width: 100%; padding: 5px 8px; }
  .recherche-menu input { flex: 1; width: auto; }
  .colonnes, .colonnes-egales { grid-template-columns: 1fr; }
  .grille-3 { grid-template-columns: 1fr; }
  .fiche, .profil-entete { flex-direction: column; align-items: center; }
  .filtres input[type="search"] { width: 100%; }
  .filtres label { flex: 1 1 140px; }
  .cacher-mobile { display: none; }
  #contenu { padding: 8px; }
}

/* ---------- Liens vers les profils ---------- */
.lien-membre { font-weight: bold; color: #222; }
.lien-membre:hover { color: #ff6600; }
