/* TMA_HEADER_ACTIONS_SAFE_V18 — TOP HEADER ONLY: login/signup, centered navigation, original menu behavior. */
html[data-atelier] body .atelier-header .header-inner { min-width:0; }
/* The actual Pro Plus header nav has only Pricing + Guides. Dashboard/More remain owned by v11. */
html[data-atelier-family="plus"] body .atelier-header .atelier-primary-nav a[href$="/pro-plus"],
html[data-atelier-family="plus"] body .atelier-header .atelier-primary-nav a[href="/"] {display:none!important;}
/* Language / Theme / Session / Signup / Go Premium grouped on the same edge. */
html[data-atelier] body .atelier-header .atelier-actions > .tma-language-picker,
html[data-atelier] body .atelier-header .atelier-actions > #atelierAdminLanguage {order:1!important;}
html[data-atelier] body .atelier-header .atelier-actions > .theme-toggle {order:2!important;}
html[data-atelier] body .atelier-header .atelier-actions > .atelier-session-actions {order:3!important;}
html[data-atelier] body .atelier-header .atelier-actions > .login-link,
html[data-atelier] body .atelier-header .atelier-actions > .atelier-account-link {order:4!important;}
html[data-atelier] body .atelier-header .atelier-actions > .tma-create-account {order:5!important;}
html[data-atelier] body .atelier-header .atelier-actions > .tma-go-premium {order:6!important;}
html[data-atelier] body .atelier-header .atelier-actions > .menu-toggle {order:7!important;}
html[data-atelier] body .atelier-header .atelier-actions {display:flex!important;align-items:center!important;gap:clamp(4px,.55vw,9px)!important;white-space:nowrap!important;}
html[data-atelier] body .atelier-header .tma-language-picker>summary {display:inline-flex;align-items:center;gap:6px;padding-inline:10px!important;border:1px solid var(--line,#dce5f0);border-radius:10px;min-height:37px;white-space:nowrap;background:var(--paper,#fff);font-weight:650;}
/* A globe glyph is painted with CSS, without modifying the DOM. */
html[data-atelier] body .atelier-header .tma-language-picker>summary::before {content:"";display:block;flex:none;width:16px;height:16px;background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'20\' height=\'20\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'%233155e8\' stroke-width=\'1.65\'%3E%3Ccircle cx=\'12\' cy=\'12\' r=\'9\'/%3E%3Cpath d=\'M3 12h18M12 3c-5 5-5 13 0 18M12 3c5 5 5 13 0 18\'/%3E%3C/svg%3E");}
html[data-atelier] body .atelier-header .theme-toggle {border:1px solid var(--line,#dce5f0)!important;border-radius:10px!important;min-height:37px;min-width:37px;}
html[data-atelier] body .atelier-header .login-link,
html[data-atelier] body .atelier-header .atelier-session-actions .btn,
html[data-atelier] body .atelier-header .tma-create-account {padding:8px 12px!important;min-height:37px;border:1px solid var(--line,#dce5f0)!important;border-radius:10px!important;text-decoration:none;white-space:nowrap;font-size:13px;font-weight:700;color:var(--ink,#14243d);background:var(--paper,#fff);}
html[data-atelier] body .atelier-header .tma-create-account,
html[data-atelier] body .atelier-header .tma-go-premium {background:var(--accent,#315be8)!important;color:#fff!important;border-radius:10px!important;border:1px solid var(--accent,#315be8)!important;font-weight:750;padding:9px 12px!important;min-height:37px;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;text-decoration:none;}
html[data-atelier] body .atelier-header .tma-go-premium svg {width:15px;height:15px;}
html[data-atelier] body .atelier-header :is(.login-link,.tma-create-account,.tma-go-premium,.theme-toggle,.tma-language-picker>summary,.atelier-session-actions .btn):hover {transform:translateY(-1px);box-shadow:0 3px 10px rgb(30 57 103 / 9%);}
html[data-atelier] body .atelier-header .tma-create-account:hover,
html[data-atelier] body .atelier-header .tma-go-premium:hover {filter:brightness(.93);color:#fff!important;}
/* Auth state follows the already-rendered logout control, no JS observer needed. */
html[data-atelier] body .atelier-header .atelier-actions:has(.atelier-session-actions :is(#logout,#logoutBtn,#premiumLogout):not([hidden])) > :is(.login-link,.tma-create-account) {display:none!important;}
html[data-atelier] body .atelier-header:has(.atelier-session-actions :is(#logout,#logoutBtn,#premiumLogout):not([hidden])) .tma-v18-mobile-auth {display:none!important;}
/* For shorter screens, preserve one header row, keeping full navigation in the existing mobile menu. */
@media (max-width:1180px) {
  html[data-atelier] body .atelier-header .atelier-actions > :is(.tma-create-account,.tma-go-premium) {display:none!important;}
  html[data-atelier] body .atelier-header .atelier-primary-nav.open > .tma-v18-mobile-link {display:flex!important;}
  html[data-atelier] body .atelier-header .tma-language-picker >summary {padding-inline:6px!important;}
}
@media (max-width:600px) {
  html[data-atelier] body .atelier-header .atelier-actions {gap:4px!important;}
  html[data-atelier] body .atelier-header .tma-language-picker>summary {min-height:32px;padding-inline:5px!important;gap:3px;}
  html[data-atelier] body .atelier-header .theme-toggle {min-height:32px;min-width:32px;}
  html[data-atelier] body .atelier-header .tma-language-picker>summary::before {width:14px;height:14px;}
  html[data-atelier] body .atelier-header .atelier-session-actions .btn {padding:7px!important;font-size:12px;}
}
@media (prefers-reduced-motion:reduce) {
  html[data-atelier] body .atelier-header :is(.login-link,.tma-create-account,.tma-go-premium,.theme-toggle,.tma-language-picker>summary,.atelier-session-actions .btn):hover {transform:none;}
}
/* At 320px the wordmark is hidden (logo stays) so language, mode and sign-out remain clickable. */
@media (max-width:360px) {
  html[data-atelier] body .atelier-header .atelier-brand .brand-word {display:none!important;}
}
@media (max-width:430px) {
  html[data-atelier-family="plus"] body .atelier-header .atelier-brand .brand-word {display:none!important;}
}
/* Upgrade remains a single CTA on desktop; its menu fallback is mobile-only. */
html[data-atelier] body .atelier-header .atelier-primary-nav .tma-v18-mobile-link {display:none!important;}
@media (max-width:1260px) {
  html[data-atelier] body .atelier-header .atelier-primary-nav.open .tma-v18-mobile-link {display:flex!important;}
}
/* At intermediate desktop widths the full guest CTA row would overlap centered links.
   Reuse the existing hamburger rather than squeezing or wrapping either group. */
@media (min-width:1181px) and (max-width:1260px) {
  html[data-atelier]:not([data-atelier-family="plus"]) body .atelier-header .header-inner > .atelier-primary-nav {
    display:none!important;position:absolute!important;left:auto!important;right:0!important;
    top:calc(100% + 4px)!important;z-index:110;min-width:210px;width:max-content!important;
    max-width:min(90vw,320px);flex-direction:column;align-items:stretch!important;
    background:var(--paper,#fff);border:1px solid var(--line,#dce5f0);border-radius:12px;
    padding:10px;box-shadow:0 12px 35px #0d244032;
  }
  html[data-atelier]:not([data-atelier-family="plus"]) body .atelier-header .header-inner > .atelier-primary-nav.open {display:flex!important;}
  html[data-atelier]:not([data-atelier-family="plus"]) body .atelier-header .menu-toggle {display:inline-flex!important;}
}
