/* ===== KURMA PARTNERS — SHARED CSS ===== */

/* ===== RESET & CUSTOM PROPERTIES ===== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
:root{
  --white:#fff;--black:#000;--text:#0D0D0D;--dark:#333;--gray:#888;
  --gray-lt:rgba(0,0,0,.12);--gray-rule:rgba(0,0,0,.1);
  --plum:#97175A;--plum-deep:#6B0F3F;--plum-dark:#3D0926;
  --plum-light:#B8437A;--plum-pale:#D4789F;--plum-wash:rgba(151,23,90,.05);
  --sand:#F3EDE7;--cream:#FAF8F5;
  --grad:linear-gradient(135deg,#97175A 0%,#C4384A 35%,#E8652E 60%,#D4A039 100%);
  --font:'DM Sans',Helvetica Neue,helvetica,arial,sans-serif;
  --display:'Playfair Display',Georgia,serif;
  --px:clamp(3rem,6vw,6rem);
  --ease:cubic-bezier(.16,1.08,.38,.98);
  --ease-in:cubic-bezier(.77,0,.175,1);
}

/* ===== BASE ===== */
html{scroll-behavior:smooth;font-size:clamp(14px,1vw,16px);scroll-padding-top:80px}
body{font-family:var(--font);font-weight:400;font-size:1rem;color:var(--text);background:var(--white);line-height:1.55;overflow-x:clip;-webkit-font-smoothing:antialiased;opacity:0;transition:opacity .7s ease-in}
body.loaded{opacity:1}
body.bg-sand{background:var(--sand)}
body.bg-white{background:var(--white)}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
ul{list-style:none}
button{border:none;background:none;cursor:pointer;font:inherit;color:inherit}

/* ===== HEADER ===== */
.hdr{position:fixed;top:0;left:0;right:0;z-index:100;background:var(--white);transform:translateY(-100%);transition:transform .8s var(--ease-in);overflow:visible}
.hdr.vis{transform:translateY(0)}
.hdr.hdr--hide{transform:translateY(-100%)}
.hdr-in{position:relative;display:flex;align-items:center;justify-content:space-between;padding:1rem var(--px);transition:padding .4s var(--ease)}
.hdr.scrolled .hdr-in{padding:0 var(--px);height:70px}
.hdr.scrolled .hdr-logo{display:flex;align-items:center;height:100%}
.hdr.scrolled .hdr-logo img{height:60px}
.hdr-logo img{height:140px;transition:height .4s var(--ease)}
.hdr-nav{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:2.4rem}
.hdr-nav a{font-size:.85rem;font-weight:600;letter-spacing:.01em;position:relative;padding-bottom:4px;transform-origin:center bottom;transition:transform .25s var(--ease),opacity .25s,color .3s;will-change:transform}
.hdr-nav a::after{display:none}
.nav-bar{position:absolute;height:2px;background:var(--plum);border-radius:1px;pointer-events:none;transition:left .4s var(--ease),width .4s var(--ease),opacity .3s;opacity:0;will-change:left,width}
.hdr-strat{position:relative;display:inline-flex;align-items:center;padding-bottom:30px;margin-bottom:-30px}
.hdr-strat-trigger{cursor:pointer}
.hdr-strat.active .hdr-strat-trigger{color:var(--plum)}
.mega{position:absolute;left:50%;transform:translateX(-50%);background:var(--white);overflow:hidden;max-height:0;opacity:1;pointer-events:none;z-index:99;box-shadow:0 8px 24px rgba(0,0,0,.06);transition:max-height .5s var(--ease) .25s,top .4s var(--ease);padding:0;min-width:580px}
.mega::after{content:'';position:absolute;top:-40px;left:-20px;right:-20px;height:45px}
.hdr-strat.active .mega{max-height:300px;pointer-events:auto}
.mega-in{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0;padding:0}
.mega-col{display:flex;flex-direction:column;gap:0;padding:1.6rem 2rem 1.8rem}
.mega-col:not(:last-child){border-right:1px solid var(--gray-rule)}
.mega-title{font-size:1.1rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase;padding-bottom:.7rem;margin-bottom:.5rem;border-bottom:none}
.mega-col--biotech .mega-title{color:#97175A}
.mega-col--healthtech .mega-title{color:#1a8a7a}
.mega-col--growth .mega-title{color:#c4a35a}
.mega-link{font-size:.92rem;font-weight:500;color:var(--dark);opacity:1;transition:color .3s;padding:.35rem 0;position:relative}
.mega-col--biotech .mega-link:hover{color:#97175A}
.mega-col--healthtech .mega-link:hover{color:#1a8a7a}
.mega-col--growth .mega-link:hover{color:#c4a35a}
.mega-link::after{display:none}
.hdr-right{justify-self:end;display:flex;align-items:center;gap:1.5rem}
.hdr-lang{display:flex;align-items:center;gap:.3rem}
.hdr-lang-btn{font-size:.72rem;font-weight:600;letter-spacing:.04em;color:var(--gray);transition:color .3s}
.hdr-lang-btn.active{color:var(--text)}
.hdr-lang-btn:hover{color:var(--plum)}
.hdr-lang-sep{font-size:.65rem;color:var(--gray-lt)}
.burger{display:none;width:28px;height:20px;flex-direction:column;justify-content:space-between}
.burger span{height:2px;background:var(--black);display:block;transition:.3s;transform-origin:center}

/* ===== MOBILE MENU ===== */
.mm{position:fixed;inset:0;background:var(--white);z-index:200;display:flex;flex-direction:column;justify-content:center;padding:3rem var(--px);transform:translateY(100%);visibility:hidden;transition:transform .8s var(--ease-in),visibility 0s .8s;border-top:3px solid var(--black)}
.mm.open{transform:translateY(0);visibility:visible;transition:transform .8s var(--ease-in),visibility 0s 0s}
.mm ul{display:flex;flex-direction:column;gap:0}
.mm li{border-bottom:1px solid var(--gray-lt)}
.mm li:first-child{border-top:1px solid var(--gray-lt)}
.mm a{display:flex;justify-content:space-between;align-items:center;font-size:clamp(1.4rem,3vw,2rem);font-weight:600;padding:1.2rem 0;transform:translateY(2rem);opacity:0;transition:transform .5s var(--ease),opacity .4s,color .3s}
.mm.open a{transform:translateY(0);opacity:1}
.mm.open li:nth-child(1) a{transition-delay:.05s}
.mm.open li:nth-child(2) a{transition-delay:.1s}
.mm.open li:nth-child(3) a{transition-delay:.15s}
.mm.open li:nth-child(4) a{transition-delay:.2s}
.mm.open li:nth-child(5) a{transition-delay:.25s}
.mm.open li:nth-child(6) a{transition-delay:.3s}
.mm.open li:nth-child(7) a{transition-delay:.35s}
.mm a:hover{color:var(--plum)}
.mm a .arrow{display:inline-flex;align-items:center;transition:transform .3s var(--ease)}
.mm a .arrow svg{width:14px;height:14px;stroke-width:1}
.mm a:hover .arrow{transform:translate(4px,-4px)}
.mm-close{position:absolute;top:1.6rem;right:var(--px);font-size:.8rem;font-weight:600;letter-spacing:.06em}
.mm-sub{display:none;padding-left:1.2rem}
.mm-strat.open .mm-sub{display:flex}
.mm-sub li{border-bottom:none;border-top:none}
.mm-sub a{font-size:clamp(1rem,2.2vw,1.4rem);padding:.7rem 0;color:var(--plum)}
.mm-sub-group{list-style:none}
.mm-sub-trigger{display:flex;justify-content:space-between;align-items:center;font-size:clamp(1.2rem,3.5vw,1.6rem);font-weight:700;padding:.8rem 0;color:var(--white);cursor:pointer;border-bottom:1px solid rgba(255,255,255,.1)}
.mm-sub .mm-sub-items{display:flex;flex-direction:column;padding-left:1rem;max-height:0;overflow:hidden;transition:max-height .4s var(--ease),opacity .3s;opacity:0}
.mm-sub .mm-sub-group.open .mm-sub-items{max-height:20rem;opacity:1}
.mm-sub-group.open .mm-sub-trigger .mm-chevron{transform:rotate(180deg)}
.mm-sub-items a{font-size:clamp(.9rem,2vw,1.1rem);padding:.5rem 0;color:var(--white)}
.mm-chevron{display:inline-flex;align-items:center;margin-left:.4rem;transition:transform .3s var(--ease)}
.mm-strat.open .mm-chevron{transform:rotate(180deg)}

/* ===== FOOTER ===== */
.ft{background:var(--black);color:var(--white);padding:2rem var(--px) 1.5rem;position:relative;overflow:hidden}
.ft>*:not(.field):not(.typo-deco){position:relative;z-index:1}
.ft-top{display:grid;grid-template-columns:1fr 1fr;gap:clamp(1.5rem,3vw,3rem);margin-bottom:1.5rem}
.ft-brand img{height:120px;filter:brightness(0) invert(1);margin-bottom:1rem}
.ft-brand-contact{font-size:1rem;color:rgba(255,255,255,.5);line-height:1.55;margin-bottom:.3rem}
.ft-brand-contact a{color:var(--plum-pale);transition:color .3s}
.ft-brand-contact a:hover{color:var(--white)}
.ft-brand-address{font-size:1rem;color:var(--white);margin-bottom:1.2rem}
.ft-brand-socials{display:flex;gap:1rem}
.ft-brand-soc{width:3.5rem;height:3.5rem;display:flex;align-items:center;justify-content:center;border:1px solid var(--white);transition:border-color .3s,color .3s}
.ft-brand-soc:hover{border-color:var(--plum-pale);color:var(--plum-pale)}
.ft-brand-soc svg{width:1.4rem;height:1.4rem}
.ft-links{display:grid;grid-template-columns:1fr 1fr;gap:2rem}
.ft-links ul{display:flex;flex-direction:column;gap:0}
.ft-links li{border-bottom:1px solid rgba(255,255,255,.1)}
.ft-links li:first-child{border-top:1px solid rgba(255,255,255,.1)}
.ft-links a{display:flex;justify-content:space-between;align-items:center;font-size:1rem;font-weight:500;padding:.6rem 0;transition:color .3s}
.ft-links a:hover{color:var(--plum-pale)}
.ft-links a .arrow{display:inline-flex;align-items:center;transition:transform .3s var(--ease)}
.ft-links a .arrow svg{width:11px;height:11px;stroke-width:1}
.ft-links a:hover .arrow{transform:translate(3px,-3px)}
.ft-bottom{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem;border-top:1px solid rgba(255,255,255,.1);padding-top:1rem}
.ft-copy{font-size:.85rem;color:var(--white)}

/* ===== SCROLL TOP ===== */
.totop{position:fixed;bottom:2rem;right:2rem;z-index:90;width:2.8rem;height:2.8rem;background:var(--black);color:var(--white);display:flex;align-items:center;justify-content:center;border-top:3px solid var(--plum);opacity:0;pointer-events:none;transition:opacity .3s,background .25s}
.totop.vis{opacity:1;pointer-events:auto}
.totop:hover{background:var(--plum)}
.totop svg{width:1rem;height:1rem}

/* ===== MOBILE MENU BUTTON (hidden on desktop, injected by JS) ===== */
.mob-menu-btn{display:none}

/* ===== SHARED RESPONSIVE ===== */
@media(max-width:64em){
  html{scroll-padding-top:140px}
  /* header: logo seul centré */
  .hdr-in{display:flex;justify-content:center}
  .hdr-nav,.hdr-right,.burger{display:none}
  .hdr-logo img{height:100px}
  .hdr.scrolled .hdr-in{height:80px}
  .hdr.scrolled .hdr-logo img{height:75px}

  /* bouton menu floating en bas — carré */
  .mob-menu-btn{display:flex;align-items:center;justify-content:center;position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);z-index:190;width:3.5rem;height:3.5rem;background:var(--plum);color:var(--white);border:none;cursor:pointer;box-shadow:0 4px 24px rgba(0,0,0,.25);transition:opacity .3s,transform .3s}
  .mob-menu-btn svg{width:22px;height:22px}
  .mob-menu-btn.hidden{opacity:0;pointer-events:none;transform:translateX(-50%) translateY(20px)}

  /* menu mobile: fond plum-dark + blur, s'ouvre du bas */
  .mm{position:fixed;inset:0;background:rgba(61,9,38,0.92);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);color:var(--white);z-index:200;display:flex;flex-direction:column;justify-content:flex-start;padding:6rem var(--px) 5rem;overflow-y:auto;-webkit-overflow-scrolling:touch;transform:translateY(100%);visibility:hidden;transition:transform .6s var(--ease-in),visibility 0s .6s;border-top:none}
  .mm.open{transform:translateY(0);visibility:visible;transition:transform .6s var(--ease-in),visibility 0s 0s}
  .mm li{border-color:rgba(255,255,255,.12)}
  .mm li:first-child{border-top-color:rgba(255,255,255,.12)}
  .mm a{color:var(--white)}
  .mm a:hover,.mm a:active{color:var(--plum-pale)}
  .mm-close{position:absolute;bottom:1.5rem;left:50%;transform:translateX(-50%);top:auto;right:auto;width:3.5rem;height:3.5rem;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.1);color:var(--white);border:1px solid rgba(255,255,255,.2);cursor:pointer;transition:background .3s}
  .mm-close:hover{background:rgba(255,255,255,.2)}
  .mm-sub a{color:var(--white)}
  .mm-sub-items a{color:var(--white)}

  /* mobile font-size minimums */
  .hdr-lang-btn,.hdr-lang-sep{font-size:.85rem}
  .mm a{font-size:1.3rem}
  .mm-sub-trigger{font-size:1.2rem}
  .mm-sub-items a{font-size:1rem}

  /* footer */
  .ft{padding-bottom:6rem}
  .ft-top{grid-template-columns:1fr}
  .ft-links{display:none}
}

/* ===== SMALL MOBILE (≤640px) ===== */
@media(max-width:40em){
  html{scroll-padding-top:120px}
  :root{--px:1.5rem}
  .hdr-logo img{height:80px}
  .hdr.scrolled .hdr-in{height:65px}
  .hdr.scrolled .hdr-logo img{height:60px}
  .ft-brand img{height:80px}
  .ft-brand-soc{width:2.8rem;height:2.8rem}
  .mm a{font-size:clamp(1.2rem,4vw,1.6rem)}
}

/* ===== DISABLE HOVER ON TOUCH ===== */
@media(hover:none){
  .hdr-lang-btn:hover{color:var(--gray)}
  .ft-brand-contact a:hover{color:var(--plum-pale)}
  .ft-brand-soc:hover{border-color:rgba(255,255,255,.2);color:inherit}
  .ft-links a:hover{color:inherit}
  .ft-links a:hover .arrow{transform:none}
  .totop:hover{background:var(--black)}
  .mm a:hover{color:var(--white)}
  .mm a:hover .arrow{transform:none}

  /* bouton menu centré, scroll-top à droite — même taille, même bottom */
  .totop{width:3.5rem;height:3.5rem;bottom:1.5rem;right:2rem;border-top:2px solid var(--plum)}
}

/* ===== SAFE AREA (iOS notch) ===== */
@supports(padding:env(safe-area-inset-bottom)){
  .mob-menu-btn{bottom:calc(1.5rem + env(safe-area-inset-bottom))}
  .mm-close{bottom:calc(1.5rem + env(safe-area-inset-bottom))}
  .mm{padding-bottom:calc(5rem + env(safe-area-inset-bottom))}
  .totop{bottom:calc(1.5rem + env(safe-area-inset-bottom))}
}
