/*
Theme Name: Ludique
Theme URI: http://bordeauxgames.com
Description: Portail de jeux français — règles, jeux en ligne et actualités gaming
Version: 1.0
Author: Bordeaux Games
Text Domain: ludique
*/

:root {
  --clr-main: #8B1A2B;
  --clr-dark: #6D1522;
  --clr-secondary: #2D4A7A;
  --clr-highlight: #FFB347;
  --clr-surface: #F5F3F0;
  --clr-card: #FFFFFF;
  --clr-text: #1A1A1A;
  --clr-muted: #555555;
  --clr-line: #E0DCD8;
  --clr-ok: #2D8B4E;
  --font-head: 'Nunito', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --wrap: 1140px;
  --gap: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--clr-text);
  background: var(--clr-surface);
  line-height: 1.7;
}

a { color: var(--clr-main); text-decoration: none; }
a:hover { color: var(--clr-dark); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--clr-text);
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

/* Layout */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Masthead */
.masthead {
  background: var(--clr-main);
  color: #fff;
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand:hover { color: var(--clr-highlight); }

.brand img {
  height: 40px;
  width: auto;
}

/* Navigation */
.topnav { display: flex; gap: 0.25rem; list-style: none; }

.topnav a {
  color: rgba(255,255,255,0.9);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.topnav a:hover,
.topnav .current-menu-item a {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.ham-btn {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 4px;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Cards */
.tile {
  background: var(--clr-card);
  border: 1px solid var(--clr-line);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.tile:hover { border-color: var(--clr-main); }

.tile-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.tile-body { padding: 1.25rem; }

.tile-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.tile-title a { color: var(--clr-text); }
.tile-title a:hover { color: var(--clr-main); }

.tile-meta {
  font-size: 0.85rem;
  color: var(--clr-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Grid */
.grid {
  display: grid;
  gap: var(--gap);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Info box (sidebar for règles) */
.infobox {
  background: var(--clr-card);
  border: 1px solid var(--clr-line);
  border-left: 4px solid var(--clr-main);
  border-radius: 0 4px 4px 0;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.infobox-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--clr-main);
}

.infobox dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.infobox dt {
  font-weight: 600;
  color: var(--clr-muted);
}

.infobox dd { margin: 0; }

/* Game embed container */
.game-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.game-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Badges / Tags */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  background: var(--clr-surface);
  color: var(--clr-muted);
}

.badge--main { background: var(--clr-main); color: #fff; }
.badge--secondary { background: var(--clr-secondary); color: #fff; }

/* Breadcrumbs */
.crumbs {
  font-size: 0.85rem;
  color: var(--clr-muted);
  padding: 0.75rem 0;
}

.crumbs a { color: var(--clr-secondary); }
.crumbs span { margin: 0 0.35rem; }

/* Content area */
.content-area {
  padding: 2rem 0;
}

.entry-content {
  max-width: 780px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.entry-content h2 { margin-top: 2rem; }
.entry-content h3 { margin-top: 1.5rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1rem 1.5rem; }
.entry-content li { margin-bottom: 0.35rem; }

/* Two-column layout (content + sidebar) */
.layout-split {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

/* Hero section */
.hero-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

/* Footer */
.colophon {
  background: var(--clr-text);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.colophon a { color: var(--clr-highlight); }
.colophon a:hover { color: #fff; }

.colophon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.colophon-title {
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.colophon-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
}

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--clr-line); }

.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1rem 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--clr-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after { content: '+'; font-size: 1.25rem; color: var(--clr-muted); }
.faq-q.open::after { content: '\2212'; }

.faq-a {
  display: none;
  padding: 0 0 1rem;
  line-height: 1.7;
}

.faq-a.open { display: block; }

/* 404 */
.page-404 {
  text-align: center;
  padding: 4rem 0;
}

.page-404 h1 { font-size: 4rem; color: var(--clr-main); }

/* Pagination */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.pagination a, .pagination span {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--clr-line);
  border-radius: 4px;
  font-size: 0.9rem;
}

.pagination .current {
  background: var(--clr-main);
  color: #fff;
  border-color: var(--clr-main);
}

/* Homepage Hero */
.hp-hero {
  background: linear-gradient(135deg, var(--clr-main) 0%, var(--clr-dark) 100%);
  color: #fff;
  padding: 3rem 0;
  margin-bottom: 2rem;
  text-align: center;
}

.hp-hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hp-hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hp-hero .search-box {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.hp-hero .search-box input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
}

.hp-hero .search-box input::placeholder { color: var(--clr-muted); }

/* Section headings */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.section-heading h2 { margin-bottom: 0; }

.section-heading a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-secondary);
}

/* Category cards with color accents */
.cat-tile {
  background: var(--clr-card);
  border: 1px solid var(--clr-line);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--clr-text);
  transition: border-color 0.2s;
  display: block;
}

.cat-tile:hover { border-color: var(--clr-main); color: var(--clr-text); }

.cat-tile-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.cat-tile-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
}

.cat-tile-count {
  font-size: 0.85rem;
  color: var(--clr-muted);
  margin-top: 0.25rem;
}

/* Quiz container */
.quiz-wrap {
  background: var(--clr-card);
  border: 1px solid var(--clr-line);
  border-radius: 4px;
  padding: 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.quiz-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.quiz-question {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.quiz-answers { list-style: none; padding: 0; }

.quiz-answers li {
  margin-bottom: 0.6rem;
}

.quiz-answers button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--clr-surface);
  border: 2px solid var(--clr-line);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.quiz-answers button:hover {
  border-color: var(--clr-secondary);
  background: #fff;
}

.quiz-answers button.correct {
  border-color: var(--clr-ok);
  background: rgba(45,139,78,0.08);
}

.quiz-answers button.wrong {
  border-color: #c0392b;
  background: rgba(192,57,43,0.08);
}

.quiz-score {
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75rem;
  background: var(--clr-surface);
  border-radius: 4px;
  margin-top: 1rem;
}

.quiz-cats {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.quiz-cats button {
  padding: 0.5rem 1rem;
  border: 2px solid var(--clr-line);
  border-radius: 50px;
  background: var(--clr-card);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}

.quiz-cats button.active,
.quiz-cats button:hover {
  border-color: var(--clr-main);
  color: var(--clr-main);
}

/* News ticker */
.news-ticker {
  background: var(--clr-card);
  border: 1px solid var(--clr-line);
  border-radius: 4px;
  overflow: hidden;
}

.news-ticker-header {
  background: var(--clr-secondary);
  color: #fff;
  padding: 0.5rem 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
}

.news-ticker-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-ticker-list li {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--clr-line);
  font-size: 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.news-ticker-list li:last-child { border-bottom: none; }

.news-ticker-time {
  font-size: 0.8rem;
  color: var(--clr-muted);
  white-space: nowrap;
}

.news-ticker-list a { color: var(--clr-text); }
.news-ticker-list a:hover { color: var(--clr-main); }

.news-ticker-source {
  font-size: 0.75rem;
  color: var(--clr-muted);
  font-style: italic;
}

/* Puzzle du jour widget */
.puzzle-widget {
  background: var(--clr-card);
  border: 1px solid var(--clr-line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--gap);
}

.puzzle-widget-header {
  background: var(--clr-main);
  color: #fff;
  padding: 0.6rem 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
}

.puzzle-widget-body {
  padding: 1rem;
  text-align: center;
}

/* Button */
.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn:hover { opacity: 0.85; }

.btn--main {
  background: var(--clr-main);
  color: #fff;
}

.btn--secondary {
  background: var(--clr-secondary);
  color: #fff;
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--clr-main);
  color: var(--clr-main);
}

/* Author box (EEAT) */
.author-box {
  display: flex;
  gap: 1rem;
  background: var(--clr-card);
  border: 1px solid var(--clr-line);
  border-radius: 4px;
  padding: 1.25rem;
  margin-top: 2rem;
}

.author-box img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box-name {
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.author-box-bio {
  font-size: 0.9rem;
  color: var(--clr-muted);
  line-height: 1.5;
}

/* Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.entry-content th,
.entry-content td {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--clr-line);
  text-align: left;
  font-size: 0.95rem;
}

.entry-content th {
  background: var(--clr-surface);
  font-weight: 600;
}

.entry-content tr:hover td {
  background: rgba(0,0,0,0.015);
}

/* SVG infographic container */
.infographic {
  text-align: center;
  margin: 1.5rem 0;
}

.infographic svg,
.infographic img {
  max-width: 100%;
  height: auto;
}

.infographic figcaption {
  font-size: 0.85rem;
  color: var(--clr-muted);
  margin-top: 0.5rem;
}

/* Deck cards widget */
.deck-hand {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.deck-hand img {
  width: 90px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Steam game card */
.steam-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-line);
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  transition: border-color 0.2s;
}

.steam-card:hover { border-color: var(--clr-secondary); }

.steam-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.steam-card-body {
  padding: 1rem 1.25rem;
}

.steam-card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.steam-card-studio {
  font-size: 0.85rem;
  color: var(--clr-muted);
  margin-bottom: 0.5rem;
}

.steam-card-price {
  font-weight: 600;
  color: var(--clr-ok);
}

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .layout-split { grid-template-columns: 1fr; }
  .colophon-grid { grid-template-columns: 1fr; }
  .steam-card { grid-template-columns: 150px 1fr; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  .hp-hero { padding: 2rem 0; }
  .hp-hero h1 { font-size: 1.85rem; }
  .steam-card { grid-template-columns: 1fr; }
  .steam-card img { max-height: 180px; }

  .topnav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--clr-dark);
    padding: 0.5rem;
  }
  .topnav.open { display: flex; }
  .ham-btn { display: block; }
}

/* Print */
@media print {
  .masthead, .colophon, .ham-btn, .game-frame iframe,
  .quiz-wrap, .news-ticker, .puzzle-widget { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .wrap { max-width: 100%; }
  a { color: #000; text-decoration: underline; }
  .entry-content { max-width: 100%; }
  .layout-split { display: block; }
  .infobox { border: 1px solid #999; }
  .hero-img { max-height: 250px; }
}
