/**
 * Landing tuba frontal — isolé du thème (Hummingbird / .rich-text).
 * Toutes les règles sont préfixées .tp-tuba-page (aucun style global hors wrapper).
 */
.tp-tuba-page {
  --tp-text: #1a1a1a;
  --tp-heading: #0d1f33;
  --tp-accent: #0b6bcb;
  --tp-accent-hover: #0958a8;
  --tp-img-radius: 14px;
  /* Bloc page (hero en pleine largeur) */
  --tp-max: min(68rem, 100%);
  /* Hauteur max des photos corps = règle figure img ; largeur prose = même bandeau (4:3) */
  --tp-figure-max-h: min(52vh, 440px);
  --tp-prose-max: min(38rem, 100%, calc(var(--tp-figure-max-h) * 4 / 3));
  --tp-hero-h: clamp(300px, 44vw, 560px);
  width: 100%;
  max-width: var(--tp-max);
  margin: 0 auto;
  padding: 0 0.85rem 2rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--tp-text);
  text-align: left;
}
.tp-tuba-page *,
.tp-tuba-page *::before,
.tp-tuba-page *::after {
  box-sizing: border-box;
}
/* Curseur : pas d’I-beam sur le texte, main sur les zones cliquables */
#content .tp-tuba-page,
#content .tp-tuba-page * {
  cursor: default !important;
}
.page-cms .tp-tuba-page,
.page-cms .tp-tuba-page * {
  cursor: default !important;
}
#wrapper .tp-tuba-page a,
#wrapper .tp-tuba-page button,
#wrapper .tp-tuba-page summary,
#wrapper .tp-tuba-page summary *,
#content .tp-tuba-page a,
#content .tp-tuba-page button,
#content .tp-tuba-page summary,
#content .tp-tuba-page summary * {
  cursor: pointer !important;
}

/* ——— Reset ciblé anti-thème (.rich-text, Bootstrap) ——— */
/* Pas de h1 ici : le seul h1 est le hero (texte blanc). Un h1 global teinterait le hero en bleu (#0d1f33). */
.page-cms.rich-text .tp-tuba-page h2,
.page-cms.rich-text .tp-tuba-page h3,
.tp-tuba-page h2,
.tp-tuba-page h3 {
  font-family: inherit !important;
  font-weight: 700 !important;
  color: var(--tp-heading) !important;
  margin: 0 !important;
  padding: 0 !important;
}
.tp-tuba-page h2 {
  font-size: 1.35rem !important;
  line-height: 1.28 !important;
}
.tp-tuba-page p {
  font-size: 1rem !important;
  line-height: 1.55 !important;
  margin: 0 0 0.8em !important;
  color: var(--tp-text) !important;
  max-width: none !important;
}
.tp-tuba-page p:last-child {
  margin-bottom: 0 !important;
}
.tp-tuba-page ul {
  margin: 0 0 0.9em !important;
  padding-left: 1.25rem !important;
  list-style: disc !important;
  font-size: 1rem !important;
}
.tp-tuba-page li {
  margin: 0 0 0.4em !important;
  line-height: 1.55 !important;
}
.tp-tuba-page figure {
  margin: 1rem auto 1.25rem !important;
  padding: 0 !important;
  max-width: 100% !important;
  text-align: center !important;
}
/* Photos du corps d’article : coins arrondis + découpe propre (Hummingbird / .rich-text) */
.tp-tuba-page .cms-tuba-article figure,
#content.page-cms.rich-text .tp-tuba-page .cms-tuba-article figure {
  overflow: hidden !important;
  border-radius: var(--tp-img-radius) !important;
}
.tp-tuba-page strong {
  font-weight: 700 !important;
  color: var(--tp-heading) !important;
}

/* Bloc racine interne */
.tp-tuba-page .cms-tuba {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

/* ——— Hero ——— */
.tp-tuba-page .cms-tuba-hero,
#content.page-cms.rich-text .tp-tuba-page .cms-tuba-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  margin: 0 auto 1.75rem;
  background: #0b2e4a;
  width: 100%;
  max-width: 100%;
  height: var(--tp-hero-h);
  min-height: 280px;
}
.tp-tuba-page .cms-tuba-hero img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: 62% 40% !important;
  border-radius: 0 !important;
  display: block !important;
  margin: 0 !important;
}

/* Article 2 : afficher plus de photo dans le cadre (ne dépend pas de l'ID CMS) */
.tp-tuba-page.tp-tuba-article2 .cms-tuba-hero img {
  object-fit: contain !important;
  object-position: 50% 50% !important;
}

/* Article 2 : remonter le titre du hero */
.tp-tuba-page.tp-tuba-article2 .cms-tuba-hero__bottom {
  transform: translateY(-12rem);
}
.tp-tuba-page .cms-tuba-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.16) 22%,
    rgba(0, 0, 0, 0.06) 34%,
    rgba(0, 0, 0, 0) 48%
  );
  pointer-events: none;
}
.tp-tuba-page .cms-tuba-hero__inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.5rem 1.5rem 1.2rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 100%;
}
.tp-tuba-page .cms-tuba-hero__bottom {
  max-width: min(var(--tp-prose-max), calc(100% - 10.5rem));
  width: 100%;
  margin-top: auto;
  margin-bottom: 0;
  text-align: left;
  padding-bottom: 0.15rem;
  flex-shrink: 0;
}
.tp-tuba-page .cms-tuba-hero__btn {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 3;
}
.tp-tuba-page .cms-tuba-hero__btn p {
  margin: 0 !important;
}
.tp-tuba-page .cms-tuba-hero__k {
  font-size: 0.82rem !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  margin: 0 0 0.65rem 0 !important;
  line-height: 1.35 !important;
  max-width: var(--tp-prose-max);
}
.tp-tuba-page .cms-tuba-hero__h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.95rem) !important;
  line-height: 1.16 !important;
  font-weight: 900 !important;
  color: #fff !important;
  margin: 0 0 0.65rem 0 !important;
  max-width: var(--tp-prose-max);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.tp-tuba-page .cms-tuba-hero__t {
  font-size: clamp(1.35rem, 3.2vw, 1.95rem) !important;
  line-height: 1.14 !important;
  font-weight: 900 !important;
  color: #fff !important;
  margin: 0 0 0.65rem 0 !important;
  max-width: var(--tp-prose-max);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.tp-tuba-page .cms-tuba-hero__s {
  font-size: clamp(0.98rem, 2vw, 1.06rem) !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 0 1rem 0 !important;
  max-width: var(--tp-prose-max);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.42);
}
.tp-tuba-page .cms-tuba-hero__bottom .cms-tuba-hero__s {
  margin-bottom: 0 !important;
}
/*
 * Hero : blanc — même si le BO a retiré la classe sur <h1>, ou si .rich-text h1 (Bootstrap gray-800) charge après.
 */
#content.page-cms.rich-text .tp-tuba-page .cms-tuba-hero h1,
.page-cms.rich-text .tp-tuba-page .cms-tuba-hero h1,
#content.page-cms .tp-tuba-page .cms-tuba-hero h1.cms-tuba-hero__h1,
.page-cms.rich-text .tp-tuba-page .cms-tuba-hero h1.cms-tuba-hero__h1 {
  color: #fff !important;
  font-weight: 900 !important;
}
#content.page-cms.rich-text .tp-tuba-page .cms-tuba-hero .cms-tuba-hero__k,
.page-cms.rich-text .tp-tuba-page .cms-tuba-hero .cms-tuba-hero__k {
  color: rgba(255, 255, 255, 0.95) !important;
}
#content.page-cms.rich-text .tp-tuba-page .cms-tuba-hero .cms-tuba-hero__s,
.page-cms.rich-text .tp-tuba-page .cms-tuba-hero .cms-tuba-hero__s {
  color: rgba(255, 255, 255, 0.9) !important;
}
.tp-tuba-page .cms-tuba-btn {
  display: inline-block !important;
  background: var(--tp-accent) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 0.72rem 1.2rem !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.tp-tuba-page .cms-tuba-btn:hover {
  background: var(--tp-accent-hover) !important;
  color: #fff !important;
}

/* ——— Bandeau fin de page (image + bouton, pleine largeur comme le hero) ——— */
.tp-tuba-page .cms-tuba-cta-fin {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 2rem auto 0;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  line-height: 0;
}
.tp-tuba-page .cms-tuba-cta-fin > img {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  display: block !important;
  margin: 0 !important;
}
.tp-tuba-page .cms-tuba-cta-fin__btn {
  position: absolute;
  left: calc(5.75rem + 6rem - 12rem + 2rem);
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(calc(-50% + 1rem));
  z-index: 2;
}
.tp-tuba-page .cms-tuba-cta-fin__btn p {
  margin: 0 !important;
}
.tp-tuba-page .cms-tuba-cta-fin .cms-tuba-btn {
  font-size: 1.15rem !important;
  padding: calc(0.72rem * 1.15) calc(1.2rem * 1.15) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* ——— Article & repliables (colonne = largeur des photos, hero reste pleine largeur) ——— */
.tp-tuba-page .cms-tuba-article {
  max-width: var(--tp-prose-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.tp-tuba-page .cms-tuba-sec {
  padding: 1.05rem 0;
  border-top: 1px solid rgba(13, 31, 51, 0.1);
}
.tp-tuba-page .cms-tuba-sec:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.tp-tuba-page details.cms-tuba-fold {
  margin: 0.35rem 0 0;
}
.tp-tuba-page details.cms-tuba-fold summary {
  list-style: none !important;
  cursor: pointer !important;
  user-select: none;
  display: block !important;
}
.tp-tuba-page details.cms-tuba-fold summary::-webkit-details-marker {
  display: none !important;
}
.tp-tuba-page .cms-tuba-sumrow {
  display: flex !important;
  align-items: flex-start;
  gap: 0.85rem;
}
.tp-tuba-page .cms-tuba-sumrow h2 {
  flex: 1;
  margin: 0 !important;
  font-size: 1.35rem !important;
  line-height: 1.28 !important;
}
.tp-tuba-page .cms-tuba-chev {
  flex: 0 0 auto;
  margin-top: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid rgba(13, 31, 51, 0.45);
  border-bottom: 2px solid rgba(13, 31, 51, 0.45);
  transform: rotate(-45deg);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.tp-tuba-page details[open] .cms-tuba-chev {
  transform: rotate(135deg);
  border-color: rgba(13, 31, 51, 0.35);
}
/* Bloc dans <summary> : pas de -webkit-line-clamp ici (souvent hauteur 0 / texte invisible). Fermé = max-height généreuse. */
.tp-tuba-page .cms-tuba-excerpt {
  display: block !important;
  margin: 0.45rem 0 0.35rem;
  color: rgba(26, 26, 26, 0.9) !important;
  overflow: hidden;
}
.tp-tuba-page details:not([open]) .cms-tuba-excerpt {
  max-height: 28em;
}
/* Même taille que .cms-tuba-body-inner h3 (ex. « 2008 : le premier… ») */
.tp-tuba-page .cms-tuba-excerpt h3 {
  font-size: 1.12rem !important;
  line-height: 1.3 !important;
  margin: 0 0 0.5em !important;
  color: var(--tp-heading) !important;
  font-weight: 700 !important;
}
.tp-tuba-page .cms-tuba-excerpt p {
  font-size: 0.98rem !important;
  line-height: 1.52 !important;
}
.tp-tuba-page .cms-tuba-readmore {
  display: inline-block !important;
  margin-top: 0.15rem;
  font-weight: 600 !important;
  color: rgba(11, 107, 203, 0.85) !important;
  font-size: 0.92rem !important;
  text-decoration: none !important;
}
.tp-tuba-page .cms-tuba-readmore:hover {
  color: var(--tp-accent-hover) !important;
  text-decoration: underline !important;
}
.tp-tuba-page .cms-tuba-readmore::after {
  content: " →";
}
.tp-tuba-page details[open] .cms-tuba-excerpt {
  max-height: none !important;
  overflow: visible !important;
}
.tp-tuba-page details[open] .cms-tuba-readmore {
  display: none !important;
}
/* Corps repliable : display (pas max-height).
 * Important : ne pas dépendre de #content.page-cms (diffère selon thèmes / prod).
 */
.tp-tuba-page .cms-tuba-body {
  display: none !important;
  overflow: visible !important;
  max-height: none !important;
  opacity: 1 !important;
}
.tp-tuba-page details[open] .cms-tuba-body {
  display: block !important;
}
.tp-tuba-page .cms-tuba-body-inner {
  padding-top: 0.55rem;
}
.tp-tuba-page .cms-tuba-body-inner > p:first-child {
  margin-top: 0 !important;
}
.tp-tuba-page .cms-tuba-body-inner h3 {
  font-size: 1.12rem !important;
  line-height: 1.3 !important;
  margin: 1.15em 0 0.5em !important;
}
.tp-tuba-page .cms-tuba-body-inner h3:first-child {
  margin-top: 0 !important;
}
.tp-tuba-page .cms-tuba-body-inner em {
  font-style: italic !important;
}
.tp-tuba-page .cms-tuba-body-inner blockquote {
  margin: 1rem 0 !important;
  padding: 0.85rem 1rem !important;
  border-left: 4px solid var(--tp-accent) !important;
  background: rgba(11, 107, 203, 0.07) !important;
  color: var(--tp-text) !important;
}
.tp-tuba-page .cms-tuba-body-inner blockquote p {
  margin: 0 !important;
}
.tp-tuba-page .cms-tuba-body-inner .cms-tuba-signoff,
#content.page-cms.rich-text .tp-tuba-page p.cms-tuba-signoff {
  text-align: right !important;
  font-style: italic !important;
  margin: 0.85rem 0 0 !important;
  color: var(--tp-text) !important;
}
.tp-tuba-page .cms-tuba-faq {
  margin-top: 1.15rem !important;
}
.tp-tuba-page details.cms-tuba-faq-item {
  margin: 0.45rem 0 !important;
  border: 1px solid rgba(13, 31, 51, 0.12) !important;
  border-radius: 10px !important;
  padding: 0.4rem 0.7rem !important;
  background: rgba(255, 255, 255, 0.6) !important;
}
.tp-tuba-page details.cms-tuba-faq-item summary {
  list-style: none !important;
  cursor: pointer !important;
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
}
.tp-tuba-page details.cms-tuba-faq-item summary::-webkit-details-marker {
  display: none !important;
}
.tp-tuba-page details.cms-tuba-faq-item summary strong {
  font-weight: 700 !important;
  color: var(--tp-heading) !important;
}
.tp-tuba-page details.cms-tuba-faq-item[open] {
  padding-bottom: 0.65rem !important;
}
.tp-tuba-page details.cms-tuba-faq-item > div {
  margin-top: 0.5rem !important;
  padding-left: 0.15rem !important;
}
.tp-tuba-page details.cms-tuba-faq-item > div p {
  font-size: 0.96rem !important;
  margin-bottom: 0.5em !important;
}

/* FAQ : encadrement — le thème .rich-text peut neutraliser border sur <details> */
#content.page-cms.rich-text .tp-tuba-page details.cms-tuba-faq-item,
.page-cms.rich-text .tp-tuba-page details.cms-tuba-faq-item {
  margin: 0.45rem 0 !important;
  border: 1px solid rgba(13, 31, 51, 0.12) !important;
  border-radius: 10px !important;
  padding: 0.4rem 0.7rem !important;
  background: rgba(255, 255, 255, 0.6) !important;
  display: block !important;
}

/* Images sections : premium, non déformées — coins arrondis forcés (spécificité BO / thème) */
.page-cms.rich-text .tp-tuba-page .cms-tuba-article .cms-tuba-body figure img,
#content.page-cms .tp-tuba-page .cms-tuba-article .cms-tuba-body figure img,
#content.page-cms.rich-text .tp-tuba-page .cms-tuba-article .cms-tuba-body figure img,
.tp-tuba-page .cms-tuba-article .cms-tuba-body figure img,
.tp-tuba-page .cms-tuba-article .cms-tuba-body-inner > img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: var(--tp-figure-max-h) !important;
  margin: 0 auto !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: var(--tp-img-radius) !important;
}

/*
 * Dernier filet : certains thèmes chargent des règles img { border-radius: 0 } après ce fichier.
 */
section#content.page-cms.rich-text .tp-tuba-page .cms-tuba-article .cms-tuba-body figure img {
  border-radius: var(--tp-img-radius) !important;
}

/* 繁體中文（lang sur .cms-tuba) */
.tp-tuba-page .cms-tuba:lang(zh-Hant) {
  font-family: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Heiti TC", "Segoe UI", sans-serif;
  line-height: 1.65;
}
.tp-tuba-page .cms-tuba:lang(zh-Hant) h2 {
  line-height: 1.35 !important;
}
.tp-tuba-page .cms-tuba:lang(zh-Hant) .cms-tuba-hero__k {
  letter-spacing: 0.12em;
}
.tp-tuba-page .cms-tuba:lang(zh-Hant) .cms-tuba-hero__t {
  line-height: 1.22 !important;
}
.tp-tuba-page .cms-tuba:lang(zh-Hant) .cms-tuba-hero__h1 {
  line-height: 1.25 !important;
}
.tp-tuba-page .cms-tuba:lang(zh-Hant) .cms-tuba-hero__s {
  line-height: 1.6 !important;
}

@media (max-width: 640px) {
  .tp-tuba-page {
    padding: 0 0.2rem 1.5rem;
    --tp-figure-max-h: min(44vh, 320px);
    --tp-prose-max: min(38rem, 100%, calc(var(--tp-figure-max-h) * 4 / 3));
  }
  .tp-tuba-page .cms-tuba-hero {
    --tp-hero-h: clamp(260px, 58vw, 440px);
    min-height: 260px;
  }
  .tp-tuba-page .cms-tuba-hero img {
    object-position: 64% 42% !important;
  }
  .tp-tuba-page .cms-tuba-hero__inner {
    padding: 1.1rem 1.1rem 1rem;
  }
  .tp-tuba-page .cms-tuba-hero__bottom {
    max-width: min(var(--tp-prose-max), calc(100% - 8.25rem));
  }
  .tp-tuba-page .cms-tuba-hero__btn {
    right: 1.1rem;
    bottom: 1.1rem;
  }
  .tp-tuba-page .cms-tuba:lang(zh-Hant) .cms-tuba-hero__h1 {
    font-size: clamp(1.15rem, 4.2vw, 1.48rem) !important;
  }
  .tp-tuba-page .cms-tuba-cta-fin__btn {
    left: calc(5.35rem + 6rem - 12rem + 2rem);
    right: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(calc(-50% + 1rem));
  }
  .tp-tuba-page .cms-tuba-body figure img {
    max-height: var(--tp-figure-max-h) !important;
  }
}
