/*
Theme Name: Routecraft
Theme URI: https://routecraft.com
Author: Routecraft
Description: Thème WooCommerce sur-mesure pour Routecraft — collections de traces GPX vérifiées terrain pour trail, ultra et fastpacking, avec service de traçage sur-mesure.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: routecraft
*/

/* ==========================================================================
   DESIGN TOKENS
   Palette : carte topographique — pin foncé, parchemin, ocre trace, sauge.
   Type    : Bricolage Grotesque (display, caractère brut/technique)
             Work Sans (texte courant)
             JetBrains Mono (data — distances, dénivelés, allures)
   Signature : ligne de profil d'élévation, motif récurrent (héros, séparateurs,
               soulignements de titres).
   ========================================================================== */

:root{
  /* couleurs */
  --pine-950:#101b16;
  --pine-900:#14201c;
  --pine-800:#1d2b25;
  --pine-700:#293c33;
  --parchment:#e9e3d2;
  --parchment-dim:#dcd4bc;
  --ink-light:#eee9db;
  --ink-dark:#161f1a;
  --ochre:#c99a3d;
  --ochre-bright:#e0b458;
  --sage:#6e8c7c;
  --sage-dim:#4e6a5c;
  --line-dim:rgba(233,227,210,0.14);

  /* type */
  --f-display:'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --f-body:'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono:'JetBrains Mono', 'Courier New', monospace;

  /* rythme */
  --radius:2px;
  --container:1180px;
  --gutter:clamp(20px, 5vw, 64px);
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important;}
}

body{
  margin:0;
  background:var(--pine-900);
  color:var(--ink-light);
  font-family:var(--f-body);
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

img{max-width:100%;display:block;height:auto;}
a{color:inherit;text-decoration:none;}
button{font-family:inherit;cursor:pointer;}
input,textarea,select{font-family:inherit;}

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 var(--gutter);
}

h1,h2,h3,h4{
  font-family:var(--f-display);
  font-weight:600;
  line-height:1.05;
  letter-spacing:-0.01em;
  margin:0 0 0.5em;
}

.eyebrow{
  font-family:var(--f-mono);
  font-size:12px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--ochre-bright);
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
}
.eyebrow::before{
  content:"";
  width:22px;height:1px;background:var(--ochre-bright);
}

.data{
  font-family:var(--f-mono);
}

/* boutons */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:14px 26px;
  border-radius:var(--radius);
  font-family:var(--f-mono);
  font-size:13px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  border:1px solid transparent;
  transition:transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover{transform:translateY(-1px);}
.btn-primary{
  background:var(--ochre);
  color:var(--ink-dark);
}
.btn-primary:hover{background:var(--ochre-bright);}
.btn-ghost{
  border-color:rgba(233,227,210,0.35);
  color:var(--ink-light);
}
.btn-ghost:hover{border-color:var(--ochre-bright); color:var(--ochre-bright);}
.btn-dark{
  background:var(--ink-dark);
  color:var(--parchment);
}
.btn-dark:hover{background:var(--pine-950);}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(16,27,22,0.92);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line-dim);
}
.site-header .container{
  display:flex;align-items:center;justify-content:space-between;
  padding-top:18px;padding-bottom:18px;
}
.site-logo{
  font-family:var(--f-display);
  font-size:22px;
  font-weight:700;
  letter-spacing:-0.01em;
}
.site-logo span{color:var(--ochre-bright);}
.main-nav ul{
  display:flex;gap:32px;list-style:none;margin:0;padding:0;
  font-family:var(--f-mono);font-size:13px;letter-spacing:0.04em;text-transform:uppercase;
}
.main-nav a{
  opacity:0.82;transition:opacity .15s ease, color .15s ease;
  border-bottom:1px solid transparent;
  padding-bottom:3px;
}
.main-nav a:hover{opacity:1;color:var(--ochre-bright);border-color:var(--ochre-bright);}
.header-actions{display:flex;align-items:center;gap:18px;}
.cart-count{
  font-family:var(--f-mono);font-size:12px;
  border:1px solid rgba(233,227,210,0.35);
  border-radius:50%;width:22px;height:22px;
  display:inline-flex;align-items:center;justify-content:center;
}
.nav-toggle{display:none;background:none;border:0;color:var(--ink-light);}

@media (max-width: 860px){
  .main-nav{
    position:absolute;top:100%;left:0;right:0;
    background:var(--pine-950);
    border-bottom:1px solid var(--line-dim);
    max-height:0;overflow:hidden;transition:max-height .25s ease;
  }
  .main-nav.is-open{max-height:400px;}
  .main-nav ul{flex-direction:column;gap:0;}
  .main-nav li{border-top:1px solid var(--line-dim);}
  .main-nav a{display:block;padding:16px var(--gutter);}
  .nav-toggle{display:block;}
}

/* ==========================================================================
   HERO — ligne de profil d'élévation, signature de la marque
   ========================================================================== */
.hero{
  position:relative;
  padding:96px 0 64px;
  overflow:hidden;
  border-bottom:1px solid var(--line-dim);
}
.hero-elevation{
  position:absolute;
  left:0;right:0;bottom:0;
  width:100%;height:auto;
  opacity:0.9;
}
.hero-elevation path{
  fill:none;
  stroke:var(--sage);
  stroke-width:1.4;
  stroke-dasharray:2000;
  stroke-dashoffset:2000;
  animation:draw-elevation 2.4s ease forwards .3s;
}
.hero-elevation path.fill-path{
  stroke:none;
  fill:url(#elevation-gradient);
  animation:none;
  opacity:0.5;
}
@keyframes draw-elevation{to{stroke-dashoffset:0;}}

.hero-content{position:relative;z-index:2;max-width:760px;}
.hero h1{
  font-size:clamp(40px, 6vw, 74px);
  color:var(--parchment);
}
.hero h1 em{
  font-style:normal;
  color:var(--ochre-bright);
  position:relative;
}
.hero-sub{
  font-size:19px;
  color:var(--parchment-dim);
  max-width:520px;
  margin-bottom:36px;
}
.hero-ctas{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:56px;}

.hero-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px,1fr));
  gap:24px;
  border-top:1px solid var(--line-dim);
  padding-top:28px;
  max-width:640px;
  position:relative;z-index:2;
}
.hero-stat .n{
  font-family:var(--f-mono);
  font-size:26px;
  color:var(--ochre-bright);
  display:block;
}
.hero-stat .l{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--parchment-dim);
}

/* ==========================================================================
   SECTIONS GÉNÉRIQUES
   ========================================================================== */
.section{padding:88px 0;}
.section-parchment{
  background:var(--parchment);
  color:var(--ink-dark);
}
.section-parchment .eyebrow{color:var(--sage-dim);}
.section-parchment .eyebrow::before{background:var(--sage-dim);}
.section-head{max-width:640px;margin-bottom:56px;}
.section-head h2{font-size:clamp(28px,3.6vw,42px);}
.section-parchment h2{color:var(--ink-dark);}
.section:not(.section-parchment) h2{color:var(--parchment);}

/* pourquoi routecraft — 3 colonnes */
.pillars{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:1px;
  background:var(--line-dim);
  border:1px solid var(--line-dim);
}
.pillar{
  background:var(--pine-900);
  padding:36px;
}
.pillar .idx{
  font-family:var(--f-mono);
  color:var(--sage);
  font-size:13px;
  margin-bottom:18px;
  display:block;
}
.pillar h3{font-size:21px;color:var(--parchment);margin-bottom:10px;}
.pillar p{color:var(--parchment-dim);font-size:15px;margin:0;}
@media (max-width: 860px){
  .pillars{grid-template-columns:1fr;}
}

/* collections / produits woocommerce */
.collections-grid ul.products{
  display:grid !important;
  grid-template-columns:repeat(3, 1fr);
  gap:32px;
  list-style:none;
  margin:0;padding:0;
}
@media (max-width: 900px){
  .collections-grid ul.products{grid-template-columns:repeat(2,1fr);}
}
@media (max-width: 600px){
  .collections-grid ul.products{grid-template-columns:1fr;}
}

.product-card{
  background:var(--pine-800);
  border:1px solid var(--line-dim);
  transition:border-color .2s ease, transform .2s ease;
}
.product-card:hover{border-color:var(--ochre); transform:translateY(-3px);}
.product-card .thumb{
  aspect-ratio:4/3;
  background:linear-gradient(180deg, var(--pine-700), var(--pine-800));
  position:relative;
  overflow:hidden;
}
.product-card .thumb img{width:100%;height:100%;object-fit:cover;}
.product-card .thumb .mini-profile{
  position:absolute;bottom:0;left:0;right:0;height:46%;
  opacity:0.55;
}
.product-card .body{padding:22px;}
.product-card .cat{
  font-family:var(--f-mono);font-size:11px;
  letter-spacing:0.08em;text-transform:uppercase;
  color:var(--ochre-bright);margin-bottom:8px;display:block;
}
.product-card h3{font-size:19px;margin-bottom:8px;color:var(--parchment);}
.product-card .meta{
  display:flex;gap:16px;
  font-family:var(--f-mono);font-size:12px;
  color:var(--parchment-dim);
  margin-bottom:16px;
}
.product-card .price{
  font-family:var(--f-mono);
  color:var(--ink-light);
  font-size:16px;
}
.product-card .price del{opacity:0.5;margin-right:8px;font-size:13px;}
.product-card .price ins{text-decoration:none;color:var(--ochre-bright);}
.product-card a.button{
  margin-top:16px;
  display:inline-block;
  font-family:var(--f-mono);
  font-size:12px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--ochre-bright);
  border-bottom:1px solid var(--ochre-bright);
  padding-bottom:2px;
}

/* sur-mesure — bloc + processus (séquence réelle → numérotation justifiée) */
.custom-block{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:64px;
  align-items:start;
}
@media (max-width: 900px){.custom-block{grid-template-columns:1fr;}}

.process-steps{list-style:none;margin:0;padding:0;}
.process-steps li{
  display:flex;gap:20px;
  padding:22px 0;
  border-top:1px solid rgba(20,32,28,0.12);
}
.process-steps li:last-child{border-bottom:1px solid rgba(20,32,28,0.12);}
.process-steps .num{
  font-family:var(--f-mono);
  color:var(--sage-dim);
  font-size:14px;
  min-width:28px;
}
.process-steps h4{font-size:17px;margin-bottom:4px;}
.process-steps p{margin:0;font-size:14px;opacity:0.75;}

/* formulaire sur-mesure */
.order-form{
  background:var(--pine-800);
  border:1px solid var(--line-dim);
  padding:36px;
}
.order-form label{
  display:block;
  font-family:var(--f-mono);
  font-size:12px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--parchment-dim);
  margin-bottom:8px;
}
.order-form .field{margin-bottom:22px;}
.order-form input[type=text],
.order-form input[type=email],
.order-form select,
.order-form textarea{
  width:100%;
  background:var(--pine-900);
  border:1px solid var(--line-dim);
  color:var(--ink-light);
  padding:12px 14px;
  border-radius:var(--radius);
  font-size:15px;
}
.order-form textarea{min-height:120px;resize:vertical;}
.order-form .row-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
@media (max-width:600px){.order-form .row-2{grid-template-columns:1fr;}}

/* preuve / avis */
.proof-strip{
  border-top:1px solid var(--line-dim);
  border-bottom:1px solid var(--line-dim);
  padding:20px 0;
  font-family:var(--f-mono);
  font-size:13px;
  color:var(--parchment-dim);
  display:flex;
  gap:40px;
  flex-wrap:wrap;
  justify-content:center;
  text-align:center;
}

/* newsletter / footer cta */
.cta-band{
  background:var(--ink-dark);
  padding:72px 0;
  text-align:center;
}
.cta-band h2{color:var(--parchment);margin-bottom:16px;}
.cta-band p{color:var(--parchment-dim);max-width:480px;margin:0 auto 32px;}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{
  background:var(--pine-950);
  padding:64px 0 32px;
  border-top:1px solid var(--line-dim);
}
.footer-grid{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr 1fr;
  gap:40px;
  margin-bottom:56px;
}
@media (max-width:800px){.footer-grid{grid-template-columns:1fr 1fr;}}
.footer-grid h5{
  font-family:var(--f-mono);
  font-size:12px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--parchment-dim);
  margin-bottom:16px;
}
.footer-grid ul{list-style:none;margin:0;padding:0;}
.footer-grid li{margin-bottom:10px;font-size:14px;}
.footer-grid a:hover{color:var(--ochre-bright);}
.footer-bottom{
  border-top:1px solid var(--line-dim);
  padding-top:24px;
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;
  font-family:var(--f-mono);
  font-size:12px;
  color:var(--parchment-dim);
}

/* ==========================================================================
   PAGES GÉNÉRIQUES / WOOCOMMERCE OVERRIDES
   ========================================================================== */
.page-hero{
  padding:64px 0 40px;
  border-bottom:1px solid var(--line-dim);
}
.page-hero h1{font-size:clamp(32px,5vw,52px);color:var(--parchment);}
.entry-content{padding:56px 0;max-width:760px;margin:0 auto;}
.entry-content .container{padding:0;}

.woocommerce-page .section{padding-top:56px;}
.woocommerce ul.products{display:grid;grid-template-columns:repeat(3,1fr);gap:32px;}
@media (max-width:900px){.woocommerce ul.products{grid-template-columns:repeat(2,1fr);}}
@media (max-width:600px){.woocommerce ul.products{grid-template-columns:1fr;}}

.woocommerce-message, .woocommerce-info, .woocommerce-error{
  font-family:var(--f-mono);
  font-size:13px;
  background:var(--pine-800);
  border:1px solid var(--ochre);
  color:var(--ink-light);
  padding:16px 20px;
  list-style:none;
  margin-bottom:24px;
}
.woocommerce div.product form.cart .button,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button{
  background:var(--ochre);
  color:var(--ink-dark);
  border-radius:var(--radius);
  font-family:var(--f-mono);
  text-transform:uppercase;
  letter-spacing:0.05em;
  font-size:13px;
  padding:12px 22px;
  border:none;
}
.woocommerce div.product form.cart .button:hover,
.woocommerce a.button:hover{background:var(--ochre-bright);}
