/* LeerMangas.es — Standalone Production Stylesheet (GameSnacks-inspired) */
:root {
  --blue: #1a73e8;
  --blue-dark: #1557b0;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --border: #e8eaed;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, .brand-font { font-family: 'Nunito', 'Plus Jakarta Sans', system-ui, sans-serif; margin-top: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(32,33,36,0.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon {
  width: 40px; height: 40px; border-radius: 14px;
  background: linear-gradient(135deg, #1a73e8, #6366f1, #06b6d4);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(26,115,232,0.28);
}
.brand-title { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.02em; display: block; line-height: 1.1; }
.brand-title span { color: var(--blue); }
.brand-sub { font-size: 0.7rem; font-weight: 700; color: var(--muted); display: block; }

.search-box { flex: 1; max-width: 340px; position: relative; }
.search-box input {
  width: 100%; padding: 9px 14px 9px 36px; border-radius: 999px;
  border: 1px solid #dadce0; background: #f8f9fa; font-size: 0.875rem; outline: none;
}
.search-box input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(26,115,232,0.12); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #80868b; pointer-events: none; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 7px 13px; border-radius: 999px; font-size: 0.875rem; font-weight: 700;
  color: #3c4043; border: none; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.nav-link:hover, .nav-link.active { background: #f1f3f4; color: var(--blue); }
.nav-cta { background: var(--blue); color: #fff !important; padding: 8px 16px; }
.nav-cta:hover { background: var(--blue-dark) !important; }

.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; left: 0; top: calc(100% + 8px); width: 230px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 8px;
  box-shadow: 0 14px 32px rgba(32,33,36,0.14); z-index: 60;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a {
  display: block; padding: 9px 12px; border-radius: 10px; font-size: 0.875rem; font-weight: 700; color: #3c4043;
}
.dropdown-menu a:hover { background: #e8f0fe; color: var(--blue); }

.mobile-toggle { display: none; background: none; border: none; padding: 8px; border-radius: 999px; cursor: pointer; color: #3c4043; }
.mobile-drawer { display: none; border-top: 1px solid var(--border); background: #fff; padding: 14px 18px; }
.mobile-drawer.open { display: block; }
.mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mobile-grid a { padding: 10px 12px; border-radius: 12px; background: #f1f3f4; font-weight: 700; font-size: 0.875rem; color: #202124; }

/* Category Pills */
.cat-strip { border-top: 1px solid #f1f3f4; background: #fff; }
.cat-pills { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.cat-pills::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; padding: 7px 16px; border-radius: 999px; border: 1px solid #dadce0;
  background: #fff; color: #3c4043; font-size: 0.85rem; font-weight: 800; cursor: pointer; transition: 0.16s;
}
.pill:hover { background: #f1f3f4; }
.pill.active { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 2px 8px rgba(26,115,232,0.28); }

/* Main & Cards */
main { flex: 1; padding: 26px 0 48px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.section-head h1, .section-head h2 { margin: 0; font-size: 1.45rem; font-weight: 900; }
.badge-blue { background: #e8f0fe; color: var(--blue); padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.gs-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gs-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px -10px rgba(32,33,36,0.18); }
.card-thumb { position: relative; aspect-ratio: 16/10; background: #0f172a; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gs-card:hover .card-thumb img { transform: scale(1.05); }
.card-tag {
  position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.62); color: #fff;
  font-size: 0.68rem; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
.card-body { padding: 13px 14px; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.card-title { font-size: 1rem; font-weight: 900; margin: 0 0 2px; color: var(--text); }
.card-cat { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 0.78rem; font-weight: 800; }
.play-pill { background: var(--blue); color: #fff; padding: 6px 15px; border-radius: 999px; font-size: 0.78rem; font-weight: 900; }

/* Surface Boxes & Editorial Articles */
.surface-box {
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
  padding: 28px; box-shadow: 0 2px 10px rgba(32,33,36,0.04); margin-top: 28px;
}
.article-wrap { max-width: 860px; margin: 0 auto; }
.article-content h2 { font-size: 1.38rem; font-weight: 900; margin: 28px 0 10px; color: #111827; }
.article-content h3 { font-size: 1.08rem; font-weight: 800; margin: 18px 0 6px; color: #1f2937; }
.article-content p { color: #374151; font-size: 1.02rem; line-height: 1.85; margin: 0 0 14px; }
.article-content .lead { font-size: 1.1rem; font-weight: 600; color: #1f2937; }
.article-content ul { padding-left: 22px; color: #374151; margin: 0 0 16px; }
.article-content li { margin-bottom: 8px; line-height: 1.75; }
.article-content a { color: var(--blue); text-decoration: underline; font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { background: #f8f9fa; font-weight: 800; color: #202124; }

/* Game Player Layout */
.play-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
.stage-card { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 18px; }
.hud-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #f1f3f4; }
.hud-chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; font-weight: 800; }
.hud-chip { background: #f1f3f4; padding: 5px 12px; border-radius: 999px; }
.stage-wrap {
  position: relative; margin-top: 14px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #172038 0%, #0b1020 100%);
  min-height: 360px; display: flex; align-items: center; justify-content: center; padding: 8px;
}
.stage-wrap canvas { display: block; max-width: 100%; border-radius: 10px; touch-action: none; user-select: none; cursor: pointer; }
.stage-overlay {
  display: none; position: absolute; inset: 0; background: rgba(9,13,26,0.88);
  backdrop-filter: blur(4px); flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; color: #fff; z-index: 20;
}
.stage-overlay.show { display: flex; }
.btn {
  border: none; border-radius: 999px; padding: 9px 18px; font-size: 0.84rem;
  font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-soft { background: #f1f3f4; color: #202124; }
.btn-soft:hover { background: #e8eaed; }
.btn-amber { background: #fef3c7; color: #92400e; }
.btn-rose { background: #ffe4e6; color: #be123c; }
.controls-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f1f3f4; }
.touch-pad { display: none; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.touch-pad.show { display: flex; }
.touch-btn { width: 52px; height: 42px; border-radius: 12px; border: 1px solid #dadce0; background: #f1f3f4; font-weight: 900; cursor: pointer; }
.sudoku-pad { display: none; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.sudoku-pad.show { display: flex; }

/* FAQ & Forms */
.faq-item { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 10px; }
.faq-q { width: 100%; text-align: left; padding: 14px 18px; background: #f8f9fa; border: none; font-weight: 800; font-size: 0.95rem; cursor: pointer; display: flex; justify-content: space-between; }
.faq-a { padding: 14px 18px; background: #fff; color: #4b5563; font-size: 0.92rem; display: none; }
.faq-a.open { display: block; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 800; margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid #dadce0; border-radius: 12px; font-family: inherit; font-size: 0.92rem;
}

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--border); padding: 36px 0 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid #f1f3f4; }
.footer-links { display: flex; flex-direction: column; gap: 7px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.footer-links a:hover { color: var(--blue); }
.footer-bottom { padding-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.78rem; color: #80868b; font-weight: 600; }

/* RGPD Cookie Consent Banner */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 780px; margin: 0 auto;
  background: #111827; color: #f9fafb; border-radius: 18px; padding: 16px 20px;
  display: none; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35); z-index: 90;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; font-size: 0.83rem; line-height: 1.5; max-width: 500px; color: #d1d5db; }
.cookie-banner a { color: #60a5fa; text-decoration: underline; }
.toast {
  position: fixed; bottom: 20px; right: 20px; background: #111827; color: #fff;
  padding: 11px 20px; border-radius: 999px; font-size: 0.85rem; font-weight: 700;
  display: none; z-index: 95; box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
.toast.show { display: block; }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .play-layout { grid-template-columns: 1fr; }
  .main-nav, .search-box { display: none; }
  .mobile-toggle { display: inline-flex; }
}
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .surface-box { padding: 20px; }
}
