#cn-lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: Arial, sans-serif;
  z-index: 2147483646;
}

#cn-lang-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#cn-lang-switcher.floating {
  position: fixed;
  top: 12px;
  right: 12px;
}

#cn-blog-link,
#cn-lang-toggle {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #8ba8c3;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

#cn-blog-link {
  white-space: nowrap;
}

#cn-lang-switcher.floating #cn-blog-link,
#cn-lang-switcher.floating #cn-lang-toggle {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #c5c5c5;
  background: #ffffff;
  color: #1f2933;
  font-size: 14px;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.2);
}

#cn-blog-link:hover,
#cn-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

#cn-lang-switcher.floating #cn-blog-link:hover,
#cn-lang-switcher.floating #cn-lang-toggle:hover {
  background: #f4f4f4;
}

#cn-lang-panel {
  display: none;
  position: fixed;
  top: 58px;
  right: 12px;
  width: min(460px, calc(100vw - 24px));
  background: #efefef;
  border: 1px solid #c7c7c7;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  padding: 18px 20px;
  max-height: min(75vh, 620px);
  overflow: auto;
  z-index: 2147483647;
}

#cn-lang-panel.open {
  display: block;
}

#cn-lang-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 26px;
  row-gap: 10px;
}

.cn-lang-item {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: left;
  color: #222;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.cn-lang-item:hover {
  color: #005ecb;
}

.cn-lang-item.active {
  color: #d41f1f;
}

#cn-google-translate-element {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.goog-te-banner-frame.skiptranslate {
  display: none !important;
}

/* Hide Google Translate floating/tooltips (e.g. "Texte d'origine") */
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
.VIpgJd-yAWNEb-L7lbkb,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
iframe.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
}

body {
  top: 0 !important;
}

#header,
#headerout,
#login {
  overflow: visible !important;
}

#login {
  position: relative;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.cn-site-logo {
  display: block;
  height: 30px;
  width: auto;
  max-width: 100%;
}

.cn-lang-icon {
  font-size: 16px;
  line-height: 1;
}

.cn-blog-icon {
  font-size: 15px;
  line-height: 1;
}

.cn-blog-label {
  font-size: 14px;
  line-height: 1;
}

.cn-lang-label {
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 900px) {
  .cn-lang-item {
    font-size: 26px;
  }
}

@media (max-width: 640px) {
  #cn-lang-panel {
    width: min(420px, calc(100vw - 12px));
    top: 52px;
    right: 6px;
    padding: 14px;
  }

  #cn-lang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 8px;
  }

  .cn-lang-item {
    font-size: 21px;
  }

  .cn-lang-label {
    display: none;
  }

  .cn-blog-label {
    display: none;
  }

  #cn-blog-link,
  #cn-lang-toggle {
    min-width: 34px;
    padding: 0 8px;
    border-radius: 999px;
  }

  .cn-site-logo {
    height: 26px;
  }
}

/* Cosmos Theme V3 (palette from provided image) */
:root {
  --cn-primary: #2563eb;
  --cn-primary-light: #dbeafe;
  --cn-success: #16a34a;
  --cn-accent: #7c3aed;
  --cn-attention: #f59e0b;
  --cn-text: #0f172a;
  --cn-page: #f8fafc;
  --cn-surface: #ffffff;
  --cn-border: #e2e8f0;
  --cn-muted: #64748b;
  --cn-disabled: #94a3b8;
}

body {
  background: var(--cn-page) !important;
  color: var(--cn-text) !important;
}

body,
p,
td,
div,
span,
input,
th,
li,
textarea {
  color: var(--cn-text);
}

h1,
h2,
h3 {
  color: var(--cn-text) !important;
}

a {
  color: var(--cn-primary);
}

#headerout,
#header {
  background: var(--cn-primary-light) !important;
  border-bottom: 1px solid var(--cn-border);
}

#header {
  height: 72px;
  position: relative;
}

#logo {
  padding: 12px 0 !important;
}

#logo {
  display: none !important;
}

#headerout {
  position: relative;
  min-height: 62px;
}

#cn-header-brand {
  position: absolute;
  left: 16px;
  top: 8px;
  width: 320px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  text-decoration: none !important;
  z-index: 2147483600;
}

#cn-header-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

#login,
#login a,
.topNavAbs a {
  color: var(--cn-text) !important;
}

.topNavAbs {
  top: 14px;
}

.topNavAbs a {
  border-radius: 10px;
  padding: 8px 12px !important;
  text-transform: none !important;
  font-size: 15px !important;
  font-weight: 600;
}

.topNavAbs a:hover,
.topNavOn {
  background: var(--cn-primary-light) !important;
  color: var(--cn-primary) !important;
}

#cn-blog-link,
#cn-lang-toggle {
  background: var(--cn-surface) !important;
  border: 1px solid var(--cn-border) !important;
  color: var(--cn-text) !important;
}

#cn-blog-link:hover,
#cn-lang-toggle:hover {
  background: #f1f5f9 !important;
}

#homecaldiv {
  background: var(--cn-page) !important;
  border-top: 0 !important;
}

#homelistdiv {
  background: var(--cn-page) !important;
}

#contentout {
  padding-top: 12px;
}

#content,
#right,
#contentbig {
  color: var(--cn-text);
}

#sciout,
.panel,
.panel2,
fieldset,
#othercalc,
table.panel {
  background: var(--cn-surface) !important;
  border: 1px solid var(--cn-border) !important;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

#sciOutPut {
  background: #f1f5f9 !important;
  border-color: var(--cn-border) !important;
  color: var(--cn-text) !important;
  border-radius: 8px;
}

#sciInPut {
  color: var(--cn-muted) !important;
}

.scifunc,
.sciop,
.scinm,
.scieq {
  background: #f8fafc !important;
  border-color: var(--cn-border) !important;
  border-radius: 7px !important;
  color: var(--cn-text) !important;
}

.scifunc:active,
.sciop:active,
.scinm:active,
.scieq:active {
  background: #e2e8f0 !important;
}

.scieq[onclick*="r('=')"] {
  background: var(--cn-primary) !important;
  border-color: var(--cn-primary) !important;
  color: var(--cn-surface) !important;
}

input[type="text"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="color"],
input[type="date"],
input[type="email"],
select,
textarea {
  border: 1px solid var(--cn-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  background: var(--cn-surface) !important;
  color: var(--cn-text) !important;
}

input[type="submit"],
#bluebtn,
fieldset a {
  background: var(--cn-primary) !important;
  background-image: none !important;
  border: 0 !important;
  color: var(--cn-surface) !important;
  border-radius: 10px !important;
  text-decoration: none !important;
}

input[type="submit"]:hover,
#bluebtn:hover,
fieldset a:hover {
  filter: brightness(0.94);
}

input[type="reset"],
input[type="button"] {
  background: var(--cn-disabled) !important;
  border-radius: 10px !important;
}

#breadcrumbs a,
#breadcrumbs a span {
  color: var(--cn-primary) !important;
}

#octitle,
#sectitle {
  background: #f8fafc !important;
  color: var(--cn-text) !important;
  border-bottom: 1px solid var(--cn-border);
  border-radius: 12px 12px 0 0;
}

#ocother {
  background: #f8fafc !important;
}

#othercalc {
  border-color: var(--cn-border) !important;
}

#homelistwrap {
  grid-row-gap: 14px !important;
  grid-column-gap: 12px !important;
}

.homelisttile {
  border: 1px solid var(--cn-border);
  border-radius: 12px;
  padding: 10px 12px 12px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
}

.homelisttile:nth-child(1) {
  background: var(--cn-primary-light);
}

.homelisttile:nth-child(2) {
  background: #ecfdf3;
}

.homelisttile:nth-child(3) {
  background: #f5f0ff;
}

.homelisttile:nth-child(4) {
  background: #fff7ed;
}

.homelisttile:nth-child(1) .hh,
.homelisttile:nth-child(1) .hh a {
  color: var(--cn-primary) !important;
}

.homelisttile:nth-child(2) .hh,
.homelisttile:nth-child(2) .hh a {
  color: var(--cn-success) !important;
}

.homelisttile:nth-child(3) .hh,
.homelisttile:nth-child(3) .hh a {
  color: var(--cn-accent) !important;
}

.homelisttile:nth-child(4) .hh,
.homelisttile:nth-child(4) .hh a {
  color: var(--cn-attention) !important;
}

.hicon {
  padding: 12px 0 10px 8px !important;
}

.hicon img {
  border-radius: 16px;
}

.hh {
  color: var(--cn-text) !important;
  font-size: 20px !important;
}

.hh a {
  color: var(--cn-text) !important;
}

.hl {
  background: transparent !important;
}

.hl li a {
  color: var(--cn-text) !important;
}

.h2result {
  background: var(--cn-primary) !important;
  border-color: var(--cn-primary) !important;
}

#topmenu ul {
  border-bottom: 1px solid var(--cn-border) !important;
}

#topmenu ul li a,
#topmenu ul li a:visited {
  color: var(--cn-primary) !important;
  background: var(--cn-primary-light) !important;
  border: 1px solid var(--cn-border) !important;
}

#topmenu ul li a:hover {
  background: #c7defe !important;
  color: var(--cn-primary) !important;
}

#topmenu ul #menuon a {
  background: var(--cn-surface) !important;
  border: 1px solid var(--cn-border) !important;
  border-bottom: 2px solid var(--cn-surface) !important;
  color: var(--cn-text) !important;
}

table.cinfoT th,
table.cinfoT td.cinfoHd,
table.cinfoT td.cinfoHdL {
  background-color: var(--cn-primary) !important;
  border-color: var(--cn-primary) !important;
}

table.cinfoT tr:nth-child(odd) {
  background-color: #f8fafc !important;
}

#footer {
  background: #f1f5f9 !important;
  color: var(--cn-muted) !important;
  border-top: 1px solid var(--cn-border);
}

#footer a,
#footerin {
  color: var(--cn-muted) !important;
}

@media (max-width: 720px) {
  #cn-header-brand {
    left: 8px;
    top: 13px;
    width: 205px;
    height: 35px;
    border-radius: 0;
  }

  #header {
    height: auto;
    min-height: 72px;
  }

  #contentout {
    padding-top: 10px;
  }
}
