:root{
  --ts-purple:#5B2C83;
  --ts-blue:#0386A9;
  --ts-green:#00A651;
  --ts-orange:#F58220;
  --ts-yellow:#FFC72C;
  --ts-dark:#081120;
  --ts-navy:#0F172A;
  --ts-white:#FFFFFF;
  --ts-text:#334155;
}

/* =========================================================
   HEADER TERANGASKILLS — VERSION FINALE STABLE
   Style inspiré menu transparent / premium, adapté TerangaSkills.
   - Logo + slogan visibles
   - Menu aligné, non coupé
   - Mode clair au repos
   - Mode sombre au scroll
   - Mobile : menu latéral uniquement
========================================================= */

.ts-header-shell{
  position:fixed;
  top:18px;
  left:0;
  width:100%;
  z-index:9999;
  padding:0 20px;
  transition:top .35s ease, padding .35s ease;
}

.ts-header-shell.scrolled{
  top:10px;
}

.ts-header-inner{
  width:min(1760px, 100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:54px 370px minmax(0,1fr);
  align-items:center;
  column-gap:16px;
  min-height:84px;
  padding:12px 20px;
  border-radius:30px;
  background:rgba(255,255,255,.95);
  border:1px solid rgba(15,23,42,.08);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  box-shadow:
    0 22px 60px rgba(15,23,42,.12),
    inset 0 1px 0 rgba(255,255,255,.88);
  transition:min-height .35s ease, background .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.ts-header-shell.scrolled .ts-header-inner{
  min-height:76px;
  background:linear-gradient(135deg, rgba(8,17,32,.96), rgba(15,23,42,.90));
  border-color:rgba(255,255,255,.10);
  box-shadow:
    0 24px 70px rgba(8,17,32,.30),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* BOUTON MENU */
.ts-menu-btn{
  width:54px;
  height:54px;
  min-width:54px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(15,23,42,.08);
  border-radius:18px;
  background:#ffffff;
  color:var(--ts-dark);
  font-size:30px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 14px 34px rgba(15,23,42,.12);
  transition:transform .28s ease, box-shadow .28s ease, color .28s ease;
}

.ts-menu-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 22px 48px rgba(15,23,42,.18);
  color:var(--ts-blue);
}

.ts-header-shell.scrolled .ts-menu-btn{
  background:#ffffff;
  color:var(--ts-dark);
}

/* LOGO + SLOGAN */
.ts-brand-zone{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  margin-left:-4px;
}

.ts-brand-zone a{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
}

.ts-brand-logo{
  width:68px;
  max-height:52px;
  height:auto;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 10px 22px rgba(15,23,42,.10));
  transition:width .35s ease, max-height .35s ease, filter .35s ease;
}

.ts-header-shell.scrolled .ts-brand-logo{
  width:62px;
  max-height:48px;
  filter:drop-shadow(0 10px 22px rgba(0,0,0,.22));
}

.ts-slogan{
  font-family:"Mayor", Arial, Helvetica, sans-serif !important;

  font-size:16px;
  line-height:1.1;

  font-weight:800;
  letter-spacing:.01em;

  white-space:nowrap;

  color:#0386A9;

  opacity:1;

  max-width:none;

  overflow:visible;
  text-overflow:unset;

  flex-shrink:1;
}



.ts-header-shell.scrolled .ts-slogan{
  color:var(--ts-blue);
  text-shadow:0 8px 22px rgba(0,0,0,.18);
}

/* NAVIGATION */
.ts-nav{
  justify-self:end;
  min-width:0;
  max-width:100%;
  width:auto;
}

.ts-nav ul,
.ts-nav .menu{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:4px;
  margin:0;
  padding:7px;
  list-style:none;
  max-width:100%;
  min-width:0;
  border-radius:999px;
  background:rgba(248,250,252,.97);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:
    0 14px 36px rgba(15,23,42,.07),
    inset 0 1px 0 rgba(255,255,255,.88);
  overflow:visible;
}

.ts-nav li{
  position:relative;
  flex:0 0 auto;
  margin:0;
  padding:0;
}

.ts-nav a{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:46px;
  padding:0 13px;
  border-radius:999px;
  color:#334155 !important;
  text-decoration:none !important;
  font-size:15px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
  transition:color .25s ease, background .25s ease, transform .25s ease;
}

.ts-nav a:hover{
  color:var(--ts-blue) !important;
  background:rgba(3,134,169,.08);
  transform:translateY(-1px);
}

.ts-nav .current-menu-item > a,
.ts-nav .current_page_item > a,
.ts-nav a[aria-current="page"]{
  color:var(--ts-blue) !important;
  background:rgba(3,134,169,.10);
}

.ts-nav a::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:7px;
  width:0;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--ts-yellow), var(--ts-blue));
  transform:translateX(-50%);
  transition:width .28s ease;
}

.ts-nav a:hover::after,
.ts-nav .current-menu-item > a::after,
.ts-nav .current_page_item > a::after,
.ts-nav a[aria-current="page"]::after{
  width:24px;
}

.ts-header-shell.scrolled .ts-nav ul,
.ts-header-shell.scrolled .ts-nav .menu{
  background:rgba(255,255,255,.96);
  border-color:rgba(255,255,255,.16);
  box-shadow:
    0 16px 42px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.90);
}

/* LARGEURS INTERMÉDIAIRES */
@media(max-width:1600px){
  .ts-header-inner{
    grid-template-columns:50px 200px minmax(0,1fr);
    column-gap:14px;
  }
  .ts-brand-logo{width:64px; max-height:50px;}
  .ts-slogan{font-size:20px; max-width:255px;}
  .ts-nav a{font-size:14.5px; padding:0 11px;}
}

@media(max-width:1450px){
  .ts-header-inner{
    grid-template-columns:52px minmax(230px, 300px) minmax(0,1fr);
    column-gap:12px;
    padding:11px 16px;
  }
  .ts-brand-zone{gap:10px; margin-left:-2px; min-width:0;}
  .ts-brand-logo{width:58px; max-height:46px;}
  .ts-slogan{font-size:18px; max-width:220px;}
  .ts-nav ul,.ts-nav .menu{gap:3px; padding:6px;}
  .ts-nav a{font-size:13.5px; padding:0 9px; height:44px;}
}

@media(max-width:1280px){
  .ts-header-inner{
    grid-template-columns:50px minmax(175px, 230px) minmax(0,1fr);
  }
  .ts-brand-logo{width:52px; max-height:40px;}
  .ts-slogan{font-size:16px; max-width:165px;}
  .ts-nav a{font-size:12.8px; padding:0 7px; height:42px;}
}

@media(max-width:1180px){
  .ts-slogan{display:none !important;}
  .ts-header-inner{
    grid-template-columns:50px auto minmax(0,1fr);
  }
  .ts-brand-zone{margin-left:0;}
  .ts-brand-logo{width:56px; max-height:42px;}
}

/* TABLETTE / MOBILE */
@media(max-width:1100px){
  .ts-header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:78px;
    padding:12px 16px;
  }
  .ts-nav{display:none !important;}
  .ts-slogan{display:none !important;}
  .ts-brand-logo{width:56px; max-height:42px;}
  .ts-menu-btn{width:50px; height:50px; min-width:50px; border-radius:17px;}
}

@media(max-width:768px){
  .ts-header-shell{top:12px; padding:0 12px;}
  .ts-header-shell.scrolled{top:8px;}
  .ts-header-inner{min-height:68px; border-radius:22px; padding:10px 12px;}
  .ts-brand-logo{width:56px; max-height:42px;}
  .ts-menu-btn{width:46px; height:46px; min-width:46px; border-radius:15px; font-size:26px;}
}

@media(max-width:420px){
  .ts-brand-logo{width:50px;}
  .ts-header-inner{padding:9px 10px;}
}
