/*
Theme Name: Chemin Libre
Theme URI: http://192.168.1.22:3012
Author: Chemin Libre
Description: Theme WordPress pour les parcours VTT et randonnees Chemin Libre.
Version: 1.0.0
Text Domain: chemin-libre
*/

:root {
  --forest: #173c2a;
  --leaf: #55723a;
  --yellow: #f4c20d;
  --sand: #f5efe4;
  --ink: #151917;
  --muted: #65736b;
  --line: #dfe6dc;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: .86rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  font-weight: 800;
}

.hero {
  min-height: 500px;
  display: grid;
  align-items: end;
  padding: 72px clamp(20px, 6vw, 80px) 46px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(11, 29, 20, .86), rgba(11, 29, 20, .42)),
    url("assets/vtt-chemin-hero.png") center 38% / cover;
}

.hero-inner {
  width: min(720px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: #cbe78f;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.08;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2vw, 2.05rem);
}

h3 {
  margin: 0 0 10px;
}

p {
  line-height: 1.62;
}

.hero p {
  max-width: 760px;
  font-size: 1.04rem;
}

.hero-proof,
.actions,
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-proof span,
.metric,
.badge {
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--yellow);
  color: #102417;
  font-weight: 900;
}

.actions {
  margin-top: 22px;
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 16px;
  color: var(--white);
  background: var(--forest);
  border-radius: 8px;
  font-weight: 900;
}

.button.secondary {
  color: var(--forest);
  background: var(--white);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0;
}

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

.card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(35, 55, 40, .08);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card p,
.muted {
  color: var(--muted);
}

.video-box {
  overflow: hidden;
  border-radius: 8px;
  background: #0e2217;
}

.video-box iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
}

.route-hero {
  min-height: 380px;
  display: grid;
  align-items: end;
  padding: 70px clamp(20px, 6vw, 80px) 42px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(11, 29, 20, .88), rgba(11, 29, 20, .35)),
    url("assets/vtt-chemin-hero.png") center / cover;
}

.route-hero-inner {
  width: min(900px, 100%);
}

.route-hero h1 {
  max-width: 920px;
}

.route-hero p {
  max-width: 760px;
  color: #edf5eb;
}

.route-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  max-width: 820px;
}

.route-metrics div {
  padding: 14px;
  background: rgba(255, 255, 255, .93);
  border-radius: 8px;
}

.route-metrics span,
.route-metrics strong {
  display: block;
}

.route-metrics span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.route-metrics strong {
  color: var(--forest);
  font-size: 1.15rem;
}

.route-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.route-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 18px;
}

.route-content {
  display: grid;
  gap: 18px;
}

.route-content > .content-panel > img,
.content-panel .wp-post-image {
  width: 100%;
  border-radius: 8px;
}

.route-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.route-related.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.content-panel {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.page-section {
  width: min(1120px, calc(100% - 40px));
}

.page-content {
  padding: clamp(24px, 5vw, 48px);
}

.page-title {
  margin-bottom: 26px;
}

.page-title h1 {
  color: var(--forest);
}

.page-content a {
  color: var(--forest);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content .button,
.page-content .cl-button,
.page-content .admin-card a,
.page-content .video-card a,
.page-content .cl-social a {
  text-decoration: none;
}

.cl-hero-note,
.cl-strip {
  margin: 22px 0;
  padding: 18px;
  color: #102417;
  background: #f9dc56;
  border-radius: 8px;
  font-weight: 900;
}

.cl-grid,
.cl-social-grid,
.cl-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.cl-box,
.cl-social,
.cl-step {
  padding: 20px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cl-social {
  min-height: 140px;
}

.cl-social strong,
.cl-box strong,
.cl-step strong {
  display: block;
  margin-bottom: 8px;
  color: var(--forest);
  font-size: 1.06rem;
}

.cl-social a,
.cl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 12px;
  padding: 10px 14px;
  color: #102417;
  background: var(--yellow);
  border-radius: 8px;
  text-decoration: none;
}

.cl-status,
.shop-soon {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 12px;
  padding: 8px 11px;
  color: var(--forest);
  background: #e9efe4;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 900;
}

.affiliate-disclosure {
  padding: 16px;
  background: #fff8da;
  border: 1px solid #ead16b;
  border-radius: 8px;
}

.ecommerce-ready {
  padding: clamp(22px, 4vw, 34px);
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cl-checklist {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.cl-checklist li {
  padding: 12px 14px;
  background: #f8fbf6;
  border-left: 5px solid var(--leaf);
  border-radius: 8px;
}

.cl-video-frame {
  overflow: hidden;
  margin: 24px 0;
  background: #0e2217;
  border-radius: 8px;
}

.cl-video-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-lead {
  padding: clamp(24px, 5vw, 42px);
  color: #f5f8ef;
  background:
    linear-gradient(90deg, rgba(11, 29, 20, .9), rgba(11, 29, 20, .58)),
    url("assets/vtt-chemin-hero.png") center / cover;
  border-radius: 8px;
}

.video-lead h2 {
  max-width: 760px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
}

.video-lead p {
  max-width: 720px;
  color: #eaf3e8;
}

.video-feature {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: 22px;
  align-items: center;
  margin: 28px 0;
}

.video-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.video-card {
  min-height: 230px;
  padding: 20px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.video-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  color: #102417;
  background: var(--yellow);
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 900;
}

.video-card h3 {
  color: var(--forest);
}

.video-card a {
  display: inline-flex;
  margin-top: 10px;
  padding: 10px 13px;
  color: #102417;
  background: var(--yellow);
  border-radius: 8px;
  text-decoration: none;
}

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

.admin-card {
  min-height: 190px;
  padding: 20px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 14px;
  border-radius: 8px;
}

.admin-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  color: #102417;
  background: var(--yellow);
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 900;
}

.admin-card h3 {
  color: var(--forest);
}

.admin-card a {
  display: inline-flex;
  margin-top: 10px;
  padding: 10px 13px;
  color: #102417;
  background: var(--yellow);
  border-radius: 8px;
  text-decoration: none;
}

.video-roadmap {
  padding: 22px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.route-form {
  display: grid;
  gap: 18px;
  margin: 24px 0;
  padding: 22px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.route-form label {
  display: grid;
  gap: 7px;
  color: var(--forest);
  font-weight: 900;
}

.route-form input,
.route-form select,
.route-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.route-form textarea {
  min-height: 150px;
  resize: vertical;
}

.form-message {
  margin: 18px 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-message.success {
  background: #f2f8df;
  border-color: #b8d67d;
}

.form-message.error {
  background: #fff1ee;
  border-color: #e6aaa0;
}

.shop-hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.25fr);
  gap: 28px;
  align-items: center;
  margin: -12px 0 36px;
  padding: 26px;
  color: #f5f8ef;
  background: var(--forest);
  border-radius: 8px;
}

.shop-hero h2 {
  font-size: clamp(2rem, 3.2vw, 3.7rem);
  line-height: 1.02;
}

.shop-hero p {
  color: #dfeadb;
  font-size: 1.04rem;
}

.shop-hero img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.shop-section {
  margin-top: 36px;
}

.product-grid,
.affiliate-grid {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

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

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

.product-card,
.affiliate-card {
  min-height: 190px;
  padding: 22px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-card h3,
.affiliate-card h3 {
  color: var(--forest);
}

.product-card span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  color: #132719;
  background: var(--yellow);
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 900;
}

.product-card strong {
  display: inline-flex;
  margin-top: 12px;
  color: var(--leaf);
  font-weight: 900;
  text-transform: uppercase;
}

.shop-soon {
  text-transform: none;
}

.affiliate-card a {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 14px;
  color: #102417;
  background: var(--yellow);
  border-radius: 8px;
  text-decoration: none;
}

.shop-roadmap {
  padding: 24px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shop-roadmap ol {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.spec-list {
  display: grid;
  gap: 10px;
}

.spec-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  color: #d9e8dd;
  background: #123523;
  border-top: 4px solid var(--yellow);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(180px, .75fr) minmax(220px, .9fr);
  gap: 24px;
  align-items: start;
  padding: 24px clamp(20px, 6vw, 80px) 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
}

.footer-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.footer-brand strong {
  display: block;
  color: var(--white);
  font-size: 1.05rem;
}

.footer-brand p {
  margin: 5px 0 0;
  color: #c8d8ce;
  line-height: 1.45;
}

.footer-links,
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.footer-links a,
.footer-social a,
.footer-bottom a {
  color: #eef6ef;
  font-weight: 800;
}

.footer-links a,
.footer-social a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 8px;
}

.footer-social a {
  color: #102417;
  background: var(--yellow);
  border-color: rgba(244, 194, 13, .45);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(20px, 6vw, 80px);
  color: #b9c9bf;
  background: rgba(0, 0, 0, .18);
  font-size: .9rem;
}

@media (max-width: 980px) {
  .site-header,
  .detail-grid,
  .route-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .site-nav a {
    flex: 0 0 auto;
    padding: 8px 10px;
    background: var(--sand);
    border-radius: 8px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .route-sidebar {
    position: static;
  }

  .route-metrics,
  .route-info-grid,
  .route-related.cards {
    grid-template-columns: 1fr;
  }

  .route-hero {
    min-height: auto;
    padding: 46px 20px 28px;
  }

  .cl-grid,
  .cl-social-grid,
  .cl-step-grid {
    grid-template-columns: 1fr;
  }

  .shop-hero,
  .video-feature,
  .video-category-grid,
  .admin-card-grid,
  .form-grid,
  .product-grid,
  .affiliate-grid {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-block: 20px 14px;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-links,
  .footer-social {
    gap: 8px;
  }

  .footer-bottom {
    justify-content: flex-start;
  }

  .shop-hero {
    padding: 20px;
  }
}
