/* ==========================================================================
   ACPE — style.css
   Mise en page et composants spécifiques au site (chargé après glass.css).
   ========================================================================== */

/* Accessibilité ---------------------------------------------------------- */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  padding: .75rem 1.1rem; border-radius: 12px;
  background: var(--acpe-blue-strong); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Structure ---------------------------------------------------------------- */
main { padding-top: 104px; }
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-sm { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-head { max-width: 760px; margin: 0 auto 2.75rem; text-align: center; }
.section-head .eyebrow, .eyebrow {
  display: inline-block; margin-bottom: .7rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--acpe-link);
}
.container-narrow { max-width: 860px; }
.container-read { max-width: 760px; }
.rounded-glass { border-radius: var(--radius); }

/* Header / navbar ---------------------------------------------------------- */
.navbar-brand { display: flex; align-items: center; gap: .65rem; padding: 0; color: var(--text-strong) !important; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-tagline { font-size: .66rem; line-height: 1.2; font-weight: 600; letter-spacing: .02em; color: var(--text-muted); padding-left: .65rem; border-left: 1px solid rgba(60, 60, 67, .2); }
[data-theme="dark"] .brand-logo { filter: drop-shadow(0 0 10px rgba(56, 189, 248, .25)); }
[data-theme="dark"] .brand-tagline { border-left-color: rgba(255, 255, 255, .18); }
.is-scrolled .brand-logo { height: 30px; }
.navbar-glass .btn { white-space: nowrap; }
.navbar-glass > .container-fluid { flex-wrap: nowrap; gap: .5rem; }
.navbar-brand { flex-shrink: 0; margin-right: 0; }
/* Menu complet affiché (≥ 1200 px) : la mention sous le logo est redondante et prendrait la place des boutons */
@media (min-width: 1200px) { /*.brand-tagline { display: none; }*/ }
.navbar-glass .navbar-nav { flex-wrap: nowrap; }
@media (min-width: 1200px) and (max-width: 1399.98px) { .navbar-glass .nav-link { padding: .5rem .6rem !important; } }
@media (max-width: 440px) { .navbar-brand small { display: none; } }
.nav-cta { display: flex; gap: .5rem; align-items: center; }
.btn-phone-nav { white-space: nowrap; }
.mobile-nav .nav-link { display: block; font-size: 1.1rem; font-weight: 500; color: var(--text-strong); padding: .7rem 1rem; border-radius: 12px; text-decoration: none; }
.mobile-nav .nav-link[aria-current="page"], .mobile-nav .dropdown-item[aria-current="page"] { color: var(--acpe-link); background: rgba(10, 132, 255, .08); }
.mobile-nav-label { display: block; padding: .5rem 1rem .25rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
@media (max-width: 380px) { .btn-phone-nav .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* Hero --------------------------------------------------------------------- */
.hero { padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 .accent { background: linear-gradient(120deg, var(--acpe-blue-strong), #00A3C4 45%, var(--acpe-orange-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="dark"] .hero h1 .accent { background: linear-gradient(120deg, #6CB4FF, #67E8F9 45%, #FDBA74); -webkit-background-clip: text; background-clip: text; }
.hero .lead { max-width: 640px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.75rem; padding: 0; list-style: none; }
.hero-card { padding: clamp(1.5rem, 3vw, 2.2rem); }
.hero-card h2 { font-size: 1.5rem; }
.page-hero { padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(1.5rem, 4vw, 3rem); }
.page-hero .lead { max-width: 760px; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }

/* Réponse directe (GEO) */
.answer-box { padding: 1.4rem 1.6rem; border-left: 4px solid var(--acpe-blue); }
.answer-box p:last-child { margin-bottom: 0; }

/* Cartes services ---------------------------------------------------------- */
.service-card { padding: 1.75rem; height: 100%; display: flex; flex-direction: column; gap: 1rem; }
.service-card h3 { margin: 0; }
.service-card ul { padding-left: 1.1rem; margin: 0; color: var(--text); font-size: .98rem; }
.service-card .stretched-link::after { border-radius: var(--radius); }
.service-card .more { margin-top: auto; font-weight: 600; color: var(--acpe-link); text-decoration: none; }
.service-card.clim .more { color: var(--c-clim-text); }
.service-card.chauffage .more { color: var(--c-chauffage-text); }
.service-card.plomberie .more { color: var(--c-plomberie-text); }
.service-card.elec .more { color: var(--c-elec-text); }

/* Arguments / features */
.feature { padding: 1.5rem; height: 100%; display: flex; gap: 1rem; align-items: flex-start; }
.feature h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.feature p { margin: 0; font-size: .98rem; }

/* Chiffres clés */
.stat { padding: 1.5rem 1rem; text-align: center; height: 100%; }
.stat .value { display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 750; letter-spacing: -0.03em; color: var(--text-strong); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .label { display: block; margin-top: .35rem; font-size: .95rem; color: var(--text-muted); }

/* Étapes numérotées */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps > li { counter-increment: step; position: relative; padding: 1.25rem 1.25rem 1.25rem 4.4rem; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 1.15rem; top: 1.15rem;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--acpe-blue-strong), var(--acpe-blue-deep));
}
.steps h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.steps p { margin: 0; font-size: .98rem; }

/* Tableaux comparatifs */
.table-glass { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: rgba(60, 60, 67, .14); margin: 0; }
.table-glass thead th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-strong); background: rgba(10, 132, 255, .07); border-bottom-width: 1px; }
.table-glass th, .table-glass td { padding: .85rem 1rem; vertical-align: top; }
.table-glass tbody th { color: var(--text-strong); font-weight: 600; }
.table-wrap { padding: .35rem; overflow: hidden; }
.table-wrap .table-responsive { border-radius: calc(var(--radius) - 6px); }
.table-note { font-size: .88rem; color: var(--text-muted); margin-top: .75rem; }
[data-theme="dark"] .table-glass { --bs-table-border-color: rgba(255, 255, 255, .1); }

/* Listes à coche */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.check-list li { position: relative; padding-left: 1.9rem; }
.check-list li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .05rem; color: var(--acpe-blue); font-size: 1.15rem; line-height: 1.4; }
.check-list.cols-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Avis */
.review-card { padding: clamp(1.5rem, 3vw, 2.3rem); max-width: 760px; margin: 0 auto; text-align: center; }
.review-card blockquote { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-strong); margin: 1rem 0; }
.review-stars { color: #F5A524; letter-spacing: .15em; }
.review-meta { color: var(--text-muted); font-size: .93rem; }

/* CTA band */
.cta-band { padding: clamp(2rem, 4.5vw, 3.5rem); overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(10, 132, 255, .35), transparent 65%); pointer-events: none; }
.cta-band::after { content: ""; position: absolute; inset: auto auto -50% -10%; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(249, 115, 22, .28), transparent 65%); pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }

/* Zones */
.city-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: var(--radius-pill); font-weight: 500; font-size: .95rem; color: var(--text-strong); text-decoration: none; }
a.city-chip:hover { color: var(--acpe-link); }
.city-card { padding: 1.4rem; height: 100%; display: flex; flex-direction: column; gap: .4rem; }
.city-card h3 { font-size: 1.15rem; margin: 0; }
.city-card .meta { font-size: .9rem; color: var(--text-muted); }
.map-frame { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--mesh-1), var(--mesh-2)); }
.map-frame iframe, .map-frame .leaflet-map { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5rem; }
.map-consent p { max-width: 420px; font-size: .95rem; }
.leaflet-container { font-family: var(--font-sans); }

/* Réalisations */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2rem; }
.filter-bar .btn[aria-pressed="true"] { background: linear-gradient(135deg, var(--acpe-blue-strong), var(--acpe-blue-deep)); color: #fff; border-color: transparent; }
.project-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.project-card .ba { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.project-card .ba a { position: relative; display: block; }
.project-card .ba img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.project-card .ba .tag { position: absolute; left: .6rem; top: .6rem; font-size: .75rem; padding: .2rem .55rem; border-radius: var(--radius-pill); background: rgba(0, 0, 0, .62); color: #fff; font-weight: 600; }
.project-card .body { padding: 1.25rem 1.4rem 1.5rem; }
.project-card h3 { font-size: 1.1rem; }
.lightbox-img { width: 100%; height: auto; display: block; }

/* Blog --------------------------------------------------------------------- */
.post-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.post-cover { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.post-cover i { font-size: 3.2rem; color: #fff; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .2)); }
.post-cover.clim, .post-cover.climatisation { background: linear-gradient(135deg, #22D3EE, #0369A1); }
.post-cover.chauffage { background: linear-gradient(135deg, #FDBA74, #C2410C); }
.post-cover.plomberie { background: linear-gradient(135deg, #60A5FA, #1E3A8A); }
.post-cover.electricite { background: linear-gradient(135deg, #FCD34D, #B45309); }
.post-cover.conseils  { background: linear-gradient(135deg, #A5B4FC, #4338CA); }
.post-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.post-card h2, .post-card h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; line-height: 1.3; }
.post-card h2 a, .post-card h3 a { color: var(--text-strong); text-decoration: none; }
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card p { font-size: .96rem; margin: 0; }
.post-meta { font-size: .85rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin-top: auto; }
.cat-pill { align-self: flex-start; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .25rem .65rem; border-radius: var(--radius-pill); text-decoration: none; position: relative; z-index: 2; }
.cat-pill.clim, .cat-pill.climatisation { color: var(--c-clim-text); background: rgba(6, 182, 212, .14); }
.cat-pill.chauffage { color: var(--c-chauffage-text); background: rgba(249, 115, 22, .14); }
.cat-pill.plomberie { color: var(--c-plomberie-text); background: rgba(37, 99, 235, .12); }
.cat-pill.electricite { color: var(--c-elec-text); background: rgba(245, 158, 11, .16); }
.cat-pill.conseils  { color: #4338CA; background: rgba(99, 102, 241, .14); }
[data-theme="dark"] .cat-pill.conseils { color: #C7D2FE; }
.blog-tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .75rem; margin-bottom: 2rem; }
.blog-tools .filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.blog-tools .btn { padding: .45rem .95rem; font-size: .92rem; }
.blog-tools .btn[aria-pressed="true"], .blog-tools .btn.active { background: linear-gradient(135deg, var(--acpe-blue-strong), var(--acpe-blue-deep)); color: #fff; border-color: transparent; }
.blog-search { min-width: min(100%, 280px); }
.pagination .page-link { border-radius: 12px !important; margin: 0 .2rem; background: var(--glass-bg); border-color: var(--glass-border); color: var(--text-strong); }
.pagination .active .page-link { background: var(--acpe-blue-strong); border-color: var(--acpe-blue-strong); color: #fff; }

/* Article */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 1040; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--acpe-blue), var(--acpe-orange)); }
.article-header .meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .93rem; color: var(--text-muted); }
.article-body { padding: clamp(1.4rem, 4vw, 3rem); }
.prose { font-size: 1.08rem; line-height: 1.72; color: var(--text); }
.prose > * { max-width: 70ch; }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 2.6rem 0 1rem; }
.prose h3 { font-size: 1.22rem; margin: 1.9rem 0 .7rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose .table-wrap, .prose .callout { max-width: none; }
.prose a { color: var(--acpe-link); }
.toc { position: sticky; top: 110px; padding: 1.25rem 1.3rem; max-height: calc(100vh - 140px); overflow: auto; }
.toc h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: .75rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .15rem; counter-reset: toc; }
.toc a { display: block; padding: .35rem .6rem; border-radius: 10px; font-size: .92rem; color: var(--text); text-decoration: none; line-height: 1.35; }
.toc a:hover, .toc a.is-active { background: rgba(10, 132, 255, .1); color: var(--acpe-link); }
.toc-mobile summary { cursor: pointer; font-weight: 600; color: var(--text-strong); padding: 1rem 1.2rem; list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile ol { padding: 0 1.2rem 1rem 2.4rem; margin: 0; }
.toc-mobile a { color: var(--text); }

/* Encadrés */
.callout { padding: 1.3rem 1.5rem 1.3rem 4.3rem; margin: 1.8rem 0; position: relative; }
.callout > .callout-icon { position: absolute; left: 1.2rem; top: 1.25rem; }
.callout .callout-title { display: block; font-weight: 700; color: var(--text-strong); margin-bottom: .35rem; font-size: 1.02rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.essentiel { border-left: 4px solid var(--acpe-blue); background: var(--glass-bg-strong); }
.callout.astuce { border-left: 4px solid #10B981; }
.callout.artisan { border-left: 4px solid var(--acpe-orange); }
.callout.attention { border-left: 4px solid #E11D48; }
.icon-pill.pill-green { --pill: #10B981; }
.icon-pill.pill-red { --pill: #E11D48; }
.icon-pill.pill-orange { --pill: var(--acpe-orange); }

.author-box { padding: 1.5rem; display: flex; gap: 1.1rem; align-items: flex-start; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--acpe-blue-strong), var(--acpe-orange-strong)); flex-shrink: 0; }
.share-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.share-links a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; padding: 0; font-size: 1.1rem; }
.sources { font-size: .95rem; }
.sources li { margin-bottom: .35rem; }
.side-cta { position: sticky; top: 110px; padding: 1.4rem; }

/* Formulaires */
.form-card { padding: clamp(1.5rem, 3.5vw, 2.5rem); }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 14px; font-weight: 500; }
.form-status.is-error { display: block; background: rgba(225, 29, 72, .1); color: #9F1239; }
.form-status.is-sending { display: block; background: rgba(10, 132, 255, .1); color: var(--acpe-link); }
[data-theme="dark"] .form-status.is-error { color: #FDA4AF; }
.contact-line { display: flex; gap: .9rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid rgba(60, 60, 67, .12); }
.contact-line:last-child { border-bottom: 0; }
.contact-line a { font-weight: 600; text-decoration: none; }

/* Footer ------------------------------------------------------------------- */
.site-footer { padding: 3rem 0 1.5rem; }
.footer-panel { padding: clamp(1.75rem, 4vw, 3rem); border-radius: 32px; }
.site-footer h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-strong); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--acpe-link); text-decoration: underline; }
.footer-legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(60, 60, 67, .14); font-size: .88rem; color: var(--text-muted); }
.footer-legal a { color: var(--text-muted); }
address { font-style: normal; }
.btn-link-plain { background: none; border: 0; padding: 0; color: var(--text-muted); text-decoration: underline; font-size: inherit; }

/* Barre d'appel mobile fixe */
.mobile-callbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 1035;
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  padding: .5rem;
  border-radius: 22px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 var(--glass-highlight);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.mobile-callbar.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
.mobile-callbar .btn { padding: .75rem .5rem; font-size: 1rem; }
@media (max-width: 991.98px) { body { padding-bottom: 92px; } }
@media (min-width: 992px) { .mobile-callbar { display: none; } }

/* Bandeau cookies */
.cookie-card {
  position: fixed; left: 12px; bottom: 12px; z-index: 1050;
  width: min(420px, calc(100% - 24px));
  padding: 1.25rem 1.3rem;
  border-radius: 22px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-hover);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  font-size: .93rem;
}
.cookie-card[hidden] { display: none; }
.cookie-card h2 { font-size: 1.05rem; margin-bottom: .4rem; }
.cookie-card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .9rem; }
@media (max-width: 991.98px) { .cookie-card { bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* 404 */
.error-code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; background: linear-gradient(120deg, var(--acpe-blue-strong), var(--acpe-orange-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Style guide */
.swatch { height: 84px; border-radius: 18px; border: 1px solid var(--glass-border); }
.sg-section { scroll-margin-top: 110px; }

/* Utilitaires */
.updated-at { font-size: .88rem; color: var(--text-muted); }
.placeholder-note { outline: 2px dashed rgba(225, 29, 72, .5); outline-offset: 4px; }
.gap-cards { --bs-gutter-x: 1.25rem; --bs-gutter-y: 1.25rem; }
@media print {
  .navbar-glass-wrap, .mobile-callbar, .cookie-card, .bg-orbs, .reading-progress, .toc, .side-cta { display: none !important; }
  main { padding-top: 0; }
  .glass, .glass-strong, .glass-subtle { box-shadow: none; border: 1px solid #ddd; background: #fff; }
}
