/*
Theme Name: Compagnons Alsaciens
Theme URI: https://parquet-du-nord.fr/
Author: Compagnons Alsaciens
Author URI: https://parquet-du-nord.fr/
Description: Thème WordPress sur mesure pour Compagnons Alsaciens — Le spécialiste des Parquets. Ponçage, vitrification, restauration et pose de parquets massifs et flottants. Compatible PHP 8.4.
Version: 7.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: compagnons-alsaciens
Tags: business, parquet, artisan, portfolio, custom-menu, featured-images, threaded-comments
*/

/* ===========================================================
   RESET & BASE
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #3a3a3a;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: #8a1c1c; color: #fff; }

.ca-display { font-family: 'Playfair Display', Georgia, serif; }
.ca-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.ca-accent { color: #8a1c1c; }

/* Eyebrow with accent line */
.ca-eyebrow {
  color: #8a1c1c; font-size: 13px; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 600; margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 14px;
}
.ca-eyebrow.line::after { content:''; width:46px; height:2px; background:#8a1c1c; display:inline-block; }

/* Buttons */
.ca-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #8a1c1c; color: #fff; font-size: 14px; font-weight: 500;
  padding: 13px 28px; border-radius: 999px; border: none; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.ca-btn:hover { background: #6f1616; }
.ca-btn-light { background: rgba(255,255,255,.92); color: #2b2b2b; }
.ca-btn-light:hover { background: #fff; }

/* ===========================================================
   HEADER
   =========================================================== */
.ca-header {
  position: sticky; top: 0; z-index: 50;
  background: #f3f1ee; transition: box-shadow .3s ease;
}
.ca-header.scrolled { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.ca-header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.ca-logo { display: flex; align-items: center; gap: 12px; }
.ca-logo img { height: 44px; width: auto; }
.ca-logo-text { font-family: 'Playfair Display', serif; font-size: 23px; font-weight: 700; color: #2b2b2b; }
.ca-nav { display: flex; align-items: center; gap: 36px; }
.ca-nav a {
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 500; color: #333; transition: color .2s ease;
}
.ca-nav a:hover, .ca-nav a.current { color: #8a1c1c; }
.ca-nav .menu-item.current-menu-item > a,
.ca-nav .current_page_item > a { color: #8a1c1c; }
.ca-phone-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #8a1c1c; color: #fff; font-size: 13px; font-weight: 500;
  padding: 10px 18px; border-radius: 999px; transition: background .2s;
}
.ca-phone-btn:hover { background: #6f1616; }
.ca-burger {
  display: none; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid #d9d4cd; background: transparent; cursor: pointer;
  align-items: center; justify-content: center; color: #2b2b2b;
}
.ca-mobile-nav { display: none; background: #f3f1ee; border-top: 1px solid #e1dcd4; }
.ca-mobile-nav.open { display: block; }
.ca-mobile-nav ul { padding: 8px 20px 24px; }
.ca-mobile-nav a { display: block; padding: 14px 0; border-bottom: 1px solid #e6e1d9;
  text-transform: uppercase; font-size: 14px; color: #333; }
.ca-mobile-nav a:hover { color: #8a1c1c; }

/* ===========================================================
   HERO
   =========================================================== */
.ca-hero { position: relative; height: 640px; overflow: hidden; display: flex;
  align-items: center; justify-content: center; text-align: center; }
.ca-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ca-hero .overlay { position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.ca-hero .content { position: relative; padding: 0 20px; }
.ca-hero h1 {
  font-family: 'Playfair Display', serif; font-style: italic; font-weight: 800;
  color: #8a1c1c; font-size: 62px; line-height: 1.1;
  background: rgba(255,255,255,.85); padding: 12px 24px; display: inline-block; margin-bottom: 24px;
}
.ca-hero p { color: #fff; max-width: 640px; margin: 0 auto 32px; font-size: 17px;
  text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.ca-hero .actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===========================================================
   SECTIONS
   =========================================================== */
.ca-section { padding: 90px 0; }
.ca-section.alt { background: #f7f4ef; }
.ca-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.ca-h2 { font-family: 'Playfair Display', serif; font-weight: 700; color: #2b2b2b;
  font-size: 38px; line-height: 1.15; margin-bottom: 24px; }
.ca-lead { font-size: 15px; color: #5a5248; margin-bottom: 16px; }
.ca-img-shadow { border-radius: 10px; box-shadow: 0 20px 45px rgba(0,0,0,.15); width: 100%; max-width: 420px; }
.ca-frame { position: relative; }
.ca-frame::before { content:''; position:absolute; top:-20px; left:-20px; width:130px; height:130px;
  border: 2px solid #e4d9c8; border-radius: 10px; }
.ca-frame img { position: relative; margin: 0 auto; }
.ca-link { display: inline-flex; align-items: center; gap: 8px; color: #8a1c1c;
  font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.ca-link:hover { gap: 12px; }

.ca-checklist li { display: flex; gap: 12px; margin-bottom: 12px; font-size: 15px; color: #5a5248; }
.ca-check { flex: none; width: 20px; height: 20px; border-radius: 999px; background: #8a1c1c;
  color: #fff; display: flex; align-items: center; justify-content: center; margin-top: 3px; font-size: 12px; }

/* Section head centered */
.ca-head-center { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.ca-head-center .ca-eyebrow { justify-content: center; }

/* Steps grid */
.ca-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.ca-step { background: #f7f4ef; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: box-shadow .3s; }
.ca-step:hover { box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.ca-step .thumb { position: relative; height: 208px; overflow: hidden; }
.ca-step .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.19,1,.22,1); }
.ca-step:hover .thumb img { transform: scale(1.08); }
.ca-step .num { position: absolute; top: 12px; left: 12px; width: 36px; height: 36px;
  border-radius: 999px; background: #8a1c1c; color: #fff; font-family: 'Playfair Display', serif;
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ca-step .body { padding: 20px; }
.ca-step .body h3 { font-size: 15px; font-weight: 600; color: #2b2b2b; line-height: 1.35; margin-bottom: 4px; }
.ca-step .body p { font-size: 13px; color: #7a7062; margin: 0; }

/* Essence cards */
.ca-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ca-card { background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: box-shadow .3s; }
.ca-card:hover { box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.ca-card .thumb { height: 224px; overflow: hidden; }
.ca-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.19,1,.22,1); }
.ca-card:hover .thumb img { transform: scale(1.08); }
.ca-card .body { padding: 24px; }
.ca-card .body h3 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 20px; color: #2b2b2b; margin-bottom: 12px; }
.ca-card .body p { font-size: 14px; color: #6a6155; margin-bottom: 16px; }

/* CTA */
.ca-cta { position: relative; padding: 96px 0; overflow: hidden; text-align: center; }
.ca-cta img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ca-cta .overlay { position: absolute; inset: 0; background: rgba(30,26,23,.8); }
.ca-cta .content { position: relative; }
.ca-cta h2 { font-family: 'Playfair Display', serif; font-weight: 700; color: #fff; font-size: 44px; margin-bottom: 16px; }
.ca-cta p { color: #e5ddd2; max-width: 560px; margin: 0 auto 32px; }
.ca-cta .actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===========================================================
   PAGE BANNER
   =========================================================== */
.ca-banner { background: #2b2622; padding: 76px 0; }
.ca-banner h1 { font-family: 'Playfair Display', serif; color: #fff; font-size: 46px; font-weight: 700; margin-bottom: 12px; }
.ca-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #b8ac9c; }
.ca-crumb a:hover { color: #c9852f; }
.ca-crumb .sep { color: #6e6459; }
.ca-crumb .active { color: #c9852f; }

/* ===========================================================
   GALLERY (Réalisations)
   =========================================================== */
.ca-masonry { column-count: 4; column-gap: 16px; }
.ca-masonry .item { margin-bottom: 16px; break-inside: avoid; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); cursor: pointer; display: block; width: 100%; border: none; padding: 0; background: none; }
.ca-masonry .item img { width: 100%; transition: transform .6s cubic-bezier(.19,1,.22,1); }
.ca-masonry .item:hover { box-shadow: 0 18px 40px rgba(0,0,0,.15); }
.ca-masonry .item:hover img { transform: scale(1.08); }

/* Matériels grid */
.ca-mat-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 48px; }
.ca-filter { padding: 10px 24px; border-radius: 999px; font-size: 13px; text-transform: uppercase;
  letter-spacing: .04em; font-weight: 500; border: none; cursor: pointer; background: #f2eee8; color: #5a5248; transition: background .2s; }
.ca-filter:hover { background: #e6e0d7; }
.ca-filter.active { background: #8a1c1c; color: #fff; }
.ca-mat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.ca-mat-item { position: relative; overflow: hidden; border-radius: 10px; aspect-ratio: 1/1;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); cursor: pointer; border: none; padding: 0; }
.ca-mat-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ca-mat-item:hover img { transform: scale(1.1); }
.ca-mat-item .cap { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; background: rgba(30,26,23,0);
  transition: background .3s; opacity: 0; }
.ca-mat-item:hover .cap { background: rgba(30,26,23,.55); opacity: 1; }
.ca-mat-item .cap span { color: #fff; font-size: 14px; font-weight: 500; }

/* ===========================================================
   CONTACT
   =========================================================== */
.ca-contact-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; }
.ca-form label { display: block; font-size: 13px; font-weight: 500; color: #5a5248; margin-bottom: 8px; }
.ca-form .req { color: #8a1c1c; }
.ca-form input, .ca-form textarea {
  width: 100%; border: 1px solid #ddd6cc; border-radius: 8px; padding: 12px 16px;
  font-size: 14px; font-family: inherit; color: #3a3a3a; transition: border-color .2s, box-shadow .2s;
}
.ca-form input:focus, .ca-form textarea:focus {
  outline: none; border-color: #8a1c1c; box-shadow: 0 0 0 3px rgba(138,28,28,.15);
}
.ca-form textarea { resize: vertical; min-height: 150px; }
.ca-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ca-form-full { margin-bottom: 20px; }
.ca-info-card { display: flex; gap: 16px; background: #f7f4ef; border-radius: 10px; padding: 24px; margin-bottom: 24px; }
.ca-info-card .ic { flex: none; width: 48px; height: 48px; border-radius: 999px; background: #8a1c1c;
  color: #fff; display: flex; align-items: center; justify-content: center; }
.ca-info-card h4 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 17px; color: #2b2b2b; margin-bottom: 8px; }
.ca-info-card p { font-size: 14px; color: #6a6155; margin: 0 0 4px; }
.ca-info-card a { color: #8a1c1c; }
.ca-alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 24px; font-size: 14px; }
.ca-alert.ok { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.ca-alert.err { background: #fdecea; color: #c62828; border: 1px solid #f5b5b0; }

/* ===========================================================
   FOOTER
   =========================================================== */
.ca-footer { background: #1e1a17; color: #cfc7bd; }
.ca-footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding: 64px 0; }
.ca-footer h3 { font-family: 'Playfair Display', serif; font-size: 24px; color: #fff; margin-bottom: 16px; }
.ca-footer h3 span { color: #c9852f; }
.ca-footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 20px; }
.ca-footer p, .ca-footer li { font-size: 14px; color: #a89f93; }
.ca-footer a:hover { color: #c9852f; }
.ca-footer ul li { margin-bottom: 12px; }
.ca-footer .contact-li { display: flex; gap: 12px; }
.ca-footer .contact-li svg { color: #c9852f; flex: none; margin-top: 2px; }
.ca-footer-bottom { border-top: 1px solid #332e28; }
.ca-footer-bottom .inner { display: flex; justify-content: space-between; gap: 8px; padding: 20px 0;
  font-size: 12px; color: #7d756a; flex-wrap: wrap; }

/* Reveal animation */
@keyframes caFadeUp { from { opacity: 0; transform: translateY(24px);} to { opacity: 1; transform: translateY(0);} }
.ca-reveal { opacity: 0; }
.ca-reveal.visible { animation: caFadeUp .7s ease forwards; }

/* ===========================================================
   LIGHTBOX
   =========================================================== */
.ca-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center; padding: 20px; }
.ca-lightbox.open { display: flex; }
.ca-lightbox img { max-height: 85vh; max-width: 90vw; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.ca-lightbox .lb-btn { position: absolute; background: none; border: none; color: rgba(255,255,255,.75); cursor: pointer; transition: color .2s; }
.ca-lightbox .lb-btn:hover { color: #fff; }
.ca-lightbox .lb-close { top: 20px; right: 24px; }
.ca-lightbox .lb-prev { left: 16px; }
.ca-lightbox .lb-next { right: 16px; }
.ca-lightbox .lb-count { position: absolute; bottom: 24px; color: rgba(255,255,255,.6); font-size: 14px; }

/* WP core alignment helpers */
.aligncenter { margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 1024px) {
  .ca-steps { grid-template-columns: repeat(2, 1fr); }
  .ca-masonry { column-count: 3; }
}
@media (max-width: 900px) {
  .ca-nav, .ca-phone-btn { display: none; }
  .ca-burger { display: flex; }
  .ca-grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .ca-cards { grid-template-columns: 1fr; }
  .ca-mat-grid { grid-template-columns: repeat(2, 1fr); }
  .ca-contact-grid { grid-template-columns: 1fr; }
  .ca-footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .ca-hero h1 { font-size: 40px; }
  .ca-h2 { font-size: 30px; }
  .ca-banner h1 { font-size: 34px; }
  .ca-cta h2 { font-size: 32px; }
}
@media (max-width: 620px) {
  .ca-masonry { column-count: 2; }
  .ca-mat-grid { grid-template-columns: 1fr; }
  .ca-form-row { grid-template-columns: 1fr; }
  .ca-hero { height: 560px; }
  .ca-hero h1 { font-size: 32px; }
  .ca-logo-text { font-size: 18px; }
}
