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

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(-45deg, #2c2c2c, #e63946, #900C3F, #2c2c2c);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
  color: #eee;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

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

.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
}

main.container {
  flex: 1;
  width: 95%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px 30px;
  background-color: rgba(44,44,44,0.95);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  color: #f0f0f0;
  transition: background-color 0.3s ease;
  position: center;
}

/* HEADER */
header {
  background-color: #2c2c2c;
  padding: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  color: #eee;
}

header h1 {
  text-align: center;
  font-size: 2.2rem;
  color: #e63946;
  margin-bottom: 0;
  font-weight: 700;
  letter-spacing: 1.1px;
}

header h1 a.logo {
  color: #e63946;
  text-decoration: none;
  transition: color 0.3s ease;
}

header h1 a.logo:hover {
  color: #900c3f;
}

/* NAVIGATION */
nav.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.nav-center > a.nav-link {
  color: #eee;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  font-size: 1rem;
}

.nav-center > a.nav-link:hover {
  color: #e63946;
  background-color: rgba(230, 57, 70, 0.2);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background-color: transparent;
  border: none;
  color: #eee;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: 1rem;
  white-space: nowrap;
}

.dropbtn:hover,
.dropbtn.active {
  color: #e63946;
  background-color: rgba(230, 57, 70, 0.2);
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #2c2c2c;
  min-width: 160px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  border-radius: 8px;
  z-index: 1000;
  top: 100%;
  left: 0;
  transition: opacity 0.3s ease;
}

.dropdown-content a {
  color: #eee;
  padding: 12px 18px;
  text-decoration: none;
  display: block;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  font-size: 0.95rem;
}

.dropdown-content a:hover {
  background-color: #e63946;
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

.nav-right {
  display: flex;
  gap: 18px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav-right a {
  color: #eee;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  font-size: 1rem;
}

.nav-right a:hover {
  color: #e63946;
  background-color: rgba(230, 57, 70, 0.2);
}

/* FOOTER */
footer {
  background-color: #111;
  color: #bbb;
  text-align: center;
  padding: 24px 15px;
  font-size: 0.95rem;
  margin-top: auto;
  box-shadow: inset 0 1px 6px rgba(255, 255, 255, 0.06);
}

footer a {
  color: #e63946;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

footer a:hover {
  text-decoration: underline;
  color: #900c3f;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  nav.main-nav {
    flex-direction: column;
    padding: 0 15px;
    gap: 12px;
  }

  .nav-center {
    justify-content: center;
    gap: 14px;
    width: 100%;
  }

  .nav-right {
    justify-content: center;
    width: 100%;
  }

  .nav-center > a.nav-link,
  .dropbtn,
  .nav-right a {
    padding: 12px 20px;
    width: auto;
    text-align: center;
    font-size: 1.1rem;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    background-color: transparent;
    display: none;
    border-radius: 0;
  }

  .dropdown-content.active {
    display: block;
  }
}

/* === Styles spécifiques pour la page Jeux === */

.onglet {
  background: rgba(44,44,44,0.95);
  border-radius: 16px;
  padding: 35px;
  margin-bottom: 35px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.6);
  color: #eee;
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  transition: background-color 0.3s ease;
}

.onglet:hover {
  background-color: rgba(230, 57, 70, 0.15);
}

.onglet img {
  max-width: 220px;
  max-height: 160px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.onglet img:hover {
  transform: scale(1.05);
}

.onglet-content {
  flex: 1;
  min-width: 220px;
}

.onglet-content h3 {
  margin-bottom: 14px;
  color: #e63946;
  font-weight: 700;
  font-size: 1.5rem;
  text-shadow: 0 0 6px rgba(230, 57, 70, 0.8);
}

.onglet-links a {
  display: inline-block;
  margin-right: 16px;
  padding: 10px 18px;
  background-color: #e63946;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  margin-top: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.5);
}

.onglet-links a:hover {
  background-color: #900c3f;
  box-shadow: 0 6px 18px rgba(144, 12, 63, 0.7);
}

.filtre {
  margin-bottom: 35px;
  text-align: center;
}

.filtre a {
  color: #eee;
  margin: 0 14px;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  background-color: rgba(230, 57, 70, 0.75);
  transition: background-color 0.3s ease;
  box-shadow: 0 3px 10px rgba(230, 57, 70, 0.7);
}

.filtre a.active,
.filtre a:hover {
  background-color: #e63946;
  color: white;
  box-shadow: 0 6px 18px rgba(230, 57, 70, 0.9);
}



/* Formulaire inscription */
.wrapper form input[type="text"],
.wrapper form input[type="email"],
.wrapper form input[type="tel"],
.wrapper form input[type="password"],
.wrapper form select {
  background-color: #1e1e1e; /* plus foncé que #2c2c2c */
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  color: #f0f0f0;
  font-size: 1rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.wrapper form input[type="text"]:focus,
.wrapper form input[type="email"]:focus,
.wrapper form input[type="tel"]:focus,
.wrapper form input[type="password"]:focus,
.wrapper form select:focus {
  outline: none;
  background-color: #2a2a2a; /* un peu plus foncé au focus */
  box-shadow: 0 0 8px #e63946;
  color: #fff;
}

/* Autre formulaire (exemple .form-container) */
form input,
form select {
  background-color: #111; /* plus foncé que rgba(255,255,255,0.08) */
  color: white;
  border: 1px solid #555;
  padding: 8px 10px;
  margin-bottom: 1.2rem;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

form input:focus,
form select:focus {
  background-color: #000; /* encore plus foncé au focus */
  border-color: #3c8dbc;
  outline: none;
}




.g-recaptcha {
  margin: 20px 0;
  transform: scale(0.95);
  transform-origin: 0 0;
}

/* Messages d’erreur et succès */
.message {
  max-width: 450px;
  margin: 20px auto;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  font-size: 1.1rem;
}

.message.error {
  background-color: #b32b3b;
  color: #fbeaea;
  box-shadow: 0 0 10px #b32b3b;
}

.message.success {
  background-color: #2f7a32;
  color: #d7f3d7;
  box-shadow: 0 0 10px #2f7a32;
}

/* Responsive Form */
@media (max-width: 500px) {
  .wrapper form {
    padding: 25px 20px;
    margin: 20px auto;
  }
  
  .wrapper form button[type="submit"] {
    font-size: 1rem;
    padding: 12px 0;
  }
}



.form-container {
  width: 100%;
  max-width: 450px;
  margin: 50px auto;
  padding: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
}

form input,
form select,
form button {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  transition: background-color 0.3s, border-color 0.3s;
}

form input:focus,
form select:focus {
  background-color: rgba(255, 255, 255, 0.12);
  outline: none;
  border: 1px solid #e63946;
}

form button {
  background-color: #e63946;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  color: white;
}

form button:hover {
  background-color: #900C3F;
}

.g-recaptcha {
  margin: 20px 0;
}


.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  margin: 15px 0;
}

.checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #e63946;
  cursor: pointer;
}

.form-container {
  max-width: 480px;
  margin: 2rem auto;
  background: #222;
  padding: 20px;
  border-radius: 10px;
  color: white;
  box-shadow: 0 0 10px #000;
}

.form-container h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: bold;
}

form input,
form select {
  background-color: #2c2c2c; /* même gris foncé que l'inscription */
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  color: #f0f0f0;
  font-size: 1rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1.2rem;
}

form input:focus,
form select:focus {
  background-color: #3d3d3d; /* un peu plus clair au focus */
  box-shadow: 0 0 8px #e63946;
  outline: none;
  color: #fff;
}

.btn-submit {
  width: 100%;
  background-color: #3c8dbc;
  color: white;
  border: none;
  padding: 12px;
  font-size: 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-submit:hover {
  background-color: #2a6a9b;
}

.logout-btn {
  display: inline-block;
  margin-top: 1rem;
  background: #e74c3c;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #c0392b;
}

.onglets-ligne {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

.onglet {
  flex: 1 1 30%;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  max-width: 300px;
  text-align: center;
}

.onglet img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.dernier-ajouts {
  background-color: #1e1e1e;
  color: #fff;
  padding: 30px 20px;
  border-radius: 10px;
  margin-top: 30px;
}

.dernier-ajouts h3 {
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}

.onglet {
  background-color: #2a2a2a;
  color: #fff;
  text-align: center; /* Centre le texte */
  padding: 15px;
  border-radius: 10px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centre horizontalement les éléments enfants */
  justify-content: center;
}


.onglet {
  background-color: #2a2a2a !important;
  color: #fff;
  padding: 15px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.onglet img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.onglet a {
  color: #00aaff;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
}

.pagejeux .jeux {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;
}

.pagejeux .jeu {
  flex: 1 1 calc(33.333% - 20px);
  background-color: #1f1f1f;
  border-radius: 12px;
  padding: 18px;
  color: #eee;
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.25s ease;
}

.pagejeux .jeu:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.7);
}

.pagejeux .jeu h4 {
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #e63946;
}

.pagejeux .jeu img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: cover;
}

.pagejeux .jeu p {
  flex-grow: 1;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 15px;
  color: #ccc;
}

.pagejeux .liens a {
  margin: 0 6px;
  padding: 8px 14px;
  background-color: #e63946;
  color: white;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.pagejeux .liens a:hover {
  background-color: #b82c34;
}

@media (max-width: 900px) {
  .pagejeux .jeu {
    flex: 1 1 calc(50% - 20px);
  }
}

@media (max-width: 600px) {
  .pagejeux .jeu {
    flex: 1 1 100%;
  }
}

.jeu-image {
  width: 100%;
  height: 200px; /* Hauteur fixe, à adapter */
  object-fit: cover;
  border-radius: 8px;
  margin-top: 10px;
  display: block;
}

/* Pour que chaque article ait la même hauteur (optionnel) */
article.jeu-article {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}


.stars {
  cursor: pointer;
  font-size: 1.5rem;
  color: #ccc;
}
.star.filled {
  color: #e63946;
}
.star:hover,
.star:hover ~ .star {
  color: #e63946;
}

/* Conteneur image avec effet ambilight */
.img-container {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #111; /* couleur de fond au cas où */
}

/* Image affichée entière, sans crop */
.img-container img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  z-index: 2;
  background-color: transparent;
}

/* Ambilight : pseudo-élément flouté derrière l’image */
.img-container::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 8px;
  background-image: var(--img-url);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.6);
  transform: scale(1.1);
  z-index: 1;
  transition: filter 0.3s ease;
}

/* Titre plus visible avec marge et taille correcte */
article h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
  word-break: break-word; /* évite couper mots bizarrement */
  color: #fff;
  text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

/* Texte contenu */
article p {
  margin: 10px 0;
  text-align: left;
  min-height: 60px;
  color: #ddd;
}

/* Style boutons liens */
article a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

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

/* Couleurs spécifiques boutons */
article a.bg-amazon {
  background-color: #e63946;
  color: white;
}

article a.bg-trailer {
  background-color: #1d3557;
  color: white;
}
