/* THUNDERLINK — HOMEPAGE STYLE OVERRIDES
 * Local additions for explicitly requested homepage features.
 * It loads after accueil.css so new, explicitly requested edits can be kept
 * separate from the preserved design. Use a page/section-specific selector.
 * Example selector names already present in accueil.html:
 *   #hero           Homepage hero
 *   #about          Company introduction
 *   #about-1        IT Operating Outsourcing
 *   #about-2        IT Asset Management
 *   #about-3        IT Facility Management
 * Do not add reset rules or global layout overrides unless you intend to change
 * every affected block. The original CSS already includes responsive behavior.
 */

/* Header language list: keep the original navigation and sticky styles intact. */
#kubio .tl-language-menu {
  position: relative;
}

#kubio .tl-language-menu > .tl-language-options {
  display: block;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  z-index: 50;
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 40px);
  margin: 0;
  padding: 12px 0;
  list-style: none;
  background: #fff;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06),
              0 12px 28px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#kubio .tl-language-menu.is-language-open > .tl-language-options {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#kubio .tl-language-options > li {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

#kubio .tl-language-options .tl-language-option {
  all: unset;
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: 16px 20px;
  color: #151515;
  background: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

#kubio .tl-language-options .tl-language-option:hover,
#kubio .tl-language-options .tl-language-option:focus-visible {
  color: #151515;
  background: #f2f4f5;
}

#kubio .tl-language-trigger:focus-visible,
#kubio .tl-language-options .tl-language-option:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

/* Inside the existing phone/tablet panel, expand within its available width. */
#kubio .kubio-accordion-menu .tl-language-menu > .tl-language-options {
  display: none;
  position: static;
  width: max-content;
  max-width: 100%;
}

#kubio .kubio-accordion-menu .tl-language-menu.is-language-open > .tl-language-options {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  #kubio .tl-language-menu > .tl-language-options {
    transition: none;
  }
}

/* Announce asynchronous language changes without moving the page layout. */
.tl-language-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Legal reading panel: fixed header, independently scrolling document body. */
#kubio .tl-legal-dialog {
  box-sizing: border-box;
  width: 71vw;
  max-width: 1800px;
  height: 93vh;
  height: 93dvh;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #333;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  text-align: left;
}

#kubio .tl-legal-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: tl-legal-appear 0.18s ease-out;
}

#kubio .tl-legal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

#kubio .tl-legal-dialog__header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 24px;
  min-height: clamp(120px, 7.8vw, 200px);
  padding: 24px 30px;
  border-bottom: 1px solid #e8e8e8;
}

#kubio .tl-legal-dialog__title {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: clamp(72px, 4.8vw, 124px);
  margin: 0;
  padding: 12px 0 12px 30px;
  border-left: 2px solid #c65b53;
  color: #222;
  font-family: inherit;
  font-size: clamp(24px, 1.8vw, 44px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: uppercase;
}

#kubio .tl-legal-dialog__close {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: #a5a5a5;
  cursor: pointer;
}

#kubio .tl-legal-dialog__close:hover {
  color: #333;
}

#kubio .tl-legal-dialog__close svg {
  width: 18px;
  height: 18px;
}

#kubio .tl-legal-dialog__body {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 30px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 18px;
  line-height: 1.7;
}

#kubio .tl-legal-dialog__body p {
  margin: 0 0 20px;
}

#kubio .tl-legal-dialog__body h3 {
  margin: 32px 0 12px;
  color: #222;
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
}

#kubio .tl-legal-dialog__body h4 {
  margin: 24px 0 10px;
  color: #333;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  text-transform: none;
}

#kubio .tl-legal-document__meta {
  color: #777;
  font-size: 15px;
}

#kubio .tl-legal-document__list {
  margin: 0 0 20px;
  padding-left: 1.4em;
  list-style: disc;
}

#kubio .tl-legal-document__list > li {
  display: list-item;
  margin: 0 0 10px;
  padding-left: 4px;
}

#kubio .tl-legal-document__facts {
  margin: 0 0 24px;
}

#kubio .tl-legal-document__facts > div {
  display: grid;
  grid-template-columns: minmax(140px, 30%) minmax(0, 1fr);
  gap: 12px 24px;
  padding: 12px 0;
  border-bottom: 1px solid #e7e7e7;
}

#kubio .tl-legal-document__facts dt {
  font-weight: 600;
}

#kubio .tl-legal-document__facts dd {
  min-width: 0;
  margin: 0;
}

#kubio .tl-legal-document__table-scroll {
  max-width: 100%;
  margin: 16px 0 24px;
  overflow-x: auto;
}

#kubio .tl-legal-document__table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 16px;
  line-height: 1.6;
}

#kubio .tl-legal-document__table th,
#kubio .tl-legal-document__table td {
  padding: 12px 14px;
  border: 1px solid #ddd;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

#kubio .tl-legal-document__table th {
  background: #f3f5f6;
  font-weight: 600;
}

#kubio .tl-legal-document__table td p {
  margin: 0;
}

#kubio .tl-legal-dialog__body [data-source-paragraph] {
  overflow-wrap: anywhere;
}

#kubio .tl-legal-dialog__close:focus-visible,
#kubio .tl-legal-dialog__body:focus-visible {
  outline: 2px solid #496c7c;
  outline-offset: -3px;
}

#kubio .tl-legal-load-status {
  max-width: 900px;
  margin: 16px auto;
  padding: 0 20px;
  color: #93453e;
  text-align: center;
}

@keyframes tl-legal-appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  #kubio .tl-legal-dialog {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
  }

  #kubio .tl-legal-dialog__header {
    gap: 12px;
    min-height: 100px;
    padding: 16px;
  }

  #kubio .tl-legal-dialog__title {
    min-height: 64px;
    padding-left: 16px;
    font-size: 21px;
  }

  #kubio .tl-legal-dialog__body {
    padding: 20px;
    font-size: 16px;
  }

  #kubio .tl-legal-document__facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #kubio .tl-legal-dialog[open] {
    animation: none;
  }
}

/* Email links retain the existing header and footer text appearance. */
#kubio a.tl-email-link,
#kubio a.tl-email-link:visited,
#kubio a.tl-email-link:hover,
#kubio a.tl-email-link:active {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

#kubio a.tl-email-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Homepage hero lights stay inside a decorative layer above the original image. */
#kubio body.home[data-i18n-page="accueil"] #hero > .tl-hero-lights {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 46%, rgba(0, 0, 0, 0.24) 67%, transparent 86%);
  mask-image: linear-gradient(90deg, #000 0%, #000 46%, rgba(0, 0, 0, 0.24) 67%, transparent 86%);
}

#kubio body.home[data-i18n-page="accueil"] #hero > .wp-block-kubio-hero__inner {
  z-index: 1;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-lightwash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 28% 63%, rgba(54, 202, 255, 0.15), transparent 62%), linear-gradient(95deg, rgba(21, 143, 238, 0.07) 8%, rgba(27, 185, 239, 0.04) 44%, transparent 72%);
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-glow {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-glow--cyan {
  top: 24%;
  left: -18%;
  width: clamp(440px, 65vw, 1050px);
  height: clamp(400px, 52vw, 820px);
  background: radial-gradient(ellipse at 44% 52%, rgba(105, 240, 255, 0.38) 0%, rgba(28, 185, 242, 0.2) 25%, rgba(15, 111, 211, 0.07) 49%, transparent 70%);
  opacity: 0.65;
  animation: tl-home-cyan-drift 22s ease-in-out infinite;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-glow--blue {
  top: 38%;
  left: 16%;
  width: clamp(400px, 57vw, 920px);
  height: clamp(360px, 45vw, 720px);
  background: radial-gradient(ellipse at 45% 50%, rgba(108, 191, 255, 0.33) 0%, rgba(43, 130, 248, 0.18) 28%, rgba(20, 82, 211, 0.06) 49%, transparent 72%);
  opacity: 0.5;
  animation: tl-home-blue-drift 18s ease-in-out infinite;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor {
  position: absolute;
  width: 240px;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(105, 219, 255, 0.28) 28%, rgba(171, 242, 255, 0.94) 76%, #fff 100%);
  box-shadow: 0 0 9px rgba(108, 220, 255, 0.34);
  opacity: 0;
  transform: translate3d(var(--tl-meteor-start-x, -220px), var(--tl-meteor-start-y, -150px), 0) rotate(32deg);
  transform-origin: right center;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor::after {
  position: absolute;
  top: -1.5px;
  right: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eaffff;
  box-shadow: 0 0 10px rgba(159, 241, 255, 1), 0 0 22px rgba(78, 195, 255, 0.8);
  content: "";
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor--one {
  --tl-meteor-end-x: 980px;
  --tl-meteor-end-y: 620px;
  top: 36%;
  left: 5%;
  animation-name: tl-home-meteor-flight;
  animation-duration: 6.2s;
  animation-delay: -0.5s;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor--two {
  --tl-meteor-start-x: -260px;
  --tl-meteor-start-y: -170px;
  --tl-meteor-end-x: 860px;
  --tl-meteor-end-y: 530px;
  top: 55%;
  left: -8%;
  width: 200px;
  animation-name: tl-home-meteor-flight;
  animation-duration: 7.1s;
  animation-delay: -4.4s;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor--three {
  --tl-meteor-end-x: 970px;
  --tl-meteor-end-y: 600px;
  top: 31%;
  left: 18%;
  width: 185px;
  animation-name: tl-home-meteor-flight;
  animation-duration: 8.4s;
  animation-delay: -6.1s;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor--four {
  --tl-meteor-end-x: 920px;
  --tl-meteor-end-y: 580px;
  top: 64%;
  left: -7%;
  width: 220px;
  animation-name: tl-home-meteor-flight;
  animation-duration: 6.8s;
  animation-delay: -2.6s;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor--five {
  --tl-meteor-start-x: -280px;
  --tl-meteor-start-y: -180px;
  --tl-meteor-end-x: 1000px;
  --tl-meteor-end-y: 630px;
  top: 42%;
  left: 15%;
  width: 250px;
  animation-name: tl-home-meteor-flight;
  animation-duration: 7.8s;
  animation-delay: -5.3s;
}

#kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor--six {
  --tl-meteor-end-x: 960px;
  --tl-meteor-end-y: 600px;
  top: 28%;
  left: 3%;
  width: 200px;
  animation-name: tl-home-meteor-flight;
  animation-duration: 5.8s;
  animation-delay: -3.8s;
}

@keyframes tl-home-cyan-drift {
  0%, 100% { opacity: 0.58; transform: translate3d(0, 0, 0) scale(1); }
  45% { opacity: 0.78; transform: translate3d(65px, -28px, 0) scale(1.09); }
  72% { opacity: 0.64; transform: translate3d(20px, 30px, 0) scale(1.03); }
}

@keyframes tl-home-blue-drift {
  0%, 100% { opacity: 0.46; transform: translate3d(0, 0, 0) scale(1); }
  48% { opacity: 0.68; transform: translate3d(-42px, 35px, 0) scale(1.11); }
  74% { opacity: 0.54; transform: translate3d(18px, 5px, 0) scale(1.04); }
}

@keyframes tl-home-meteor-flight {
  0% { opacity: 0; transform: translate3d(var(--tl-meteor-start-x, -220px), var(--tl-meteor-start-y, -150px), 0) rotate(32deg); }
  2% { opacity: 1; }
  19% { opacity: 0.95; }
  30%, 100% { opacity: 0; transform: translate3d(var(--tl-meteor-end-x), var(--tl-meteor-end-y), 0) rotate(32deg); }
}

@media (max-width: 767px) {
  #kubio body.home[data-i18n-page="accueil"] #hero > .tl-hero-lights {
    opacity: 0.82;
  }

  #kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-glow--cyan {
    top: 28%;
    left: -62%;
    width: 650px;
    height: 650px;
  }

  #kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-glow--blue,
  #kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor--three,
  #kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor--six {
    display: none;
  }

  #kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor {
    --tl-meteor-end-x: 480px;
    --tl-meteor-end-y: 320px;
    width: 145px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-glow {
    animation: none;
    opacity: 0.58;
    transform: none;
    will-change: auto;
  }

  #kubio body.home[data-i18n-page="accueil"] #hero .tl-hero-meteor {
    display: none;
    animation: none;
    will-change: auto;
  }
}
