/*
Theme Name: Edificly
Theme URI: https://edificly.com
Author: Edificly
Description: Vitrine Edificly — preuves de chantier, rapports, tranches. Même identité que l'application (« Chantier à 16h »). Français par défaut, anglais complet.
Version: 2.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.2
Text Domain: edificly
*/

/* Palette « Chantier à 16h » — identique à app.edificly.com. Thème clair seulement, par choix de marque. */
:root {
  --bg: #EEF0F2;
  --bg-elevated: #F7F8F9;
  --bg-sunk: #E3E6E9;
  --ink: #1A1D21;
  --ink-muted: #5C6570;
  --ink-soft: #8A929B;
  --accent: #E08A1E;
  --accent-strong: #C47410;
  --accent-text: #9A5A0C; /* ambre lisible pour le texte sur fond clair (4,8:1) */
  --accent-wash: #FBEEDB;
  --accent-2: #1F5C45;
  --danger: #B33A2B;
  --line: #C9CED4;
  --display: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Manrope, "Helvetica Neue", Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
@media (min-width: 640px) { .wrap { padding-left: 32px; padding-right: 32px; } }

.mark { width: 28px; height: 28px; flex-shrink: 0; }
.mark-sm { width: 24px; height: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 20px; }
.wordmark-xl { font-size: 40px; color: var(--bg-elevated); }
.wordmark-xl .mark { width: 46px; height: 46px; }
@media (min-width: 640px) { .wordmark-xl { font-size: 48px; } }

.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); }
.kicker-light { color: var(--accent); }
h2 { margin-top: 12px; font-family: var(--display); font-weight: 600; font-size: 36px; line-height: 1.12; letter-spacing: -0.01em; }
@media (min-width: 640px) { h2 { font-size: 48px; } }
.h2-sm { font-size: 30px; margin-top: 0; }
@media (min-width: 640px) { .h2-sm { font-size: 36px; } }
.narrow { max-width: 42rem; }
.muted { color: var(--ink-muted); }
.dim { color: rgba(255, 255, 255, 0.7); }
.strong { font-weight: 700; }
.lead { font-size: 18px; line-height: 1.6; margin-top: 16px; max-width: 34rem; }
.section { padding-top: 80px; padding-bottom: 80px; }
.section-sm { padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 640px) { .section { padding-top: 112px; padding-bottom: 112px; } .section-sm { padding-top: 80px; padding-bottom: 80px; } }
.split { display: grid; gap: 48px; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1.3fr; } .split.center { grid-template-columns: 1fr 1fr; align-items: center; } }
.split > div > .muted { margin-top: 16px; max-width: 28rem; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 6px; font-weight: 700; text-decoration: none; border: 1px solid transparent; transition: background-color .15s, border-color .15s; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn-xl { min-height: 56px; padding: 0 26px; font-size: 16px; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #cf7b12; }
.btn-ink { background: var(--ink); color: var(--bg-elevated); margin-top: 32px; }
.btn-ink:hover { background: #2a2e34; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-secondary { background: var(--bg-elevated); border-color: var(--line); color: var(--ink); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ctas { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) { .ctas { flex-direction: row; } }
.ctas-center { justify-content: center; }

/* Héros : une seule composition, photo pleine largeur */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100svh; overflow: hidden; background: var(--ink); color: #fff; }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero-img { object-position: 50% 70%; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(26,29,33,.94) 0%, rgba(26,29,33,.82) 45%, rgba(26,29,33,.35) 75%, rgba(26,29,33,.55) 100%); }
@media (min-width: 768px) {
  .hero-img { object-position: 70% 60%; }
  .hero-shade { background: linear-gradient(90deg, rgba(26,29,33,.92) 0%, rgba(26,29,33,.74) 40%, rgba(26,29,33,.12) 78%), linear-gradient(0deg, rgba(26,29,33,.6) 0%, transparent 40%); }
}
.topbar { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.topnav { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 600; }
.topnav a { text-decoration: none; color: rgba(255, 255, 255, 0.75); }
.topnav a:hover, .topnav a.strong { color: #fff; }
.langs { display: inline-flex; gap: 6px; color: rgba(255, 255, 255, 0.4); }
.langs a[aria-current="true"] { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hide-sm { display: none; }
@media (min-width: 768px) { .hide-sm { display: inline; } }
.hero-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 56px; }
@media (min-width: 1024px) { .hero-body { justify-content: center; padding-bottom: 96px; } }
.hero-copy { max-width: 42rem; }
.hero h1 { margin-top: 28px; font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1.04; letter-spacing: -0.02em; }
@media (min-width: 640px) { .hero h1 { font-size: 60px; } }
@media (min-width: 1024px) { .hero h1 { font-size: 68px; } }
.hero-sub { margin-top: 20px; max-width: 36rem; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, 0.8); }
@media (min-width: 640px) { .hero-sub { font-size: 20px; } }

/* Douleurs */
.pains { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pains li { display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.pains li:first-child { border-top: 0; }
.pains .num { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.pains .pain { font-weight: 600; line-height: 1.35; }
.pains .cost { grid-column-start: 2; margin-top: 4px; font-size: 14px; color: var(--danger); }
@media (min-width: 640px) { .pains li { grid-template-columns: 3rem 1fr 1fr; } .pains .cost { grid-column-start: 3; margin-top: 0; } }

/* Bandeaux */
.band { background: var(--bg-elevated); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dark { background: var(--ink); color: #fff; }
.dark .split { gap: 48px; }
@media (min-width: 1024px) { .dark .split { grid-template-columns: 1.2fr 1fr; } }

.how-grid { margin-top: 56px; display: grid; gap: 48px; }
@media (min-width: 1024px) { .how-grid { grid-template-columns: 1.15fr 1fr; gap: 64px; } }
.steps { display: grid; gap: 40px; }
.steps li { display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 20px; border-top: 2px solid var(--ink); padding-top: 20px; }
.step-n { font-family: var(--display); font-weight: 600; font-size: 48px; line-height: 1; color: var(--accent); }
.steps h3 { font-size: 20px; }
.how-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
@media (min-width: 1024px) { .how-photo { aspect-ratio: auto; height: 100%; } }

/* Diaspora */
@media (min-width: 1024px) { .split.diaspora { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 64px; } }
.diaspora-fig { position: relative; margin: 0; }
.diaspora-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.diaspora-fig figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; background: rgba(26, 29, 33, .85); color: #fff; padding: 12px 16px; font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.3; }
@media (min-width: 640px) { .diaspora-fig figcaption { left: 24px; right: 24px; bottom: 24px; font-size: 20px; } }
.who-section { border-top: 1px solid var(--line); }
.steps p { margin-top: 8px; line-height: 1.6; }

.checks { margin-top: 28px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 8px; border-left: 2.5px solid var(--accent-2); border-bottom: 2.5px solid var(--accent-2); transform: rotate(-45deg); }

/* Aperçu du rapport (dessiné en HTML, suit la langue) */
.phone { width: 100%; max-width: 340px; margin: 0 auto; border: 10px solid var(--ink); border-radius: 34px; background: var(--ink); box-shadow: 0 30px 60px -20px rgba(26, 29, 33, 0.45); }
.phone-screen { overflow: hidden; border-radius: 24px; background: var(--bg-elevated); }
.phone-head { border-bottom: 4px solid var(--ink); padding: 20px 16px 16px; }
.phone-meta { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.phone-title { margin-top: 16px; font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.15; }
.phone-place { margin-top: 4px; font-size: 11px; color: var(--ink-muted); }
.phone-progress { margin-top: 16px; display: flex; align-items: flex-end; justify-content: space-between; }
.phone-progress span { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.phone-progress b { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; }
.bar { margin-top: 8px; height: 8px; background: var(--bg-sunk); }
.bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; }
.phone-body { padding: 16px; display: grid; gap: 12px; }
.pay { border-left: 4px solid var(--accent); background: rgba(251, 238, 219, 0.7); padding: 12px; }
.pay small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8a4f08; }
.pay b { display: block; margin-top: 4px; font-family: var(--display); font-weight: 600; font-size: 18px; }
.phone-obs-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-muted); }
.phone-obs-meta b { color: var(--ink); }
.phone-obs-meta .ok { font-weight: 700; text-transform: uppercase; color: var(--accent-2); }
.phone-obs { font-size: 13px; font-weight: 600; line-height: 1.35; margin-top: -6px; }
.phone-body img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }

/* Avenants */
.flow { align-self: end; font-size: 15px; }
.flow li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.flow .hint { margin-left: auto; text-align: right; font-size: 14px; color: rgba(255, 255, 255, 0.55); }
.dot { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.dot-0 { background: var(--accent); } .dot-1 { background: #7FA9D1; } .dot-2 { background: #fff; } .dot-3 { background: #4FA37F; }

/* Pour qui */
.who { margin-top: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.who-row { display: grid; gap: 8px; padding: 24px 0; border-top: 1px solid var(--line); }
.who-row:first-child { border-top: 0; }
.who-row h3 { font-family: var(--display); font-weight: 600; font-size: 24px; }
@media (min-width: 768px) { .who-row { grid-template-columns: 1fr 1.4fr 1.2fr; gap: 32px; } }

.local { margin-top: 40px; display: grid; gap: 32px; }
@media (min-width: 640px) { .local { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .local { grid-template-columns: repeat(4, 1fr); } }
.local dt { font-weight: 700; }
.local dd { margin-top: 6px; font-size: 14px; line-height: 1.6; }

.final { text-align: center; }
.final h2 { max-width: 48rem; margin-left: auto; margin-right: auto; }
@media (min-width: 640px) { .final h2 { font-size: 60px; } }
.final .lead { margin-left: auto; margin-right: auto; }

.site-footer { border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-muted); }
.footer-row { display: flex; flex-direction: column; gap: 16px; padding-top: 32px; padding-bottom: 32px; }
.footer-row .wordmark { color: var(--ink); font-size: 18px; }
.footer-row a { text-decoration: none; }
.footer-row a:hover { color: var(--ink); }
@media (min-width: 640px) { .footer-row { flex-direction: row; align-items: center; justify-content: space-between; } }

/* Pages simples (mentions, 404) */
.page-simple { max-width: 46rem; padding-top: 64px; padding-bottom: 96px; }
.page-simple h1 { font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1.1; margin-bottom: 24px; }
.page-simple p + p { margin-top: 1em; }
.page-simple .back { display: inline-block; margin-top: 24px; font-weight: 700; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* Trois mouvements seulement : montée du héros, croissance de la barre. */
.rise { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.grow { animation: grow 1.1s cubic-bezier(.2, .7, .2, 1) .3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .rise, .grow { animation: none; } html { scroll-behavior: auto; } }

@media (min-width: 1024px) { .pains-head { position: sticky; top: 40px; align-self: start; } }
