/*
Theme Name: La Caverne du Chenappan
Theme URI: https://caverneduchenappan.com/
Author: La Caverne du Chenappan
Author URI: https://caverneduchenappan.com/
Description: Site vitrine de La Caverne du Chenappan — vide-grenier, débarras et petits travaux. Artisan local à Genappe, intervention dans toute la Belgique.
Version: 3.0.0
Requires at least: 5.0
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: la-caverne-du-chenappan
*/

/* ══════════ VARIABLES ══════════ */
:root {
  --tc: #66331e;
  --rust: #7A3E26;
  --cream: #FDFBF7;
  --line: #E8DDD5;
  --ink: #1A1A1A;
  --muted: #6B5E55;
  --stone: #8C7060;
}

/* ══════════ BASE ══════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Blocage du defilement lateral. « clip » est prefere a « hidden » :
     sur iOS, overflow:hidden casse le positionnement fixe (barre d'appel). */
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  position: relative;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); /* barre d'appel mobile */
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.serif { font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 16px; }
.wrap-sm { max-width: 42rem; margin: 0 auto; padding: 0 16px; }

section { padding: 48px 0; }

/* ══════════ ÉLÉMENTS COMMUNS ══════════ */
.label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .15em; color: var(--tc); margin-bottom: 12px;
}
.label::before { content: ""; width: 16px; height: 1px; background: var(--tc); }

.center { text-align: center; }
.sec-title { font-size: 20px; font-weight: 700; line-height: 1.25; }
.sec-head { text-align: center; margin-bottom: 32px; }

.btn-call {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--tc); color: #fff; font-weight: 700; font-size: 14px;
  padding: 14px 24px; border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .15); transition: opacity .2s;
}
.btn-call:hover { opacity: .9; }

.btn-mail {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--rust); color: var(--rust); font-weight: 600; font-size: 14px;
  padding: 12px 24px; border-radius: 12px; transition: opacity .2s;
}
.btn-mail:hover { opacity: .8; }

.cream { background: var(--cream); }
.bordered-y { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ══════════ EN-TÊTE ══════════ */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 64rem; margin: 0 auto; padding: 0 16px; height: 88px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.header-inner .logo { flex-shrink: 0; }
.header-call {
  display: inline-flex; align-items: center; gap: 8px; background: var(--tc); color: #fff;
  font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .12); white-space: nowrap;
  flex-shrink: 0;
}

/* Tres petits ecrans (320 px) : on resserre pour eviter tout debordement. */
@media (max-width: 359px) {
  .header-inner { gap: 8px; padding: 0 12px; }
  .header-call { padding: 9px 12px; font-size: 13px; }
}
.header-call .full { display: none; }

/* ══════════ HERO ══════════ */
/* Fond : photo aerienne ancienne de Genappe, en noir et blanc, adoucie par
   un voile creme pour que le texte reste parfaitement lisible.
   Le chemin est relatif a style.css, donc valable quel que soit le domaine. */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(253, 251, 247, .90), rgba(253, 251, 247, .78)),
    url('assets/genappe-ancienne.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

.hero-inner {
  position: relative;
  max-width: 46rem;
  padding-top: 48px;
  padding-bottom: 48px;
  text-align: center;
}

.hero h1 { font-size: 26px; font-weight: 700; line-height: 1.15; margin-bottom: 16px; }
.hero .lead {
  color: var(--muted); font-size: 15px; line-height: 1.7;
  margin: 0 auto 24px; max-width: 34rem;
}
.hero .ctas { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badges span {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  color: var(--muted); background: rgba(255, 255, 255, .82); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px;
}

.hero-credit {
  margin-top: 24px; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--stone); opacity: .75;
}

/* ══════════ SERVICES ══════════ */
.grid3 { display: grid; grid-template-columns: 1fr; gap: 16px; }

.svc {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--cream); display: flex; flex-direction: column; transition: all .3s;
}
.svc:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); border-color: rgba(102, 51, 30, .3); }
.svc .pic { position: relative; aspect-ratio: 3/2; }
.svc .pic img { width: 100%; height: 100%; object-fit: cover; }
.svc .flag {
  position: absolute; top: 12px; left: 12px; background: var(--tc); color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em;
  padding: 4px 12px; border-radius: 999px;
}
.svc .body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.svc .num { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: rgba(102, 51, 30, .45); margin-bottom: 4px; }
.svc h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.svc p { color: var(--muted); font-size: 14px; line-height: 1.7; flex: 1; }
.svc .more { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--tc); }
.svc .more:hover { opacity: .7; }

/* ══════════ POURQUOI ══════════ */
.why-grid { display: grid; gap: 40px; align-items: center; }
.why h2 { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 24px; }
.why-list { display: flex; flex-direction: column; gap: 16px; }
.why-item { display: flex; gap: 12px; }
.why-item .ico {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px;
  background: rgba(102, 51, 30, .07); display: flex; align-items: center; justify-content: center;
}
.why-item .t { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.why-item .d { color: var(--muted); font-size: 14px; line-height: 1.6; }
.why .btn-call { margin-top: 24px; }

.why-media { display: none; grid-template-columns: 1fr 1fr; gap: 12px; }
.why-media .cell { border-radius: 16px; overflow: hidden; }
.why-media .cell img { width: 100%; height: 100%; object-fit: cover; }
.why-media .tall { aspect-ratio: 3/4; }
.why-media .stack { display: flex; flex-direction: column; gap: 12px; }
.why-media .sq { aspect-ratio: 1/1; }

/* ══════════ AVANT / APRÈS ══════════ */
.ba-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ba { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 4/3; }
.ba img { width: 100%; height: 100%; object-fit: cover; }
.ba img.after { display: none; }
.ba.show-after img.before { display: none; }
.ba.show-after img.after { display: block; }
.ba-btns { position: absolute; bottom: 12px; left: 12px; display: flex; gap: 6px; }
.ba-btns button {
  font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .88); color: var(--ink); transition: all .3s;
}
.ba-btns .b-before { background: var(--tc); color: #fff; }
.ba.show-after .ba-btns .b-before { background: rgba(255, 255, 255, .88); color: var(--ink); }
.ba.show-after .ba-btns .b-after { background: var(--tc); color: #fff; }
.ba-card .cap { font-size: 14px; font-weight: 500; color: var(--muted); padding: 12px 16px; background: var(--cream); }

/* ══════════ TÉMOIGNAGES ══════════ */
.review {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.stars { display: flex; gap: 2px; }
.review .txt { color: var(--muted); font-size: 14px; line-height: 1.7; flex: 1; }
.review .who { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.review .av {
  width: 36px; height: 36px; border-radius: 999px; background: var(--tc); color: #fff;
  font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.review .nm { font-weight: 700; font-size: 14px; }
.review .nm span { font-weight: 400; color: var(--stone); }
.review .sv { font-size: 11px; margin-top: 2px; color: var(--rust); }

/* ══════════ CONTACT ══════════ */
.contact h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.contact .intro { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.contact-grid { display: grid; gap: 16px; margin-bottom: 24px; text-align: left; }
.contact-card {
  display: flex; align-items: center; gap: 16px; background: var(--cream);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px; transition: box-shadow .2s;
}
.contact-card.primary { border: 2px solid var(--tc); }
.contact-card:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); }
.contact-card .ico { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-card.primary .ico { background: var(--tc); }
.contact-card .ico.soft { background: rgba(102, 51, 30, .07); }
.contact-card .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 4px; color: var(--rust); }
.contact-card .v { font-size: 18px; font-weight: 700; line-height: 1.2; }
.contact-card .v.mail { font-size: 14px; word-break: break-all; }
.contact-card .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.contact-card .go { font-size: 12px; font-weight: 600; margin-top: 6px; color: var(--tc); }

.zone-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
  background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px;
}

/* ══════════ PIED DE PAGE ══════════ */
.site-footer { background: var(--cream); border-top: 1px solid var(--line); }
.footer-inner { max-width: 64rem; margin: 0 auto; padding: 40px 16px 24px; }

.footer-top { display: grid; gap: 32px; text-align: center; }

.footer-top .brand .logo { margin: 0 auto 16px; }
.footer-top .tagline { font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 24rem; margin: 0 auto; }

.fh {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em;
  color: var(--tc); margin-bottom: 14px;
}

.flist { list-style: none; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.flist li { font-size: 14px; color: var(--muted); line-height: 1.5; }
.flist a { color: var(--muted); transition: color .2s; }
.flist a:hover { color: var(--tc); }
.flist a.strong { font-weight: 700; color: var(--tc); font-size: 16px; }

.footer-legal {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; text-align: center;
}
.footer-legal p { font-size: 12px; line-height: 1.6; color: var(--stone); }

/* ══════════ BARRE D'APPEL MOBILE ══════════ */
.callbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  display: flex; gap: 12px;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, .08);
}
.callbar .main {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--tc); color: #fff; font-weight: 700; font-size: 14px;
  padding: 12px; border-radius: 12px;
}
.callbar .mail {
  width: 48px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--rust); border-radius: 12px; flex-shrink: 0;
}

/* ══════════ RETOUR EN HAUT ══════════ */
.to-top {
  position: fixed; bottom: 96px; right: 16px; z-index: 40;
  width: 40px; height: 40px; border-radius: 999px; background: var(--tc);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .2);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .3s;
}
.to-top.visible { opacity: 1; pointer-events: auto; transform: none; }

/* ══════════ ≥ 640px (tablette) ══════════ */
@media (min-width: 640px) {
  body { padding-bottom: 0; }
  .callbar { display: none; }
  .to-top { bottom: 24px; right: 24px; }

  section { padding: 64px 0; }
  .wrap, .wrap-sm, .header-inner { padding: 0 24px; }

  .header-inner { height: 110px; }
  .header-call { padding: 12px 20px; }
  .header-call .full { display: inline; }
  .header-call .short { display: none; }

  .hero h1 { font-size: 32px; }
  .hero .lead { font-size: 16px; margin-bottom: 32px; }
  .hero .ctas { flex-direction: row; justify-content: center; }
  .hero-inner { padding-top: 72px; padding-bottom: 72px; }

  .grid3 { grid-template-columns: 1fr 1fr; gap: 20px; }
  .sec-title { font-size: 24px; }
  .why h2, .contact h2 { font-size: 24px; }
  .sec-head { margin-bottom: 40px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-card { padding: 24px; }
  .contact-card .v { font-size: 24px; }
  .contact-card .ico { width: 56px; height: 56px; }
  .review { padding: 24px; }
  .svc .body { padding: 20px; }
  .svc h3 { font-size: 18px; }

  .footer-inner { padding: 56px 24px 28px; }
  .footer-top { grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; text-align: left; }
  .footer-top .brand .logo { margin-left: 0; margin-right: auto; }
  .footer-top .tagline { margin: 0; }
  .flist { align-items: flex-start; }
  .footer-legal { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 24px; text-align: left; }
  .footer-legal p:last-child { white-space: nowrap; text-align: right; }
}

/* ══════════ ≥ 768px (desktop) ══════════ */
@media (min-width: 768px) {
  section { padding: 80px 0; }
  .hero h1 { font-size: 40px; }
  .hero .lead { font-size: 18px; }
  .hero-inner { padding-top: 96px; padding-bottom: 96px; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .why-media { display: grid; }
  .sec-title, .why h2 { font-size: 30px; }
  .contact h2 { font-size: 34px; }
  .header-inner { height: 124px; }
}

/* ══════════ ≥ 1024px ══════════ */
@media (min-width: 1024px) {
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 50px; }
  .sec-title, .why h2 { font-size: 34px; }
}

/* ══════════════════════════════════════════════════════════
   TAILLE DU LOGO — dimensionnement par la LARGEUR

   Le logo est dimensionne par sa largeur, pas par sa hauteur.
   Raison : de nombreuses extensions WordPress imposent
   « img { height: auto !important } », ce qui annulait toute
   hauteur fixee et reduisait le logo a une trentaine de pixels.
   Une largeur fixe resiste a cette regle : la hauteur suit
   automatiquement le rapport du fichier (environ 2,74 : 1).

   Pour changer la taille du logo, modifiez uniquement les six
   valeurs de « width » ci-dessous.
   ══════════════════════════════════════════════════════════ */
.site-header .header-inner img.logo,
.site-footer .footer-inner img.logo {
  display: block;
  height: auto !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 0;
  object-fit: contain;
}

.site-header .header-inner img.logo { width: 186px !important; max-width: 46vw !important; }
.site-footer .footer-inner img.logo { width: 214px !important; max-width: 72vw !important; }

@media (min-width: 640px) {
  .site-header .header-inner img.logo { width: 235px !important; }
  .site-footer .footer-inner img.logo { width: 268px !important; }
}

@media (min-width: 768px) {
  .site-header .header-inner img.logo { width: 274px !important; }
  .site-footer .footer-inner img.logo { width: 318px !important; }
}
