/*
Theme Name: Parcs Pro
Theme URI: https://parcsattractions.be
Author: Dieter Maes
Description: Thème blog léger et rapide pour parcsattractions.be – guides, bons plans et réductions pour les parcs d'attractions.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: parcs-pro
*/

:root {
  --accent: #e8590c;
  --accent-dark: #c2410c;
  --cta: #16a34a;
  --cta-dark: #15803d;
  --dark: #2c3e50;
  --text: #333;
  --muted: #6b7280;
  --bg: #f8f9fa;
  --card: #fff;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,.08);
  --shadow-hover: 0 10px 24px rgba(0,0,0,.12);
  --max: 1200px;
  --content: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { line-height: 1.3; color: var(--dark); margin: 1.6em 0 .6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-top: 0; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.25rem; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: #fff; padding: 8px 14px; clip: auto; width: auto; height: auto; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  position: sticky; top: 0; z-index: 50;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; position: relative; }
.site-branding { display: flex; align-items: center; flex-shrink: 0; }
.site-branding img { max-height: 48px; width: auto; }
.site-title { font-size: 1.35rem; font-weight: 800; color: var(--dark); letter-spacing: -.02em; }
.site-title span { color: var(--accent); }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a {
  display: block; padding: 10px 14px; color: var(--text);
  font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; border-radius: 8px;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--accent); background: #fff4ed; }
.main-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; box-shadow: var(--shadow); border-radius: 10px; padding: 6px; flex-direction: column;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { text-transform: none; letter-spacing: 0; }

.header-search-toggle, .menu-toggle {
  background: none; border: 0; padding: 8px; cursor: pointer; color: var(--dark); line-height: 0;
}
.menu-toggle { display: none; }
.header-search { display: none; padding: 0 0 14px; }
.header-search.is-open { display: block; }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: 8px; }
.search-form input[type=search] {
  flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px;
}
.search-form button {
  padding: 12px 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; font-size: 15px;
}

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .header-inner { gap: 8px; }
  .site-branding { margin-right: auto; }
  .main-nav {
    display: none; position: absolute; left: -16px; right: -16px; top: 100%;
    background: #fff; box-shadow: 0 8px 16px rgba(0,0,0,.08); margin: 0; padding: 8px 16px 16px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 12px 8px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .main-nav .sub-menu { display: flex; position: static; box-shadow: none; padding: 0 0 0 14px; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #34495e 60%, var(--accent) 140%);
  color: #fff; padding: 48px 0 44px; text-align: center;
}
.hero h1 { color: #fff; margin-bottom: 10px; }
.hero p { margin: 0 auto 22px; max-width: 620px; opacity: .92; }
.hero .search-form { max-width: 520px; margin: 0 auto; }
.hero .search-form input[type=search] { border: 0; }

/* ---------- Layout ---------- */
.site-main { padding: 36px 0 56px; }
.section-title { font-size: 1.4rem; margin: 0 0 20px; }
.archive-header { margin-bottom: 28px; }
.archive-header h1 { margin-bottom: 6px; }
.archive-header .archive-description { color: var(--muted); }

/* ---------- Cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.post-card .thumb { display: block; aspect-ratio: 16/10; background: #e9ecef; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .card-body { padding: 18px 22px 22px; text-align: center; display: flex; flex-direction: column; flex: 1; }
.post-card h2 { font-size: 1.3rem; margin: 12px 0 10px; }
.post-card h2 a { color: var(--dark); }
.post-card h2 a:hover { color: var(--accent); }
.post-card .excerpt { color: #555; font-size: .95rem; margin: 0 0 16px; }
.post-card .read-more { margin-top: auto; font-weight: 700; font-size: .9rem; }

.badge {
  display: inline-block; background: var(--accent); color: #fff !important;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 5px 12px; border-radius: 6px; line-height: 1.4;
}
.badge:hover { background: var(--accent-dark); }

/* ---------- Pagination ---------- */
.pagination { margin-top: 40px; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
  min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 8px; box-shadow: var(--shadow); color: var(--dark); font-weight: 600;
}
.pagination .current { background: var(--accent); color: #fff; }

/* ---------- Single ---------- */
.single-wrap { max-width: var(--content); margin: 0 auto; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.entry-header { text-align: center; margin-bottom: 24px; }
.entry-header .badge { margin-bottom: 14px; }
.entry-meta { color: var(--muted); font-size: .88rem; margin-top: 10px; }
.entry-meta span + span::before { content: "·"; margin: 0 8px; }
.featured-image { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.entry-content {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 5vw, 44px);
  overflow-wrap: break-word;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .4em; }
.entry-content a:not(.btn-affiliate):not(.wp-block-button__link) { text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: 10px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 6px; }
.entry-content blockquote {
  margin: 1.6em 0; padding: 14px 20px; border-left: 4px solid var(--accent); background: #fff7f2; border-radius: 0 10px 10px 0;
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--dark); color: #fff; }
.entry-content tr:nth-child(even) td { background: #f9fafb; }

/* Affiliate button & boxes */
.btn-affiliate, .entry-content .wp-block-button__link {
  display: inline-block; background: var(--cta); color: #fff !important; font-weight: 700;
  padding: 14px 26px; border-radius: 10px; text-decoration: none !important; text-align: center;
  box-shadow: 0 4px 10px rgba(22,163,74,.25); transition: background .2s, transform .2s;
}
.btn-affiliate:hover, .entry-content .wp-block-button__link:hover { background: var(--cta-dark); transform: translateY(-1px); }
.btn-affiliate.is-full { display: block; }
.btn-wrap { text-align: center; margin: 1.6em 0; }

.deal-box {
  border: 2px solid var(--accent); border-radius: var(--radius); padding: 20px 22px; margin: 1.8em 0; background: #fffaf6;
}
.deal-box .deal-title { font-weight: 800; color: var(--dark); font-size: 1.15rem; margin: 0 0 6px; }
.deal-box .deal-price { color: var(--accent); font-weight: 800; font-size: 1.3rem; }
.deal-box p { margin: 0 0 12px; }

.info-box { background: #eef6ff; border-left: 4px solid #2563eb; border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 1.6em 0; }

.affiliate-disclosure { font-size: .82rem; color: var(--muted); background: #f3f4f6; border-radius: 8px; padding: 10px 14px; margin-bottom: 20px; }

/* Related */
.related { margin-top: 48px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #ecf0f1; padding: 40px 0 28px; font-size: .92rem; }
.site-footer a { color: #ecf0f1; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 20px; } }
.footer-grid h3 { color: #fff; font-size: 1rem; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 18px; text-align: center; opacity: .8; }

/* ---------- 404 / empty ---------- */
.not-found { text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px 20px; max-width: var(--content); margin: 0 auto; }
.not-found .search-form { max-width: 460px; margin: 20px auto 0; }

/* WP core */
.alignwide { max-width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .85rem; color: var(--muted); }
