/* Services */
.page-head{padding-top:110px}

.page-services .header.is-nav-open{
  z-index:90;
}

.service-card{
  padding:24px;
  perspective:1500px;
  min-height:390px;
  background:transparent;
  border:none;
  overflow:visible;
  transition: padding 0.4s cubic-bezier(.22,1,.36,1);
}

.service-card:hover {
  padding: 0;
}

.service-card-flip{
  perspective:1500px;
}

.card-inner{
  position:relative;
  width:100%;
  height:100%;
  transform-style:preserve-3d;
  transition: transform 1.05s cubic-bezier(.22,1,.36,1);
}

@media (hover:hover){
  .service-card-flip:hover .card-inner{
    transform:rotateY(180deg);
  }
}

.card-face{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  width:100%;
  height:100%;
  top:0;
  left:0;
  padding:24px;
  border-radius:28px;
  overflow:hidden;
  background:
    radial-gradient(120% 90% at 15% 10%, rgba(198,167,94,.08), transparent 100%),
    linear-gradient(180deg, rgba(15,15,15,.88), rgba(10,10,10,.94));
  border:1px solid rgba(198,167,94,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 16px 40px rgba(0,0,0,.22);

  -webkit-backface-visibility:hidden;
  backface-visibility:hidden;
  transform-style:preserve-3d;
  will-change:transform;
}

.card-front{
  transform:rotateY(0deg) translateZ(1px);
  gap:0;
}

.card-back{
  transform:rotateY(180deg) translateZ(1px);
  justify-content:center;
}

.card-back .h3,
.card-back .small{
  max-width:100%;
}

.service-card__toggle{
  display:none;
  align-self:flex-end;
  min-height:38px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(198,167,94,.35);
  background:rgba(198,167,94,.10);
  color:rgba(255,255,255,.92);
  cursor:pointer;
  font:inherit;
  margin-bottom:14px;
}

.service-card__toggle--back{
  margin-bottom:18px;
}

.service-card .icon{
  width:44px;
  height:44px;
  border-radius:16px;
  border:1px solid rgba(198,167,94,.35);
  display:grid;
  place-items:center;
  background: rgba(198,167,94,.08);
  margin-bottom:18px;
  flex:0 0 auto;
}

.service-card .icon svg{
  width:22px;
  height:22px;
  stroke:var(--gold);
}

.service-card .h3{
  margin:0 0 12px;
}

.service-card .small{
  margin:0;
}

.service-card__divider{
  width:56px;
  height:1px;
  margin:0 0 18px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(198,167,94,.95), rgba(198,167,94,.22));
  box-shadow:0 0 12px rgba(198,167,94,.14);
}

.service-card__intro{
  max-width:28ch;
  color:rgba(255,255,255,.84);
  line-height:1.75;
}

.service-card__price{
  margin-top:auto;
  padding-top:28px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}

.service-card__price-label{
  font-size:.74rem;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:rgba(198,167,94,.78);
}

.service-card__price strong{
  font-family:'Cinzel', serif;
  font-size:clamp(1.45rem, 2vw, 1.9rem);
  line-height:1.05;
  font-weight:600;
  color:rgba(255,248,233,.98);
}

.service-card .card-back-content .small{
  line-height:1.75;
  color:rgba(255,255,255,.84);
}

.service-card .card-back-list{
  margin:18px 0 0;
  padding-left:18px;
  display:grid;
  gap:10px;
}

.service-card .card-back-list li{
  padding-left:4px;
  line-height:1.55;
  color:rgba(255,255,255,.88);
}

.process{
  margin-top:22px;
}

.step{padding:16px}

.step .n{
  font-family:'Cinzel', serif;
  color:var(--gold-2);
  letter-spacing:.18em;
}

@media (max-width: 900px){
  .service-card,
  .card-inner{
    height:340px;
    min-height:340px;
  }

  .card-face{
    padding:22px;
  }
}

@media (max-width: 768px), (hover: none), (pointer: coarse){
  .service-card{
    perspective:1400px;
    min-height:clamp(360px, 88vw, 470px);
    padding:0;
    touch-action:pan-y pinch-zoom;
    pointer-events:none;
  }

  .card-inner{
    height:clamp(360px, 88vw, 470px);
    min-height:clamp(360px, 88vw, 470px);
    transform-style:preserve-3d;
    transition:transform .82s cubic-bezier(.22,1,.36,1);
    display:block;
    touch-action:pan-y pinch-zoom;
    pointer-events:none;
  }

  .card-face{
    position:absolute;
    inset:0;
    height:100%;
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
    touch-action:pan-y pinch-zoom;
    pointer-events:none;
  }

  .service-card:hover{
    padding:0;
  }

  .service-card-flip:hover .card-inner{
    transform:none;
  }

  .card-front{
    transform:rotateY(0deg) translateZ(1px);
  }

  .card-back{
    transform:rotateY(180deg);
    pointer-events:none;
  }

  .page-services .service-card.is-flipped .card-inner,
  .page-services .service-card.is-mobile-flipped .card-inner{
    transform:rotateY(180deg) !important;
  }

  .service-card__toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    touch-action:manipulation;
    pointer-events:auto;
  }

  .service-card .card-front .service-card__toggle{
    pointer-events:auto;
  }

  .service-card .card-front .icon,
  .service-card .card-front .h3,
  .service-card .card-front .small,
  .service-card .card-front .service-card__divider,
  .service-card .card-front .service-card__intro,
  .service-card .card-front .service-card__price,
  .service-card .card-front .service-card__price-label,
  .service-card .card-front .service-card__price strong{
    pointer-events:none;
  }

  .service-card .card-back .service-card__toggle{
    pointer-events:none;
  }

  .card-face{
    padding:20px;
  }

  .service-card .icon{
    margin-bottom:16px;
  }

  .service-card .h3{
    margin-bottom:10px;
  }

  .service-card__divider{
    width:48px;
    margin-bottom:16px;
  }

  .service-card__intro{
    max-width:none;
    line-height:1.68;
  }

  .service-card__price{
    padding-top:24px;
  }

  .service-card__price strong{
    font-size:1.55rem;
  }

  .service-card .card-back-content{
    flex:1 1 auto;
    min-height:0;
    overflow:hidden;
    max-height:none;
    padding-right:8px;
    -webkit-overflow-scrolling:touch;
    pointer-events:none;
  }

  .page-services .service-card.is-flipped,
  .page-services .service-card.is-mobile-flipped{
    pointer-events:auto;
  }

  .page-services .service-card.is-flipped .card-inner,
  .page-services .service-card.is-mobile-flipped .card-inner{
    pointer-events:auto;
  }

  .page-services .service-card.is-flipped .card-back,
  .page-services .service-card.is-mobile-flipped .card-back{
    pointer-events:auto;
  }

  .page-services .service-card.is-flipped .card-back .service-card__toggle,
  .page-services .service-card.is-mobile-flipped .card-back .service-card__toggle,
  .page-services .service-card.is-flipped .card-back-content,
  .page-services .service-card.is-mobile-flipped .card-back-content{
    overflow-y:auto;
    overflow-x:hidden;
    pointer-events:auto;
  }
}

/* Fix rendu texte pendant le flip retour */
.card-face .h3,
.card-face .small,
.card-face .icon,
.card-face .icon svg,
.service-card .card-back-content,
.service-card .card-back-list,
.service-card .card-back-list li{
  -webkit-backface-visibility:hidden;
  backface-visibility:hidden;
  transform:translateZ(0);
  will-change:transform;
}

.service-card .card-back{
  justify-content:flex-start;
  overflow:hidden;
  padding-right:10px;
}

.service-card .card-back-content{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  padding-right:4px;
  -webkit-overflow-scrolling:touch;
}

/* Scroll actif seulement au hover */
@media (hover:hover){
  .service-card:hover .card-back-content{
    overflow-y:auto;
  }
}

/* Scrollbar fine et arrondie */
.service-card .card-back-content::-webkit-scrollbar{
  width:6px;
}

.service-card .card-back-content::-webkit-scrollbar-track{
  background:transparent;
  border-radius:999px;
}

.service-card .card-back-content::-webkit-scrollbar-thumb{
  background:rgba(198,167,94,.55);
  border-radius:999px;
  border:1px solid transparent;
  background-clip:padding-box;
}

/* Firefox */
.service-card .card-back-content{
  scrollbar-width:thin;
  scrollbar-color:rgba(198,167,94,.55) transparent;
}

@media (max-width: 768px), (hover: none), (pointer: coarse){
  .page-services .nav-overlay{
    z-index:91;
  }

  .page-services .nav-drawer{
    z-index:92;
  }

  .service-card .card-back{
    justify-content:flex-start;
  }
}

@media (max-width: 480px), ((hover: none) and (pointer: coarse) and (max-width: 640px)){
  .service-card{
    min-height:400px;
  }

  .card-inner{
    height:400px;
    min-height:400px;
  }

  .card-face{
    padding:18px;
    border-radius:24px;
  }

  .service-card__price{
    padding-top:22px;
    gap:4px;
  }

  .service-card__price-label{
    font-size:.68rem;
    letter-spacing:.24em;
  }

  .service-card__price strong{
    font-size:1.42rem;
  }

  .service-card .card-back-list{
    gap:9px;
    margin-top:16px;
  }

  .service-card__divider{
    width:44px;
    margin-bottom:14px;
  }
}
