/* L'Atelier Bernard : animations et composants ajoutés en octobre 2026.
   S'appuie sur les variables de Base.css (--noir, --ivoire, --terracotta, --line…).
   Tout ce qui bouge est désactivé si le visiteur demande moins d'animations. */

:root { --ab-ease: cubic-bezier(.2, .7, .2, 1); }

/* ───── Badge garantie décennale ───── */
.deca {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 20px; padding: 9px 18px 9px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  font-size: .9rem; line-height: 1.25; text-decoration: none;
}
.deca__ic {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--noir); color: var(--ivoire);
}
.deca b { display: block; font-weight: 600; }
.deca small { display: block; color: var(--taupe-text); font-size: .8rem; }
.deca--inline { margin-top: 0; padding: 6px 14px 6px 8px; }
.deca--inline .deca__ic { width: 28px; height: 28px; }
.deca--inline .deca__ic svg { width: 16px; height: 16px; }
.site-footer__deca { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .9rem; line-height: 1.45; }
.site-footer__deca svg { flex: none; margin-top: 2px; }

/* ───── Bande « repères » : icônes, lien Philippe, barre de suivi ───── */
.proof { position: relative; }
.proof::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--terracotta), transparent) no-repeat -40% 0 / 40% 100%;
}
.proof__item { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 2px; align-items: center; position: relative; }
.proof__item .pi {
  grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); color: var(--terracotta-text);
  transition: background .35s, color .35s, border-color .35s;
}
.proof__item:hover .pi, .proof__item:focus-within .pi { background: var(--noir); color: var(--ivoire); border-color: var(--noir); }
.proof__item .pi svg { width: 22px; height: 22px; }
.proof__item strong, .proof__item > span:not(.pi) { grid-column: 2; }

.plink {
  position: relative; display: inline-block;
  text-decoration: underline; text-decoration-color: var(--terracotta);
  text-decoration-thickness: 2px; text-underline-offset: 5px; font-weight: 600;
}
.plink:hover { text-decoration-color: var(--noir); }
.plink__tip {
  position: absolute; left: 0; bottom: calc(100% + 16px); z-index: 20;
  display: flex; align-items: center; gap: 12px; white-space: nowrap; width: max-content;
  padding: 10px 16px 10px 10px; border-radius: 10px;
  background: var(--noir); color: var(--ivoire);
  font-size: .85rem; font-weight: 500; text-decoration: none;
  box-shadow: 0 14px 34px rgba(36, 33, 31, .24);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s, transform .3s var(--ab-ease);
}
.plink__tip::after {
  content: ""; position: absolute; left: 28px; top: 100%;
  border: 7px solid transparent; border-top-color: var(--noir);
}
.plink__tip img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; }
.plink:hover .plink__tip, .plink:focus-visible .plink__tip { opacity: 1; transform: none; }

.pbar { grid-column: 2; display: block; height: 3px; margin-top: 8px; border-radius: 2px; background: var(--line); overflow: hidden; }
.pbar::after { content: ""; display: block; height: 100%; width: 100%; background: var(--terracotta); transform-origin: 0 50%; }

/* ───── Services : flèche au survol, pastille « Nouveau » ───── */
.services__name::after {
  content: "\2192"; display: inline-block; margin-left: 10px; color: var(--terracotta-text);
  opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .35s var(--ab-ease);
}
.services a:hover .services__name::after, .services a:focus-visible .services__name::after { opacity: 1; transform: none; }
.tagnew {
  display: inline-block; margin-left: 12px; padding: 2px 9px; vertical-align: middle;
  border-radius: 4px; background: var(--terracotta-text); color: var(--ivoire);
  font: 600 .68rem/1.5 var(--font-main); letter-spacing: .08em; text-transform: uppercase;
}

/* ───── Avant / après ───── */
.ba { position: relative; }
.ba__tag {
  position: absolute; z-index: 2; top: 12px; left: 12px; padding: 4px 10px; border-radius: 4px;
  background: var(--ivoire); color: var(--noir); font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.ba__tag--apres { background: var(--noir); color: var(--ivoire); }
.bapair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin: 0 0 clamp(36px, 5vw, 64px); }
.bapair figure { margin: 0; position: relative; }
.bapair picture, .bapair img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--greige); }
.bapair figcaption { color: var(--taupe-text); margin-top: 10px; font-size: .88rem; }
.bapair h3 { grid-column: 1 / -1; margin: 0; font-size: 1.25rem; font-weight: 500; letter-spacing: -.015em; }
.bapair h3 small { display: block; margin-top: 2px; color: var(--taupe-text); font: 400 .92rem/1.4 var(--font-main); letter-spacing: 0; }
@media (width <= 560px) { .bapair { gap: 12px; } .ba__tag { top: 8px; left: 8px; font-size: .7rem; } }

/* Rideau avant/après piloté par le défilement (navigateurs compatibles) */
.wipe { margin: 0 0 clamp(40px, 6vw, 80px); }
.wipe__cap { margin: 14px 0 0; color: var(--taupe-text); font-size: .9rem; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .wipe--on .wipe__stage { position: relative; max-width: 560px; margin-inline: auto; }
    .wipe--on .bapair { display: block; margin: 0; position: relative; }
    .wipe--on .bapair figure + figure { position: absolute; inset: 0; }
    .wipe--on .bapair figure + figure picture { display: block; height: 100%; }
    .wipe--on .bapair figure + figure img { height: 100%; object-fit: cover; }
    .wipe--on .bapair figure + figure { animation: ab-wipe linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; }
    .wipe--on .bapair figure:first-child figcaption, .wipe--on .bapair figure + figure figcaption { display: none; }
    .wipe--on .bapair figure + figure::before { content: ""; position: absolute; z-index: 3; inset: 0 auto 0 0; width: 3px; background: var(--ivoire); box-shadow: 0 0 0 1px rgba(36, 33, 31, .25); left: 0; animation: ab-wipe-line linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; }
  }
}
@keyframes ab-wipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes ab-wipe-line { from { left: 100%; } to { left: 0; } }

/* ───── Vidéo du chantier ───── */
.pvid { display: grid; gap: 24px; align-items: center; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
.pvid video { width: 100%; height: auto; border-radius: 8px; background: var(--noir); aspect-ratio: 9 / 16; }
@media (width <= 760px) { .pvid { grid-template-columns: 1fr; } .pvid video { max-width: 360px; } }

/* ───── Animations (uniquement si le visiteur l'accepte) ───── */
@media (prefers-reduced-motion: no-preference) {
  .proof::before { animation: ab-sweep 2.6s .5s var(--ab-ease) 1 both; }
  .proof__item { animation: ab-rise .8s var(--ab-ease) both; }
  .proof__item:nth-child(1) { animation-delay: .1s; }
  .proof__item:nth-child(2) { animation-delay: .25s; }
  .proof__item:nth-child(3) { animation-delay: .4s; }
  .proof__item:nth-child(4) { animation-delay: .55s; }
  .proof__item .pi svg * { stroke-dasharray: 200; animation: ab-draw 1.1s .6s var(--ab-ease) both; }
  .pbar::after { animation: ab-fill 2.2s .9s var(--ab-ease) both; }

  .deca { animation: ab-rise .8s .55s var(--ab-ease) both; }
  .deca .ck { stroke-dasharray: 24; animation: ab-draw .9s 1.1s var(--ab-ease) both; }
  .hero__figure { overflow: hidden; border-radius: 6px; }
  .hero__figure img { animation: ab-zoom 2.2s var(--ab-ease) both; }
  .count { font-variant-numeric: tabular-nums; }

  .btn { transition: transform .25s var(--ab-ease), background-color .25s, color .25s, border-color .25s; }
  .btn:hover { transform: translateY(-2px); }

  @supports (animation-timeline: view()) {
    .section__head h2, .intro h2, .aboutteaser h2, .sps__head h2 {
      animation: ab-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
    }
  }
}
@keyframes ab-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ab-sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@keyframes ab-draw { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
@keyframes ab-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ab-zoom { from { transform: scale(1.07); } to { transform: none; } }

@media (width <= 1000px) {
  .proof__item { padding: 18px 16px; grid-template-columns: 38px 1fr; column-gap: 12px; }
  .proof__item .pi { width: 38px; height: 38px; }
  .plink__tip { display: none; }
}
@media (hover: none) { .plink__tip { display: none; } }

/* ───── Page porte cochère : même en-tête que les autres pages de service ───── */
.sp--pc .sphero__fig { aspect-ratio: 4 / 5; max-height: 640px; }
@media (width >= 900px) {
  .sp--pc .sphero__txt { grid-area: 2 / 1 / auto / span 7; align-self: center; }
  .sp--pc .sphero__fig { grid-area: 2 / 8 / auto / span 5; }
}
@media (width >= 900px) {
  .sp--pc .spcon { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; column-gap: clamp(32px, 6vw, 88px); }
  .sp--pc .spcon__fig { position: sticky; top: calc(var(--header-h) + 24px); }
}
