/* === Page TDA / TDAH === */

/* Même fond que l’index */
body {
  background: #f2eeeb;
  margin: 0;
  padding: 0;
}

/* Header flottant au-dessus du bandeau, jamais sticky */
.site-header,
.site-header.is-sticky,
.site-header.sticky,
.site-header.fixed,
.site-header--fixed,
.site-header[data-sticky],
.site-header[data-fixed] {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  background: none !important;
  z-index: 50;
}

/* Ligne sous le menu en blanc (comme sur Hyperactivité) */
.site-header::after {
  border-bottom-color: #ffffff !important;
}

/* ===== Bandeau TDA plein haut ===== */

:root {
  --header-height: 80px; /* valeur de secours, surchargée par le JS global */
}

.tda-hero {
  position: relative;
  width: 100%;
  height: calc(var(--header-height) * 3);
  background-image: url("images/tda_header.jpg");
  background-position: center;
  background-repeat: no-repeat;

  /* ✅ Étire l'image pour couvrir toute la zone (largeur & hauteur) sans crop */
  background-size: 100% 100%;

  margin-top: 0;
}

.tda-hero-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.tda-hero-rail {
  position: relative;
  height: 100%;
}

/* Titre "Le trouble de l'attention" */
.tda-hero-title {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);

  margin: 0;

  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  white-space: nowrap; /* reste sur une seule ligne */

  color: #ffffff;
  text-align: center;
}

/* Réduction sur très petits écrans */
@media (max-width: 450px){
  .tda-hero-title{
    font-size: 28px;
  }
}
@media (max-width: 330px){
  .tda-hero-title{
    font-size: 24px;
  }
}

/* ===== Contenu principal sous le bandeau ===== */

.page-main {
  padding-top: 80px;
  padding-bottom: 0;
  min-height: 21vh;
}

.tda-body {
  margin: 0 auto;
  text-align: center;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.33;
  color: #000;

  font-size: clamp(17px, 3vw, 35px);
  max-width: 53ch;
}

/* 901–1449px : même logique que les titres de cartes */
@media (min-width: 901px) and (max-width: 1449px){
  .tda-body{
    font-size: calc((36px + (34 * ((100vw - 901px) / 549))) * 0.5) !important;
  }
}

/* ≥1450px : 70px * 0.5 = 35px */
@media (min-width: 1450px){
  .tda-body{
    font-size: 35px !important;
  }
}

/* Titre d’intro "L'épreuve silencieuse" */
.tda-title-3{
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 56px);
  line-height: 1.15;
  display: block;
  margin-bottom: 8px;
}

/* Ajustements mobiles de l’intro */
@media (max-width: 900px){
  .page-main{
    padding-top: 40px; /* réduit, comme sur Hyperactivité */
  }

  .tda-body{
    font-size: 18px !important;
    padding-inline: 8%;
  }

  .tda-title-3{
    font-size: 1.3em;
  }
}

/* ===== Section 2 colonnes TDA : texte + image carrée ===== */

/* Section globale */
.tda-two-cols {
  padding: 40px 0;
}

/* Conteneur dans le même rail que le reste du contenu (page-rail)
   → ne dépassera jamais la largeur du contenu */
.tda-columns {
  display: flex;
  width: 100%;
}

/* Deux colonnes strictement 50/50 */
.tda-col {
  width: 50%;
  display: flex;
}

/* Colonne texte */
.tda-col-text {
  align-items: center;
}

.tda-two-cols-body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #000;
}

.tda-two-cols-title {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(20px, 3vw, 48px);
  line-height: 1.2;
  display: block;
}

/* Colonne image : le carré occupe TOUTE la moitié du rail */
.tda-col-image {
  justify-content: flex-end;   /* colle le bloc au bord droit de la colonne */
  align-items: stretch;
  margin: 0;                   /* IMPORTANT: annule le margin par défaut de <figure> */
}

.tda-img-square-wrapper {
  width: 100%;         /* 100% de la colonne = 50% de la largeur du rail */
  aspect-ratio: 1 / 1; /* carré parfait */
  overflow: hidden;
}

.tda-img-square {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsive pour la section 2 colonnes */
@media (max-width: 900px){
  .tda-two-cols {
    padding: 50px 0;
  }

  .tda-columns {
    flex-direction: column;
  }

  .tda-col {
    width: 100%;
  }

  .tda-col-text {
    order: 1;
  }

  .tda-col-image {
    order: 2;
  }

  .tda-two-cols-body {
    padding-inline: 8%;
    font-size: 17px;
  }
}

/* ===== Bandeau sous la section (Vers la clarté intérieure) ===== */

.tda-banner {
  /* background: #4D5699; */
  background: #415AA0;  
  color: #fff;

  height: calc(var(--header-height) * 5);
  display: flex;
  align-items: center;
  margin-top: 50px;
  margin-bottom: 80px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.tda-banner-rail {
  width: 100%;
}

.tda-banner-text {
  text-align: center;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
  text-indent: 0;
  max-width: 53ch;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

/* Titre dans le bandeau : "Vers la clarté intérieure" */
/* Banner title — same size as "L'épreuve silencieuse" */
/* Titre dans le bandeau : "Sculpter la clarté intérieure" */
.tda-title-4 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 48px); /* même taille que tda-title-3 */
  line-height: 1.15;
  color: #63BCDE;
  display: inline;        /* ✅ se comporte comme du texte normal */
  white-space: nowrap;    /* ✅ reste sur une ligne */
  margin: 0;
  padding: 0;
}

/* Adaptation sur petits écrans */
@media (max-width: 600px){
  .tda-banner {
    height: auto;
    padding: 40px 0;
  }
  .tda-banner-text {
    padding-inline: 8%;
    font-size: 18px;
    line-height: 1.45;
  }
}

@media (max-width: 450px){
  .tda-title-4{
    font-size: 20px;
  }
}
@media (max-width: 330px){
  .tda-title-4{
    font-size: 18px;
  }
}

/* Add breathing room between text and square image */
.tda-col-text {
  padding-left: 75px;   /* space before text */
  padding-right: 75px;  /* space between text and image */
}

/* ===== Quote block (same as Nietzsche on index.php) ===== */

.quote-section {
  text-align: center;
  padding: 0 0 40px;
  font-family: "Playfair Display", serif;
}

/* Duguay quote */
.duguay-quote {
  /* font-family: 'Dancing Script', cursive; */
  font-family: Caveat;  
  font-size: 48px;
  line-height: 1.25;
  max-width: 900px;
  margin: 0 auto 15px;
  margin-bottom: 30px;
  /*color: #4D5699;*/
  color: #000000;
  letter-spacing: 0.5px;
}

/* ===== Overline subtitle above section titles ===== */

.tda-overline {
  display: block;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; /* sans-serif */
  font-size: 0.8em;            /* 50% of main title */
  font-weight: 500;
  /* color: #63BCDE; */              /* bleu */
  color: #1f86b0;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  margin-left: 4px;
}

/* Kill residual gap between overline and main title */
.tda-overline {
  padding-bottom: 0 !important;
  line-height: 1;
}

.tda-two-cols-title {
  margin-top: 0 !important;
  padding-top: 0 !important;
  line-height: 1.05;
}

/* Indigo blue highlight sentence */
.tda-highlight {
  color: #000;   
  font-size: 1.3em;
  margin-bottom: 10px;
}

/* ===== Titre du bandeau TDA : Sculpter la clarté intérieure ===== */

.tda-banner-text {
  position: relative;   /* pour que le titre se centre par rapport à ce bloc */
}

/* Titre parfaitement centré au pixel près */
.tda-banner-title {
  position: relative;
  left: 50%;
  transform: translateX(-50%);  /* centre mathématiquement */

  display: inline-block;
  white-space: nowrap;

  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 48px);  /* même taille que L'épreuve silencieuse */
  line-height: 1.15;
  /* color: #63BCDE; */
  color: #ffffff;  
  margin: 0;
  padding: 0;
}

/* ===== Sous-menu "À propos" : même apparence que apropos.css ===== */
.page-tda .nav-item.has-submenu .submenu{
  padding-top: 0px !important;
  padding-bottom: 0px !important;
}

.page-tda .nav-item.has-submenu .submenu a{
  padding-left: 6px !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  display: block !important; /* assure que le padding augmente bien la hauteur */
}

/* ===== Sous-menu "À propos" : texte NOIR sur fond blanc ===== */
.page-tda .nav-item.has-submenu .submenu{
  background: #fff !important;
}

.page-tda .nav-item.has-submenu .submenu a{
  color: #000 !important;
}

.tda-bullet {
  color: #415AA0;   
}

/* =========================
   Correctifs MOBILE ONLY
   Ne touche pas au desktop
   ========================= */
@media (max-width: 900px){

  /* Hero plus souple sur mobile */
  .tda-hero{
    min-height: 300px;
    height: auto;
    aspect-ratio: 16 / 10;
    background-size: cover;          /* évite l’écrasement de l’image */
    background-position: center;
  }

  .tda-hero-inner,
  .tda-hero-rail{
    min-height: inherit;
  }

  .tda-hero-title{
    top: 68%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 520px);
    padding-inline: 12px;
    white-space: normal;             /* autorise le retour à la ligne */
    text-wrap: balance;
    line-height: 1.08;
    font-size: clamp(28px, 7vw, 42px);
  }

  /* Intro */
  .page-main{
    padding-top: 34px;
    min-height: auto;
  }

  .tda-body{
    font-size: 18px !important;
    line-height: 1.45;
    padding-inline: 24px;
  }

  /* Sections 2 colonnes */
  .tda-two-cols{
    padding: 34px 0;
  }

  .tda-columns{
    flex-direction: column;
    gap: 22px;
  }

  .tda-col{
    width: 100%;
  }

  .tda-col-text{
    padding-left: 24px;              /* remplace les 75px trop lourds en mobile */
    padding-right: 24px;
    align-items: flex-start;
  }

  .tda-two-cols-body{
    padding-inline: 0;               /* éviter double padding */
    font-size: 17px;
    line-height: 1.6;
  }

  .tda-two-cols-title{
    font-size: clamp(28px, 7vw, 38px);
    line-height: 1.08;
  }

  .tda-highlight{
    display: block;
    font-size: 1.1em;
    line-height: 1.4;
  }

  .tda-img-square-wrapper{
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  /* Bandeau bleu */
  .tda-banner{
    height: auto;
    margin-top: 38px;
    margin-bottom: 54px;
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .tda-banner-text{
    max-width: none;
    padding-inline: 24px;
    font-size: 17px;
    line-height: 1.55;
  }

  .tda-banner-title{
    position: static;                /* supprime le centrage “mathématique” fragile */
    left: auto;
    transform: none;
    display: block;
    white-space: normal;             /* peut se casser proprement sur 2 lignes */
    text-align: center;
    font-size: clamp(28px, 7vw, 38px);
    line-height: 1.12;
    margin-bottom: 18px;
  }

  /* Citation */
  .quote-section{
    padding: 0 24px 34px;
  }

  .duguay-quote{
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.2;
    margin-bottom: 0;
  }
}

/* Très petits écrans */
@media (max-width: 480px){
  .tda-hero{
    min-height: 260px;
    aspect-ratio: 4 / 3;
  }

  .tda-hero-title{
    width: 94vw;
    font-size: clamp(24px, 8vw, 34px);
  }

  .tda-col-text,
  .tda-body,
  .tda-banner-text,
  .quote-section{
    padding-left: 18px;
    padding-right: 18px;
  }

  .tda-two-cols-title,
  .tda-banner-title{
    font-size: clamp(24px, 8vw, 32px);
  }
}

.tda-col-text {
  margin-top: 20px; /* ajuste: 15–30px selon ton goût */
}