/* ==========================================================================
   Zone Gaming
   ========================================================================== */

.page-zone {
  background: var(--fond);
}

/* En-tête (partagé avec la page configurateur) */
.cfg-entete {
  border-bottom: 1px solid var(--bordure);
  background: var(--surface);
}

.cfg-entete__int {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

.cfg-retour {
  color: var(--texte-2);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.cfg-retour:hover {
  color: var(--accent);
}

.zone-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Sélecteur de langue de la Zone Gaming */
.zone-langue select {
  height: 34px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-petit);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 7px center / 14px;
  appearance: none;
  color: var(--texte-2);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

/* Arabe : le contenu passe en droite à gauche */
html[dir="rtl"] .zone__tete,
html[dir="rtl"] .zone__note,
html[dir="rtl"] .pc-ligne,
html[dir="rtl"] .jeu__meta {
  text-align: right;
}

html[dir="rtl"] .zone-nav {
  margin-left: 0;
  margin-right: auto;
}

.zone-nav a {
  color: var(--texte-2);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.zone-nav a:hover {
  color: var(--accent);
}

.zone {
  padding: 36px 22px 70px;
}

/* --- En-tête de page ----------------------------------------------------- */

.zone__tete {
  margin-bottom: 26px;
}

.zone__surtitre {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.zone__tete h1 {
  font-family: var(--police-titre);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.zone__tete h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #4f46e5, #8b5cf6 60%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.zone__texte {
  max-width: 620px;
  color: var(--texte-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

.zone__outils {
  margin-top: 18px;
}

.zone__recherche {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: min(360px, 100%);
}

.zone__recherche svg {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--muet);
}

.zone__recherche input {
  width: 100%;
  padding: 11px 14px 11px 37px;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 0.9rem;
}

.zone__recherche input:focus {
  outline: 2px solid var(--accent-bordure);
}

/* --- Cartes de jeu ------------------------------------------------------- */

.zone__grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.jeu {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--bordure);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.jeu:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 24px 50px -30px rgba(11, 11, 15, 0.45);
}

.jeu__visuel {
  position: relative;
  height: 118px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 20% 10%, var(--teinte) 0%, transparent 65%),
    linear-gradient(140deg, #12142a 0%, #1b1e38 100%);
  overflow: hidden;
}

.jeu__visuel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.05) 0 2px,
    transparent 2px 12px
  );
}

.jeu__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

/* Léger voile pour que le titre reste lisible sur les jaquettes claires */
.jeu__visuel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 9, 13, 0.45) 100%);
  pointer-events: none;
}

.jeu__initiale {
  position: relative;
  z-index: 1;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #fff;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.jeu__corps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 15px 15px;
  flex: 1;
}

.jeu__nom {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.jeu__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muet);
}

.jeu__tag {
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 600;
  color: var(--texte-2);
}

.jeu__actions {
  display: flex;
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
}

.jeu__bouton {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--bordure);
  background: var(--surface);
  color: var(--texte-2);
  border-radius: 999px;
  padding: 7px 3px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.jeu__bouton:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.jeu__bouton--plein {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.jeu__bouton--plein:hover {
  background: var(--accent-fonce);
  color: #fff;
}

.zone__note {
  margin-top: 26px;
  font-size: 0.78rem;
  color: var(--muet);
  line-height: 1.55;
  max-width: 720px;
}

/* --- Panneau de configuration ------------------------------------------- */

.zone-panneau {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}

.zone-panneau[hidden] {
  display: none;
}

.zone-panneau__fond {
  position: absolute;
  inset: 0;
  background: rgba(9, 11, 20, 0.6);
  backdrop-filter: blur(3px);
}

.zone-panneau__boite {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, 90vh);
  display: flex;
  flex-direction: column;
  background: var(--panneau);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.65);
}

.zone-panneau__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--bordure);
}

.zone-panneau__entete h2 {
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.zone-panneau__fermer {
  border: 0;
  background: var(--surface-2);
  color: var(--texte-2);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
}

.zone-panneau__contenu {
  overflow: auto;
  padding: 16px 20px 20px;
}

.pc-ligne {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--bordure);
  font-size: 0.85rem;
}

.pc-ligne:last-of-type {
  border-bottom: 0;
}

.pc-ligne__cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muet);
}

.pc-ligne__nom {
  font-weight: 600;
  line-height: 1.3;
}

.pc-ligne__boutique {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: var(--texte-2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 7px;
}

.pc-ligne__prix {
  font-weight: 800;
  white-space: nowrap;
}

.pc-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid var(--texte);
}

.pc-total span {
  font-size: 0.86rem;
  color: var(--texte-2);
}

.pc-total strong {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.pc-boutiques {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--texte-2);
}

.pc-boutiques div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.pc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pc-bouton {
  border: 1px solid var(--bordure);
  background: var(--surface);
  color: var(--texte-2);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.pc-bouton:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pc-bouton--plein {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pc-bouton--plein:hover {
  background: var(--accent-fonce);
  color: #fff;
}

.pc-note {
  margin-top: 12px;
  font-size: 0.76rem;
  color: var(--muet);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .zone {
    padding: 24px 16px 60px;
  }

  .zone__grille {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .jeu__visuel {
    height: 92px;
  }

  .pc-ligne {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pc-ligne__cat {
    grid-column: 1 / -1;
  }
}

/* Sélection multiple de jeux */
.jeu__choix {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(8, 9, 13, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.jeu--choisi .jeu__choix {
  background: var(--accent);
  border-color: var(--accent);
}

.jeu--choisi {
  box-shadow: 0 0 0 2px var(--accent);
}

.zone-barre {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--panneau);
  border: 1px solid var(--bordure);
  border-radius: 999px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.zone-barre[hidden] {
  display: none;
}

.zone-barre__texte {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.zone-barre__bouton {
  border: 1px solid var(--bordure);
  background: var(--surface-2);
  color: var(--texte-2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.zone-barre__bouton--plein {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.zone-barre__bouton--discret {
  background: transparent;
  border-color: transparent;
  color: var(--muet);
}

.zone-barre__bouton:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.zone-barre__bouton--plein:hover {
  background: var(--accent-fonce);
  color: #fff;
}

@media (max-width: 640px) {
  .zone-barre {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 18px;
    left: 12px;
    right: 12px;
    transform: none;
    bottom: 12px;
  }
}

/* Liste des jeux couverts dans le panneau */
.pc-couverts {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--texte-2);
  line-height: 1.5;
}

.jeu__tag--neuf {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* Ma configuration face aux jeux */
.ma-config {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 18px 0 6px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  background: var(--surface);
}

.ma-config__texte {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 240px;
  flex: 1;
}

.ma-config__texte strong {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muet);
}

.ma-config__texte span {
  font-size: 0.88rem;
  color: var(--texte-2);
}

.ma-config__actions {
  display: flex;
  gap: 8px;
}

.ma-config__bouton {
  padding: 9px 16px;
  border: 1px solid var(--bordure-forte);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--texte-2);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.ma-config__bouton--plein {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.ma-config__bouton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ma-config__resultat {
  flex: 1 1 100%;
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--texte-2);
}

.jeu__verdict {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
}

.jeu__verdict--reco {
  background: #dcfce7;
  color: #146c43;
}

.jeu__verdict--min {
  background: #fef3c7;
  color: #92400e;
}

.jeu__verdict--non {
  background: #fee2e2;
  color: #991b1b;
}

/* --------------------------------------------------------------------------
   Animation « gaming » derrière le titre de la Zone Gaming :
   une grille en perspective qui avance, deux halos qui respirent, et un
   balayage lumineux sur « par jeu ».
   -------------------------------------------------------------------------- */
.zone__tete {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 30px;
  border-radius: 22px;
  isolation: isolate;
}

/* Grille en perspective, animée vers le spectateur */
.zone__tete::before {
  content: "";
  position: absolute;
  inset: auto -20% -55% -20%;
  height: 130%;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(124, 58, 237, 0.30) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 211, 238, 0.22) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(320px) rotateX(62deg);
  transform-origin: top center;
  mask-image: linear-gradient(to bottom, transparent, #000 45%, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%, transparent 92%);
  animation: zone-grille 7s linear infinite;
}

@keyframes zone-grille {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 56px, 0 56px; }
}

/* Deux halos qui respirent */
.zone__tete::after {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 180%;
  z-index: -3;
  background:
    radial-gradient(38% 60% at 18% 30%, rgba(124, 58, 237, 0.42), transparent 70%),
    radial-gradient(34% 55% at 82% 22%, rgba(34, 211, 238, 0.30), transparent 72%),
    radial-gradient(30% 50% at 60% 92%, rgba(219, 39, 119, 0.22), transparent 70%);
  filter: blur(22px);
  contain: paint;
  animation: zone-respire 9s ease-in-out infinite alternate;
}

@keyframes zone-respire {
  from { opacity: 0.75; transform: scale(1) translateY(0); }
  to   { opacity: 1;    transform: scale(1.08) translateY(-8px); }
}

/* Balayage lumineux sur le mot accentué */
.zone__tete h1 em {
  background: linear-gradient(100deg, #a78bfa 0%, #22d3ee 40%, #f472b6 70%, #a78bfa 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: zone-brillance 5s ease-in-out infinite;
}

@keyframes zone-brillance {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .zone__tete::before,
  .zone__tete::after,
  .zone__tete h1 em {
    animation: none;
  }
}

/* Thème clair : halos beaucoup plus discrets, sinon le titre baigne dans le rose */
html[data-theme="classique"] .zone__tete::after,
body:not([data-theme]) .zone__tete::after {
  opacity: 0.45;
  filter: blur(42px);
}

html[data-theme="classique"] .zone__tete::before,
body:not([data-theme]) .zone__tete::before {
  opacity: 0.6;
}

html[data-theme="classique"] .zone__tete,
body:not([data-theme]) .zone__tete {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
}
