:root{
  --accent-1:#A3CFC0;
  --accent-2:#E099B1;
  --accent-grad: linear-gradient(90deg,var(--accent-1),var(--accent-2));
  --bg-1:#fafafa;
  --bg-2:#f3f6f4;
  --text:#1f2724;
  --muted:#6b7680;
  --topbar-space:92px; 
  --touch-min:44px;
  --content-max:1150px;

  /* micro motion */
  --ease-spring: cubic-bezier(.22,.9,.3,1);
  --glass: rgba(255,255,255,0.92);

  /* ultra light accents */
  --accent-1-ultra-light: rgba(163, 207, 192, 0.2);
  --accent-2-ultra-light: rgba(224, 153, 177, 0.2);
}

/* Reset & base */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{
  height:100%;
  font-family: 'ITCCheltenham LT BookCond', system-ui, -apple-system, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,var(--bg-1),var(--bg-2));
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
a{color:inherit;text-decoration:none}

body{padding-top:var(--topbar-space);-webkit-text-size-adjust:100%;}
main{
  max-width:var(--content-max);
  margin:0 auto;
  padding:22px 18px 120px;
  width:100%;
  overflow: visible; 
}

/* Page label above arrows (kept) */
.page-label{
  position:absolute;
  top:-36px;
  left:50%;
  transform:translateX(-50%);
  white-space:nowrap;
  font-size:0.9rem;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,0.96);
  color:var(--text);
  box-shadow:0 10px 28px rgba(0,0,0,0.06);
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
  transform-origin: bottom center;
}
.page-arrow:hover .page-label{ opacity:1; transform:translateX(-50%) translateY(-6px); }

.top-bar{
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1600;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding:12px 18px;
  border-radius:14px;
  background:var(--glass);
  box-shadow:0 10px 30px rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(31,39,36,0.06);
  transform-origin:center;
  transition: transform .28s var(--ease-spring), box-shadow .28s ease;

  overflow: visible;
}
.top-bar:focus-within,
.top-bar:hover { transform: translateY(-2px); box-shadow:0 20px 40px rgba(0,0,0,0.09); }
.top-left{ display:flex; gap:10px; align-items:center; min-width:0; }

/* Retour button (desktop) */
.btn-retour{
  display:inline-flex; align-items:center; gap:8px; padding:10px 14px;
  border-radius:28px; background:transparent; border:1px solid rgba(31,39,36,0.06);
  font-weight:700; color:var(--text); line-height:1; min-height:var(--touch-min);
  text-decoration:none; transition: transform .18s var(--ease-spring), box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-retour:hover,
.btn-retour:focus{
  background: var(--accent-grad);
  color:#fff;
  transform:translateY(-4px) scale(1.02);
  box-shadow:0 14px 40px rgba(31,39,36,0.08), 0 6px 18px rgba(163,207,192,0.08);
  outline: none;
}
.btn-retour:focus{ box-shadow:0 14px 40px rgba(31,39,36,0.1), 0 0 0 4px rgba(163,207,192,0.12); }

/* TAB BUTTONS */
.tab-buttons{
  display:flex; gap:8px; align-items:center; overflow-x:auto; overflow-y: visible;
  -webkit-overflow-scrolling:touch; padding-bottom:2px; padding-top:6px;
}
.tab-buttons::-webkit-scrollbar{ display:none; }

/* tab button core style */
.tab-buttons button{
  position:relative;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(31,39,36,0.06);
  background:transparent;
  font-weight:700;
  cursor:pointer;
  color:var(--text);
  transition: transform .14s var(--ease-spring), box-shadow .14s ease, background .14s ease, color .14s ease;
  min-height:var(--touch-min);
  white-space:nowrap;
  flex:0 0 auto;
  overflow:visible;
  isolation:isolate;
  --tab-shadow: 0 10px 28px rgba(0,0,0,0.04);
}

.tab-buttons button::after{
  content:"";
  position:absolute;
  bottom: -6px;
  left: 12%;
  width: 76%;
  height: 4px;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(163,207,192,0.85), rgba(224,153,177,0.85));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease-spring), opacity .18s ease;
  opacity: 0;
  pointer-events:none;
}

/* hover shows active-like state */
.tab-buttons button:hover,
.tab-buttons button:focus{
  background: linear-gradient(90deg, rgba(163,207,192,0.16), rgba(224,153,177,0.12));
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: var(--tab-shadow);
  outline: none;
}
.tab-buttons button:hover::after,
.tab-buttons button:focus::after{
  transform: scaleX(1);
  opacity:1;
}

.tab-buttons button[data-active="true"]{
  background: var(--accent-grad);
  color:#fff;
  box-shadow:0 18px 46px rgba(163,207,192,0.14);
  transform:translateY(-4px);
  border-color: transparent;
}
.tab-buttons button[data-active="true"]::after{
  transform: scaleX(1);
  opacity:1;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  height: 3px;
  left: 10%;
  width: 80%;
}


.tab-buttons button:focus-visible{
  box-shadow:0 6px 30px rgba(0,0,0,0.06), 0 0 0 6px rgba(163,207,192,0.12);
}

/* social/icon */
.social-icon img{ width:44px;height:44px;border-radius:10px;display:block }

/* layout */
.tabs-viewport{ position:relative; overflow:hidden; margin-top:6px; border-radius:12px; }
.tabs-wrapper{ display:flex; width:100%; transition: transform .48s cubic-bezier(.22,.9,.3,1); will-change:transform; }

/* --- IMPORTANT CHANGE: center images on desktop ---
   The only change from original: align-items set to center to ensure .prestation-images centers visually
*/
.tab{
  width:100%; flex:0 0 100%; padding:28px 12px; min-height:56vh;
  display:flex; gap:28px; align-items:center; justify-content:space-between; position:relative;
  opacity:1; transition: opacity .36s ease, transform .36s var(--ease-spring);
}

/* prestation text */
.prestation-text{ flex:1 1 44%; min-width:260px; z-index:10; }
.prestation-text h2{ margin-bottom:8px; font-size:clamp(1.2rem,3.8vw,1.9rem); color:#2f3b36; letter-spacing:1.4px; text-transform:uppercase }
.prestation-text p{ color:var(--muted); line-height:1.45; max-width:60ch }

/* PREVIEW: static blurred preview */
.prestation-images{ flex:1 1 52%; min-width:300px; position:relative; display:flex; align-items:center; justify-content:center; }
.stack-wrap{
  position:relative;
  width:100%;
  max-width:560px;
  height:320px;
  margin:0 auto;
  overflow:hidden; /* <- important : empêche le débordement qui provoque un scroll */
  background:linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  border-radius:14px;
  padding:12px;
  box-shadow:0 6px 30px rgba(0,0,0,0.04);
  transition: transform .32s var(--ease-spring), box-shadow .32s ease;
}
.stack-wrap:hover{ transform: translateY(-6px); box-shadow:0 30px 90px rgba(0,0,0,0.08); }

/* images stack */
.stack-img{
  position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%);

  display:block;
  width:auto;
  height:auto;


  max-width: 90%;
  max-height: 90%; 


  object-fit: contain;

  border-radius:10px;
  transition: transform 320ms var(--ease-spring), opacity 300ms ease, filter 300ms ease;
  user-select:none; -webkit-user-drag:none;
  will-change: transform, opacity, filter;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* front / back styling */
.stack-img.front{
  transform: translate(-50%,-50%) scale(1);
  opacity:1; filter:none; box-shadow:0 28px 80px rgba(0,0,0,0.45); z-index:30;
  transition-duration:360ms;
}
.stack-img.back-left{
  transform: translate(calc(-50% - 120px), -50%) rotate(-6deg) scale(.86);
  filter: blur(4px) contrast(.96); opacity:.62; z-index:20;
}
.stack-img.back-right{
  transform: translate(calc(-50% + 120px), -50%) rotate(6deg) scale(.86);
  filter: blur(4px) contrast(.96); opacity:.62; z-index:20;
}
.stack-img.hidden{ opacity:0; transform:translate(-50%,-50%) scale(.8); z-index:10; filter:blur(6px); }

/* subtle hover parallax for stack images */
.stack-wrap:hover .stack-img.front{ transform: translate(-50%,-48%) scale(1.02); box-shadow:0 40px 100px rgba(0,0,0,0.5); }
.stack-wrap:hover .stack-img.back-left{ transform: translate(calc(-50% - 140px), -52%) rotate(-8deg) scale(.88); opacity:.72; filter: blur(3px); }
.stack-wrap:hover .stack-img.back-right{ transform: translate(calc(-50% + 140px), -48%) rotate(8deg) scale(.88); opacity:.72; filter: blur(3px); }

/* gallery open (bouton) */
.gallery-open {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 60;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-weight: 700;
  backdrop-filter: blur(4px);
  animation: pulse-attention 2.5s infinite;
  transition: transform .18s var(--ease-spring), box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.stack-wrap:hover .gallery-open {
  animation: pulse-attention-heavy 1.2s infinite ease-in-out;
  background: var(--accent-grad);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.gallery-open:hover {
  animation: none;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 18px 46px rgba(0,0,0,0.4);
  background: rgba(0, 0, 0, 0.9);
}

@keyframes pulse-attention-heavy {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(163,207,192,0.6); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 15px rgba(224,153,177,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(163,207,192,0); }
}

/* gallery modal */
.gallery-modal{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:2500;
  background: rgba(6,6,6,0.86); padding:16px;
}
.gallery-modal.active{ display:flex; }

.gallery-inner {
  width: 100%;
  max-width: 1100px; 
  min-width: 300px;
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
  margin: auto;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 10px 0;
}

.gallery-grid img {
  height: auto;
  max-height: 300px;
  width: auto;
  flex: 0 1 calc(33.333% - 20px);
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #f9f9f9;
}
.gallery-grid img:hover { transform: scale(1.05); box-shadow: 0 10px 25px rgba(0,0,0,0.2); z-index:10; }

.gallery-close{ position:absolute; right:22px; top:18px; background:transparent; border:0; color:#fff; font-size:1.6rem; cursor:pointer; }

.lightbox{ display:none; position:fixed; inset:0; background: rgba(0,0,0,0.92); z-index:3000; align-items:center; justify-content:center; padding:18px; }
.lightbox.active{ display:flex; }
.lightbox img{ max-width:95%; max-height:86vh; border-radius:8px; object-fit:contain; }
.lightbox .close-btn{ position:absolute; top:16px; right:18px; font-size:1.6rem; color:#fff; background:transparent; border:0; cursor:pointer; }

/* contact CTA */
.contact-section{ text-align:center; margin-top:26px; }
.btn-contact{
  display:inline-block; padding:14px 28px; border-radius:999px;
  background: var(--accent-grad); color:#fff; font-weight:800; box-shadow:0 14px 40px rgba(163,207,192,0.12); text-decoration:none;
  transition: transform .22s var(--ease-spring), box-shadow .22s ease;
  position:relative;
  overflow:hidden;
  top: -110px !important;
}
.btn-contact::after{
  content:"";
  position:absolute; inset:0; background: linear-gradient(120deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)); opacity:0;
  transform: translateX(-30%); transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
}
.btn-contact:hover{ transform:translateY(-6px); box-shadow:0 24px 70px rgba(0,0,0,0.16); }
.btn-contact:hover::after{ opacity:1; transform: translateX(30%); }

/* PAGE NAVIGATION ARROWS */
.page-nav{ position: fixed; inset: 0; z-index: 1400; pointer-events: none; }
.page-arrow{
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  pointer-events: auto;
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: linear-gradient(145deg,#ffffff,#f0f0f0);
  box-shadow: 0 12px 30px rgba(0,0,0,.22), inset 0 0 0 1px rgba(0,0,0,.06);
  font-size: 2.4rem; font-weight: 600; color: #2f3b36;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .25s var(--ease-spring), box-shadow .25s ease, opacity .2s ease;
}
.page-arrow.prev{ left: 46px; }
.page-arrow.next{ right: 46px; }
.page-arrow:hover{ box-shadow: 0 22px 60px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.08); }
.page-arrow.next:hover{ transform: translateY(-50%) translateX(6px) scale(1.08); }
.page-arrow.prev:hover{ transform: translateY(-50%) translateX(-6px) scale(1.08); }
.page-arrow:active{ transform: translateY(-50%) scale(0.95); }
.page-arrow.hidden{ opacity: 0; pointer-events: none; transform: translateY(-50%) scale(0.8); }

:focus-visible{ outline: 3px solid rgba(163,207,192,0.18); outline-offset: 3px; }

/* small polish & motion respect */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}


.right-actions { display:flex; align-items:center; gap:10px; }

@keyframes jump-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); } /* Le bouton monte de 6px */
}


@keyframes border-glow {
  0% { border-color: var(--accent-1); box-shadow: 0 0 5px rgba(var(--accent-1-rgb), 0.2); }
  50% { border-color: #ff00ea; box-shadow: 0 0 15px rgba(255, 0, 234, 0.4); } /* Change vers une couleur vive */
  100% { border-color: var(--accent-1); box-shadow: 0 0 5px rgba(var(--accent-1-rgb), 0.2); }
}


.top-contact-btn {
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  padding: 8px 16px; 
  border-radius: 999px;
  background: transparent; 
  border: 1.5px solid var(--accent-1); 
  color: var(--text); 
  font-weight: 700;
  min-height: var(--touch-min);
  cursor: pointer;
  position: relative;
  overflow: hidden;


  transition: 
    transform .3s var(--ease-spring), 
    box-shadow .3s ease, 
    background .3s ease, 
    color .3s ease,
    border-color .3s ease;


  animation: 
    jump-soft 2s infinite ease-in-out, 
    border-glow 3s infinite ease-in-out;
  
  will-change: transform, border-color; 
}

.top-contact-btn:hover {
  background: var(--accent-1); 
  color: #ffffff; 
  transform: scale(1.05); 
  animation-play-state: paused;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-1);
}


.top-contact-btn:active {
  transform: scale(0.95);
}

.home-overlay{ position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: #ffffff; z-index: 1200; color: #222; overflow: hidden; }
.home-overlay.active { display: flex; }
.home-bg{ position: absolute; inset: 0; overflow: hidden; filter: blur(10px) saturate(110%); opacity: 0.08; pointer-events: none; }
.home-bg .bg-img{ position:absolute; will-change:transform,opacity; pointer-events:none; opacity:.9; transition: transform 6s ease-in-out, opacity 6s ease-in-out; animation: floatBg 18s linear infinite; }
@keyframes floatBg { 0% { transform: translateY(0) rotate(0deg); opacity: .9 } 50% { transform: translateY(-8%) rotate(2deg); opacity: .85 } 100% { transform: translateY(0) rotate(0deg); opacity: .9 } }
.home-content{ position:relative; z-index:2; max-width:900px; padding:60px 40px; text-align:center; overflow:hidden; border-radius:32px; background: rgba(255,255,255,0.05); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 40px rgba(0,0,0,0.04); }
.bg-glow-1, .bg-glow-2 { position:absolute; width:500px; height:500px; filter: blur(120px); z-index:-1; opacity:0.6; border-radius:50%; pointer-events:none; }
.bg-glow-1{ background: var(--accent-1-ultra-light); top:-200px; left:-150px; animation: float-glow 10s infinite alternate ease-in-out; }
.bg-glow-2{ background: var(--accent-2-ultra-light); bottom:-200px; right:-150px; animation: float-glow 15s infinite alternate-reverse ease-in-out; }
@keyframes float-glow { 0% { transform: translate(0,0) scale(1) rotate(0deg); } 100% { transform: translate(80px,50px) scale(1.3) rotate(10deg); } }

/* btn-retour2 (hidden desktop, visible mobile) kept */
.btn-retour2 { display:none; align-items:center; gap:8px; padding:10px 14px; border-radius:28px; background:transparent; border:1px solid rgba(31,39,36,0.06); font-weight:700; color:var(--text); line-height:1; min-height:var(--touch-min); text-decoration:none; transition: transform .18s var(--ease-spring), box-shadow .18s ease, background .18s ease, color .18s ease; z-index:1700; pointer-events:auto; }
.btn-retour2:hover, .btn-retour2:focus { background: var(--accent-grad); color:#fff; transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 40px rgba(31,39,36,0.08), 0 6px 18px rgba(163,207,192,0.08); outline:none; }
.btn-retour2:focus{ box-shadow:0 14px 40px rgba(31,39,36,0.1), 0 0 0 4px rgba(163,207,192,0.12); }

@media (max-width:700px) {
  .top-bar::before,
  .top-bar::after {
    content: none !important;
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    background: none !important;
  }

  .top-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    background: rgba(255,255,255,0.98);
    box-shadow: none;

    top: -52px;
    padding: 6px 12px;
    margin: 0;
    pointer-events: auto;
    position: relative;
    z-index: 1650;
  }


  .top-bar .right-actions { display: none !important; }

  .top-bar .btn-retour { display: none !important; pointer-events: none !important; }

  .tab-buttons {
    position: fixed;
    top: calc(56px + 8px);   
    left: 8px;
    right: 8px;
    z-index: 1600;
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.08);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
  }

  /* larger touch targets */
  .tab-buttons button {
    padding: 12px 16px;
    min-height: 48px;
    font-size: 0.95rem;
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.06);
  }


  .page-label { display: none; }


  .page-arrow { display:block !important; pointer-events:auto; z-index:1550; }
  .page-arrow.prev { left: 8px; top: 60%; }
  .page-arrow.next { right: 8px; top: 60%; }


  body { padding-top: 56px !important; } 


  .stack-wrap{ max-width:360px; height:260px; padding:10px; border-radius:12px; position:relative; transition:all .4s ease-in-out; }
  .stack-img.back-left,
  .stack-img.back-right { opacity:0; visibility:hidden; transform: translate(-50%,-50%) scale(.8); }
  .stack-img.front{ transform: translate(-50%,-50%) scale(1); box-shadow:0 18px 40px rgba(0,0,0,0.35); z-index:10; }

  .tab { flex-direction:column; gap:14px; padding:18px 10px; min-height:auto; align-items:stretch; }


  .gallery-grid img { flex: 0 1 calc(50% - 16px); max-height:220px; width:auto; }
  .gallery-inner { padding:16px; max-width: 96%; min-width: auto; border-radius:12px; }

  .btn-contact{ padding:12px 20px; font-size:0.95rem; }
  .right-actions { gap:8px; }
  .bg-glow-1, .bg-glow-2 { display: none; }

  /* small tweak for gallery button position on mobile */
  .gallery-open { right: 32px; top: 10px; padding:8px 12px; font-size:0.95rem; background: var(--accent-grad); color:#fff; border-color: rgba(255,255,255,0.5); animation: pulse-attention-heavy 1.2s infinite ease-in-out; }
  .btn-retour2 { display:inline-flex; position: fixed; left:12px; bottom:96px; padding:12px 16px; min-height:48px; z-index:1700; background: rgba(255,255,255,0.96); box-shadow:0 12px 36px rgba(0,0,0,0.08); }

  .tab-buttons { z-index: 1600; }
}


@media (max-width:480px) {
  main{ padding:16px 12px 80px; }
  .stack-wrap{ max-width:320px; height:220px; padding:8px; }
  .stack-img{ max-width:95%; max-height:85%; }
  .gallery-grid{ gap:12px; }
  .gallery-grid img{ flex: 0 1 calc(100% - 12px); max-height:180px; width:100%; }
  .tab-buttons{ gap:6px; padding-top:4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (max-width: 700px){
  .top-bar{
    top: -110px !important;
  }
}
