/* preview/style.css — feuille de style centrale du nouveau rendu.
   Reconstruite proprement (pas une copie du vrai site), mais reprend les
   éléments visuels déjà éprouvés des widgets (étoiles, boutons Steam/EGS). */

:root {
  --ink: #1f2733;
  --ink-soft: #5a6572;
  --paper: #f6f7f9;
  --card: #ffffff;
  --line: #e2e6eb;
  --accent: #1a6fb5;
  --accent-dark: #14577f;
  --header-bg: #12141a;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

html { scrollbar-gutter: stable; overflow-y: scroll; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(31, 39, 51, 0.70), transparent 55%),
    radial-gradient(circle at 88% 45%, rgba(255, 215, 0, 0.18), transparent 20%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---------------- Header ---------------- */
.header {
  background-color: var(--header-bg);
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 16px 16px;
  color: #fff;
  position: relative;
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.header .logo { height: 56px; display: block; }
@media (min-width: 900px) {
  .header .logo { height: 100px; }
  .header-inner { padding: 10px 32px; }
}
.header .logo-text { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; }
.header .lang-switcher { position: relative; order: 3; margin-left: auto; }
.header .lang-switcher-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: 1px solid #333a45; border-radius: 6px;
  color: #cfd6de; padding: 6px 10px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; text-transform: uppercase;
}
.header .lang-switcher-toggle:hover { color: #fff; border-color: var(--accent); }
.header .lang-switcher-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  list-style: none; margin: 0; padding: 6px; min-width: 160px;
  background: var(--header-bg); border: 1px solid #333a45; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35); z-index: 20;
}
.header .lang-switcher.open .lang-switcher-menu { display: block; }
.header .lang-btn {
  display: block; color: #cfd6de; border-radius: 5px;
  padding: 7px 10px; font-size: 13px;
}
.header .lang-btn:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.header .lang-btn.active { color: var(--accent); font-weight: 600; }

.main-nav { flex: 1; }
.menu-toggle {
  display: none;
  background: transparent; border: 1px solid #333a45; color: #fff;
  font-size: 18px; border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column;
  gap: 8px;
}
.main-nav ul li a {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 10px 10px 10px 2px; min-width: 84px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.09);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  color: #e7edf3; font-size: 12.5px; font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.main-nav ul li a:hover {
  background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.22);
  transform: translateY(-2px); text-decoration: none; color: #fff;
}

@media (max-width: 780px) {
  .menu-toggle { display: inline-block; order: 2; }
  .main-nav { order: 4; flex-basis: 100%; }
  .main-nav ul {
    grid-template-rows: none; grid-auto-flow: row; grid-template-columns: 1fr;
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease; margin-top: 8px; gap: 4px;
  }
  .main-nav.open ul { max-height: 500px; }
  .main-nav ul li a { flex-direction: row; justify-content: flex-start; min-width: 0; clip-path: none; border-radius: 8px; }
}

/* ---------------- Layout principal ---------------- */
.main-container {
  max-width: 1180px; margin: 0 auto; padding: 28px 20px 50px;
  display: grid; grid-template-columns: 1fr 300px; gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .main-container { grid-template-columns: 1fr; }
}
.content {
  background: #f3f3f3; border: 1px solid var(--line); border-radius: 12px;
  padding: 26px 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 8px 20px rgba(0,0,0,0.06);
}
.content h1 { font-family: var(--font-display); font-size: 26px; margin: 0 0 14px; }
.content h2 { font-family: var(--font-display); font-size: 19px; margin: 26px 0 10px; }
.content h3 { font-size: 16px; margin: 18px 0 8px; }
.article-body p { margin: 0 0 14px; }
.article-body img.imgInText { border-radius: 8px; margin: 12px 0; display: block; }

.anchor ul { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 4px; }
.anchor li { border-bottom: none; }
.anchor a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 8px; font-size: 14.5px; font-weight: 600;
  color: var(--ink); border-left: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.anchor a::before { content: '›'; color: var(--accent); font-weight: 700; }
.anchor a:hover { background: var(--paper); border-left-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Section ciblée par un lien d'ancre : brève mise en évidence pour repérer où on a atterri */
h2[id], h3[id] { transition: background-color 0.3s ease, padding-left 0.3s ease; border-radius: 6px; }
h2[id].anchor-flash, h3[id].anchor-flash { animation: anchor-flash 1.8s ease; }
@keyframes anchor-flash {
  0%   { background-color: rgba(26,111,181,0.16); padding-left: 10px; }
  100% { background-color: transparent; padding-left: 0; }
}

.date { font-size: 12px; color: var(--ink-soft); margin-top: 24px; }

/* ---------------- FAQ (support) ---------------- */
.faq-item { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.faq-item h3 {
  margin: 0; padding: 13px 16px; cursor: pointer; position: relative;
  background: var(--paper); font-size: 14.5px;
}
.faq-item h3::after {
  content: '▾'; position: absolute; right: 16px; transition: transform 0.2s;
}
.faq-item h3.active::after { transform: rotate(180deg); }
.faq-item p { margin: 0; padding: 0 16px; max-height: 0; overflow: hidden; transition: all 0.25s ease; }
.faq-item p.open { padding: 4px 16px 16px; max-height: 800px; }
.faq-item code { background: #eef0f3; padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }

/* ---------------- Sidebar ---------------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.thumbnail-slider {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: #f3f3f3; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 8px 20px rgba(0,0,0,0.06);
}
.thumbnail-slider a { display: block; border-radius: 6px; overflow: hidden; line-height: 0; }
.thumbnail-slider img { width: 100%; height: 70px; object-fit: cover; transition: transform 0.2s; }
.thumbnail-slider a:hover img { transform: scale(1.05); }

.card {
  background: #f3f3f3; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 6px 14px rgba(0,0,0,0.05);
}
.sidebar a { display: block; }
.sidebar a:hover { text-decoration: none; }
.sidebar a:hover .card { border-color: var(--accent); }
.card-content h4 { margin: 0; font-size: 14px; color: var(--ink); font-weight: 600; }

/* ---------------- Reviews / rating ---------------- */
.rating { display: flex; align-items: center; gap: 5px; margin: 10px 0; font-size: 14px; }
.stars { color: #f5c518; font-size: 1.4em; display: inline-block; }
.stars::before {
  content: '★★★★★';
  background: linear-gradient(90deg, #f5c518 calc(var(--rating) * 20%), rgba(0,0,0,0.15) calc(var(--rating) * 20%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.review-count-text { color: var(--ink-soft); font-style: italic; font-size: 13px; }

.released { margin: 10px 0 !important; display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; }
.release-dates { display: flex; flex-direction: column; }
.platform-tag { font-size: 0.75em; font-style: italic; opacity: 0.7; margin-left: 4px; }

/* ---------------- Boutons d'achat ---------------- */
.product-top-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 10px 0 18px;
}
.product-buy-col { text-align: right; margin-left: auto; }
.button-container { text-align: right; margin: 8px 0; }
.steam-buy-button, .egs-buy-button {
  display: inline-flex; align-items: center; text-decoration: none;
  font-family: var(--font-display); font-size: 14px; color: #fff; border: none;
  cursor: pointer; overflow: hidden; border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.steam-buy-button:hover, .egs-buy-button:hover { text-decoration: none; }
.steam-buy-button .price, .egs-buy-button .price { background: #000; padding: 8px 12px; font-weight: 700; }
.steam-buy-button .price { color: #c6d4df; }
.steam-buy-button .buy-text { background: #6fa720; padding: 8px 14px; font-weight: 600; }
.steam-buy-button:hover .price { background: #333; }
.steam-buy-button:hover .buy-text { background: #218838; }
.egs-buy-button .price { color: #fff; }
.egs-buy-button .buy-text { background: #fff; color: #2F2D2E; padding: 8px 14px; font-weight: 600; }
.egs-buy-button:hover .price { background: #2F2D2E; }
.egs-buy-button:hover .buy-text { background: #25BCFF; color: #fff; }


/* ---------------- Partage ---------------- */
.share-widget { display: flex; gap: 10px; margin: 14px 0; }
.share-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--header-bg); color: #fff;
  border: 1px solid var(--header-bg);
}
.share-icon:hover { background: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------------- Formulaire de contact ---------------- */
.contact-form, .confirmation {
  max-width: 560px; margin: 20px 0; padding: 22px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.contact-form .form-group { margin-bottom: 16px; }
.contact-form label {
  display: block; margin-bottom: 5px; font-weight: 600; font-size: 13.5px; color: var(--ink);
}
.contact-form .required::after { content: " *"; color: var(--accent-dark); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; box-sizing: border-box; background: var(--card);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .char-count { font-size: 11.5px; color: var(--ink-soft); text-align: right; margin-top: 4px; }
.contact-form button {
  background: var(--accent); color: #fff; padding: 11px 24px; border: none;
  border-radius: 7px; cursor: pointer; font-size: 15px; font-weight: 600;
  transition: background 0.15s ease;
}
.contact-form button:hover { background: var(--accent-dark); }
.confirmation { display: none; text-align: center; }
.confirmation h2 { color: var(--accent); margin-top: 0; }

/* ---------------- Vignettes aléatoires (page d'accueil) ---------------- */
.random-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px;
}
@media (max-width: 640px) { .random-cards { grid-template-columns: 1fr; } }
.random-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  color: var(--ink); transition: border-color 0.15s, transform 0.15s;
}
.random-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.random-card img { width: 100%; height: 140px; object-fit: cover; }
.random-card-body { padding: 14px 16px; }
.random-card-body h2 { font-family: var(--font-display); font-size: 15.5px; margin: 0 0 8px; }
.random-card-body p { font-size: 13px; color: var(--ink-soft); margin: 0; line-height: 1.5; }

/* ---------------- Footer ---------------- */
.footer { background: var(--header-bg); color: #b7c0cb; padding: 26px 20px; margin-top: 40px; }
.footer-content {
  max-width: 1180px; margin: 0 auto; font-size: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-text-links a { color: #cfd6de; }
.footer-text-links a:hover { color: #fff; }
.footer-icon-links { display: flex; gap: 12px; align-items: center; }
.footer-icon-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,0.06);
}
.footer-icon-links a:hover { background: rgba(255,255,255,0.14); }
.footer-icon-links img { width: 20px; height: 20px; object-fit: contain; }

@media (max-width: 600px) {
  .footer-content { flex-direction: column; text-align: center; }
}

/* ---------------- Bannière cookies ---------------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #12141a; color: #e7edf3; padding: 14px 20px;
  display: none; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
}
.cookie-banner a { color: var(--accent); }
.cookie-banner button {
  border: none; border-radius: 6px; padding: 7px 16px; font-size: 13px; cursor: pointer; font-weight: 600;
}
#accept-cookies { background: var(--accent); color: #fff; }
#refuse-cookies { background: transparent; color: #cfd6de; border: 1px solid #333a45 !important; }

/* ---------------- 404 (grimoire) ---------------- */
.grimoire-404 {
  background: linear-gradient(135deg, #2b0a0a, #1a1a1a);
  padding: 40px 24px; border-radius: 14px; text-align: center; color: #e0e0e0;
}
.grimoire-page h1 { font-size: 6rem; color: #ff4d4d; margin: 0 0 16px; font-family: var(--font-display); }
.grimoire-page .intro { color: #999; font-style: italic; }
.grimoire-page .message { font-size: 1.2rem; margin: 20px auto; max-width: 560px; }
.summon-btn {
  background: #ff4d4d; color: #fff; border: none; padding: 11px 22px;
  border-radius: 8px; font-size: 14px; cursor: pointer;
}
.summon-btn:hover { background: #cc3333; }
.return-link { display: inline-block; margin-top: 18px; color: #ff4d4d; }
