/*
 * Wisext template - content classes.
 *
 * Classes used INSIDE articles, modules and Wisext pages (www_wisext_tools,
 * com_wisexttools), independent of the page layout. Ported from Helix
 * Ultimate's custom.css (Helix-only #sp-* rules and Bootstrap 2 leftovers
 * dropped). The site's look itself (colours, header, footer) is in user.css.
 * Colours come from the variables defined at the top of user.css.
 */

/* ---------- Sections: zones of forms and profile pages ---------- */
/* Each <fieldset> is a card and its <legend> a coloured title band across its top
   (Wisext templates > Sections; --wx-section-* variables at the top of user.css).
   Bootstrap floats the legend at full width and clears what follows it. */
fieldset {
  min-width: 0;
  margin: 0 0 var(--wx-section-gap);
  padding: 0 var(--wx-section-padding) var(--wx-section-padding);
  border: var(--wx-section-border-width) solid var(--wx-section-border);
  border-radius: var(--wx-radius);
  background: var(--wx-section-bg);
}

fieldset + fieldset {
  margin-top: 0;
}

/* Not zones: a fieldset inside a zone, and Joomla's radio / checkbox / switcher
   groups (e.g. « Non | Oui »), which are fieldsets too */
.wisext fieldset fieldset,
.wisext fieldset.radio,
.wisext fieldset.checkboxes,
.wisext fieldset.switcher {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

/* A zone without a title (e.g. the login form) */
fieldset:not(:has(> legend)) {
  padding-top: var(--wx-section-padding);
}

legend {
  float: left;
  width: calc(100% + 2 * var(--wx-section-padding));
  margin: 0 calc(-1 * var(--wx-section-padding)) var(--wx-section-padding);
  padding: .6em var(--wx-section-padding);
  border-radius: max(0px, calc(var(--wx-radius) - var(--wx-section-border-width))) max(0px, calc(var(--wx-radius) - var(--wx-section-border-width))) 0 0;
  background: var(--wx-section-band);
  color: var(--wx-section-title);
  font-size: var(--wx-section-title-size);
  font-weight: 600;
  line-height: 1.3;
}

/* Highlight the username field (profile, registration) */
#username,
#jform_username {
  background-color: #fff8d6;
}

.wisext_form_label {
  display: block;
  width: 275px;
  float: left;
}

.wisext_list_field {
  width: 300px;
}

.wisext_button {
  display: block;
  margin: .25rem auto;
  padding: .9rem 2rem;
  border: none;
  border-radius: var(--wx-radius-sm);
  background-color: var(--wx-accent);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.wisext_button:hover {
  background-color: var(--wx-brand-dark);
  color: #fff;
}

.wisext_to_hide {
  color: aqua;
}

/* ---------- User profile (definition lists) ---------- */
#users-profile-core dt,
#users-profile-custom dt,
.dl-horizontal dt {
  display: block;
  margin-top: .5rem;
  padding: .25rem .5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  background-color: var(--wx-bg);
  border-bottom: 1px solid var(--wx-border);
}

#users-profile-core dd,
#users-profile-custom dd,
.dl-horizontal dd {
  margin-left: 5%;
  font-style: oblique;
}

/* ---------- Tables ---------- */
/* Activation info tables (legacy markup uses id= on every cell) */
table[id="wisext_table"] {
  width: 100%;
  border-collapse: collapse;
}

td[id="wisext_td"],
th[id="wisext_th"] {
  padding: 8px;
  border: 1px solid var(--wx-border);
  text-align: left;
}

tr[id="wisext_tr"]:nth-child(even) {
  background-color: var(--wx-bg);
}

/* Licence comparison table (7 columns) */
#licence-table table {
  width: 100%;
  table-layout: fixed;
}

#licence-table th,
#licence-table td {
  width: 14.28%;
  vertical-align: top;
  text-align: center;
}

/* ---------- Media ---------- */
.responsive-video {
  position: relative;
}

.responsive-video iframe,
.responsive-video object,
.responsive-video embed {
  width: 100%;
}

.iframeHtml {
  display: block;
  width: 100%;
  height: 100vh;
  border: none;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ---------- Banners and modules ---------- */
/* Announcement strip */
.marquee {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  background-color: var(--wx-brand-dark);
  color: #fff !important;
}

.marquee a {
  color: #fff !important;
  text-decoration: none;
}

.support-company-banner {
  min-height: 40px;
  background-color: #fff;
}

/* Home banner: image with a centred text box */
.banner-wisext {
  position: relative;
  padding: 20px 0;
  background-color: #333;
  color: #fff;
  text-align: center;
}

.banner-wisext img {
  width: 100%;
  height: auto;
}

.banner-wisext-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, .5);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .3);
}

/* "Wisext clients" logos strip */
.wisext-clients {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
  overflow-x: auto;
}

.wisext-clients img {
  height: 50px;
  object-fit: contain;
  transition: transform .3s ease;
}

.wisext-clients img:hover {
  transform: scale(1.1);
}

/* Inline language links (legacy) */
.lang-inline a {
  color: var(--wx-muted);
}

.lang-inline a:hover {
  color: var(--wx-brand);
}

#footerinfos1 a {
  color: inherit;
}

/* ---------- Menu decorations ---------- */
/* Belgian flag menu item */
.belgian-flag {
  border-right: 5px solid transparent;
}

/* EPB menu item: green "energy label" arrow */
.epb-menu-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-right: 12px;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}

.epb-menu-link .image-title {
  position: relative;
  z-index: 2;
  padding: 6px 14px 6px 10px;
  border-radius: 3px 0 0 3px;
  background-color: #46c046;
  color: #fff;
}

.epb-menu-link .image-title::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -12px;
  width: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 12px solid #46c046;
}

/* EPB arrow in content */
.epb-arrow {
  --arrow-color: #46c046;
  --arrow-depth: 22px;
  display: inline-flex;
  align-items: center;
  padding: 8px 30px 8px 14px;
  border-radius: 4px 0 0 4px;
  background: var(--arrow-color);
  color: #fff;
  font-weight: bold;
  clip-path: polygon(0 0, calc(100% - var(--arrow-depth)) 0, 100% 50%, calc(100% - var(--arrow-depth)) 100%, 0 100%);
}

.epb-arrow a {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

/* ---------- EPB documentation (.epb-content), numbered headings ---------- */
.epb-content {
  counter-reset: h2counter;
}

.epb-content h1 {
  font-size: 2em;
  margin-bottom: .6em;
}

.epb-content h2 {
  margin-top: 1.8em;
  margin-bottom: .6em;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--wx-border);
  counter-reset: h3counter;
}

.epb-content h3 {
  margin-top: 1.4em;
  margin-bottom: .4em;
  counter-reset: h4counter;
}

.epb-content h4 {
  margin-top: 1em;
  margin-bottom: .4em;
  font-size: 1.1em;
}

.epb-content h2::before {
  counter-increment: h2counter;
  content: counter(h2counter) ". ";
  color: #555;
  font-weight: 600;
}

.epb-content h3::before {
  counter-increment: h3counter;
  content: counter(h2counter) "." counter(h3counter) " ";
  color: #777;
}

.epb-content h4::before {
  counter-increment: h4counter;
  content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) " ";
  color: #999;
}

.epb-content p,
.epb-content ul {
  margin-bottom: 1em;
  line-height: 1.55;
}

.epb-content ul {
  padding-left: 1.2em;
}

.epb-content img {
  display: block;
  max-width: 95%;
  height: auto;
  margin: .6em auto;
  padding: 4px;
  border: 1px solid #ccc;
  background: #fafafa;
  box-shadow: 0 0 4px rgba(0, 0, 0, .12);
}

/* Small icons inside sentences */
.epb-icon {
  display: inline-block !important;
  max-width: 32px;
  height: auto;
  margin: 0 4px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  vertical-align: middle;
}

/* Table of contents (numbers added by JS in .toc-num) */
.toc {
  margin-bottom: 1.8rem;
  padding: .2rem 0 .5rem .8rem;
  border-left: 3px solid var(--wx-border);
}

.toc h5 {
  margin: 0 0 .6rem;
  color: #444;
  font-size: 1.3rem;
  font-weight: 600;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  margin: 4px 0;
}

.toc a {
  color: #555;
  font-size: .92rem;
  text-decoration: none;
}

.toc a:hover {
  color: #000;
  text-decoration: underline;
}

.toc li.h2 a { font-weight: 600; }
.toc li.h3 a { margin-left: .7rem; font-weight: 500; }
.toc li.h4 a { margin-left: 1.4rem; font-weight: 400; }

.toc-num {
  margin-right: 4px;
  color: #777;
}

/* ---------- YouExtendXL pages (.yxl-*) ---------- */
/* Sober one-column pages of the YouExtendXL site: articles (home, Install,
   About) and com_wisexttools' views yxlshop / yxlaccount. One accent colour:
   --wx-brand (set per style in Colours and fonts). The content panel around
   such a page loses its card look: plain white page. */
.wisext .site-grid .container-component:has(.yxl-page) {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.yxl-page {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.yxl-page h1 {
  margin: .5rem 0 1rem;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

.yxl-page h2 {
  margin: 2.5rem 0 .75rem;
  font-size: 1.4rem;
  font-weight: 650;
}

.yxl-lead {
  margin-bottom: 1.75rem;
  color: var(--wx-muted);
  font-size: 1.15rem;
}

.yxl-muted,
.yxl-footnote {
  color: var(--wx-muted);
  font-size: .95rem;
}

.yxl-footnote {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--wx-border);
}

.yxl-figure {
  margin: 0 0 2rem;
}

.yxl-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
}

/* The page's one call to action */
.yxl-cta {
  margin: 0 0 2rem;
}

.yxl-cta .btn,
.yxl-page .btn-primary {
  --btn-bg: var(--wx-brand);
  --btn-border-color: var(--wx-brand);
  --btn-hover-bg: var(--wx-brand-dark);
  --btn-hover-border-color: var(--wx-brand-dark);
  --btn-active-bg: var(--wx-brand-dark);
  --btn-active-border-color: var(--wx-brand-dark);
  color: #fff;
}

.yxl-cta .btn {
  padding: .8rem 1.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.yxl-cta p {
  margin: .6rem 0 0;
  color: var(--wx-muted);
  font-size: .95rem;
}

.yxl-page .btn-outline-primary {
  --btn-color: var(--wx-brand);
  --btn-border-color: var(--wx-brand);
  --btn-hover-bg: var(--wx-brand);
  --btn-hover-border-color: var(--wx-brand);
  --btn-active-bg: var(--wx-brand-dark);
}

/* Short reassuring lines (home) */
.yxl-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.yxl-points li {
  position: relative;
  margin: .4rem 0;
  padding-left: 1.6rem;
}

.yxl-points li::before {
  position: absolute;
  left: 0;
  color: var(--wx-brand);
  font-weight: 700;
  content: "\2713";
}

/* Numbered steps (Install) */
.yxl-steps {
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  counter-reset: yxl-step;
}

.yxl-steps li {
  position: relative;
  margin: 0 0 1.1rem;
  padding-left: 2.6rem;
  counter-increment: yxl-step;
}

.yxl-steps li::before {
  position: absolute;
  top: -.1rem;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--wx-brand);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  content: counter(yxl-step);
}

.yxl-download {
  margin: 0;
  color: var(--wx-muted);
  font-size: .85rem;
  overflow-wrap: anywhere;
}

/* Shop: comparison table and packs */
.yxl-compare th,
.yxl-compare td {
  padding: .75rem;
  text-align: center;
  vertical-align: middle;
}

.yxl-compare tbody th {
  font-weight: 500;
  text-align: left;
}

.yxl-compare .yxl-highlight {
  background: color-mix(in srgb, var(--wx-brand) 7%, transparent);
}

.yxl-compare thead .yxl-highlight {
  color: var(--wx-brand);
}

.yxl-compare tfoot td {
  border-bottom: 0;
}

/* Phones: the four columns must fit, the subscription one included */
@media (max-width: 575.98px) {
  .yxl-compare {
    font-size: .85rem;
  }

  /* .table thead th is nowrap in Cassiopeia */
  .yxl-compare thead th,
  .yxl-compare th,
  .yxl-compare td {
    padding: .5rem .3rem;
    white-space: normal;
  }

  .yxl-compare .btn {
    padding: .3rem .5rem;
    font-size: .85rem;
  }
}

.yxl-packs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.yxl-pack {
  padding: 1.25rem;
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  text-align: center;
}

.yxl-pack p {
  margin-bottom: .75rem;
}

.yxl-pack-amount {
  font-size: 1.6rem;
  font-weight: 700;
}

/* My account: one row per subject */
.yxl-list {
  margin: 1.5rem 0;
  border-top: 1px solid var(--wx-border);
}

.yxl-list dt {
  padding-top: 1rem;
  color: var(--wx-muted);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.yxl-list dd {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin: 0;
  padding: .25rem 0 1rem;
  border-bottom: 1px solid var(--wx-border);
}

.yxl-actions {
  display: flex;
  gap: .5rem;
}

.yxl-actions form {
  margin: 0;
}

.yxl-pcs {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yxl-pcs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.yxl-pcs form {
  margin: 0;
}

.yxl-logout {
  margin-top: 2rem;
}

/* Contact: the AI first, then the form (html/com_contact/contact/default_form.php) */
.wx-contact-ai {
  margin-bottom: 2rem;
}
