/* === Wordcloud (auto light/dark via your CSS vars) === */
#wordcloud{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:.5rem .75rem;
  padding:.25rem 0;
}

#wordcloud .wordcloud-item{
  display:inline-block;
  line-height:1.1;
  color:var(--accent-primary);
  text-decoration:none;
  border-radius:.5rem;
  padding:.1rem .4rem;            /* tiny chip padding; size set by JS */
  border:1px solid transparent;   /* reserved for hover */
  transition:color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

#wordcloud .wordcloud-item:hover,
#wordcloud .wordcloud-item:focus-visible{
  background:var(--accent-primary);
  color:var(--text-light);
  border-color:var(--border-primary);
  box-shadow:0 4px 10px var(--shadow-light);
  text-decoration:none;
}

#wordcloud .wordcloud-item:active{
  transform:translateY(1px) scale(.98);
}

/* Optional: subtle separators for long clouds */
#wordcloud .wordcloud-item::selection{
  background:var(--accent-gold);
  color:var(--text-light);
}

/* Optional: compact on small screens */
@media (max-width: 600px){
  #wordcloud{ gap:.4rem .5rem; }
}



html {
  scroll-behavior: smooth;
}

/* ===== HEADER & NAVIGATION - LAYOUT ONLY ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Background moved to theme files */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid;
  transition: background 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  padding-bottom: 0.5rem;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  min-height: 70px;
  position: relative;
}

.nav-logo {
  display: block;
  margin-bottom: 0px; /* just under 10px spacing */
}

.logo-img {
  height: 140px;
  width: auto;
  max-width: 100%;
  margin-right: 0;
  display: block;
}

/* Logo theme swap - LAYOUT ONLY */
.light-logo { display: inline; }
.dark-logo { display: none; }
.dark-mode .light-logo { display: none; }
.dark-mode .dark-logo { display: inline; }

/* LANG NAV WRAPPER TOGGLE - LAYOUT ONLY */
#nav-wrapper .EN,
#nav-wrapper .FR {
  display: none;
}
.lang-en #nav-wrapper .EN {
  display: block;
}
.lang-fr #nav-wrapper .FR {
  display: block;
}

/* Navigation Container - LAYOUT ONLY */
#nav-wrapper {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Navigation Lists - LAYOUT ONLY */
#nav-wrapper .EN ul,
#nav-wrapper .FR ul {
  display: flex;
  list-style: none;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

#nav-wrapper nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

/* Navigation Links - LAYOUT ONLY */
#nav-wrapper .EN ul a,
#nav-wrapper .FR ul a,
#nav-wrapper nav li a {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid;
  /* Colors moved to theme files */
}

#nav-wrapper .EN ul a:hover,
#nav-wrapper .FR ul a:hover,
#nav-wrapper nav li a:hover {
  transform: translateY(-2px);
  /* Colors and shadows moved to theme files */
}

/* Toggle button - LAYOUT ONLY */
.nav-toggle {
  display: none;
  border: 1px solid;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  /* Colors moved to theme files */
}

/* ===== MOBILE MENU - LAYOUT ONLY ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-controls {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  #nav-wrapper .EN ul,
  #nav-wrapper .FR ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 2rem;
    border-radius: 0 0 12px 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Background moved to theme files */
  }

  #nav-wrapper .EN.show ul,
  #nav-wrapper .FR.show ul {
    display: flex;
  }
}

/* ===== BACK LINK - LAYOUT ONLY ===== */
.back-link {
  margin-bottom: 1.5rem;
}
.back-link a {
  text-decoration: none;
  font-weight: 500;
  /* Colors moved to theme files */
}
.back-link a:hover {
  text-decoration: underline;
}


.nav-logo-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
    align-items: center;
}

.nav-controls {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: center;
  gap: 0.25rem;
  padding: 0;
  margin-top: -6px;
}

.nav-controls button {
  padding: 0.4rem 0.7rem; /* minor trim */
  font-size: 0.9rem;
  border: none;
  border-radius: 6px;
  background: #eee;
  color: #222;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  vertical-align: middle;
  line-height: 1;
}

.nav-controls button:hover {
  background-color: #ccc;
}


.lang-en .FR { display: none; }
.lang-fr .EN { display: none; }