/* =========================================================================
   A RAPETTI TOITURE — site.css
   Design system extrait des maquettes Claude Design (dc-runtime).
   Rouge marque #c4162a · Archivo (titres) + DM Sans (texte) · fond sombre.
   ========================================================================= */

/* ---- Reset & base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  margin: 0; padding: 0;
  scroll-behavior: smooth;
  background-color: #0a0a0c;
  background-image:
    radial-gradient(50% 40% at 12% 6%, rgba(196,22,42,0.13), transparent 60%),
    radial-gradient(46% 40% at 88% 22%, rgba(196,22,42,0.09), transparent 62%),
    radial-gradient(55% 46% at 72% 96%, rgba(120,20,30,0.10), transparent 62%),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 56px 56px, 56px 56px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat;
  background-attachment: fixed;
}

body {
  margin: 0; padding: 0;
  background: transparent;
  scroll-behavior: smooth;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #f4f3f0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Les halos décoratifs sont en position:absolute avec des débords type
   `right:-8%` / `left:-10%`. Dans les sections sans overflow:hidden, ils
   élargissent le document : scrollbar horizontale masquée en desktop, et
   surtout dézoom complet de la page sur mobile (le navigateur élargit le
   viewport pour tout faire tenir). Comme ces halos débordent au-delà du bord
   de l'écran, les clipper au ras de la section ne change rien visuellement.
   `clip` plutôt que `hidden` : ne crée pas de conteneur de défilement. */
section { overflow-x: clip; }

a { color: inherit; }
a:hover { color: #ff3a4a; }
img { max-width: 100%; }
input, textarea, select, button { font-family: inherit; }

/* ---- Keyframes ---------------------------------------------------------- */
@keyframes heroSlide { 0%, 16% { opacity:1; transform:scale(1.08); } 22%, 96% { opacity:0; transform:scale(1); } 100% { opacity:1; transform:scale(1.08); } }
@keyframes fadeUp { from { opacity:0; transform: translateY(32px); } to { opacity:1; transform: translateY(0); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.35; } }
@keyframes smokeDrift { 0% { transform: translate(0,0) scale(1); opacity:0.55; } 50% { transform: translate(3%, -2%) scale(1.06); opacity:0.8; } 100% { transform: translate(0,0) scale(1); opacity:0.55; } }
@keyframes methodFlow { from { background-position: 0% 0; } to { background-position: 200% 0; } }
@keyframes gridDrift { from { background-position: 0 0, 0 0; } to { background-position: 56px 56px, 56px 56px; } }
@keyframes glowPulse { 0%,100% { opacity:0.9; transform: translate(0,0) scale(1); } 50% { opacity:1; transform: translate(2%,-1.5%) scale(1.05); } }
@keyframes ddIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
@keyframes logoGlow { 0%,100% { box-shadow:0 8px 24px rgba(196,22,42,0.2); } 50% { box-shadow:0 8px 32px rgba(196,22,42,0.55); } }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes borderSpin { to { --ang: 360deg; } }

/* ---- Reveal au scroll (init par site.js) -------------------------------- */
[data-reveal].reveal-init {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.22,1,0.36,1), transform 0.8s cubic-bezier(0.22,1,0.36,1);
}
[data-reveal].reveal-in { opacity: 1 !important; transform: translateY(0) !important; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal].reveal-init { opacity: 1; transform: none; }
}

/* ---- Cartes services (bordure conique animée au survol) ----------------- */
.ar-service { position:relative; isolation:isolate; }
.ar-service::before {
  content:""; position:absolute; inset:0; padding:1.5px;
  background: conic-gradient(from var(--ang), transparent 0deg 210deg, rgba(255,58,74,0.95) 300deg, rgba(196,22,42,0.6) 330deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity:0; transition: opacity 0.35s ease; pointer-events:none; z-index:3;
}
.ar-service:hover::before { opacity:1; animation: borderSpin 2.6s linear infinite; }
.ar-service:hover .ar-service-arrow { transform: translateX(6px); }
.ar-service:hover .ar-service-icon { border-color:#c4162a !important; box-shadow:0 0 20px rgba(196,22,42,0.4); }

/* ---- Pages service (ServicePage) : responsive -------------------------- */
@media (max-width: 900px) {
  .sp-pad { padding-left:22px !important; padding-right:22px !important; }
  .sp-hero { padding-top:140px !important; padding-bottom:70px !important; }
  .sp-hero h1 { font-size:46px !important; }
  .sp-2col { grid-template-columns:1fr !important; gap:36px !important; }
  .sp-3col { grid-template-columns:1fr !important; }
  .sp-4stat { grid-template-columns:1fr 1fr !important; }
}

/* ---- Composant FAQ accordéon (natif <details>, sans JS) ----------------- */
.ar-faq { background:#111114; border:1px solid #1c1c1f; border-radius:14px; overflow:hidden; }
.ar-faq + .ar-faq { margin-top:12px; }
.ar-faq summary { list-style:none; cursor:pointer; padding:24px 28px; display:flex; align-items:center; justify-content:space-between; gap:20px; font-family:'Archivo'; font-weight:700; font-size:18px; color:#fff; }
.ar-faq summary::-webkit-details-marker { display:none; }
.ar-faq summary::after { content:"+"; font-size:24px; color:#d92435; flex-shrink:0; line-height:1; }
.ar-faq[open] summary::after { content:"\2212"; }
.ar-faq .ar-faq-a { padding:0 28px 24px; font-size:15px; line-height:1.65; color:#a8a59d; margin:0; }

/* =========================================================================
   BLOG — article "digeste" + publication programmée
   ========================================================================= */
.article-hero { position:relative; padding:150px 56px 60px; overflow:hidden; background:radial-gradient(circle at 78% 20%, rgba(196,22,42,0.20), transparent 55%), #0a0a0c; }
.article-wrap { max-width:820px; margin:0 auto; padding:0 56px 100px; }
.article-meta { display:flex; flex-wrap:wrap; gap:16px; align-items:center; font-size:13px; color:#8f8c84; margin-bottom:22px; }
.article-meta .tag { color:#d92435; font-weight:600; letter-spacing:1.5px; text-transform:uppercase; font-size:11px; }

.article-body { font-size:17px; line-height:1.75; color:#cfccc4; }
.article-body h2 { font-family:'Archivo'; font-weight:800; font-size:30px; line-height:1.15; letter-spacing:-0.8px; color:#fff; margin:52px 0 18px; }
.article-body h3 { font-family:'Archivo'; font-weight:700; font-size:21px; color:#fff; margin:32px 0 12px; }
.article-body p { margin:0 0 20px; }
.article-body strong { color:#fff; }
.article-body a { color:#ff3a4a; text-decoration:underline; text-underline-offset:2px; }
.article-body ul, .article-body ol { margin:0 0 22px; padding-left:22px; }
.article-body li { margin-bottom:10px; }

.article-brief { background:#111114; border:1px solid #1c1c1f; border-left:3px solid #c4162a; border-radius:12px; padding:26px 30px; margin:0 0 40px; }
.article-brief h2 { font-family:'Archivo'; font-weight:700; font-size:13px; letter-spacing:1.5px; text-transform:uppercase; color:#d92435; margin:0 0 14px; }
.article-brief ul { list-style:none; padding:0; margin:0; }
.article-brief li { position:relative; padding-left:26px; margin-bottom:10px; font-size:15px; color:#e8e6e1; line-height:1.5; }
.article-brief li::before { content:"✓"; position:absolute; left:0; color:#d92435; font-weight:800; }

.article-toc { background:#0d0d10; border:1px solid #1c1c1f; border-radius:12px; padding:22px 28px; margin:0 0 44px; }
.article-toc h2 { font-family:'Archivo'; font-weight:700; font-size:12px; letter-spacing:1.5px; text-transform:uppercase; color:#8f8c84; margin:0 0 12px; }
.article-toc ol { margin:0; padding-left:20px; }
.article-toc li { margin-bottom:8px; }
.article-toc a { color:#bdbab2; text-decoration:none; }
.article-toc a:hover { color:#ff3a4a; }

.article-quote { border-left:3px solid #c4162a; padding:6px 0 6px 24px; margin:36px 0; font-family:'Archivo'; font-weight:700; font-style:italic; font-size:22px; line-height:1.4; color:#fff; }

.article-realisations { background:linear-gradient(135deg,#1a1013,#0d0d10); border:1px solid #241a1c; border-radius:16px; padding:32px 34px; margin:48px 0; }
.article-realisations h2 { font-family:'Archivo'; font-weight:800; font-size:24px; color:#fff; margin:0 0 10px; }
.article-realisations p { font-size:15px; color:#a8a59d; margin:0 0 22px; }
.article-realisations .reno-btns { display:flex; flex-wrap:wrap; gap:12px; }
.article-realisations a.reno-btn { display:inline-flex; align-items:center; gap:8px; background:#111114; border:1px solid #2a2a2e; color:#fff; padding:12px 20px; border-radius:10px; text-decoration:none; font-weight:600; font-size:14px; transition:border-color 0.25s, transform 0.2s; }
.article-realisations a.reno-btn:hover { border-color:#c4162a; transform:translateY(-2px); color:#fff; }

.article-more, .article-zones { margin:48px 0; }
.article-more h2, .article-zones h2 { font-family:'Archivo'; font-weight:800; font-size:24px; color:#fff; margin:0 0 20px; }
.article-more-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.article-more-grid a { background:#111114; border:1px solid #1c1c1f; border-radius:12px; padding:22px 24px; text-decoration:none; transition:border-color 0.25s; }
.article-more-grid a:hover { border-color:#2a2a2e; }
.article-more-grid .k { font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:#d92435; font-weight:600; }
.article-more-grid .t { font-family:'Archivo'; font-weight:700; font-size:17px; color:#fff; margin-top:8px; line-height:1.3; }
.article-zones .chips { display:flex; flex-wrap:wrap; gap:10px; }
.article-zones a { padding:10px 18px; border:1px solid #1c1c1f; border-radius:40px; font-size:14px; color:#e8e6e1; text-decoration:none; transition:border-color 0.25s, background 0.25s; }
.article-zones a:hover { border-color:#c4162a; background:rgba(196,22,42,0.1); }

/* Publication programmée */
.publish-gate__locked { background:#0d0d10; border:1px dashed #2a2a2e; border-radius:14px; padding:44px 30px; text-align:center; margin:20px 0; }
.publish-gate__locked .ic { font-size:30px; margin-bottom:14px; }
.publish-gate__locked h2 { font-family:'Archivo'; font-weight:800; font-size:24px; color:#fff; margin:0 0 10px; }
.publish-gate__locked p { font-size:15px; color:#8f8c84; margin:0; }

@media (max-width: 900px) {
  .article-hero { padding:130px 22px 50px !important; }
  .article-wrap { padding:0 22px 70px !important; }
  .article-more-grid { grid-template-columns:1fr !important; }
}

/* =========================================================================
   CARROUSEL RÉALISATIONS (1 chantier = 1 carrousel)
   ========================================================================= */
.ar-carousel { position:relative; border-radius:18px; overflow:hidden; border:1px solid #1c1c1f; background:#0d0d10; box-shadow:0 24px 50px rgba(0,0,0,0.4); }
.ar-carousel__track { display:flex; transition:transform 0.5s cubic-bezier(0.22,1,0.36,1); }
.ar-carousel__slide { min-width:100%; aspect-ratio:16/10; background:#141013; }
.ar-carousel__slide img { width:100%; height:100%; object-fit:cover; display:block; }
.ar-carousel__nav { position:absolute; top:50%; transform:translateY(-50%); width:46px; height:46px; border-radius:50%; background:rgba(8,8,10,0.55); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); border:1px solid rgba(255,255,255,0.18); color:#fff; font-size:24px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background 0.2s, transform 0.2s; z-index:3; }
.ar-carousel__nav:hover { background:#c4162a; }
.ar-carousel__prev { left:14px; } .ar-carousel__next { right:14px; }
.ar-carousel__count { position:absolute; top:14px; right:14px; background:rgba(8,8,10,0.7); backdrop-filter:blur(6px); padding:5px 12px; border-radius:40px; font-size:12px; letter-spacing:0.5px; color:#fff; z-index:3; }
.ar-carousel__dots { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); display:flex; gap:8px; z-index:3; }
.ar-carousel__dot { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.45); border:none; cursor:pointer; padding:0; transition:width 0.25s, background 0.25s; }
.ar-carousel__dot.is-active { background:#c4162a; width:22px; border-radius:4px; }

/* Points de progression des rails `bw-swipe`. Générés par site.js sur TOUS les
   viewports (sinon un redimensionnement desktop→mobile laisserait le rail sans
   points, le JS ne repassant pas) et masqués ici hors mobile. Le passage en
   display:flex se fait dans la media query 900px, avec le reste du composant. */
.bw-swipe__dots { display:none; }

/* Grille des chantiers (/realisations) : l'espacement vient du gap de la
   grille inline ; les cellules ~410px demandent des commandes plus discrètes */
.ar-reno-grid .ar-carousel__nav { width:36px; height:36px; font-size:19px; }
.ar-reno-grid .ar-carousel__count { font-size:11px; padding:4px 10px; }

/* Variante 3 photos visibles (carrousel de l'accueil). Le glissement JS
   reste en % : le padding est DANS le min-width, le calcul tombe juste. */
.ar-carousel--triple .ar-carousel__slide { min-width:33.3333%; padding:6px; }
.ar-carousel--triple .ar-carousel__slide img { border-radius:10px; }

/* Variante cartes (avis) : mêmes commandes, sans cadre photo ni ratio.
   Les textes longs sont coupés à 8 lignes (line-clamp), le récit complet
   reste lisible sur la page Facebook liée sous le carrousel. */
.ar-carousel--cards { background:transparent; border:none; box-shadow:none; border-radius:0; padding-bottom:54px; }
.ar-carousel--cards .ar-carousel__slide { min-width:33.3333%; aspect-ratio:auto; background:transparent; padding:0 8px; display:flex; }
.ar-carousel--cards .ar-carousel__slide > div { width:100%; }
.ar-carousel--cards .ar-review-txt { display:-webkit-box; -webkit-line-clamp:8; -webkit-box-orient:vertical; overflow:hidden; }
.ar-carousel--cards .ar-carousel__count { display:none; }
.ar-carousel--cards .ar-carousel__dots { bottom:16px; }
/* flèches plus discrètes, arrêtées au bord du texte (8px de gouttière
   + 30px de padding de carte), pour ne pas recouvrir la lecture */
.ar-carousel--cards .ar-carousel__nav { top:calc(50% - 27px); width:38px; height:38px; font-size:20px; background:rgba(8,8,10,0.85); }
.ar-carousel--cards .ar-carousel__prev { left:0; }
.ar-carousel--cards .ar-carousel__next { right:0; }
@media (max-width:640px){
  .ar-carousel__nav { width:38px; height:38px; font-size:20px; }
}

/* =========================================================================
   HEADER
   ========================================================================= */
.ar-header {
  position:fixed; top:0; left:0; right:0; z-index:1000;
  padding:18px 56px; color:#fff;
  background:rgba(10,10,12,0.10);
  border-bottom:1px solid rgba(255,255,255,0);
  box-shadow:none;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.ar-header.is-scrolled {
  padding:11px 56px;
  background:rgba(10,10,12,0.92);
  border-bottom:1px solid rgba(255,255,255,0.08);
  box-shadow:0 10px 34px rgba(0,0,0,0.4);
}
/* Contenu du header resserré au centre — le logo ne colle plus le bord */
.ar-header-inner {
  max-width:1240px; margin:0 auto; width:100%;
  display:flex; align-items:center; justify-content:space-between;
}
.ar-logo-box { animation: logoGlow 3.8s ease-in-out infinite; }

.ar-nav-link { position:relative; }
.ar-nav-link::after {
  content:""; position:absolute; left:0; right:0; bottom:-5px; height:2px; border-radius:2px;
  background:linear-gradient(90deg,#ff3a4a,#c4162a); box-shadow:0 0 8px rgba(255,58,74,0.6);
  transform:scaleX(0); transform-origin:left center;
  transition:transform 0.32s cubic-bezier(0.22,1,0.36,1);
}
.ar-nav-link:hover::after, .ar-nav-link.is-active::after { transform:scaleX(1); }
.ar-desktop-nav a:hover { opacity:1 !important; }
/* Onglet actif piloté par <body data-page="..."> */
body[data-page="home"] .ar-nav-link[data-nav="accueil"]::after,
body[data-page="services"] .ar-nav-link[data-nav="services"]::after,
body[data-page="realisations"] .ar-nav-link[data-nav="realisations"]::after,
body[data-page="apropos"] .ar-nav-link[data-nav="apropos"]::after,
body[data-page="actualites"] .ar-nav-link[data-nav="actualites"]::after { transform:scaleX(1); }
body[data-page="home"] .ar-nav-link[data-nav="accueil"],
body[data-page="services"] .ar-nav-link[data-nav="services"],
body[data-page="realisations"] .ar-nav-link[data-nav="realisations"],
body[data-page="apropos"] .ar-nav-link[data-nav="apropos"],
body[data-page="actualites"] .ar-nav-link[data-nav="actualites"] { opacity:1 !important; }

/* Méga-menu services (survol pur CSS en desktop) */
.ar-has-mega { position:relative; padding:14px 0; }
.ar-mega {
  position:absolute; top:100%; left:-24px; width:560px;
  background:#111114; border:1px solid #232327; border-radius:16px; padding:14px;
  box-shadow:0 30px 60px rgba(0,0,0,0.55);
  opacity:0; transform:translateY(10px); pointer-events:none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  display:grid; grid-template-columns:1fr 1fr; gap:6px;
}
.ar-has-mega:hover .ar-mega { opacity:1; transform:translateY(0); pointer-events:auto; }
.ar-has-mega:hover .ar-caret { transform:rotate(180deg); }
.ar-caret { font-size:9px; display:inline-block; transition: transform 0.25s; }
.ar-mega a { display:block; padding:14px 16px; border-radius:10px; text-decoration:none; transition: background 0.2s; }
.ar-mega a:hover { background:#1b1418; }

.ar-cta {
  background:linear-gradient(135deg,#c4162a,#8e0f1c); color:#fff; padding:11px 20px; border-radius:8px;
  text-decoration:none; font-weight:700; font-size:13px; letter-spacing:0.5px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ar-cta:hover { transform: translateY(-2px); box-shadow:0 10px 24px rgba(196,22,42,0.45); color:#fff; }

.ar-burger { display:none; background:transparent; border:1px solid rgba(255,255,255,0.25); border-radius:10px; width:46px; height:46px; cursor:pointer; align-items:center; justify-content:center; color:#fff; }

/* Menu mobile plein écran.
   IMPORTANT : ce bloc doit rester HORS du <header> dans le HTML — le header a un
   backdrop-filter, ce qui en fait le bloc conteneur de ses descendants position:fixed
   et enfermerait le menu dans la hauteur du header. */
.ar-mobile {
  position:fixed; inset:0; z-index:2000; background:rgba(8,8,10,0.98);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  padding:22px 22px calc(22px + env(safe-area-inset-bottom));
  display:flex; flex-direction:column;
  height:100dvh;                 /* évite la barre d'URL mobile qui rogne 100vh */
  overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  opacity:0; pointer-events:none; visibility:hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.ar-mobile.is-open { opacity:1; pointer-events:auto; visibility:visible; transition-delay:0s; }
/* les boutons flottants (z-index 9998) passaient au-dessus du menu ouvert */
body.ar-menu-open #arfx-fab { display:none !important; }
/* 14 liens à 26px ne tiennent pas sur un écran de 667 px : on adapte + on garde 44px de cible tactile */
.ar-mobile nav { font-size:clamp(17px, 5vw, 24px) !important; }
.ar-mobile nav a { padding:11px 0 !important; min-height:44px; display:flex; align-items:center; }
.ar-mobile > a[href^="tel:"] { flex-shrink:0; margin-top:24px !important; }

@media (max-width: 1100px) {
  .ar-desktop-nav { display:none !important; }
  .ar-burger { display:flex !important; }
}
@media (max-width: 640px) {
  .ar-header { padding:14px 20px !important; }
  .ar-header.is-scrolled { padding:11px 20px !important; }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.ar-foot-grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap:48px; margin-bottom:56px; }
.ar-foot-soc a { transition: border-color 0.25s, background 0.25s; }
.ar-foot-soc a.wa:hover { border-color:#25D366; background:rgba(37,211,102,0.1); }
.ar-foot-soc a.ml:hover { border-color:#d92435; background:rgba(196,22,42,0.1); }
.ar-foot-links a { transition: color 0.2s; }
.ar-foot-links a:hover { color:#fff; }

@media (max-width: 900px) {
  footer { padding-left:22px !important; padding-right:22px !important; }
  .ar-foot-grid { grid-template-columns:1fr 1fr !important; gap:32px !important; }
}
@media (max-width: 520px) {
  .ar-foot-grid { grid-template-columns:1fr !important; }
}

/* =========================================================================
   RESPONSIVE GLOBAL
   Les pages sont stylées en inline (héritage des maquettes) : on ne peut donc
   pas compter sur des classes. La stratégie mobile tient en 3 règles :
     1. TOUTE grille inline passe en 1 colonne (avant, on listait des chaînes
        exactes type "repeat(3, 1fr)" — la moindre espace en moins et la grille
        restait en 3 colonnes sur téléphone) ;
     2. les titres sont fluides (clamp) au lieu d'une taille fixe ;
     3. les règles génériques passent par :where() pour rester surchargeables
        par les composants (sinon un h2 { !important } écrase tous les h2 du blog).
   ========================================================================= */
@media (max-width: 900px) {
  /* --- Garde-fous globaux : rien ne doit dépasser en largeur --------------
     Un seul élément trop large suffit à faire dézoomer TOUTE la page sur
     mobile (le navigateur élargit le viewport pour tout faire tenir). */
  img, svg, video, iframe, table, pre { max-width:100% !important; }
  html { overflow-x: clip; }
  /* background-attachment:fixed = repaint permanent + rendu cassé sur iOS Safari */
  html { background-attachment: scroll; }

  /* --- Grilles : tout en 1 colonne, sauf exceptions ci-dessous ----------- */
  [style*="grid-template-columns"] { grid-template-columns:1fr !important; }
  /* motif récurrent "titre 320px + paragraphe" : la gouttière de 80px n'a plus de sens empilée */
  [style*="grid-template-columns: 320px 1fr"],
  [style*="grid-template-columns:320px 1fr"] { gap:22px !important; margin-bottom:36px !important; }

  /* --- Typo fluide ------------------------------------------------------- */
  :where(h1) { font-size:clamp(34px, 10vw, 48px) !important; line-height:1.04 !important; letter-spacing:-1px !important; }
  :where(h2) { font-size:clamp(30px, 9vw, 40px) !important; line-height:1.08 !important; }

  section { padding-left:22px !important; padding-right:22px !important; }
  /* évite qu'un enfant de grille/flex refuse de rétrécir sous sa taille mini */
  section > div, section > div > div { min-width:0; }

  /* --- Hero accueil ------------------------------------------------------ */
  #accueil { height:auto !important; min-height:660px !important; }
  #accueil > div:nth-of-type(1) img { object-position:center center !important; }
  #accueil > div:nth-of-type(5) { padding:150px 22px 40px !important; max-width:100% !important; }
  #accueil h1 { font-size:clamp(38px, 12vw, 54px) !important; line-height:1 !important; letter-spacing:-1px !important; margin-bottom:20px !important; max-width:100% !important; }
  #accueil p { font-size:16px !important; line-height:1.5 !important; max-width:100% !important; margin-bottom:26px !important; }
  #accueil > div:nth-of-type(5) > div:last-child > a { width:100% !important; justify-content:center !important; text-align:center !important; }
  /* Barre de raccourcis services (6e div du hero).
     ⚠ NE PAS utiliser `:last-child` ici : arfx.js injecte un <canvas> à la fin
     de #accueil, donc le dernier enfant n'est pas cette barre — c'est ce qui
     rendait toutes les règles mobiles du hero inopérantes et faisait dézoomer
     la page entière. `nth-of-type` compte les <div> et reste juste. */
  #accueil > div:nth-of-type(6) {
    position:relative !important; display:grid !important;
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    margin-top:8px !important;
  }
  #accueil > div:nth-of-type(6) > a { padding:16px 18px !important; min-width:0 !important; }
  #accueil > div:nth-of-type(6) > a > div:first-child { font-size:19px !important; }
  #accueil > div:nth-of-type(6) > a > div:last-child { font-size:11px !important; letter-spacing:0.5px !important; }

  .ar-method-line { display:none !important; }

  /* --- Composants : on réaffirme leur taille, sinon :where(h2) l'emporte -- */
  .article-body h2 { font-size:26px !important; }
  .article-brief h2 { font-size:13px !important; }
  .article-toc h2 { font-size:12px !important; }
  .article-realisations h2,
  .article-more h2,
  .article-zones h2,
  .publish-gate__locked h2 { font-size:22px !important; }

  /* --- Blog : blocs FAQ et CTA final, sans classe à l'origine, donc sans
         aucun garde-fou mobile (padding 40px + h2 32px figés) ------------- */
  .article-faq h2 { font-size:24px !important; }
  .article-cta { padding:28px 20px !important; margin-top:40px !important; }
  .article-cta h2 { font-size:24px !important; }
  .article-cta a { display:block !important; text-align:center !important; }
  .article-cta a + a { margin-top:10px !important; }

  /* --- Blog : ces classes existaient dans le HTML mais n'avaient aucune règle */
  .ac-pad { padding-left:22px !important; padding-right:22px !important; }
  .ac-hero { padding-top:130px !important; padding-bottom:40px !important; }
  .ac-hero h1 { font-size:clamp(34px, 10.5vw, 46px) !important; }
  .ac-hero p { font-size:16px !important; }

  /* --- Cibles tactiles : 44px mini (WCAG 2.5.5) -------------------------- */
  .article-toc a { display:block; padding:9px 2px; }
  .article-zones a { padding:13px 18px; }
  .article-realisations a.reno-btn { padding:14px 20px; }
  .ar-foot-soc a { width:44px !important; height:44px !important; }
  .ar-foot-links a, footer li a { display:inline-block; padding:3px 0; }
  /* fil d'Ariane : liens serrés + risque de débordement sur les noms longs */
  .ar-breadcrumb { flex-wrap:wrap !important; row-gap:2px !important; }
  .ar-breadcrumb a { padding:6px 0; }
  /* pastilles "villes autour de…" et autres chips */
  .ar-chip { min-height:44px; display:inline-flex !important; align-items:center; }

  /* grilles à garder en 2 colonnes malgré la règle globale ci-dessus */
  .sp-4stat, .ar-foot-grid { grid-template-columns:1fr 1fr !important; }

  /* carrousels : flèches et puces sous le seuil tactile */
  .ar-carousel__nav { width:44px !important; height:44px !important; font-size:22px !important; }
  /* variante 3 photos : on revient à 1 photo pleine largeur sur mobile
     (le JS repasse aussi en pas de 1 via matchMedia 900px) */
  .ar-carousel--triple .ar-carousel__slide { min-width:100%; padding:0; }
  .ar-carousel--triple .ar-carousel__slide img { border-radius:0; }
  .ar-carousel--cards .ar-carousel__slide { min-width:100%; padding:0; }
  .ar-carousel__dots { gap:12px; padding:6px 0; }
  .ar-carousel__dot { position:relative; }
  .ar-carousel__dot::before { content:""; position:absolute; inset:-16px -6px; }

  /* ======================================================================
     `bw-swipe` — rail horizontal mobile (composant BE WEB, réutilisable)
     ----------------------------------------------------------------------
     But : réduire le scroll VERTICAL. Une grille empilée devient un rail
     qu'on fait défiler du pouce. Zéro JS : `scroll-snap` est natif.
     Convention alignée sur be-web-template (.services-grid / .why-grid).

     ⚠ Le débord est le mode d'emploi. `flex-basis` < 100% laisse la carte
     suivante dépasser du bord : c'est le SEUL signal qui dit à l'utilisateur
     qu'il peut glisser. Ne jamais passer les enfants à 100%, sinon le rail
     ressemble à une carte unique et personne ne swipe.

     ⚠ Préfixe `bw-` = composant d'agence transposable tel quel sur un autre
     site. Les classes `ar-` sont, elles, spécifiques à Rapetti.

     Sélecteur doublé : la règle globale [style*="grid-template-columns"]
     plus haut a la même spécificité (0,1,0) ; on passe à (0,2,0) pour
     gagner quel que soit l'ordre des règles dans le fichier.
     ====================================================================== */
  [style*="grid-template-columns"].bw-swipe,
  .bw-swipe {
    display:flex !important;
    grid-template-columns:none !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    overflow-x:auto;
    overscroll-behavior-x:contain;   /* empêche le swipe de tirer la page */
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    /* full-bleed : annule les 22px de padding de la section pour que le rail
       file jusqu'au bord de l'écran — sinon le débord tombe dans la marge
       et l'affordance disparaît. Le padding est rendu en interne. */
    margin-left:-22px !important;
    margin-right:-22px !important;
    padding:2px 22px 14px !important;
    gap:12px !important;
  }
  .bw-swipe::-webkit-scrollbar { display:none; }

  .bw-swipe > * {
    flex:0 0 var(--bw-swipe-w, 82%);
    scroll-snap-align:start;
    min-width:0;
    /* une mosaïque pose grid-column/row: span N en inline sur ses enfants ;
       inutile en flex, mais on neutralise au cas où display:grid revienne */
    grid-column:auto !important;
    grid-row:auto !important;
  }

  /* Rail d'images : en grille, la hauteur venait de `grid-auto-rows`. En flex
     cette propriété ne s'applique plus, et les <img height:100%> n'ont donc
     plus de référence → il FAUT redonner une hauteur explicite ici. */
  .bw-swipe--media > * { height:var(--bw-swipe-h, 220px); }

  /* Variante "cartes jointives" : la grille dessinait ses séparateurs avec
     gap:1px + un fond. Écartées dans un rail, ce fond baverait entre les
     cartes — on le retire et on rend sa bordure à chaque carte. */
  .bw-swipe--boxed { background:transparent !important; border:0 !important; }
  .bw-swipe--boxed > * { border:1px solid #1c1c1f !important; border-radius:14px; }

  /* Points de progression (générés par site.js → initSwipeDots).
     Le débord de la carte suivante reste l'affordance principale, mais les
     boutons flottants occupent le bord droit : les points garantissent que
     l'utilisateur voit qu'il y a une suite même quand le débord est masqué. */
  .bw-swipe__dots {
    display:flex; justify-content:center; align-items:center;
    gap:8px; margin:2px 0 0; padding:0;
  }
  .bw-swipe__dot {
    width:7px; height:7px; padding:0; border:0; border-radius:50%;
    background:rgba(255,255,255,0.28); cursor:pointer; position:relative;
    transition:width 0.25s, background 0.25s;
  }
  .bw-swipe__dot.is-active { background:#c4162a; width:20px; border-radius:4px; }
  /* cible tactile 44px (WCAG 2.5.5) sans grossir la pastille visible */
  .bw-swipe__dot::before { content:""; position:absolute; inset:-18px -7px; }
}

/* Le JS respecte prefers-reduced-motion, le CSS l'ignorait totalement :
   hero en fondu, marquee, pulse, glow… tournaient quand même en boucle. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    /* sans delay:0, un `animation: fadeUp … 1s both` laisse le bloc invisible
       pendant tout son délai (fill-mode backwards) même à durée quasi nulle */
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 520px) {
  #accueil { min-height:600px !important; }
  #accueil > div:nth-of-type(5) { padding-top:140px !important; padding-bottom:32px !important; }
  #accueil > div:nth-of-type(5) > div:first-child { font-size:11px !important; padding:7px 13px !important; margin-bottom:22px !important; }
  #accueil > div:nth-of-type(6) > a { padding:14px 14px !important; }
  #accueil > div:nth-of-type(6) > a > div:first-child { font-size:17px !important; }
  /* pages service/ville : "Couvreur à Fexhe-le-Haut-Clocher" à 46px ne passe pas */
  .sp-hero h1 { font-size:clamp(30px, 8.6vw, 40px) !important; }
  .ap-4col, .ct-2col-form { grid-template-columns:1fr !important; }
}
