/* ==========================================================================
   Club Canin Castelpontin — thème "ccc-modern"
   ========================================================================== */

:root {
  --ink: #21201c;
  --muted: #6b665c;
  --paper: #fbfaf6;
  --card: #ffffff;
  --border: #e8e3d6;
  --primary: #b23a2e;
  --primary-dark: #8f2c22;
  --green: #3f7d58;
  --blue: #2f6690;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(33, 32, 28, 0.07);
  --shadow-hover: 0 10px 32px rgba(33, 32, 28, 0.13);
  --container: 1160px;
  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-head);
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-outline-dark { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-outline-dark:hover { border-color: var(--primary); color: var(--primary); }

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding img { height: 58px; width: auto; }
.site-branding .site-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.15;
}
.site-branding .site-title span { display: block; font-size: 0.72rem; font-weight: 500; color: var(--muted); }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
  background: var(--primary);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------------------------------------------------------------- Hero */
.hero {
  position: relative;
  color: #fff;
  padding: 90px 0 100px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--green) 55%, var(--primary) 130%);
  overflow: hidden;
  text-align: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.12), transparent 45%);
}
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero-kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(255,255,255,.16);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 { color: #fff; margin-bottom: 0.4em; }
.hero p.lead { font-size: 1.15rem; opacity: .95; margin-bottom: 2em; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-practical {
  margin-top: 46px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.95rem;
  opacity: .95;
}
.hero-practical div { display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- Sections */
.section { padding: 76px 0; }
.section-alt { background: #f4f1e9; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .eyebrow {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--primary);
  font-size: 0.85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head p { color: var(--muted); }

/* Activity cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.activity-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
  transition: transform .2s ease, box-shadow .2s ease;
}
.activity-card:nth-child(2) { border-top-color: var(--green); }
.activity-card:nth-child(3) { border-top-color: var(--blue); }
.activity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.activity-card h3 { margin-bottom: 0.5em; }
.activity-card p { color: var(--muted); font-size: 0.95rem; }
.activity-card .btn { margin-top: 8px; padding: 9px 20px; font-size: 0.85rem; }

/* News cards */
.news-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--border); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.news-card .date { font-size: 0.8rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.news-card .excerpt { color: var(--muted); font-size: 0.92rem; flex: 1; }
.news-card .readmore { margin-top: 14px; font-weight: 600; font-size: 0.9rem; }

/* CTA band */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 50px 40px;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.8); max-width: 560px; margin: 0 auto 1.6em; }

/* ---------------------------------------------------------------- Generic page content */
.page-hero {
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
  padding: 64px 0 56px;
  text-align: center;
}
.page-hero h1 { color: #fff; margin: 0; }
.entry-content {
  max-width: 780px;
  margin: 56px auto;
  padding: 0 24px;
  font-size: 1.02rem;
}
.entry-content img { border-radius: var(--radius); margin: 8px 0 20px; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content iframe { max-width: 100%; border-radius: var(--radius); }
.entry-content .wp-caption, .entry-content figure { margin: 0 0 20px; }

/* Blog listing */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* Single post */
.single-post .entry-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5em; }
.single-post .entry-thumb { max-width: var(--container); margin: 0 auto 40px; padding: 0 24px; }
.single-post .entry-thumb img { border-radius: var(--radius); width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.back-link { display: inline-block; margin: 0 auto 40px; text-align:center; width:100%; font-weight: 600; }

/* ---------------------------------------------------------------- Résultats CPT (fallback en cas d'absence du plugin) */
.ccc-no-results { text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.contact-form-card, .contact-info-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
}
.contact-info-card h3 { margin-top: 1.2em; font-size: 1rem; }
.contact-info-card h3:first-child { margin-top: 0; }
.contact-info-card p { color: var(--muted); margin-bottom: 0.2em; }
.contact-info-card iframe { width: 100%; height: 220px; border: 0; border-radius: var(--radius); margin-top: 20px; }

.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: var(--paper);
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; font-size: 0.92rem; }
.form-notice.success { background: #e5f3ea; color: #245c3b; }
.form-notice.error { background: #fbe7e4; color: #8f2c22; }
.hp-field { position: absolute; left: -9999px; }

/* ---------------------------------------------------------------- Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.75);
  padding: 56px 0 26px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1em; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { height: 46px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.footer-brand span { font-family: var(--font-head); font-weight: 700; color: #fff; }
.site-footer .menu { list-style: none; margin: 0; padding: 0; }
.site-footer .menu li { margin-bottom: 9px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 22px;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255,255,255,.5);
}

/* ---------------------------------------------------------------- 404 */
.error-404 { text-align: center; padding: 100px 24px; }
.error-404 .code { font-family: var(--font-head); font-size: 5rem; font-weight: 700; color: var(--primary); margin: 0; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .grid-3, .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .main-nav.is-open {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .main-nav.is-open ul { flex-direction: column; padding: 14px 24px 22px; gap: 2px; }
  .main-nav.is-open a { display: block; }
  .nav-toggle { display: block; }
  .grid-3, .blog-grid, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding: 60px 0 70px; }
  .section { padding: 54px 0; }
}
