/* ============================================================
   Karting Midi-Pyrénées — Circuit de karting près de Toulouse
   Design : circuit / sport mécanique, CSS custom pur
   Palette : anthracite + vert course + accent jaune drapeau
   ============================================================ */

:root {
  --ink: #1b1e23;          /* anthracite */
  --ink-soft: #2b2f36;
  --green: #0a8a3c;        /* vert course */
  --green-bright: #1bd45f;
  --yellow: #f4c020;       /* accent drapeau */
  --cream: #f6f6f3;        /* fond clair */
  --white: #ffffff;
  --grey: #5b616b;
  --line: #e2e2dd;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, Arial, sans-serif;
  --maxw: 1140px;
  --radius: 14px;
  --shadow: 0 14px 40px rgba(27,30,35,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin-bottom: 1.1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  letter-spacing: .3px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { background: var(--green-bright); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
}
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #ffd23d; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 22px;
}
.logo img { height: 46px; }
.main-nav ul { list-style: none; display: flex; gap: 6px; align-items: center; }
.main-nav a {
  text-decoration: none; color: var(--ink); font-weight: 600;
  padding: 9px 14px; border-radius: 8px; font-size: .98rem;
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover, .main-nav a.active { background: var(--cream); color: var(--green); }
.main-nav a.nav-cta { background: var(--ink); color: #fff; }
.main-nav a.nav-cta:hover { background: var(--green); color: #fff; }
.menu-toggle {
  display: none; background: none; border: none; font-size: 1.7rem;
  color: var(--ink); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(rgba(20,22,26,.72), rgba(20,22,26,.55)), var(--hero-img) center/cover no-repeat;
  background-color: var(--ink);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 92px 22px 100px; }
.hero .eyebrow { color: var(--yellow); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { color: rgba(255,255,255,.9); max-width: 56ch; font-size: 1.15rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats {
  display: flex; gap: 40px; flex-wrap: wrap; margin-top: 54px;
  border-top: 1px solid rgba(255,255,255,.18); padding-top: 28px;
}
.hero-stats .stat strong { font-family: var(--serif); font-size: 2.2rem; color: var(--yellow); display: block; line-height: 1; }
.hero-stats .stat span { font-size: .95rem; color: rgba(255,255,255,.85); }

/* ---------- Page banner (sous-pages) ---------- */
.page-banner {
  color: #fff; text-align: center;
  background: linear-gradient(rgba(20,22,26,.78), rgba(20,22,26,.62)), var(--hero-img) center/cover no-repeat;
  background-color: var(--ink);
  padding: 78px 22px;
}
.page-banner h1 { color: #fff; margin-bottom: .5rem; }
.page-banner p { color: rgba(255,255,255,.9); max-width: 60ch; margin: 0 auto; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.7); margin-bottom: 12px; letter-spacing: .5px; }
.breadcrumb a { color: var(--yellow); text-decoration: none; }

/* ---------- Sections ---------- */
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 2.5px;
  font-size: .8rem; font-weight: 700; color: var(--green); margin-bottom: 12px;
}
.section { padding: 78px 0; }
.section.alt { background: var(--white); }
.section-head { max-width: 660px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }

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

.card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 22px 50px rgba(27,30,35,.16); }
.card img { height: 210px; width: 100%; object-fit: cover; }
.card-body { padding: 24px; }
.card-body h3 { margin-bottom: 10px; }
.card-body p { color: var(--grey); font-size: .98rem; margin-bottom: 16px; }
.card-link { font-weight: 700; text-decoration: none; color: var(--green); }
.card-link:hover { color: var(--green-bright); }
.tag {
  display: inline-block; background: var(--cream); color: var(--green);
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}

/* ---------- Split media ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split.reverse .split-media { order: 2; }

/* ---------- Article (pages de contenu) ---------- */
.article { display: grid; grid-template-columns: 1fr; gap: 0; }
.article-body { max-width: 760px; margin: 0 auto; padding: 64px 22px; }
.article-body h2 { margin: 38px 0 14px; }
.article-body h3 { margin: 28px 0 10px; color: var(--green); }
.article-body img { border-radius: var(--radius); margin: 28px 0; box-shadow: var(--shadow); }
.article-body ul { margin: 0 0 1.2rem 1.3rem; }
.article-body li { margin-bottom: .5rem; }
.inline-link { color: var(--green); font-weight: 700; }
.callout {
  background: var(--white); border-left: 5px solid var(--yellow);
  padding: 22px 26px; border-radius: 10px; margin: 30px 0; box-shadow: var(--shadow);
}

/* ---------- Tarifs ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.price-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 28px; text-align: center; box-shadow: var(--shadow);
}
.price-card.featured { background: var(--ink); color: #fff; border-color: var(--ink); }
.price-card.featured h3, .price-card.featured .price { color: #fff; }
.price-card .price { font-family: var(--serif); font-size: 2.6rem; font-weight: 800; color: var(--green); margin: 8px 0; }
.price-card .price small { font-size: .9rem; color: var(--grey); font-family: var(--sans); font-weight: 400; }
.price-card ul { list-style: none; text-align: left; margin: 22px 0; }
.price-card li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
.price-card.featured li { border-color: rgba(255,255,255,.15); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--green); color: #fff; text-align: center; padding: 64px 22px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 56ch; margin: 0 auto 24px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.info-block { margin-bottom: 22px; }
.info-block h4 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 1.5px; font-size: .8rem; color: var(--green); margin-bottom: 4px; }
form { display: flex; flex-direction: column; gap: 14px; }
input, textarea {
  font-family: var(--sans); font-size: 1rem; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white); width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--green); border-color: var(--green); }
.newsletter form { flex-direction: row; flex-wrap: wrap; max-width: 540px; margin: 0 auto; }
.newsletter input { flex: 1; min-width: 220px; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 120px 22px; }
.error-page .code { font-family: var(--serif); font-size: clamp(5rem, 18vw, 11rem); color: var(--green); line-height: 1; font-weight: 800; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; }
.footer-brand p { font-size: .95rem; margin-top: 14px; max-width: 34ch; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .9rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; font-size: .96rem; }
.site-footer a:hover { color: var(--yellow); }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a { display: inline-flex; }
.socials svg { width: 22px; height: 22px; fill: rgba(255,255,255,.7); transition: fill .15s ease; }
.socials a:hover svg { fill: var(--yellow); }
.footer-contact p { font-size: .95rem; margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px;
  text-align: center; font-size: .88rem; color: rgba(255,255,255,.55);
}

/* ---------- Checkerboard accent ---------- */
.flag-strip {
  height: 8px;
  background:
    repeating-linear-gradient(45deg, var(--ink) 0 12px, var(--white) 12px 24px);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .price-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px; }
  .main-nav a { display: block; padding: 13px 14px; }
  .grid-3, .grid-2, .price-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 64px 22px 72px; }
  .hero-stats { gap: 26px; }
  .newsletter form { flex-direction: column; }
}
