/* ============================================================
   SEb-Prof — main.css
   Variables CSS (miroir de theme.json pour le CSS classique)
   ============================================================ */

:root {
  --sp-forest:      #1b5e3b;
  --sp-forest-mid:  #2d7a52;
  --sp-forest-lt:   #d4ede0;
  --sp-gold:        #e8a320;
  --sp-gold-lt:     #fff6e0;
  --sp-coral:       #c8503a;
  --sp-ink:         #0f1a14;
  --sp-muted:       #6b7c72;
  --sp-border:      #d8e4dc;
  --sp-sand:        #f7f3ee;

  --sp-radius-sm:   6px;
  --sp-radius:      12px;
  --sp-radius-lg:   18px;

  --sp-shadow-card: 0 2px 8px rgba(15,26,20,0.06), 0 0 0 1.5px var(--sp-border);
  --sp-shadow-md:   0 4px 16px rgba(15,26,20,0.10);
  --sp-shadow-lg:   0 8px 32px rgba(27,94,59,0.14);

  --sp-transition:  0.2s ease;
}

/* ── RESET MINIMAL ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── LAYOUT GLOBAL ───────────────────────────────────────────────────────── */
.site-wrapper { min-height: 100vh; }

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--sp-border);
  box-shadow: 0 1px 3px rgba(15,26,20,0.06);
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header__brand { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.site-header__logo-icon { font-size: 1.5rem; width: 40px; height: 40px; background: var(--sp-forest); border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.site-header__name { font-family: var(--wp--preset--font-family--fraunces, Georgia, serif); font-weight: 900; font-size: 1.1rem; color: var(--sp-forest); display: block; line-height: 1.1; }
.site-header__tagline { font-size: 0.7rem; color: var(--sp-muted); display: block; }

.site-header__nav .nav-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.site-header__nav .nav-menu a { font-size: 0.9rem; font-weight: 500; color: var(--sp-muted); text-decoration: none; transition: color var(--sp-transition); }
.site-header__nav .nav-menu a:hover,
.site-header__nav .nav-menu .current-menu-item > a { color: var(--sp-forest); }

.site-header__burger { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; }
.site-header__burger span { display: block; width: 22px; height: 2px; background: var(--sp-ink); border-radius: 2px; transition: var(--sp-transition); }

.site-header__mobile-menu { display: none; }

@media (max-width: 768px) {
  .site-header__nav { display: none; }
  .site-header__burger { display: flex; }
  .site-header__mobile-menu:not([hidden]) {
    display: block;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--sp-border);
    padding: 1rem 1.5rem;
    z-index: 99;
  }
  .mobile-nav-menu { list-style: none; margin: 0; padding: 0; }
  .mobile-nav-menu li + li { border-top: 1px solid var(--sp-border); }
  .mobile-nav-menu a { display: block; padding: 0.75rem 0; font-weight: 500; color: var(--sp-ink); }
}

/* ── BREADCRUMB ──────────────────────────────────────────────────────────── */
.sebprof-breadcrumb { padding: 0.75rem 0; }
.sebprof-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; font-size: 0.8rem; color: var(--sp-muted); }
.sebprof-breadcrumb li + li::before { content: '›'; margin-right: 0.25rem; color: var(--sp-border); }
.sebprof-breadcrumb a { color: var(--sp-muted); text-decoration: none; }
.sebprof-breadcrumb a:hover { color: var(--sp-forest); }
.sebprof-breadcrumb [aria-current="page"] { color: var(--sp-ink); font-weight: 500; }

/* ── ACTIVITY CARD ───────────────────────────────────────────────────────── */
.sebprof-card {
  background: #fff;
  border-radius: var(--sp-radius);
  overflow: hidden;
  box-shadow: var(--sp-shadow-card);
  transition: transform var(--sp-transition), box-shadow var(--sp-transition);
}
.sebprof-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sp-shadow-lg);
}
.sebprof-card__link { display: block; text-decoration: none; color: inherit; height: 100%; }

.sebprof-card__thumb {
  height: 160px;
  background-color: var(--card-color, #fde8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.sebprof-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sebprof-card__emoji { font-size: 3.5rem; }
.sebprof-thumb-fallback {
  width: 100%;
  height: 100%;
  background-color: var(--card-color, #fde8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.sebprof-card__body { padding: 1rem 1.125rem; display: flex; flex-direction: column; gap: 0.375rem; }
.sebprof-card__age { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sp-forest-mid); }
.sebprof-card__title { font-family: var(--wp--preset--font-family--fraunces, Georgia, serif); font-weight: 700; font-size: 1.1rem; color: var(--sp-ink); line-height: 1.25; margin: 0; }
.sebprof-card__accroche { font-size: 0.82rem; color: var(--sp-muted); margin: 0; line-height: 1.4; }
.sebprof-card__tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem; }
.sebprof-tag {
  background: var(--sp-forest-lt);
  color: var(--sp-forest);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background var(--sp-transition);
}
.sebprof-tag:hover { background: var(--sp-forest); color: #fff; }
.sebprof-card__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--sp-border);
  font-size: 0.75rem;
  color: var(--sp-muted);
}

/* ── GRILLE ──────────────────────────────────────────────────────────────── */
.sebprof-grid {
  display: grid;
  gap: 1.25rem;
}
.sebprof-grid--cols-1 { grid-template-columns: 1fr; }
.sebprof-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.sebprof-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.sebprof-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .sebprof-grid--cols-3,
  .sebprof-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .sebprof-grid--cols-2,
  .sebprof-grid--cols-3,
  .sebprof-grid--cols-4 { grid-template-columns: 1fr; }
}

/* ── FILTRES ─────────────────────────────────────────────────────────────── */
.sebprof-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--sp-border);
}
.sebprof-filter-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sp-muted); display: block; margin-bottom: 0.3rem; }
.sebprof-filter-select {
  border: 1.5px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  color: var(--sp-ink);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--sp-transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7c72' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
}
.sebprof-filter-select:focus { border-color: var(--sp-forest); outline: none; box-shadow: 0 0 0 3px rgba(27,94,59,0.15); }
.sebprof-filter-reset {
  padding: 0.45rem 1rem;
  background: var(--sp-sand);
  border: 1.5px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  font-size: 0.82rem;
  color: var(--sp-muted);
  cursor: pointer;
  transition: all var(--sp-transition);
}
.sebprof-filter-reset:hover { border-color: var(--sp-coral); color: var(--sp-coral); }

/* ── AGE NAV CHIPS ───────────────────────────────────────────────────────── */
.sebprof-age-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--sp-border);
  margin-bottom: 1.5rem;
}
.sebprof-age-chip {
  padding: 0.45rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--sp-border);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sp-muted);
  text-decoration: none;
  transition: all var(--sp-transition);
  white-space: nowrap;
}
.sebprof-age-chip:hover { border-color: var(--sp-forest-mid); color: var(--sp-forest); }
.sebprof-age-chip.is-active { background: var(--sp-forest); border-color: var(--sp-forest); color: #fff; }

/* ── MÉTA BANDE ──────────────────────────────────────────────────────────── */
.sebprof-meta-band {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--sp-sand);
  border-top: 1px solid var(--sp-border);
  border-bottom: 1px solid var(--sp-border);
  margin: 0;
}
.sebprof-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  flex: 1;
  min-width: 160px;
  border-right: 1px solid var(--sp-border);
}
.sebprof-meta-item:last-child { border-right: none; }
.sebprof-meta-icon { font-size: 1.25rem; flex-shrink: 0; }
.sebprof-meta-label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sp-muted); }
.sebprof-meta-value { display: block; font-size: 0.875rem; font-weight: 600; color: var(--sp-ink); }

@media (max-width: 768px) {
  .sebprof-meta-band { flex-direction: column; }
  .sebprof-meta-item { border-right: none; border-bottom: 1px solid var(--sp-border); }
}

/* ── NEWSLETTER CTA ──────────────────────────────────────────────────────── */
.sebprof-nl-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--sp-gold-lt);
  border-top: 3px solid var(--sp-gold);
  border-bottom: 2px solid var(--sp-gold);
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}
.sebprof-nl-icon { font-size: 2rem; flex-shrink: 0; }
.sebprof-nl-text strong { display: block; font-size: 1rem; font-weight: 700; color: var(--sp-ink); }
.sebprof-nl-text span { font-size: 0.85rem; color: var(--sp-muted); }
.sebprof-nl-cta .sebprof-btn { margin-left: auto; }

/* ── LOAD MORE ───────────────────────────────────────────────────────────── */
.sebprof-load-more { text-align: center; margin-top: 2rem; }
.sebprof-btn-load-more {
  background: var(--sp-forest);
  color: #fff;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--sp-transition);
}
.sebprof-btn-load-more:hover { background: var(--sp-forest-mid); }
.sebprof-btn-load-more.is-loading { opacity: 0.6; pointer-events: none; }
.sebprof-no-results { text-align: center; padding: 3rem; color: var(--sp-muted); font-size: 1rem; }

/* ── PAGINATION ──────────────────────────────────────────────────────────── */
.sebprof-pagination { margin-top: 2rem; }
.sebprof-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border: 1.5px solid var(--sp-border);
  border-radius: 6px;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--sp-muted);
  transition: all var(--sp-transition);
}
.sebprof-pagination .page-numbers.current,
.sebprof-pagination .page-numbers:hover { background: var(--sp-forest); border-color: var(--sp-forest); color: #fff; }
.sebprof-pagination ol { list-style: none; padding: 0; display: flex; gap: 0.375rem; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--sp-forest); color: rgba(255,255,255,0.85); }
.site-footer__widgets { padding: 3rem clamp(1.5rem, 5vw, 3rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.site-footer__bottom { padding: 1rem clamp(1.5rem, 5vw, 3rem); border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.site-footer__bottom a { color: rgba(255,255,255,0.55); text-decoration: none; }
.site-footer__bottom a:hover { color: #fff; }
.footer-widget-title { color: var(--sp-gold) !important; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem !important; }

/* ── ARCHIVE HERO ────────────────────────────────────────────────────────── */
.archive-hero, .taxonomy-hero {
  background: var(--sp-forest) !important;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}
.archive-hero::after, .taxonomy-hero::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

/* ── SINGLE ACTIVITE ─────────────────────────────────────────────────────── */
.activite-hero { background: var(--sp-forest) !important; }
.activite-header { padding-top: 2rem; }
.activite-title { font-size: clamp(1.8rem, 4vw, 3rem) !important; }
.activite-age-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.activite-age-badges a { background: var(--sp-forest-lt); color: var(--sp-forest); font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 12px; text-decoration: none; }

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.error-404 { min-height: 60vh; display: flex; align-items: center; }
.error-404__inner { text-align: center; padding: 4rem 1.5rem; width: 100%; }

/* ── WIDGET ──────────────────────────────────────────────────────────────── */
.widget { margin-bottom: 1.5rem; }
.widget-title { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sp-muted); margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--sp-gold); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 0.375rem 0; border-bottom: 1px solid var(--sp-border); font-size: 0.875rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul a { color: var(--sp-ink); text-decoration: none; }
.widget ul a:hover { color: var(--sp-forest); }

/* ── SKIP LINK ───────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--sp-forest); color: #fff;
  padding: 0.5rem 1rem; border-radius: 0 0 8px 8px;
  font-size: 0.875rem; font-weight: 600; text-decoration: none; z-index: 999;
}
.skip-link:focus { top: 0; }

/* ── GUTENBERG OVERRIDES ─────────────────────────────────────────────────── */
.wp-element-button,
.wp-block-button__link {
  font-family: var(--wp--preset--font-family--dm-sans, system-ui, sans-serif) !important;
  font-weight: 600 !important;
  transition: background var(--sp-transition), transform 0.1s !important;
}
.wp-element-button:hover { transform: translateY(-1px); }
.has-forest-background-color { background-color: var(--sp-forest) !important; }
.has-gold-background-color   { background-color: var(--sp-gold) !important; }
.has-sand-background-color   { background-color: var(--sp-sand) !important; }
.has-forest-color            { color: var(--sp-forest) !important; }
.has-gold-color              { color: var(--sp-gold) !important; }
.has-ink-color               { color: var(--sp-ink) !important; }
