/*
Theme Name: GK Digital
Theme URI: https://gkdigital.fr
Author: GK Digital
Author URI: https://gkdigital.fr
Description: Thème WordPress sur-mesure pour agence SEO — référencement naturel, blog, pages services. Front page dynamique, sommaire d'article automatique, accent de marque personnalisable.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gk-digital
Tags: business, seo, agency, blog, two-columns, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   GK Digital — Agence SEO
   Shared design system
   ============================================================ */

/* ---- Fonts ---- */
/* ---- Tokens ---- */
:root {
  /* Color — warm paper, cool ink, growth-green accent */
  --paper: oklch(0.985 0.005 95);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.97 0.006 110);
  --ink: oklch(0.23 0.015 260);
  --ink-soft: oklch(0.42 0.012 260);
  --muted: oklch(0.56 0.01 260);
  --line: oklch(0.9 0.005 260);
  --line-strong: oklch(0.84 0.006 260);

  /* Accent — user-tweakable hue lives here */
  --accent-h: 152;
  --accent: oklch(0.66 0.15 var(--accent-h));
  --accent-deep: oklch(0.5 0.13 var(--accent-h));
  --accent-ink: oklch(0.32 0.09 var(--accent-h));
  --accent-wash: oklch(0.95 0.04 var(--accent-h));

  /* Dark section */
  --night: oklch(0.22 0.018 260);
  --night-2: oklch(0.27 0.02 260);
  --night-line: oklch(0.34 0.02 260);
  --on-night: oklch(0.96 0.005 260);
  --on-night-soft: oklch(0.74 0.012 260);

  /* Type */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  /* Spacing / radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 260 / 0.05), 0 2px 8px oklch(0.2 0.02 260 / 0.04);
  --shadow-md: 0 4px 16px oklch(0.2 0.02 260 / 0.07), 0 12px 36px oklch(0.2 0.02 260 / 0.06);
  --shadow-lg: 0 8px 28px oklch(0.2 0.02 260 / 0.1), 0 30px 70px oklch(0.2 0.02 260 / 0.1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; padding: 0; }

::selection { background: var(--accent-wash); color: var(--accent-ink); }

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

/* ---- Type scale ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}
.eyebrow--plain::before { display: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.display {
  font-size: clamp(2.6rem, 6.2vw, 5.1rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
h2.title { font-size: clamp(2rem, 3.8vw, 3.2rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-soft); line-height: 1.5; text-wrap: pretty; }
.muted { color: var(--muted); }
.accent-text { color: var(--accent-deep); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--accent); color: oklch(0.16 0.03 var(--accent-h)); box-shadow: var(--shadow-sm); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px oklch(0.66 0.15 var(--accent-h) / 0.4); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-2px); }
.btn--light { background: var(--on-night); color: var(--night); }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 10px 30px oklch(0 0 0 / 0.3); }
.btn--block { width: 100%; justify-content: center; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.textlink {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-weight: 600; color: var(--accent-deep);
  border-bottom: 1px solid transparent; transition: border-color .2s, gap .2s;
}
.textlink:hover { border-color: var(--accent); gap: 0.6em; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: oklch(0.985 0.005 95 / 0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-color: var(--line); background: oklch(0.985 0.005 95 / 0.92); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 2rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6em; font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 800;
  position: relative; overflow: hidden;
}
.brand .mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, var(--accent) 140%);
}
.brand .mark span { position: relative; z-index: 1; }
.brand small { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; display: block; line-height: 1; margin-top: 2px; font-weight: 400; }

.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-links a {
  padding: 0.5em 0.9em; border-radius: 8px; font-weight: 500; font-size: 0.96rem;
  color: var(--ink-soft); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 0.8rem; }

.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Badges / chips ---- */
.badge {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 0.4em 0.85em; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent-ink);
  border: 1px solid oklch(0.66 0.15 var(--accent-h) / 0.25);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px oklch(0.66 0.15 var(--accent-h) / 0.2); }

.chip {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.45em 0.9em;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 0.88rem; font-weight: 500; color: var(--ink-soft);
  transition: all .2s ease; cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---- Cards ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.8rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---- Footer ---- */
.site-footer { background: var(--night); color: var(--on-night-soft); padding-block: clamp(56px, 7vw, 88px) 36px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer .brand { color: var(--on-night); }
.site-footer .brand small { color: var(--on-night-soft); }
.footer-col h4 { color: var(--on-night); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-col a { display: block; padding: 0.32em 0; color: var(--on-night-soft); transition: color .2s; font-size: 0.96rem; }
.footer-col a:hover { color: var(--on-night); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: clamp(40px, 6vw, 64px); padding-top: 28px; border-top: 1px solid var(--night-line); font-size: 0.85rem; }
.footer-bottom .legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 1rem; padding: 0.8em 1em;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.66 0.15 var(--accent-h) / 0.18);
}
.field.invalid input, .field.invalid textarea { border-color: oklch(0.6 0.2 25); box-shadow: 0 0 0 3px oklch(0.6 0.2 25 / 0.15); }
.field .err { font-size: 0.78rem; color: oklch(0.55 0.2 25); display: none; }
.field.invalid .err { display: block; }

/* ---- Utilities ---- */
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.stack-sm > * + * { margin-top: 0.6rem; }
.grid { display: grid; gap: 1.4rem; }
.flex { display: flex; }
.hide-mobile { }

/* ---- Section header ---- */
.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; }
.section-head .lead { margin-top: 1rem; }
.section-head .eyebrow { margin-bottom: 1.1rem; }

/* ---- Mobile menu sheet ---- */
.mobile-sheet {
  position: fixed; inset: 0; z-index: 55; background: var(--paper);
  transform: translateY(-100%); transition: transform .4s cubic-bezier(.16,1,.3,1);
  display: flex; flex-direction: column; padding: 96px var(--gutter) 40px; gap: 0.4rem;
  visibility: hidden;
}
.mobile-sheet.open { transform: none; visibility: visible; }
.mobile-sheet a { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.mobile-sheet .btn { margin-top: 1.5rem; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-cta .btn--ghost { display: none; }
  .menu-toggle { display: flex; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   WordPress integration helpers
   ============================================================ */
/* Featured images filling placeholder frames */
.post-thumb img.thumb-img,
.featured .media img.cover,
.hero-figure .ph img.cover,
.case-media img.cover,
.body-figure .ph img.cover,
.post-thumb .thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.has-thumb { background-image: none !important; }

/* Active nav state from WP menu classes */
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a,
.nav-links .current-menu-ancestor > a { color: var(--ink); background: var(--surface-2); }

/* WP core alignment / caption inside article body */
.article-body img { border-radius: var(--r-md); height: auto; }
.article-body .alignleft { float: left; margin: 0.4rem 1.6rem 1rem 0; max-width: 50%; }
.article-body .alignright { float: right; margin: 0.4rem 0 1rem 1.6rem; max-width: 50%; }
.article-body .aligncenter { display: block; margin-inline: auto; }
.article-body figure.wp-caption, .article-body figure.wp-block-image { margin: 2rem 0; }
.article-body .wp-caption-text, .article-body figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.6rem; text-align: center; }
.article-body blockquote { margin: 2.4rem 0; padding: 1.4rem 1.8rem; border-left: 4px solid var(--accent); background: var(--accent-wash); border-radius: 0 var(--r-md) var(--r-md) 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4; color: var(--ink); }
.article-body blockquote p { margin: 0; }
.article-body ul:not(.bullets):not(.svc-feats), .article-body ol { margin: 0 0 1.6rem 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.article-body ol { list-style: decimal; padding-left: 1rem; }
.article-body ul:not(.bullets):not(.svc-feats) { list-style: disc; padding-left: 1rem; }

/* Comments */
.comments-area { max-width: 720px; margin: 3.5rem auto 0; }
.comments-area .comments-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1.5rem; }
.comment-list { display: flex; flex-direction: column; gap: 1.4rem; }
.comment-list .comment-body { border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.3rem; background: var(--surface); }
.comment-list .comment-author { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.5rem; }
.comment-list .comment-author img { border-radius: 50%; }
.comment-list .comment-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-bottom: 0.6rem; }
.comment-list .children { list-style: none; margin: 1.4rem 0 0 1.6rem; padding: 0; display: flex; flex-direction: column; gap: 1.4rem; }
.comment-respond { margin-top: 2.5rem; }
.comment-respond .comment-reply-title { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 1rem; }
.comment-form { display: flex; flex-direction: column; gap: 1rem; }
.comment-form input:not([type=submit]), .comment-form textarea { font: inherit; font-size: 1rem; padding: 0.8em 1em; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); width: 100%; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.66 0.15 var(--accent-h) / 0.18); }

/* Pagination (WP) */
.wp-pagenavi, .nav-links.pagination, .posts-navigation { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3.5rem; }
.page-numbers { width: 44px; height: 44px; border-radius: 11px; display: inline-grid; place-items: center; border: 1px solid var(--line); font-weight: 600; transition: all .2s; }
.page-numbers:hover { border-color: var(--ink); }
.page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.page-numbers.dots { border: none; }

/* Sticky-post badge */
.post-card .sticky-flag { position: absolute; top: 12px; right: 12px; }

/* Generic page body */
.page-body { font-size: 1.12rem; line-height: 1.7; color: var(--ink-soft); }
.page-body h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 2.2rem 0 1rem; color: var(--ink); }
.page-body h3 { font-size: 1.3rem; margin: 1.8rem 0 0.7rem; color: var(--ink); }
.page-body p { margin-bottom: 1.3rem; }
.page-body a { color: var(--accent-deep); border-bottom: 1px solid var(--accent); }

/* 404 */
.error-404 { padding-block: clamp(64px, 12vw, 160px); text-align: center; }
.error-404 .code { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 18vw, 11rem); line-height: 0.9; letter-spacing: -0.05em; color: var(--ink); }
.error-404 .code span { color: var(--accent-deep); }
