/*
 * CoAbonnement v21.9.1 — Header visiteur desktop unifié.
 * Scope: visiteurs non connectés, hors shell WooCommerce.
 * Objectif: une seule ligne compacte, lisible, identique entre home, marketplace,
 * catalogue, co-abonnements et visibilité.
 */
body.coab-public-visitor-shell{
  --coabvh-text:#0f172a;
  --coabvh-muted:#5f6878;
  --coabvh-line:rgba(15,23,42,.08);
  --coabvh-blue:#1769f6;
  --coabvh-blue-dark:#0f56d8;
  --coabvh-soft:#f4f6f9;
}

body.coab-public-visitor-shell .coab-announcement-v2190{
  position:relative;
  z-index:101;
  background:linear-gradient(90deg,#10204f,#173478 52%,#10204f);
  color:#fff;
  border:0;
  font-size:12px;
}
body.coab-public-visitor-shell .coab-announcement-v2190__inner{
  width:min(1320px,calc(100% - 40px));
  min-height:34px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
}
body.coab-public-visitor-shell .coab-announcement-v2190 b{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 8px;
  margin-right:6px;
  border-radius:999px;
  background:#2d70ff;
  color:#fff;
  font-size:10px;
  line-height:1;
}
body.coab-public-visitor-shell .coab-announcement-v2190 a{
  color:#fff;
  text-decoration:none;
  font-weight:800;
  white-space:nowrap;
}
body.coab-public-visitor-shell .coab-announcement-v2190 a:hover{text-decoration:underline}

body.coab-public-visitor-shell .coabh-header{
  position:sticky;
  top:0;
  z-index:100;
  width:100%;
  background:rgba(255,255,255,.975);
  border-bottom:1px solid var(--coabvh-line);
  box-shadow:0 8px 28px rgba(15,23,42,.045);
  backdrop-filter:saturate(1.15) blur(14px);
  -webkit-backdrop-filter:saturate(1.15) blur(14px);
}
body.admin-bar.coab-public-visitor-shell .coabh-header{top:32px}
body.coab-public-visitor-shell .coabh-bar{
  width:min(1320px,calc(100% - 36px));
  min-height:72px;
  margin:0 auto;
  padding:10px 0;
  display:flex;
  align-items:center;
  gap:10px;
}
body.coab-public-visitor-shell .coabh-brand{
  display:flex;
  align-items:center;
  flex:0 0 auto;
  text-decoration:none;
  min-width:122px;
}
body.coab-public-visitor-shell .coabh-logo{
  display:block;
  width:122px!important;
  height:44px!important;
  border-radius:0!important;
  overflow:visible!important;
}
body.coab-public-visitor-shell .coabh-logo img{
  display:block;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:left center!important;
}
body.coab-public-visitor-shell .coabh-brand-text{display:none!important}

body.coab-public-visitor-shell .coabh-links{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:2px;
  min-width:0;
  margin-left:8px;
}
body.coab-public-visitor-shell .coabh-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 11px;
  border-radius:12px;
  color:#525b6b;
  text-decoration:none;
  font-size:13px;
  line-height:1;
  font-weight:700;
  white-space:nowrap;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}
body.coab-public-visitor-shell .coabh-link:hover{
  color:var(--coabvh-text);
  background:#f2f4f7;
  transform:translateY(-1px);
}
body.coab-public-visitor-shell .coabh-link.is-active{
  color:var(--coabvh-text);
  background:#eef1f5;
}
body.coab-public-visitor-shell .coabh-link--marketplace span{
  display:inline-flex;
  align-items:center;
  min-height:18px;
  padding:0 6px;
  margin-left:5px;
  border-radius:999px;
  background:#e8f0ff;
  color:#1769f6;
  font-size:9px;
  font-weight:900;
}
body.coab-public-visitor-shell .coabh-link--marketplace.is-active span{
  background:#dbe8ff;
  color:#0f56d8;
}

body.coab-public-visitor-shell .coabh-search-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 38px;
  width:38px;
  height:38px;
  margin-left:auto;
  padding:0;
  border:1px solid #e3e7ed;
  border-radius:50%;
  background:#fff;
  color:#586273;
  cursor:pointer;
  box-shadow:none;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
body.coab-public-visitor-shell .coabh-search-btn:hover{
  background:#f5f7fa;
  border-color:#d9dee7;
  color:#0f172a;
}

body.coab-public-visitor-shell .coabh-right{
  display:flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
  margin-left:0;
}
body.coab-public-visitor-shell .coabh-currency{
  position:relative;
  flex:0 0 auto;
}
body.coab-public-visitor-shell .coabh-currency select{
  appearance:none;
  -webkit-appearance:none;
  min-height:40px;
  max-width:128px;
  padding:0 28px 0 13px;
  border:0;
  border-radius:999px;
  background:#f1f3f6;
  color:#171b23;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
body.coab-public-visitor-shell .coabh-currency::after{
  content:"▾";
  position:absolute;
  right:11px;
  top:50%;
  transform:translateY(-52%);
  color:#747d8b;
  font-size:9px;
  pointer-events:none;
}
body.coab-public-visitor-shell .coabh-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 15px;
  border-radius:999px;
  text-decoration:none;
  font-size:12.5px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
  transition:transform .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease;
}
body.coab-public-visitor-shell .coabh-btn:hover{transform:translateY(-1px)}
body.coab-public-visitor-shell .coabh-btn--ghost{
  color:#171b23;
  background:transparent;
}
body.coab-public-visitor-shell .coabh-btn--ghost:hover{background:#f2f4f7}
body.coab-public-visitor-shell .coabh-btn--primary{
  color:#fff;
  background:linear-gradient(135deg,#1769f6,#0e5ce4);
  box-shadow:0 8px 20px rgba(23,105,246,.20);
}
body.coab-public-visitor-shell .coabh-btn--primary:hover{
  background:linear-gradient(135deg,#0f61ec,#0b50ca);
  box-shadow:0 10px 24px rgba(23,105,246,.26);
}
body.coab-public-visitor-shell .coabh-burger{
  display:none;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  margin-left:auto;
  padding:0;
  border:1px solid #e3e7ed;
  border-radius:12px;
  background:#fff;
  color:#182131;
}

body.coab-public-visitor-shell .coab-public-visitor-main{
  display:block;
  width:100%;
  max-width:none;
  min-width:0;
  margin:0;
  padding:0;
}

/* Overlay / drawer are shared across all public visitor pages. */
body.coab-public-visitor-shell .coabh-search-overlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:10000;
  align-items:flex-start;
  justify-content:center;
  padding-top:14vh;
  background:rgba(15,23,42,.36);
}
body.coab-public-visitor-shell .coabh-search-overlay.is-open{display:flex}
body.coab-public-visitor-shell .coabh-search-box{
  width:min(590px,calc(100% - 28px));
  padding:9px;
  border-radius:18px;
  background:#fff;
  box-shadow:0 24px 70px rgba(15,23,42,.24);
}
body.coab-public-visitor-shell .coabh-search-box form{
  display:flex;
  align-items:center;
  gap:7px;
  padding:4px 4px 4px 14px;
  border-radius:13px;
  background:#f2f4f7;
}
body.coab-public-visitor-shell .coabh-search-box input{
  flex:1;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  font-size:15px;
  padding:11px 0;
}
body.coab-public-visitor-shell .coabh-search-box button{
  min-height:42px;
  padding:0 17px;
  border:0;
  border-radius:10px;
  background:#111827;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
body.coab-public-visitor-shell .coabh-drawer-backdrop{
  display:none;
  position:fixed;
  inset:0;
  z-index:10001;
  background:rgba(15,23,42,.40);
}
body.coab-public-visitor-shell .coabh-drawer-backdrop.is-open{display:block}
body.coab-public-visitor-shell .coabh-drawer{
  position:fixed;
  top:0;
  right:-105%;
  z-index:10002;
  width:min(355px,90vw);
  height:100dvh;
  padding:18px;
  overflow:auto;
  background:#fff;
  box-shadow:-22px 0 65px rgba(15,23,42,.18);
  transition:right .22s ease;
}
body.coab-public-visitor-shell .coabh-drawer.is-open{right:0}
body.coab-public-visitor-shell .coabh-drawer-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}
body.coab-public-visitor-shell .coabh-drawer-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  padding:0;
  border:1px solid #e3e7ed;
  border-radius:50%;
  background:#fff;
  cursor:pointer;
}
body.coab-public-visitor-shell .coabh-drawer-search{
  display:flex;
  gap:6px;
  padding:4px 4px 4px 13px;
  margin-bottom:18px;
  border-radius:999px;
  background:#f2f4f7;
}
body.coab-public-visitor-shell .coabh-drawer-search input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;padding:9px 0;font-size:14px;
}
body.coab-public-visitor-shell .coabh-drawer-search button{
  display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;padding:0;border:0;border-radius:50%;background:#111827;color:#fff;
}
body.coab-public-visitor-shell .coabh-drawer-nav{display:flex;flex-direction:column;margin-bottom:18px}
body.coab-public-visitor-shell .coabh-drawer-nav a{
  padding:12px 3px;
  border-bottom:1px solid #eef0f3;
  color:#172033;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
}
body.coab-public-visitor-shell .coabh-drawer-auth{display:grid;gap:8px;margin-bottom:18px}
body.coab-public-visitor-shell .coabh-drawer-auth .coabh-btn{width:100%;min-height:44px}
body.coab-public-visitor-shell .coabh-drawer-currency label{
  display:block;margin-bottom:7px;color:#7b8492;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em
}
body.coab-public-visitor-shell .coabh-drawer-currency select{
  width:100%;min-height:44px;padding:0 12px;border:1px solid #e3e7ed;border-radius:12px;background:#f6f7f9;color:#172033;font-weight:700
}

/* Desktop intermédiaire : priorité au cœur commercial sans créer une seconde ligne. */
@media (max-width:1260px) and (min-width:981px){
  body.coab-public-visitor-shell .coabh-bar{width:min(1180px,calc(100% - 28px));gap:7px}
  body.coab-public-visitor-shell .coabh-logo{width:108px!important}
  body.coab-public-visitor-shell .coabh-brand{min-width:108px}
  body.coab-public-visitor-shell .coabh-link{padding:0 8px;font-size:12.2px}
  body.coab-public-visitor-shell .coabh-link--how{display:none}
  body.coab-public-visitor-shell .coabh-btn{padding:0 12px;font-size:12px}
  body.coab-public-visitor-shell .coabh-currency select{max-width:116px;padding-left:11px;font-size:11.5px}
}
@media (max-width:1090px) and (min-width:981px){
  body.coab-public-visitor-shell .coabh-link--visibility{display:none}
}

/* Mobile / tablette : drawer, pas de header desktop compressé. */
@media (max-width:980px){
  body.coab-public-visitor-shell .coab-announcement-v2190__inner{
    width:calc(100% - 24px);
    min-height:38px;
    font-size:10.5px;
    justify-content:flex-start;
  }
  body.coab-public-visitor-shell .coab-announcement-v2190 a{display:none}
  body.coab-public-visitor-shell .coabh-bar{
    width:100%;
    min-height:62px;
    padding:9px 14px;
  }
  body.coab-public-visitor-shell .coabh-logo{width:105px!important;height:38px!important}
  body.coab-public-visitor-shell .coabh-brand{min-width:105px}
  body.coab-public-visitor-shell .coabh-links,
  body.coab-public-visitor-shell .coabh-search-btn,
  body.coab-public-visitor-shell .coabh-right{display:none!important}
  body.coab-public-visitor-shell .coabh-burger{display:inline-flex!important}
}
@media(max-width:782px){
  body.admin-bar.coab-public-visitor-shell .coabh-header{top:46px}
}
@media(prefers-reduced-motion:reduce){
  body.coab-public-visitor-shell .coabh-link,
  body.coab-public-visitor-shell .coabh-btn,
  body.coab-public-visitor-shell .coabh-drawer{transition:none!important}
}


/* v21.9.2 — desktop header simplification */
@media (min-width:981px){
  body.coab-public-visitor-shell .coabh-links{
    margin-left:18px;
    gap:6px;
  }
  body.coab-public-visitor-shell .coabh-link{
    padding-left:10px;
    padding-right:10px;
  }
  body.coab-public-visitor-shell .coabh-search-btn{
    margin-left:14px;
  }
}

/* Slightly calmer active state: avoid a heavy pill in the main nav. */
body.coab-public-visitor-shell .coabh-link.is-active{
  background:transparent;
  color:#0f172a;
}
body.coab-public-visitor-shell .coabh-link.is-active::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:2px;
  height:2px;
  border-radius:999px;
  background:#1769f6;
}
body.coab-public-visitor-shell .coabh-link--marketplace.is-active::after{
  background:#1769f6;
}

/* Preserve compactness at medium desktop widths. */
@media (max-width:1180px) and (min-width:981px){
  body.coab-public-visitor-shell .coabh-links{gap:2px;margin-left:10px}
  body.coab-public-visitor-shell .coabh-search-btn{margin-left:8px}
}
