/*
Theme Name: A. d'Aboville
Theme URI: https://adaboville.com
Author: A. d'Aboville
Author URI: https://adaboville.com
Description: Thème WordPress bean-to-bar pour A. d'Aboville, maison de chocolat. Palette claire, typographie Fraunces / Libre Franklin / IBM Plex Mono.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: adaboville
*/

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --blanc:        #FFFFFF;
  --creme:        #F8F4EA;
  --creme-2:      #F1EADA;
  --ligne:        #E5DECB;
  --encre:        #221911;
  --encre-sourd:  #5F5346;
  --cuivre:       #A8693A;
  --cuivre-clair: #C28A57;
  --terracotta:   #8C3E22;
  --vert:         #49542F;

  --serif:  "Fraunces", Georgia, serif;
  --sans:   "Libre Franklin", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:   "IBM Plex Mono", monospace;

  --container: 1180px;
  --edge: clamp(1.5rem, 5vw, 4.5rem);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { margin: 0; padding: 0; list-style: none; }
p   { margin: 0; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
section { scroll-margin-top: 84px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left:  var(--edge);
  padding-right: var(--edge);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--terracotta);
}
.eyebrow::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cuivre);
  display: inline-block;
}

:focus-visible { outline: 2px solid var(--cuivre); outline-offset: 3px; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html    { scroll-behavior: auto; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease,
              color .25s ease, border-color .25s ease;
}
.btn-solid {
  background: var(--encre);
  color: var(--blanc);
  border: 1px solid var(--encre);
}
.btn-solid:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  transform: translateY(-2px);
}
.btn-ghost {
  border: 1px solid var(--encre);
  color: var(--encre);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--cuivre);
  color: var(--cuivre);
  transform: translateY(-2px);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ligne);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.brand-logo { width: 42px; height: auto; }
.brand-text  { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name  { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--encre); }
.brand-tag   { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cuivre); }

/* Desktop nav links */
.primary-nav { display: flex; gap: 1.7rem; align-items: center; }
.primary-nav a {
  font-size: 0.85rem;
  color: var(--encre-sourd);
  position: relative;
  padding-bottom: 4px;
  transition: color .25s ease;
  white-space: nowrap;
}
.primary-nav a:hover { color: var(--encre); }
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--cuivre);
  transition: width .3s ease;
}
.primary-nav a:hover::after { width: 100%; }

/* External / CTA link */
.primary-nav a.nav-external {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cuivre);
}
.primary-nav a.nav-external::after { background: var(--cuivre); }

.nav-cta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--encre);
  color: var(--encre);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  transition: background .25s ease, color .25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--encre); color: var(--blanc); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--encre);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Mobile nav */
@media (max-width: 1010px) {
  .primary-nav {
    position: fixed;
    top: 62px; left: 0; right: 0; bottom: auto;
    background: var(--blanc);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem 0.7rem;
    padding: 0 var(--edge);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    border-bottom: 1px solid transparent;
    box-shadow: 0 12px 24px rgba(34,25,17,0.07);
    transition: max-height .35s ease, opacity .3s ease, padding .35s ease;
  }
  .primary-nav.is-open {
    max-height: 320px;
    opacity: 1;
    padding: 1.1rem var(--edge) 1.3rem;
    border-bottom-color: var(--ligne);
  }
  .primary-nav a {
    padding: 0.55rem 1rem;
    border: 1px solid var(--ligne);
    border-radius: 999px;
    font-size: 0.84rem;
  }
  .primary-nav a::after { display: none; }
  .nav-cta    { display: none; }
  .nav-toggle { display: block; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 8.5rem var(--edge) 0;
}
.hero-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-eyebrow  { margin-bottom: 1.5rem; }
.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.12;
  max-width: 16ch;
}
.hero h1 em    { font-style: italic; font-weight: 500; color: var(--cuivre); }
.hero .lead    { margin-top: 1.5rem; font-size: 1.06rem; color: var(--encre-sourd); max-width: 34em; }
.hero-ctas     { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }
.origin-ticker {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--ligne);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--encre-sourd);
  letter-spacing: 0.02em;
  line-height: 1.9;
}
.hero-photo {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  position: relative;
  margin: 0;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem 1.2rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(to top, rgba(20,14,8,.65), transparent);
}

@media (max-width: 880px) {
  .hero { padding-top: 7rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; aspect-ratio: 16 / 10; }
}

/* ============================================================
   SECTION SHELLS
   ============================================================ */
.section        { padding: 6.5rem 0; }
.section.alt    { background: var(--creme); }
.section-head   { max-width: 42em; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.85rem, 3.2vw, 2.6rem); margin-top: 0.7rem; }

/* ============================================================
   ITINÉRAIRE
   ============================================================ */
.itineraire-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: start;
}
.itineraire-text p { margin-bottom: 1.2rem; color: var(--encre-sourd); font-size: 1.01rem; }
.itineraire-text p:last-child { margin-bottom: 0; }
.itineraire-text strong { color: var(--encre); font-weight: 600; }

.route         { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.4rem; }
.route-chip    { font-family: var(--mono); font-size: 0.74rem; border: 1px solid var(--ligne); background: var(--blanc); border-radius: 999px; padding: 0.45rem 0.95rem; color: var(--encre-sourd); }
.route-chip b  { color: var(--encre); font-weight: 600; font-family: var(--sans); }
.route-arrow   { color: var(--cuivre); align-self: center; font-size: 0.8rem; }

.photo-stack { display: flex; flex-direction: column; gap: 1.2rem; }
.photo-card  { border-radius: 14px; overflow: hidden; border: 1px solid var(--ligne); margin: 0; }
.photo-card img { width: 100%; display: block; object-fit: cover; aspect-ratio: 4 / 3; }
.photo-card figcaption {
  font-family: var(--mono); font-size: 0.68rem;
  color: var(--encre-sourd);
  padding: 0.7rem 0.95rem;
  border-top: 1px solid var(--ligne);
  background: var(--blanc);
}

@media (max-width: 880px) {
  .itineraire-layout { grid-template-columns: 1fr; gap: 2.6rem; }
}

/* ============================================================
   PROCÉDÉ (STEPS)
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.step  { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 14px; overflow: hidden; }
.step-photo { aspect-ratio: 4 / 3; overflow: hidden; }
.step-photo img { width: 100%; height: 100%; object-fit: cover; }
.step-body  { padding: 1.4rem 1.3rem 1.6rem; }
.step-num   { font-family: var(--mono); font-size: 0.74rem; color: var(--cuivre); letter-spacing: 0.08em; }
.step h3    { font-size: 1.04rem; font-weight: 600; margin: 0.6rem 0 0.45rem; }
.step p     { font-size: 0.89rem; color: var(--encre-sourd); }
.procede-foot {
  margin-top: 2.4rem;
  display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--mono); font-size: 0.82rem;
  color: var(--terracotta); letter-spacing: 0.03em;
}
.procede-foot::before { content: ""; width: 24px; height: 1px; background: var(--cuivre); display: inline-block; }

@media (max-width: 980px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* ============================================================
   TRANSPARENCE
   ============================================================ */
.transp-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: 3.4rem;
}
.transp-grid p { color: var(--encre-sourd); margin-bottom: 1.1rem; font-size: 1rem; }
.stat-card    { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 16px; padding: 2rem; }
.stat-big     { font-family: var(--serif); font-size: 3.1rem; font-weight: 700; color: var(--terracotta); line-height: 1; }
.stat-label   { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em; color: var(--encre-sourd); margin-top: 0.6rem; text-transform: uppercase; }
.sparkline-cap { font-family: var(--mono); font-size: 0.68rem; color: var(--encre-sourd); margin-top: 0.5rem; }

.bean-feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.2rem;
  align-items: center;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 3rem;
}
.bean-feature img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.bean-feature .bf-text { padding: 2rem 2rem 2rem 0; }
.bean-feature h3 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.bean-feature p  { color: var(--encre-sourd); font-size: 0.96rem; }

.cost-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; }
.cost-card    { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 16px; padding: 1.8rem; }
.cost-card h4 { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--encre-sourd); margin-bottom: 1.2rem; font-weight: 600; }
.bar-track    { height: 14px; border-radius: 999px; background: var(--creme-2); overflow: hidden; }
.bar-fill     { height: 100%; border-radius: 999px; background: var(--terracotta); }
.cost-card.alt .bar-fill { background: var(--encre-sourd); }
.cost-card .pct { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; margin-top: 0.9rem; display: block; }
.cost-card .pct.alt-color { color: var(--encre-sourd); }
.cost-card p.fine { font-family: var(--mono); font-size: 0.75rem; color: var(--encre-sourd); margin-top: 0.6rem; }

@media (max-width: 880px) {
  .transp-grid  { grid-template-columns: 1fr; }
  .cost-compare { grid-template-columns: 1fr; }
  .bean-feature { grid-template-columns: 1fr; }
  .bean-feature .bf-text { padding: 0 1.6rem 1.8rem; }
}

/* ============================================================
   ORIGINES
   ============================================================ */
.origines-banner { border-radius: 16px; overflow: hidden; margin-bottom: 3rem; border: 1px solid var(--ligne); }
.origines-banner img { width: 100%; max-height: 280px; object-fit: cover; }
.origines-banner figcaption { font-family: var(--mono); font-size: 0.7rem; color: var(--encre-sourd); padding: 0.8rem 1.1rem; border-top: 1px solid var(--ligne); background: var(--blanc); }

.origines-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.stamp {
  background: var(--blanc);
  border: 1.5px dashed var(--cuivre-clair);
  border-radius: 6px;
  padding: 1.5rem 1.4rem;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.stamp:hover { transform: rotate(-1deg) translateY(-4px); border-color: var(--cuivre); box-shadow: 0 14px 26px rgba(34,25,17,.1); }
.stamp-photo { margin: -1.5rem -1.4rem 1rem; border-radius: 6px 6px 0 0; overflow: hidden; aspect-ratio: 16 / 9; }
.stamp-photo img { width: 100%; height: 100%; object-fit: cover; }
.stamp-top    { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.85rem; }
.stamp-country { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.stamp-pct    { font-family: var(--mono); font-size: 0.76rem; color: var(--cuivre); border: 1px solid var(--cuivre); border-radius: 999px; padding: 0.15rem 0.6rem; }
.stamp-notes  { font-size: 0.93rem; color: var(--encre-sourd); margin-bottom: 0.85rem; }
.stamp-detail { font-family: var(--mono); font-size: 0.71rem; color: var(--encre-sourd); border-top: 1px dashed var(--ligne); padding-top: 0.75rem; line-height: 1.5; }
.stamp-blend  { background: var(--creme); }

.origines-foot {
  margin-top: 2.8rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.4rem;
  border-top: 1px solid var(--ligne);
  padding-top: 2rem;
}
.origines-foot p { color: var(--encre-sourd); max-width: 34em; }

@media (max-width: 980px) { .origines-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .origines-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PHILOSOPHIE
   ============================================================ */
.philo-photo { position: relative; min-height: 420px; display: flex; align-items: flex-end; }
.philo-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.philo-scrim {
  position: relative; z-index: 1; width: 100%;
  background: linear-gradient(to top, rgba(255,255,255,.97) 35%, rgba(255,255,255,.55) 75%, transparent 100%);
  padding: 5.5rem var(--edge) 3rem;
  text-align: center;
}
.philo-scrim .eyebrow { justify-content: center; }
.philo-scrim h2 { font-size: clamp(2rem, 4vw, 2.9rem); margin-top: 0.9rem; font-style: italic; font-weight: 500; max-width: 42em; margin-left: auto; margin-right: auto; }
.philo-scrim p  { margin-top: 1.4rem; font-size: 1.04rem; color: var(--encre-sourd); max-width: 40em; margin-left: auto; margin-right: auto; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; }
.contact-info p   { color: var(--encre-sourd); margin-bottom: 1.2rem; }
.contact-info .addr { font-family: var(--mono); font-size: 0.85rem; line-height: 1.8; color: var(--terracotta); margin-top: 1.6rem; }

.wpcf7-form .field,
.field { margin-bottom: 1.2rem; }
.wpcf7-form label,
.field label {
  display: block;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cuivre); margin-bottom: 0.5rem;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea,
.field input,
.field textarea {
  width: 100%;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--encre);
  font-family: var(--sans); font-size: 0.95rem;
  transition: border-color .25s ease;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.field input:focus,
.field textarea:focus { border-color: var(--cuivre); outline: none; }
.wpcf7-form textarea,
.field textarea { resize: vertical; min-height: 120px; }
.wpcf7-form input[type="submit"] {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.05em;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  background: var(--encre); color: var(--blanc); border: 1px solid var(--encre);
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}
.wpcf7-form input[type="submit"]:hover { background: var(--terracotta); border-color: var(--terracotta); }

@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

/* ============================================================
   BLOG / CONTENT PAGES
   ============================================================ */
.page-hero {
  padding: 8.5rem var(--edge) 4rem;
  background: var(--creme);
  border-bottom: 1px solid var(--ligne);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 0.7rem; }

.content-area { padding: 5rem 0; }
.entry-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--encre-sourd);
}
.entry-content h2, .entry-content h3 { color: var(--encre); margin: 2rem 0 0.9rem; }
.entry-content p { margin-bottom: 1.4rem; }
.entry-content a { color: var(--cuivre); text-decoration: underline; }
.entry-content img { border-radius: 10px; margin: 1.8rem 0; }

/* Posts grid */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.post-card  { border: 1px solid var(--ligne); border-radius: 14px; overflow: hidden; background: var(--blanc); transition: transform .3s ease, box-shadow .3s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(34,25,17,.1); }
.post-card .card-thumb { aspect-ratio: 16 / 9; overflow: hidden; }
.post-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .card-body { padding: 1.5rem; }
.post-card .card-date { font-family: var(--mono); font-size: 0.7rem; color: var(--encre-sourd); margin-bottom: 0.6rem; }
.post-card h2, .post-card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.post-card p { font-size: 0.9rem; color: var(--encre-sourd); }

@media (max-width: 860px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .posts-grid { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--creme);
  border-top: 1px solid var(--ligne);
  padding: 3.2rem 0 2rem;
}
.footer-grid {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem;
  border-bottom: 1px solid var(--ligne);
  padding-bottom: 2rem; margin-bottom: 1.5rem;
}
.footer-brand { display: flex; align-items: center; gap: 1.1rem; }
.footer-mark  { width: 64px; height: auto; flex-shrink: 0; }
.footer-brand p { margin-top: 0.5rem; max-width: 24em; font-size: 0.88rem; color: var(--encre-sourd); }

.footer-nav   { display: flex; gap: 1.8rem; flex-wrap: wrap; align-items: center; }
.footer-nav a { font-size: 0.85rem; color: var(--encre-sourd); transition: color .25s ease; }
.footer-nav a:hover { color: var(--encre); }

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--encre-sourd);
}

/* ============================================================
   WORDPRESS BLOCK EDITOR COMPATIBILITY
   ============================================================ */
.wp-block-image img { border-radius: 10px; }
.wp-block-quote { border-left: 3px solid var(--cuivre); padding-left: 1.5rem; font-style: italic; color: var(--encre-sourd); }
.wp-block-separator { border: none; border-top: 1px solid var(--ligne); margin: 3rem 0; }
.alignwide  { max-width: 100%; }
.alignfull  { margin-left: calc(-1 * var(--edge)); margin-right: calc(-1 * var(--edge)); }
