/* main.css — Reset, styles globaux, nav, footer */

/* ===========================
   Accessibilite — Skip to content
   =========================== */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background-color: var(--yellow);
  color: var(--brown);
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.skip-to-content:focus {
  left: 0;
}

/* ===========================
   Reset minimal
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--brown);
  background-color: var(--cream);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

/* ===========================
   Header — Nav sticky
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--brown);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

/* Logo */
.site-header__logo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}

.site-header__logo span {
  color: var(--yellow);
}

/* Logo personnalisé (Customizer) */
.custom-logo {
  max-height: 50px;
  width: auto;
  display: block;
}

/* Nav desktop */
.site-header__nav {
  flex: 1;
}

.site-header__menu {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
}

.site-header__menu a {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--spacing-xs) 0;
  position: relative;
  transition: color 0.2s;
}

.site-header__menu a:hover {
  color: var(--yellow);
}

.site-header__menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--yellow);
  transition: width 0.2s;
}

.site-header__menu a:hover::after {
  width: 100%;
}

/* CTA bouton pill */
.site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  background-color: var(--orange);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.site-header__cta:hover {
  background-color: var(--orange-lt);
}

/* Hamburger */
.site-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  /* Zone tactile accessible (recommandation ≥ 44 px) */
  min-width: 44px;
  min-height: 44px;
  z-index: 110;
}

.site-header__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger animé → croix */
.site-header__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.site-header__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menu mobile */
.site-header__mobile {
  background-color: var(--brown);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header__mobile[hidden] {
  display: none;
}

.site-header__mobile-menu {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.site-header__mobile-menu a {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  padding: var(--spacing-sm) 0;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__mobile-menu a:hover {
  color: var(--yellow);
}

.site-header__cta--mobile {
  text-align: center;
  margin-top: var(--spacing-sm);
  border-bottom: none;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background-color: var(--brown);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
}

/* La homepage finit par une bande CTA pleine largeur : footer collé (pas de bande crème). */
.homepage + .site-footer {
  margin-top: 0;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.site-footer__logo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  color: #fff;
}

.site-footer__logo span {
  color: var(--yellow);
}

.site-footer__menu {
  display: flex;
  gap: var(--spacing-lg);
}

.site-footer__menu a {
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.site-footer__menu a:hover {
  color: #fff;
}

/* ===========================
   Boutons globaux
   =========================== */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn--primary {
  background-color: var(--orange);
  color: #fff;
}

.btn--primary:hover {
  background-color: var(--orange-lt);
}

.btn--secondary {
  background-color: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.btn--secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

/* ===========================
   Homepage — Hero
   =========================== */
.hero {
  background-color: var(--brown);
  padding: 3.5rem var(--spacing-lg) 0;
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2.5rem;
}

.hero__left {
  padding-bottom: 3rem;
}

.hero__eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: var(--cream);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-md);
}

.hero__title em {
  color: var(--yellow);
  font-style: normal;
}

.hero__subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
  max-width: 420px;
  font-weight: 300;
}

.hero__ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero__right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Card preview "Ce soir" dans le hero */
.ce-soir-preview {
  display: block;
  text-decoration: none;
  color: inherit;
  background-color: var(--orange);
  border-radius: 20px 20px 0 0;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: filter 0.2s ease;
}

.ce-soir-preview:hover {
  filter: brightness(1.04);
}

.ce-soir-preview::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.ce-soir-preview__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.4rem;
}

.ce-soir-preview__sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.1rem;
}

.ce-soir-preview__label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.ce-soir-preview__chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-md);
}

.chip {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.chip--active {
  background: #fff;
  color: var(--orange);
  border-color: #fff;
}

.ce-soir-preview__btn {
  display: block;
  background-color: var(--yellow);
  color: var(--brown);
  width: 100%;
  padding: 0.7rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  transition: opacity 0.2s;
}

.ce-soir-preview__btn:hover {
  opacity: 0.9;
}

/* ===========================
   Homepage — Stats
   =========================== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: var(--border);
}

.stats__item {
  background-color: var(--beige);
  padding: var(--spacing-md) 1.25rem;
  text-align: center;
}

.stats__number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--orange);
}

.stats__label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

/* ===========================
   Homepage — Sections génériques
   =========================== */
.section {
  padding: 2.5rem var(--spacing-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section--articles {
  background-color: var(--brown);
  max-width: 100%;
  padding: 2.5rem var(--spacing-lg);
}

.section--articles > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section--villes {
  background-color: var(--beige);
  max-width: 100%;
  padding: 2.5rem var(--spacing-lg);
}

.section--villes > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: -0.02em;
}

.section__title--light {
  color: var(--cream);
}

.section__link {
  font-size: 0.8rem;
  color: var(--orange);
  font-weight: 500;
}

.section__link--light {
  color: var(--orange-lt);
}

/* ===========================
   Homepage — Grille jeux
   =========================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.games-grid__empty,
.articles-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: var(--spacing-lg);
}

.articles-grid__empty {
  color: rgba(255, 255, 255, 0.5);
}

.game-card {
  display: block;
  background-color: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.18s;
}

.game-card:hover {
  transform: translateY(-3px);
}

.game-card__thumb {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem;
  overflow: hidden;
}

/* Covers de boîtes (carrées, fond blanc) : entières, jamais rognées */
.game-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-card__emoji {
  font-size: 2rem;
}

.game-card__body {
  padding: 0.9rem;
}

.game-card__name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brown);
  margin-bottom: 0.25rem;
}

.game-card__meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.meta-pill {
  font-size: 0.7rem;
  padding: 0.15rem 0.3rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.meta-pill--players {
  background-color: #FEF3C7;
  color: #92400E;
}

.meta-pill--time {
  background-color: #E8F5E9;
  color: #1B5E20;
}

.meta-pill--level {
  background-color: #F3E8FF;
  color: #4C1D95;
}

.game-card__score {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.game-card__score-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--orange);
}

/* ===========================
   Homepage — Grille articles
   =========================== */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.article-card {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.25rem;
  transition: background-color 0.2s;
}

.article-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.article-card__icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.article-card__cat {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-lt);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.article-card__title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.article-card__desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===========================
   Homepage — Grille villes
   =========================== */
.villes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.ville-card {
  display: block;
  background-color: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  text-align: center;
  transition: transform 0.18s;
}

.ville-card:hover {
  transform: translateY(-2px);
}

.ville-card__flag {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.ville-card__name {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--brown);
}

.ville-card__count {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ===========================
   Homepage — CTA final
   =========================== */
.bottom-cta {
  background-color: var(--orange);
  padding: 2.5rem var(--spacing-lg);
  text-align: center;
}

.bottom-cta__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.5rem;
}

.bottom-cta__sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.25rem;
}

.bottom-cta__btn {
  display: inline-block;
  background-color: var(--yellow);
  color: var(--brown);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.bottom-cta__btn:hover {
  opacity: 0.9;
}

/* ===========================
   Bouton "Ce soir" — variant jaune global
   =========================== */
.btn--ce-soir {
  background-color: var(--yellow);
  color: var(--brown);
  font-family: var(--font-heading);
  font-weight: 800;
}

.btn--ce-soir:hover {
  opacity: 0.9;
}

/* ===========================
   Page 404
   =========================== */
.page-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-lg);
}

.page-404__inner {
  text-align: center;
  max-width: 520px;
}

.page-404__dice {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  line-height: 1;
}

.page-404__title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--brown);
  margin-bottom: var(--spacing-md);
}

.page-404__text {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

.page-404__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-md);
}

.page-404__hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.page-404__hint a {
  color: var(--orange);
  text-decoration: underline;
}

/* ===========================
   Page recherche
   =========================== */
.search-results__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
}

.search-results__header {
  margin-bottom: var(--spacing-xl);
}

.search-results__title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--brown);
  margin-bottom: var(--spacing-sm);
}

.search-results__empty-hint {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: var(--spacing-md);
}

.search-results__empty-hint a {
  color: var(--orange);
  text-decoration: underline;
}

.search-section {
  margin-bottom: var(--spacing-xl);
}

.search-section__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--brown);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.search-section__icon {
  font-size: 1.1rem;
}

.search-section__count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--beige);
  color: var(--muted);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.search-section__more {
  display: inline-block;
  margin-top: var(--spacing-md);
  font-size: 0.85rem;
  color: var(--orange);
  font-weight: 500;
}

/* Grilles résultats */
.search-section__grid--jeux {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.search-section__grid--articles,
.search-section__grid--lieux {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

/* Cards génériques de résultat */
.search-card {
  display: flex;
  background-color: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s;
}

.search-card:hover {
  transform: translateY(-2px);
}

.search-card--jeu {
  flex-direction: column;
}

.search-card__thumb {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brown), var(--muted));
  font-size: 2rem;
  flex-shrink: 0;
}

.search-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-card__body {
  padding: 0.9rem;
}

.search-card__cat {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.search-card__name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brown);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.search-card__meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.search-card__excerpt {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.25rem;
}

.search-results__cta {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
}

/* ===========================
   Mobile
   =========================== */
@media (max-width: 768px) {
  .site-header__nav {
    display: none;
  }

  .site-header__cta:not(.site-header__cta--mobile) {
    display: none;
  }

  .site-header__burger {
    display: flex;
  }

  .site-footer__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
  }

  .site-footer__menu {
    gap: var(--spacing-md);
  }

  /* Hero */
  .hero {
    padding: var(--spacing-lg) var(--spacing-md) 0;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .hero__right {
    margin: 0 calc(-1 * var(--spacing-md));
  }

  .ce-soir-preview {
    border-radius: 0;
  }

  /* Stats */
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats__number {
    font-size: 1.2rem;
  }

  /* Sections */
  .section {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .section--articles,
  .section--villes {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  /* Grille jeux : 2 colonnes */
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Articles : 1 colonne */
  .articles-grid {
    grid-template-columns: 1fr;
  }

  /* Villes : 2 colonnes + scroll */
  .villes-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .section__header {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.8rem;
  }

  .hero__ctas {
    flex-direction: column;
  }

  .hero__ctas .btn {
    text-align: center;
  }

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

/* ===========================
   Fil d'ariane (global)
   =========================== */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-md);
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-xs);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--orange);
}

.breadcrumb__sep {
  color: var(--border);
}

.breadcrumb__current {
  color: var(--brown);
  font-weight: 500;
}
