/*
Theme Name: SEDEF BTP
Author: SEDEF BTP
Description: Thème vitrine de SEDEF BTP (maçonnerie, rénovation, toiture, terrassement en Île-de-France). Tout le contenu se modifie dans l'éditeur de pages.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sedef-btp
*/

:root {
  --red: #d8141a;
  --red-dark: #b00f14;
  --grey: #737373;
  --ink: #2a2a2a;
  --text: #3a3a3a;
  --muted: #777;
  --bg: #ffffff;
  --bg-soft: #f6f5f3;
  --line: #e7e4df;
  --radius: 14px;
  --wrap: 1160px;
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Playfair Display", Georgia, "Times New Roman", serif;
  --barh: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.75 var(--font); -webkit-font-smoothing: antialiased; padding-bottom: var(--barh); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--font-title); color: var(--ink); line-height: 1.25; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
strong { color: var(--ink); }

/* ---------- En-tête (logo + menu hamburger, façon épurée) ---------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 40; }
.site-header .wrap-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
body:not(.home) .site-header { position: relative; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.brand-name { font-family: var(--font-title); font-size: 1.5rem; letter-spacing: .14em; color: #fff; text-transform: uppercase; }
.brand-name small { display: block; font-family: var(--font); font-size: .68rem; letter-spacing: .3em; color: rgba(255,255,255,.8); }
body:not(.home) .brand-name { color: var(--ink); }
body:not(.home) .brand-name small { color: var(--muted); }
.menu-btn { width: 54px; height: 54px; border-radius: 10px; border: 0; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.12); cursor: pointer; display: grid; place-items: center; padding: 8px 0 6px; }
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 2px auto; }
.menu-btn em { font-style: normal; font-size: 9px; letter-spacing: .12em; color: var(--ink); text-transform: uppercase; }

.nav-panel { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.nav-panel.open { visibility: visible; }
.nav-panel .overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.nav-panel.open .overlay { opacity: 1; }
.nav-panel .panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); background: #fff; padding: 26px 30px; transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; }
.nav-panel.open .panel { transform: none; }
.nav-panel .close { float: right; border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--ink); }
.nav-panel ul { list-style: none; margin: 40px 0 24px; padding: 0; clear: both; }
.nav-panel li a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-family: var(--font-title); font-size: 1.2rem; }
.nav-panel li a:hover, .nav-panel .current-menu-item > a { color: var(--red); }
.nav-panel .sub-menu { margin: 0 0 0 16px; }
.nav-panel .sub-menu a { font-family: var(--font); font-size: 1rem; }
.nav-panel .panel-contact { font-size: 15px; color: var(--muted); }
.nav-panel .panel-contact a { color: var(--ink); font-weight: 700; text-decoration: none; }

/* ---------- Boutons ---------- */
.btn, .wp-block-button__link { display: inline-block; background: var(--red); color: #fff !important; padding: 13px 26px; border-radius: 8px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: 16px; transition: background .2s, transform .2s; }
.btn:hover, .wp-block-button__link:hover { background: var(--red-dark); }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--ink) !important; border: 1.5px solid var(--ink); }
.is-style-outline .wp-block-button__link:hover { background: var(--ink); color: #fff !important; }

/* ---------- Contenu des pages (blocs éditables) ---------- */
.page-content > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.page-content > .alignfull { max-width: none; }
.page-content > .wp-block-group.alignfull { padding-left: max(24px, calc((100% - var(--wrap)) / 2 + 24px)); padding-right: max(24px, calc((100% - var(--wrap)) / 2 + 24px)); }
.section { padding-top: 80px; padding-bottom: 80px; }
.section-soft { background: var(--bg-soft); }
.section-grey { background: var(--grey); color: #f1f1f1; }
.section-grey h2, .section-grey h3, .section-grey strong { color: #fff; }
.center { text-align: center; }
.narrow { max-width: 780px; margin-left: auto !important; margin-right: auto !important; }
.kicker { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; margin-bottom: .6em; }
.section-grey .kicker { color: #fff; opacity: .85; }
.title-line::after { content: ""; display: block; width: 56px; height: 2px; background: var(--red); margin-top: 16px; }
.center .title-line::after, .title-line.has-text-align-center::after { margin-left: auto; margin-right: auto; }

/* Hero accueil : grande photo, accroche à gauche, encart vitré à droite */
.wp-block-cover.hero { min-height: 100vh; padding: 130px 24px 90px; }
.wp-block-cover.hero .wp-block-cover__inner-container { max-width: var(--wrap); width: 100%; margin: 0 auto; }
.hero-cols { align-items: center !important; gap: 40px !important; }
.wp-block-cover.hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.wp-block-cover.hero p { color: rgba(255,255,255,.9); font-size: 1.12rem; }
.glass { background: rgba(40,40,40,.42); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.22); border-radius: 18px; padding: 30px 28px !important; color: #fff; }
.glass h2, .glass h3 { color: #fff; font-size: 1.55rem; }
.glass .check-list li { color: #fff; }
.glass .wp-block-buttons { flex-direction: column; align-items: stretch; gap: 10px; }
.glass .wp-block-button { width: 100%; }
.glass .wp-block-button__link { width: 100%; text-align: center; }
.glass .is-style-outline .wp-block-button__link { color: #fff !important; border-color: rgba(255,255,255,.75); }
.glass .is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--ink) !important; }

.wp-block-cover.page-hero { min-height: 380px; padding: 60px 24px; }
.wp-block-cover.page-hero .wp-block-cover__inner-container { max-width: var(--wrap); width: 100%; margin: 0 auto; }
.wp-block-cover.page-hero h1 { color: #fff; }
.wp-block-cover.page-hero p { color: rgba(255,255,255,.9); max-width: 680px; }

.check-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.check-list li { padding-left: 32px; position: relative; margin-bottom: 10px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .9; }
.check-list li::after { content: ""; position: absolute; left: 6px; top: 9px; width: 8px; height: 5px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.glass .check-list li::after { border-color: #fff; }

/* Cartes services */
.cards { gap: 26px !important; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; height: 100%; box-shadow: 0 6px 26px rgba(0,0,0,.07); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,.11); }
.card > *:not(figure) { padding-left: 24px; padding-right: 24px; }
.card > :last-child { padding-bottom: 24px; }
.card figure { margin: 0 0 18px; }
.card figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card .more a { font-weight: 700; text-decoration: none; font-size: 15px; }

/* Chiffres */
.stats { text-align: center; }
.stats .stat-num { font-family: var(--font-title); font-size: 2.8rem; color: #fff; margin: 0; line-height: 1.1; }
.stats .stat-label { color: #ececec; margin: 0; font-size: 15px; }

/* Étapes */
.steps .step-num { font-family: var(--font-title); font-size: 2.4rem; color: var(--red); margin: 0; line-height: 1; }

/* Avis */
.reviews { gap: 22px !important; }
.review { background: #fff; border-radius: var(--radius); padding: 26px; height: 100%; box-shadow: 0 6px 26px rgba(0,0,0,.06); font-style: italic; }
.review .stars { color: #e5a00d; letter-spacing: 3px; font-style: normal; margin-bottom: 8px; }
.review .who { font-weight: 700; color: var(--ink); font-style: normal; margin: 0; }
.note-fictif { font-size: 12.5px; color: var(--red); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Engagements */
.engagements { gap: 18px !important; text-align: center; }
.engagement { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 16px; background: #fff; }
.engagement h3 { font-size: 1.1rem; margin-bottom: .3em; }
.engagement p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* Image arrondie */
.rounded img, .wp-block-image.rounded img { border-radius: var(--radius); }
.gallery-grid img, .wp-block-gallery img { border-radius: 10px; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 4/3; object-fit: cover; }

.cta-band { background: var(--ink); color: #eee; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .wp-block-buttons { justify-content: center; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { font-family: var(--font-title); font-size: 1.12rem; color: var(--ink); cursor: pointer; }
.faq details p { margin: 10px 0 0; }

/* ---------- Formulaire devis ---------- */
.devis-form { background: #fff; border-radius: var(--radius); padding: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; box-shadow: 0 8px 30px rgba(0,0,0,.07); }
.devis-form .full { grid-column: 1 / -1; }
.devis-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.devis-form input, .devis-form select, .devis-form textarea { width: 100%; padding: 13px 14px; border: 1px solid #d6d3ce; border-radius: 8px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.devis-form input:focus, .devis-form select:focus, .devis-form textarea:focus { outline: 2px solid var(--red); border-color: transparent; }
.devis-form .hp { position: absolute; left: -9999px; }
.devis-form .rgpd { font-size: 13px; color: var(--muted); margin: 0; }
.form-msg { padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; font-weight: 700; }
.form-msg.ok { background: #e8f5ea; color: #1d6a33; }
.form-msg.err { background: #fdeceb; color: #a1201b; }

/* ---------- Pied de page ---------- */
.site-footer { background: #232323; color: #b5b5b5; padding: 60px 0 28px; font-size: 15px; }
.site-footer .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.site-footer a { color: #e4e4e4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-logo { width: 74px; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid #3a3a3a; margin-top: 40px; padding-top: 18px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Barre fixe du bas (toujours visible) ---------- */
.float-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: var(--barh); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(0,0,0,.07); display: grid; grid-template-columns: repeat(3, 1fr); }
.float-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ink); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.float-bar a:hover { color: var(--red); }
.float-bar svg { width: 20px; height: 20px; fill: currentColor; }
.float-bar a.fb-wa svg { fill: #1fa855; }
.float-bar a.fb-devis { background: var(--red); color: #fff; }
.float-bar a.fb-devis:hover { background: var(--red-dark); color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .site-header .wrap-h { padding: 12px 16px; }
  .brand img { width: 52px; height: 52px; }
  .brand-name { font-size: 1.2rem; }
  .wp-block-cover.hero { padding: 100px 16px 50px; min-height: auto; }
  .page-content > * { padding-left: 16px; padding-right: 16px; }
  .devis-form { grid-template-columns: 1fr; padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .float-bar a { font-size: 11px; }
}

/* ---------- Ajustements v1.0.2 ---------- */
.menu-btn { position: fixed; top: 18px; right: 24px; z-index: 70; }
body.admin-bar .menu-btn { top: 50px; }
.card > :first-child:not(figure) { margin-top: 24px; }
.engagement p { margin: 0 0 .9em; color: var(--text); }
.engagement p:last-child { margin-bottom: 0; }
@media (max-width: 700px) {
  .menu-btn { top: 12px; right: 16px; width: 50px; height: 50px; }
  .brand-name small { display: none; }
  .engagement { padding: 20px; }
}

/* ---------- Galerie réalisations (v1.0.3) ---------- */
.wp-block-gallery.gallery-grid { --wp--style--unstable-gallery-gap: 14px; gap: 14px; margin: 30px 0; }
.wp-block-gallery.gallery-grid figure.wp-block-image { position: relative; overflow: hidden; border-radius: 10px; }
.wp-block-gallery.gallery-grid figure.wp-block-image img { aspect-ratio: 4/3; object-fit: cover; transition: transform .4s; }
.wp-block-gallery.gallery-grid figure.wp-block-image:hover img { transform: scale(1.04); }
.wp-block-gallery.gallery-grid figcaption.wp-element-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: 14px; font-weight: 700; text-align: left; }
.card .wp-block-image.card-img { margin: 0 0 18px; }
.card .wp-block-image.card-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0; }
.card > .wp-block-image:first-child { padding: 0; }
@media (max-width: 700px) { .wp-block-gallery.gallery-grid { --wp--style--unstable-gallery-gap: 8px; gap: 8px; } }

/* ---------- Bandeau chiffres sur photo (v1.0.4) ---------- */
.wp-block-cover.stats-band { padding: 90px 24px; min-height: 0; }
.wp-block-cover.stats-band .wp-block-cover__inner-container { max-width: var(--wrap); width: 100%; margin: 0 auto; }
.stats-band .stat-num { color: #fff; }
.stats-band .stat-label { color: #f0f0f0; }
.stats-band .stats .wp-block-column { border-left: 1px solid rgba(255,255,255,.25); }
.stats-band .stats .wp-block-column:first-child { border-left: 0; }
@media (max-width: 781px) { .stats-band .stats .wp-block-column { border-left: 0; } }
.wp-block-gallery.gallery-grid figure.wp-block-image { background: #ebe8e3; }
@media (min-width: 900px) { .wp-block-gallery.gallery-grid.columns-3 figure.wp-block-image:not(#x) { width: calc(33.333% - 14px * .66667); } }
/* Section présentation avec photo (v1.0.6) */
.seo-cols { align-items: center !important; gap: 48px !important; }
.photo-entreprise img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); box-shadow: 0 14px 40px rgba(0,0,0,.14); }
/* En-têtes de pages plus hauts : on voit davantage la photo (v1.0.7) */
.wp-block-cover.page-hero { min-height: clamp(400px, 38vw, 620px); }
.wp-block-cover.page-hero .wp-block-cover__image-background { object-position: center 55%; }

/* ==========================================================
   Finitions mobile (v1.0.8) — uniquement < 782 px,
   aucun effet sur la version ordinateur
   ========================================================== */
@media (max-width: 781px) {
  /* Gouttière unique de 20 px partout */
  .page-content > *,
  .page-content > .wp-block-group.alignfull { padding-left: 20px; padding-right: 20px; }
  .site-footer .wrap { padding: 0 20px; }
  .wp-block-cover.hero, .wp-block-cover.page-hero, .wp-block-cover.stats-band { padding-left: 20px; padding-right: 20px; }

  /* Titres : tailles adaptées et retours à la ligne équilibrés */
  h1, h2, h3, .faq summary { text-wrap: balance; overflow-wrap: break-word; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.2rem; }
  .page-content > h1:first-child { margin-top: 40px; }
  .title-line::after { margin-top: 12px; }

  /* Hero de l'accueil + encart vitré */
  .wp-block-cover.hero { padding-top: 96px; padding-bottom: 44px; }
  .wp-block-cover.hero h1 { font-size: 1.75rem; line-height: 1.22; margin-bottom: .55em; }
  .wp-block-cover.hero p { font-size: 1.02rem; line-height: 1.65; }
  .hero-cols { gap: 26px !important; }
  .glass { padding: 24px 20px !important; border-radius: 16px; }
  .glass h2, .glass h3 { font-size: 1.35rem; }

  /* En-têtes des pages intérieures */
  .wp-block-cover.page-hero { min-height: 320px; padding-top: 48px; padding-bottom: 48px; }
  .wp-block-cover.page-hero h1 { font-size: 1.8rem; }
  .wp-block-cover.page-hero p { font-size: 1rem; }

  /* Cartes services */
  .cards { gap: 20px !important; }
  .card > *:not(figure) { padding-left: 18px; padding-right: 18px; }
  .card > :first-child:not(figure) { margin-top: 18px; }
  .card > :last-child { padding-bottom: 20px; }
  .card:hover { transform: none; }

  /* Bandeau des chiffres : grille 2 x 2 */
  .wp-block-cover.stats-band { padding-top: 56px; padding-bottom: 56px; }
  .wp-block-columns.stats { flex-wrap: wrap !important; gap: 30px 0 !important; }
  .wp-block-columns.stats > .wp-block-column:not(#x) { flex-basis: 50% !important; flex-grow: 0; padding: 0 6px; }
  .stats .stat-num { font-size: 2.3rem; }
  .stats .stat-label { font-size: 14px; line-height: 1.4; margin-top: 4px; }

  /* Étapes, avis, engagements, colonnes */
  .steps { gap: 22px !important; }
  .steps .step-num { font-size: 2.1rem; }
  .steps .wp-block-column > :last-child { margin-bottom: 0; }
  .reviews { gap: 16px !important; }
  .review { padding: 22px 20px; }
  .seo-cols { gap: 32px !important; }
  .engagements { gap: 12px !important; }

  /* Galeries */
  .wp-block-gallery.gallery-grid { margin: 22px 0; }
  .wp-block-gallery.gallery-grid figcaption.wp-element-caption { font-size: 12.5px; line-height: 1.3; padding: 22px 8px 8px; }
  .wp-block-gallery.gallery-grid figure.wp-block-image:hover img { transform: none; }

  /* Boutons pleine largeur faciles à toucher */
  .cta-band .wp-block-button, .cta-band .wp-block-button__link { max-width: 100%; }
  .wp-block-button__link, .btn { padding: 14px 22px; }

  /* FAQ */
  .faq summary { font-size: 1.05rem; line-height: 1.4; padding: 2px 0; }

  /* Formulaire */
  .devis-form { padding: 20px 18px; gap: 14px; }
  .devis-form .btn { width: 100%; font-family: var(--font); font-size: 16px; }
  .devis-form input, .devis-form select, .devis-form textarea { min-height: 48px; }

  /* Pied de page */
  .site-footer { padding-top: 48px; }
  .footer-grid { gap: 28px; }
  .footer-grid li { margin-bottom: 0; }
  .footer-grid li a { display: inline-block; padding: 5px 0; }
  .footer-bottom { margin-top: 30px; padding-bottom: 8px; }

  /* Menu hamburger */
  .nav-panel .panel { width: min(340px, 86vw); padding: 22px 24px calc(var(--barh) + 24px); }
  .nav-panel ul { margin-top: 28px; }
  .nav-panel li a { padding: 12px 0; font-size: 1.15rem; }
  .nav-panel .sub-menu li a { padding: 9px 0; }
}

@media (max-width: 380px) {
  .wp-block-cover.hero h1 { font-size: 1.6rem; }
  h1, .wp-block-cover.page-hero h1 { font-size: 1.65rem; }
  h2 { font-size: 1.45rem; }
  .brand-name { font-size: 1.1rem; }
  .float-bar a { font-size: 10.5px; letter-spacing: .03em; }
}

/* Menu : seule la page en cours est en rouge (v1.1.0)
   - sur écran tactile, le dernier lien touché ne reste plus rouge
   - « Nos services » (lien vers l'accueil) ne s'allume plus en même temps que « Accueil » */
@media (hover: none) {
  .nav-panel li:not(.current-menu-item) > a:hover { color: var(--ink); }
}
.nav-panel .menu-item-object-custom.current-menu-item > a:not(:hover) { color: var(--ink); }

/* Réalisations classées par métier (v1.1.1) */
.cat-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px auto 10px; }
.cat-pill { display: inline-block; padding: 9px 18px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14.5px; white-space: nowrap; transition: border-color .2s, color .2s; }
.cat-pill:hover { border-color: var(--red); color: var(--red); }
.cat-anchor { display: block; position: relative; top: -24px; }
.realisations-cats .cat-title { margin-top: 56px; }
.realisations-cats .cat-more { text-align: right; margin-top: -8px; }
.realisations-cats .cat-more a { font-weight: 700; text-decoration: none; }
@media (max-width: 781px) {
  .cat-pills { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 22px -20px 4px; padding: 2px 20px 8px; }
  .cat-pills::-webkit-scrollbar { display: none; }
  .cat-pill { padding: 8px 15px; font-size: 14px; }
  .realisations-cats .cat-title { margin-top: 40px; }
  .realisations-cats .cat-more { text-align: left; margin-top: -6px; }
}

/* Galeries : une photo seule en fin de rangée garde la taille des autres, rangée centrée (v1.1.2) */
.wp-block-gallery.gallery-grid { justify-content: center; }
.wp-block-gallery.gallery-grid figure.wp-block-image:not(#x) { flex-grow: 0; }
@media (max-width: 899px) {
  .wp-block-gallery.gallery-grid figure.wp-block-image:not(#x) { width: calc(50% - var(--wp--style--unstable-gallery-gap, 14px) / 2); }
}

/* Avis : grille de 3 sur ordinateur, carrousel à faire glisser sur mobile (v1.1.4) */
.reviews-grid > .wp-block-group__inner-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.reviews-grid .review { margin: 0; display: flex; flex-direction: column; }
.reviews-grid .review > .wp-block-group__inner-container { display: flex; flex-direction: column; height: 100%; }
.reviews-grid .review .who { margin-top: auto; }
@media (max-width: 1000px) and (min-width: 782px) {
  .reviews-grid > .wp-block-group__inner-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 781px) {
  .reviews-grid { margin-left: -20px !important; margin-right: -20px !important; padding: 0 !important; }
  .reviews-grid > .wp-block-group__inner-container { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 20px 18px; }
  .reviews-grid > .wp-block-group__inner-container::-webkit-scrollbar { display: none; }
  .reviews-grid .review { flex: 0 0 84%; scroll-snap-align: center; }
}
/* 13e avis seul sur sa rangée : centré (v1.1.5) */
@media (min-width: 1001px) {
  .reviews-grid .review:last-child:nth-child(3n+1) { grid-column: 2; }
}
@media (max-width: 1000px) and (min-width: 782px) {
  .reviews-grid .review:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 11px); }
}
