/*
Theme Name: Turf Pepite
Theme URI: https://turf-pepite.com
Description: Theme classique leger pour Turf Pepite. Magazine PMU clair, rapide, SEO-first.
Author: Sam / Codex
Version: 0.1.0
Text Domain: turf-pepite
*/

:root {
  --tp-bg: #faf7f2;
  --tp-surface: #ffffff;
  --tp-ink: #1f2937;
  --tp-muted: #667085;
  --tp-line: #e7ded2;
  --tp-green: #166534;
  --tp-green-dark: #0f4f2b;
  --tp-red: #9f1239;
  --tp-gold: #92400e;
  --tp-gold-soft: #f6e6ca;
  --tp-shadow: 0 10px 28px rgba(31, 41, 55, .08);
}

body {
  margin: 0;
  background: var(--tp-bg);
  color: var(--tp-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--tp-green);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

a:hover {
  color: var(--tp-red);
}

.wp-site-blocks {
  background:
    linear-gradient(180deg, rgba(22, 101, 52, .06), transparent 360px),
    var(--tp-bg);
}

.tp-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 242, .94);
  border-bottom: 1px solid var(--tp-line);
  backdrop-filter: blur(14px);
}

.tp-topbar {
  background: linear-gradient(90deg, #04291d, #0b5132);
  color: #fff;
  text-align: center;
  padding: 7px 14px;
  font-size: .88rem;
  font-weight: 800;
}

.tp-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 11px clamp(18px, 3vw, 34px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}

.tp-logo {
  color: var(--tp-ink);
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0;
}

.tp-logo span {
  white-space: nowrap;
}

.tp-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
}

.tp-logo b {
  color: var(--tp-green);
}

.tp-nav ul {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tp-nav a {
  color: var(--tp-ink);
  font-size: .84rem;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
}

.tp-nav a:hover {
  color: var(--tp-green);
}

.tp-header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 7px;
  background: #b9822c;
  color: #fff;
  font-size: .9rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.tp-header-cta:hover {
  background: var(--tp-green-dark);
  color: #fff;
}

.tp-site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--tp-line);
  background: #fff;
}

.tp-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 34px);
  color: var(--tp-muted);
  font-size: .92rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.tp-footer-inner strong {
  color: var(--tp-green-dark);
  font-size: 1.5rem;
}

.tp-footer-inner nav {
  display: grid;
  gap: 8px;
}

.tp-footer-inner nav a {
  text-decoration: none;
  font-weight: 750;
}

.tp-footer-legal {
  padding: 14px;
  border-radius: 8px;
  background: rgba(159, 18, 57, .05);
}

.tp-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
}

.tp-home .tp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding-top: clamp(24px, 5vw, 70px);
  padding-bottom: clamp(28px, 5vw, 76px);
}

.tp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(22, 101, 52, .24);
  border-radius: 999px;
  background: rgba(22, 101, 52, .08);
  color: var(--tp-green-dark);
  font-size: .84rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.tp-hero h1 {
  margin: 18px 0 16px;
  max-width: 780px;
  font-size: clamp(2.3rem, 6vw, 5.1rem);
  line-height: .96;
  letter-spacing: 0;
  color: #073f2a;
}

.tp-lead {
  max-width: 680px;
  font-size: clamp(1.08rem, 1.8vw, 1.34rem);
  line-height: 1.58;
  color: #3f4856;
}

.tp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.tp-proofline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 26px;
  color: #4c5665;
  font-size: .92rem;
  font-weight: 650;
}

.tp-proofline span::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border: 1px solid #b8c4b7;
  border-radius: 50%;
  color: var(--tp-green);
  font-size: .72rem;
}

.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
}

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

.tp-btn-primary:hover {
  background: var(--tp-green-dark);
  color: #fff;
}

.tp-btn-secondary {
  background: var(--tp-surface);
  border-color: var(--tp-line);
  color: var(--tp-ink);
}

.tp-btn-secondary:hover {
  border-color: var(--tp-green);
  color: var(--tp-green-dark);
}

.tp-hero-card,
.tp-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--tp-line);
  border-radius: 8px;
  box-shadow: var(--tp-shadow);
}

.tp-hero-media {
  position: relative;
  min-height: 520px;
  border-radius: 0 0 0 64px;
  overflow: hidden;
}

.tp-hero-media img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  display: block;
}

.tp-featured-race {
  position: absolute;
  right: 24px;
  top: 54px;
  width: min(330px, calc(100% - 48px));
  padding: 22px;
  border: 1px solid rgba(212, 162, 60, .75);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(5, 48, 34, .94), rgba(7, 77, 45, .9));
  color: #fff;
  box-shadow: 0 18px 40px rgba(6, 31, 24, .28);
}

.tp-featured-race span {
  color: #eec77d;
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tp-featured-race h2 {
  margin: 12px 0 6px;
  color: #fff;
  font-size: 2rem;
}

.tp-featured-race p {
  color: rgba(255,255,255,.82);
}

.tp-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: -22px;
  position: relative;
  z-index: 3;
}

.tp-shortcuts .tp-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  text-decoration: none;
}

.tp-shortcuts strong {
  color: #073f2a;
  font-size: 1.15rem;
}

.tp-shortcuts span {
  color: var(--tp-muted);
}

.tp-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr);
  gap: 24px;
  align-items: start;
}

.tp-table-panel,
.tp-quinte-panel {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--tp-line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--tp-shadow);
}

.tp-quinte-panel {
  position: sticky;
  top: 112px;
}

.tp-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(22, 101, 52, .1);
  color: var(--tp-green-dark);
  font-size: .8rem;
  font-weight: 800;
}

.tp-dark-band {
  margin: 50px 0 0;
  background:
    linear-gradient(90deg, rgba(4, 41, 29, .98), rgba(6, 68, 42, .92)),
    var(--tp-green-dark);
  color: #fff;
}

.tp-dark-band .tp-grid {
  padding-top: 34px;
  padding-bottom: 34px;
}

.tp-dark-band strong,
.tp-dark-band span {
  display: block;
}

.tp-dark-band strong {
  font-size: 1.08rem;
  color: #f5dfb7;
}

.tp-dark-band span {
  margin-top: 6px;
  color: rgba(255,255,255,.78);
}

.tp-hero-card {
  overflow: hidden;
}

.tp-race-visual {
  min-height: 290px;
  background:
    linear-gradient(145deg, rgba(22, 101, 52, .92), rgba(31, 41, 55, .88)),
    radial-gradient(circle at 30% 20%, rgba(246, 230, 202, .45), transparent 34%),
    repeating-linear-gradient(100deg, rgba(255,255,255,.12) 0 2px, transparent 2px 18px);
  color: #fff;
  display: grid;
  align-content: end;
  padding: 24px;
}

.tp-race-visual strong {
  display: block;
  max-width: 420px;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.05;
}

.tp-race-visual span {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,.82);
}

.tp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--tp-line);
}

.tp-stat {
  padding: 16px;
  border-right: 1px solid var(--tp-line);
}

.tp-stat:last-child {
  border-right: 0;
}

.tp-stat b {
  display: block;
  color: var(--tp-red);
  font-size: 1.28rem;
}

.tp-stat span {
  display: block;
  color: var(--tp-muted);
  font-size: .84rem;
}

.tp-section {
  padding-top: clamp(28px, 5vw, 62px);
  padding-bottom: clamp(28px, 5vw, 62px);
}

.tp-section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.72rem, 3vw, 2.7rem);
  letter-spacing: 0;
}

.tp-post-title {
  max-width: 1000px;
  margin: 30px auto 10px;
  padding: 0 clamp(18px, 3vw, 34px);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
}

.tp-featured-image {
  max-width: 1140px;
  margin: 16px auto 8px;
  padding: 0 clamp(18px, 3vw, 34px);
}

.tp-featured-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid var(--tp-line);
  box-shadow: var(--tp-shadow);
  display: block;
}

.tp-author-box {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  max-width: 920px;
  margin: 32px 0 10px;
  padding: 20px;
  border: 1px solid var(--tp-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--tp-shadow);
}

.tp-author-box img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
}

.tp-author-box span {
  display: block;
  color: var(--tp-muted);
  font-size: .86rem;
  font-weight: 750;
  text-transform: uppercase;
}

.tp-author-box strong {
  display: block;
  color: var(--tp-green-dark);
  font-size: 1.28rem;
}

.tp-default-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
}

.tp-default-content > *:not(.tp-wrap) {
  max-width: 820px;
}

.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.wp-block-table table,
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--tp-line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--tp-line);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(22, 101, 52, .08);
  color: var(--tp-green-dark);
}

.tp-section-lead {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--tp-muted);
  font-size: 1.06rem;
  line-height: 1.65;
}

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

.tp-card img {
  width: 100%;
  height: auto;
  border-radius: 7px;
  margin-bottom: 12px;
}

.tp-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tp-card {
  padding: 20px;
}

.tp-card h3 {
  margin: 0 0 8px;
  font-size: 1.16rem;
}

.tp-card p {
  margin: 0;
  color: var(--tp-muted);
  line-height: 1.55;
}

.tp-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--tp-gold-soft);
  color: var(--tp-gold);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tp-method {
  border-left: 4px solid var(--tp-green);
}

.tp-legal {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid rgba(159, 18, 57, .22);
  border-radius: 8px;
  background: rgba(159, 18, 57, .05);
  color: #5b2432;
  font-size: .92rem;
}

@media (max-width: 860px) {
  .tp-home .tp-hero,
  .tp-grid,
  .tp-grid-4,
  .tp-shortcuts,
  .tp-home-grid,
  .tp-footer-inner {
    grid-template-columns: 1fr;
  }

  .tp-hero-media,
  .tp-hero-media img {
    min-height: 420px;
  }

  .tp-featured-race {
    left: 18px;
    right: 18px;
    bottom: 18px;
    top: auto;
    width: auto;
  }

  .tp-stats {
    grid-template-columns: 1fr;
  }

  .tp-stat {
    border-right: 0;
    border-bottom: 1px solid var(--tp-line);
  }

  .tp-stat:last-child {
    border-bottom: 0;
  }

  .tp-header-inner {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 16px;
    padding-right: 16px;
  }

  .tp-nav ul {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 10px;
  }

  .tp-nav,
  .tp-nav ul,
  .tp-site-header,
  .tp-topbar {
    max-width: 100%;
    box-sizing: border-box;
  }

  .tp-header-cta {
    width: 100%;
    box-sizing: border-box;
  }

  .tp-featured-image {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tp-featured-image img {
    aspect-ratio: 16 / 9;
    max-height: none;
  }
}
