/*
Theme Name:   Tour de France du dérèglement bioéthique
Theme URI:    https://dereglement-bioethique.fr
Description:  Thème bloc sur mesure pour le site du Tour de France du dérèglement bioéthique, Fondation Jérôme Lejeune. Contrôle l'intégralité du rendu — en-tête, pied de page, gabarits, compositions. Les jetons de design sont dans theme.json ; ce fichier ne contient que les composants. Polices auto-hébergées, aucune dépendance externe.
Author:       Fondation Jérôme Lejeune
Version:      1.10.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  tdf-bioethique
Tags:         one-column, block-patterns, full-site-editing, custom-colors, custom-menu
*/

/* =========================================================
   1. PONT VERS LE PLUGIN
   Le plugin utilise ses propres variables --tdf-*. On les
   alimente depuis la palette de theme.json : changer une
   couleur dans theme.json met à jour le plugin aussi.
   ========================================================= */
:root{
  --tdf-navy:      var(--wp--preset--color--navy);
  --tdf-navy-deep: var(--wp--preset--color--navy-deep);
  --tdf-orange:    var(--wp--preset--color--orange);
  --tdf-orange-500:var(--wp--preset--color--orange-lit);
  --tdf-orange-ink:var(--wp--preset--color--orange-ink);
  --tdf-mist:      var(--wp--preset--color--mist);
  --tdf-slate:     var(--wp--preset--color--slate);
  --tdf-line:      rgba(16,30,51,.13);
  --tdf-display:   var(--wp--preset--font-family--display);
  --tdf-hand:      var(--wp--preset--font-family--hand);
  --tdf-navy-soft: var(--wp--preset--color--navy-soft);
}

/* =========================================================
   2. BASE
   ========================================================= */
body{ -webkit-font-smoothing:antialiased; }

/* Les bandeaux doivent s'enchaîner sans respiration blanche :
   on supprime l'écart que WordPress place entre en-tête, contenu
   et pied de page. */
.wp-site-blocks > * + *{ margin-block-start:0; }
.wp-site-blocks > main > .wp-block-post-content > :last-child{ margin-block-end:0; }

/* Même chose ENTRE deux bandeaux pleine largeur du contenu : l'écart de
   blocs de WordPress laissait un filet blanc entre deux fonds colorés
   (bleu clair → bleu nuit sur l'accueil, bleu nuit → orange en fin de
   page). La barre des repères, qui chevauche volontairement le bandeau
   précédent, garde sa marge négative. */
.wp-block-post-content > .alignfull + .alignfull:not(.tdf-pillars-wrap){ margin-block-start:0; }

/* Longueur de ligne confortable dans les pages éditoriales.
   La largeur de contenu de theme.json (820px) s'en charge
   déjà ; ceci ne vise que les blocs posés en pleine largeur. */
.tdf-prose p,
.tdf-prose li{ max-width:70ch; }

/* Phrase d'introduction d'un bandeau : le bandeau peut être large,
   la ligne de texte doit rester lisible. */
.tdf-lede{ max-width:56ch; }

/* Dans une page éditoriale, les titres structurent une lecture longue :
   ils gagnent à être plus présents que dans un bandeau d'accueil. */
.tdf-prose h2{
  font-size:clamp(1.95rem, 1.4rem + 1.9vw, 2.85rem);
  margin-top:2.4rem;
  margin-bottom:.7rem;
}
.tdf-prose h3{
  font-size:clamp(1.25rem, 1.1rem + .6vw, 1.55rem);
  margin-top:1.9rem;
  margin-bottom:.5rem;
}
.tdf-prose h2:first-child,
.tdf-prose h3:first-child{ margin-top:0; }

/* =========================================================
   3. COMPOSANTS
   Classes à saisir dans « Réglages avancés → Classe(s) CSS »
   d'un bloc. Les compositions du thème les posent déjà.
   ========================================================= */

/* Écriture manuscrite — accents ponctuels, jamais du texte long */
.tdf-hand{
  font-family:var(--wp--preset--font-family--hand);
  font-weight:700;
  line-height:1.15;
}

/* Titre en lettrage d'affiche (Anton), pour les bandeaux */
.tdf-display,
.tdf-display h1,
.tdf-display h2{
  font-family:var(--wp--preset--font-family--display);
  font-weight:400;
  text-transform:uppercase;
  line-height:1.02;
  letter-spacing:0;
  text-wrap:balance;
}

/* Filet orange court, au-dessus d'un titre de section */
.tdf-rule::before{
  content:"";
  display:block;
  width:52px;
  height:4px;
  border-radius:2px;
  background:var(--wp--preset--color--orange);
  margin-bottom:1.1rem;
}
.has-white-color .tdf-rule::before,
.tdf-on-dark .tdf-rule::before{ background:var(--wp--preset--color--orange-lit); }

/* Surtitre */
.tdf-eyebrow{
  font-size:.76rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--wp--preset--color--orange-ink);
}
.tdf-on-dark .tdf-eyebrow{ color:var(--wp--preset--color--orange-lit); }

/* Sur fond sombre : titres et texte en blanc */
.tdf-on-dark,
.tdf-on-dark p,
.tdf-on-dark li,
.tdf-on-dark h1,
.tdf-on-dark h2,
.tdf-on-dark h3{ color:#fff; }
.tdf-on-dark a:not(.wp-block-button__link){ color:var(--wp--preset--color--orange-lit); }

/* Encadré d'appel */
.tdf-callout{
  border-left:4px solid var(--wp--preset--color--orange);
  background:#FFF7F1;
  padding:1.1rem 1.4rem;
  border-radius:0 6px 6px 0;
}
.tdf-callout p{ margin:0; }

/* Citation du dossier de presse */
.tdf-quote{
  border-left:4px solid var(--wp--preset--color--orange);
  padding-left:1.4rem;
  font-weight:600;
}
.tdf-on-dark .tdf-quote{ border-left-color:var(--wp--preset--color--orange-lit); }

/* Bouton secondaire, contour seul */
.wp-block-button.tdf-btn-outline .wp-block-button__link{
  background:transparent;
  color:var(--wp--preset--color--navy);
  box-shadow:inset 0 0 0 2px currentColor;
}
.tdf-on-dark .wp-block-button.tdf-btn-outline .wp-block-button__link{ color:#fff; }
.wp-block-button.tdf-btn-outline .wp-block-button__link:hover{
  background:var(--wp--preset--color--navy);
  color:#fff;
  box-shadow:inset 0 0 0 2px var(--wp--preset--color--navy);
}

/* Bouton bleu nuit, pour les fonds orange */
.wp-block-button.tdf-btn-navy .wp-block-button__link{
  background:var(--wp--preset--color--navy);
  color:#fff;
}
.wp-block-button.tdf-btn-navy .wp-block-button__link:hover{
  background:var(--wp--preset--color--navy-soft);
}

/* =========================================================
   4. EN-TÊTE ET PIED DE PAGE
   ========================================================= */
/* Le flou dépoli est porté par un pseudo-élément, PAS par l'en-tête.
   Une propriété `backdrop-filter` sur un élément en fait le bloc
   conteneur de ses descendants en `position:fixed` : le menu mobile de
   WordPress, qui s'ouvre en plein écran, se retrouvait enfermé dans la
   hauteur de la barre — d'où les deux seules entrées visibles. Déplacé
   sur `::before`, l'effet est identique et l'en-tête redevient
   transparent au positionnement fixe. */
.tdf-header{
  position:sticky;
  top:0;
  z-index:100;
  border-bottom:1px solid var(--tdf-line);
}
.tdf-header::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:rgba(255,255,255,.95);
  backdrop-filter:saturate(180%) blur(10px);
}

/* Le panneau mobile passe au-dessus de tout le reste, y compris des
   bandeaux qui créent leur propre contexte d'empilement. */
.tdf-header .wp-block-navigation__responsive-container.is-menu-open{
  z-index:200000;
}
.tdf-header .wp-block-navigation__responsive-container-open,
.tdf-header .wp-block-navigation__responsive-container-close{
  position:relative;
  z-index:1;
}
.admin-bar .tdf-header{ top:32px; }
@media (max-width:782px){ .admin-bar .tdf-header{ top:46px; } }

.tdf-header .wp-block-site-logo img{ height:42px; width:auto; }

.tdf-header .wp-block-navigation a{ text-decoration:none; }
.tdf-header .wp-block-navigation a:hover{ color:var(--wp--preset--color--orange-ink); }

/* Logo complet de la Fondation, en pied de page — version blanche,
   lisible sur bleu nuit. La pastille seule laissait la signature
   institutionnelle hors du pied de page.
   SVG vectoriel extrait du flyer imprimé (tracés d'origine, visage en
   deux gris) : net à toute taille et sur écran haute densité. */
.tdf-footer-mark{
  width:min(260px, 100%);
  aspect-ratio:144.22 / 35.18;
  margin-bottom:1.1rem;
  background:url("assets/images/logo_full_white.svg") no-repeat left center/contain;
}

/* Appel au don, repris de la signature de la Fondation : deux lignes,
   la seconde soulignée d'un trait orange. L'ensemble est un seul lien. */
.tdf-don{ margin:0; }
.tdf-don a{
  display:inline-block;
  color:#fff;
  font-size:1.18rem;
  line-height:1.3;
  font-weight:600;
}
.tdf-don a:hover{ text-decoration:none; }
.tdf-don .tdf-don-a,
.tdf-don .tdf-don-b{ display:block; }
.tdf-don .tdf-don-b{
  position:relative;
  font-weight:800;
  padding-bottom:.22em;
}
.tdf-don .tdf-don-b::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:4px;
  border-radius:4px;
  background:var(--wp--preset--color--orange);
  transition:transform .18s ease;
  transform-origin:left center;
}
.tdf-don a:hover .tdf-don-b::after{ transform:scaleX(1.06); }
.tdf-don a:focus-visible{ outline:3px solid var(--wp--preset--color--orange); outline-offset:4px; }

/* Les liens héritent sinon de l'orange encre défini dans theme.json :
   3,66:1 sur le bleu nuit profond, sous le seuil AA pour du petit texte.
   En blanc, ils passent à 18:1, et l'orange clair sert au survol. */
.tdf-footer a{ text-decoration:none; color:#fff; }
.tdf-footer a:hover{ text-decoration:underline; color:var(--wp--preset--color--orange-lit); }
.tdf-footer .tdf-don a:hover{ text-decoration:none; color:#fff; }
.tdf-footer .wp-block-heading{
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:#fff;
}

/* =========================================================
   5. BANDEAU DE PAGE INTÉRIEURE
   ========================================================= */
.tdf-page-hero{ position:relative; overflow:hidden; }
.tdf-page-hero .wp-block-post-title,
.tdf-page-hero h1{ color:#fff; }

/* Boussole en filigrane — signature visuelle du Tour.
   Posée en fond, jamais sur plus d'un bandeau par page. */
.tdf-compass::after{
  content:"";
  position:absolute;
  right:-90px;
  top:-110px;
  width:420px;
  height:420px;
  pointer-events:none;
  opacity:.13;
  background-repeat:no-repeat;
  background-size:contain;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23fff' stroke-width='1'%3E%3Ccircle cx='100' cy='100' r='94'/%3E%3Ccircle cx='100' cy='100' r='78'/%3E%3Ccircle cx='100' cy='100' r='52'/%3E%3Cpath d='M100 6v28M100 166v28M6 100h28M166 100h28' stroke-width='1.4'/%3E%3Cpath d='M39 39l20 20M161 39l-20 20M39 161l20-20M161 161l-20-20' stroke-width='.9'/%3E%3Cpath d='M100 48L112 100L100 152L88 100Z'/%3E%3Cpath d='M48 100L100 88L152 100L100 112Z'/%3E%3C/svg%3E");
}

/* Fil d'Ariane */
.tdf-crumb{ font-size:.85rem; }
.tdf-crumb a{ color:rgba(255,255,255,.65); text-decoration:none; }
.tdf-crumb a:hover{ color:#fff; text-decoration:underline; }

/* =========================================================
   6. MOSAÏQUE DU HERO D'ACCUEIL
   ========================================================= */
.tdf-mosaic img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:14px;
  box-shadow:0 26px 60px -22px rgba(0,0,0,.6);
}
.tdf-mosaic figcaption{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:2;
  margin:0;
  padding:1.8rem .9rem .8rem;
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#fff;
  background:linear-gradient(to top, rgba(6,14,28,.88), transparent);
  border-radius:0 0 14px 14px;
}
.tdf-mosaic .wp-block-image{ position:relative; height:100%; margin:0; }

/* La mosaïque : colonnes à hauteur égale, images qui remplissent.
   La hauteur minimale évite que les visuels se réduisent à des
   vignettes quand la colonne de texte est plus haute qu'eux. */
.tdf-mosaic{ min-height:26rem; }
.tdf-mosaic .wp-block-columns{ align-items:stretch; height:100%; }
.tdf-mosaic .wp-block-column{ display:flex; flex-direction:column; gap:.75rem; }
.tdf-mosaic .wp-block-image{ flex:1; min-height:9rem; }

@media (max-width:781px){
  .tdf-mosaic{ min-height:0; }
  .tdf-mosaic .wp-block-image{ min-height:11rem; }
}

/* =========================================================
   6 bis. BANDEAUX PLEINE LARGEUR
   Un bandeau qui touche les bords de l'écran ne doit pas
   pour autant étirer son texte d'un bord à l'autre : le
   contenu reste centré sur la largeur large du thème.
   ========================================================= */
.alignfull > .tdf-cta,
.alignfull .tdf-cta{ border-radius:0; }

.tdf-cta-in{
  max-width:var(--wp--style--global--wide-size);
  margin-inline:auto;
}

/* Le titre du bandeau d'action reprend le lettrage d'affiche */
.tdf-cta h2{
  font-family:var(--wp--preset--font-family--display);
  font-weight:400;
  letter-spacing:0;
  line-height:1.04;
  font-size:var(--wp--preset--font-size--h2);
}

/* Idem pour la liste et la grille d'étapes posées en pleine largeur */
.alignfull > .tdf-list,
.alignfull > .tdf-cards,
.alignfull > .tdf-stats{
  max-width:var(--wp--style--global--wide-size);
  margin-inline:auto;
}

/* =========================================================
   6 quater. FRISE 2026 → 2028
   Une pastille par échéance, reliées par un trait : la
   succession se lit d'un coup d'œil, ce qu'une simple
   colonne de dates ne donne pas.
   ========================================================= */
.tdf-timeline{ position:relative; padding-top:3.1rem; }

/* Le trait de liaison, à hauteur du centre des pastilles */
.tdf-timeline::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:11px;
  height:2px;
  background:rgba(255,255,255,.22);
}

.tdf-timeline > .wp-block-column{ position:relative; }
.tdf-timeline > .wp-block-column::before{
  content:"";
  position:absolute;
  left:0;
  top:-3.1rem;
  width:24px;
  height:24px;
  border-radius:50%;
  background:var(--wp--preset--color--navy);
  border:4px solid var(--wp--preset--color--orange);
  box-sizing:border-box;
}

@media (max-width:781px){
  .tdf-timeline::before{ display:none; }
  .tdf-timeline > .wp-block-column{ padding-top:2.6rem; }
  .tdf-timeline > .wp-block-column::before{ top:0; }
  .tdf-timeline{ padding-top:0; }
}

/* =========================================================
   6 ter. LES QUATRE VERBES
   Carte blanche posée à cheval sur la couture entre le
   bandeau d'accueil et la section suivante : elle relie les
   deux zones et annonce la logique du site.
   « Agir » est traité en orange plein, pour rester la
   destination la plus visible.
   ========================================================= */
.tdf-pillars-wrap{
  position:relative;
  z-index:5;
  margin-top:calc(-1 * var(--wp--preset--spacing--50));
  margin-bottom:var(--wp--preset--spacing--40);
}
.tdf-pillars{
  background:#fff;
  border-radius:14px;
  box-shadow:0 1px 2px rgba(10,20,40,.05), 0 18px 44px -14px rgba(10,20,40,.3);
  overflow:hidden;
}
.tdf-pillar{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:.9rem;
  padding:1.3rem 1.25rem;
  border-right:1px solid var(--tdf-line);
  margin:0;
}
.tdf-pillar:last-child{ border-right:none; }

.tdf-pillar-ic{
  width:42px;
  min-width:42px;
  height:42px;
  padding:0;
  border-radius:50%;
  background:var(--wp--preset--color--mist);
  flex-shrink:0;
  background-repeat:no-repeat;
  background-position:center;
  background-size:20px 20px;
}
.tdf-pillar-tx{ min-width:0; }
.tdf-pillar-t{
  margin:0;
  font-weight:700;
  font-size:1rem;
  color:var(--wp--preset--color--navy);
  line-height:1.25;
}
.tdf-pillar-s{
  margin:0;
  font-size:.83rem;
  color:var(--wp--preset--color--slate);
  line-height:1.3;
}

/* « Agir » : aplat orange, texte blanc */
.tdf-pillar-agir{ background:var(--wp--preset--color--orange); border-right:none; }
.tdf-pillar-agir .tdf-pillar-t,
.tdf-pillar-agir .tdf-pillar-s{ color:#fff; }
.tdf-pillar-agir .tdf-pillar-ic{ background-color:rgba(255,255,255,.22); }

/* Pictogrammes, en fond pour éviter quatre blocs image à gérer */
.tdf-ic-informer{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23173568' stroke-width='2'%3E%3Cpath d='M4 5.5A1.5 1.5 0 015.5 4H12v16H5.5A1.5 1.5 0 014 18.5v-13z'/%3E%3Cpath d='M20 5.5A1.5 1.5 0 0018.5 4H12v16h6.5a1.5 1.5 0 001.5-1.5v-13z'/%3E%3C/svg%3E"); }
.tdf-ic-comprendre{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23173568' stroke-width='2'%3E%3Cpath d='M9 18h6M10 22h4M12 2a6 6 0 00-3.5 10.9c.5.4.8 1 .8 1.6V15h5.4v-.5c0-.6.3-1.2.8-1.6A6 6 0 0012 2z'/%3E%3C/svg%3E"); }
.tdf-ic-echanger{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23173568' stroke-width='2'%3E%3Ccircle cx='8' cy='9' r='3'/%3E%3Ccircle cx='17' cy='9' r='2.4'/%3E%3Cpath d='M2.5 20c0-3 2.5-5 5.5-5s5.5 2 5.5 5M14.5 15.5c2.4.2 4.2 1.9 4.5 4.3'/%3E%3C/svg%3E"); }
.tdf-ic-agir{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M3 11v3a1 1 0 001 1h2l4 4V6L6 10H4a1 1 0 00-1 1z'/%3E%3Cpath d='M15 8a4 4 0 010 8M18 5a8 8 0 010 14'/%3E%3C/svg%3E"); }

@media (max-width:900px){
  .tdf-pillars-wrap{ margin-top:calc(-1 * var(--wp--preset--spacing--40)); }
  .tdf-pillar{ border-bottom:1px solid var(--tdf-line); }
  .tdf-pillar-agir{ border-bottom:none; }
}

/* =========================================================
   7. CARTES OUTILS
   ========================================================= */
/* La carte ne porte AUCUN rembourrage : le bandeau visuel touche donc
   ses trois bords sans avoir à ressortir par une marge négative. C'est
   le texte qui porte sa propre gouttière. La version précédente faisait
   l'inverse — carte rembourrée, bandeau tiré vers l'extérieur — et la
   disposition « constrained » de WordPress annulait ces marges avec un
   `margin-left:auto !important` : le visuel se retrouvait encadré de
   blanc. Les `!important` ci-dessous écrasent les styles en ligne du
   contenu déjà en base, pour que la correction s'applique sans réimport. */
.tdf-tool{
  height:100%;
  overflow:hidden;
  padding:0 0 var(--wp--preset--spacing--30) !important;
}
.tdf-tool > *{
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
}
.tdf-tool > *:not(.tdf-tool-top){
  padding-left:var(--wp--preset--spacing--30);
  padding-right:var(--wp--preset--spacing--30);
}
.tdf-tool-top{
  margin:0 0 var(--wp--preset--spacing--20) !important;
  padding:0 !important;
  height:132px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px 14px 0 0;
}
/* Hauteur de bandeau identique sur les trois cartes : les titres
   s'alignent, quelle que soit la proportion du visuel. */
.tdf-tool-top .wp-block-image{ margin:0; }
.tdf-tool-top img{ max-height:88px; width:auto; object-fit:contain; }
.tdf-tool-top-wa{ background:linear-gradient(135deg,#25D366,#128C4A); }

/* Boussole de la carte « repères pour agir » */
.tdf-tool-top-compass::before{
  content:"";
  width:74px;
  height:74px;
  background-repeat:no-repeat;
  background-size:contain;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23F47B27' stroke-width='3.4'%3E%3Ccircle cx='50' cy='50' r='38'/%3E%3Ccircle cx='50' cy='50' r='27'/%3E%3Cpath d='M50 50L63 29L50 19L37 29Z' fill='%23F47B27' stroke='none'/%3E%3Cpath d='M50 50L37 71L50 81L63 71Z' fill='%23fff' stroke='none' opacity='.8'/%3E%3C/svg%3E");
}

/* =========================================================
   8. CARTES DES GRANDS ENJEUX
   ========================================================= */
.tdf-issue{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  min-height:19rem;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  background:var(--wp--preset--color--navy);
}
/* Le contenu de la carte s'empile ; l'image reste un calque de fond. */
.tdf-issue > *:not(.tdf-issue-bg){ width:100%; max-width:none; margin-inline:0; }
.tdf-issue h3{ margin-bottom:.4rem; }
.tdf-issue p{ margin-bottom:.7rem; }
.tdf-issue .tdf-issue-bg{ position:absolute; inset:0; margin:0; z-index:0; }
.tdf-issue .tdf-issue-bg img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.55;
  transition:transform .5s ease, opacity .3s ease;
}
.tdf-issue:hover img{ transform:scale(1.06); opacity:.68; }
.tdf-issue::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(8,18,36,.94) 18%, rgba(8,18,36,.3) 62%, rgba(8,18,36,.08));
}
.tdf-issue > *{ position:relative; z-index:2; }
.tdf-issue h3{ color:#fff; font-family:var(--wp--preset--font-family--display); font-weight:400; text-transform:uppercase; }
.tdf-issue p{ color:rgba(255,255,255,.76); }

/* =========================================================
   9. ACCESSIBILITÉ
   ========================================================= */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
summary:focus-visible{
  outline:3px solid var(--wp--preset--color--orange-lit);
  outline-offset:3px;
}

.tdf-skip{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:9999;
  background:var(--wp--preset--color--navy);
  color:#fff;
  padding:.8rem 1.2rem;
}
.tdf-skip:focus{ left:0; color:#fff; }

.screen-reader-text{
  position:absolute !important;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
  .tdf-issue:hover img{ transform:none; }
}

/* =========================================================
   10. RESPONSIVE
   ========================================================= */
@media (max-width:781px){
  .tdf-compass::after{ width:280px; height:280px; right:-70px; top:-80px; }
  .tdf-issue{ min-height:240px; }
}

/* =========================================================
   11. DOSSIER « APRÈS LA VISITE DE LÉON XIV »
   Compositions leon-xiv-*. Le titre porte la thèse, la carte
   de droite porte l'événement : l'accroche au-dessus du
   titre fait le lien entre les deux.
   ========================================================= */

/* Les ancres des points d'attention passent sous l'en-tête collant */
#points-attention,
#venir,
.tdf-repere{ scroll-margin-top:110px; }

/* --- Bandeau d'ouverture --- */
.tdf-leon-kicker{
  display:flex;
  align-items:center;
  gap:1rem;
  margin:0 0 .9rem;
  font-family:var(--wp--preset--font-family--display);
  font-weight:400;
  font-size:clamp(1.25rem, .95rem + 1.2vw, 2rem);
  line-height:1.05;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.tdf-leon-kicker::before{
  content:"";
  flex:0 0 48px;
  height:4px;
  border-radius:2px;
  background:var(--wp--preset--color--orange);
}
.tdf-on-dark .tdf-leon-kicker{ color:var(--wp--preset--color--orange-lit); }

.tdf-on-dark .tdf-leon-lede{ color:rgba(255,255,255,.86); max-width:56ch; }

/* Carte du voyage */
.tdf-leon-card{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.15);
  border-radius:20px;
  padding:clamp(1.4rem, 3vw, 2.4rem);
}
.tdf-leon-card > *{ margin-block:0; }
.tdf-leon-card > * + *{ margin-block-start:1.3rem; }

.wp-block-group.tdf-leon-card-head{
  gap:1.1rem;
  padding-bottom:1.3rem;
  border-bottom:1px solid rgba(255,255,255,.15);
}
.tdf-leon-portrait{ margin:0; flex:0 0 84px; }
.tdf-leon-portrait img{
  width:84px;
  height:84px;
  border-radius:50%;
  object-fit:cover;
  border:3px solid var(--wp--preset--color--orange-lit);
}
/* Emplacement photo vide : rien ne s'affiche sur le site */
.tdf-leon-portrait:not(:has(img[src])){ display:none; }

.tdf-leon-id > *{ margin:0; }
.tdf-leon-name{
  font-family:var(--wp--preset--font-family--display);
  font-size:clamp(2rem, 1.6rem + 1.2vw, 2.6rem);
  line-height:1;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.tdf-on-dark .tdf-leon-dates{
  margin-top:.4rem;
  font-size:.9rem;
  font-weight:600;
  color:rgba(255,255,255,.72);
}

.wp-block-quote.tdf-leon-quote{ margin:0; padding:0; border:0; }
.wp-block-quote.tdf-leon-quote::before{
  content:"«";
  display:block;
  height:3rem;
  margin-bottom:.4rem;
  font-family:var(--wp--preset--font-family--display);
  font-size:4.5rem;
  line-height:1;
  color:var(--wp--preset--color--orange);
}
.tdf-leon-quote p{
  margin:0;
  font-size:clamp(1.2rem, 1rem + .8vw, 1.6rem);
  font-weight:600;
  line-height:1.38;
}
.tdf-leon-quote cite{
  display:block;
  margin-top:.8rem;
  font-size:.88rem;
  font-style:normal;
  color:rgba(255,255,255,.72);
}

/* Itinéraire : reprend la frise de l'accueil, en plus petit, et reste
   horizontal sur mobile. Double classe pour passer devant les règles
   mobiles de .tdf-timeline. */
.tdf-timeline.tdf-leon-trip{ padding-top:1.9rem; }
.tdf-timeline.tdf-leon-trip::before{ display:block; top:6px; }
.tdf-timeline.tdf-leon-trip > .wp-block-column{ padding-top:0; }
.tdf-timeline.tdf-leon-trip > .wp-block-column::before{
  top:-1.9rem;
  width:14px;
  height:14px;
  border-width:3px;
}
.tdf-leon-trip p{ margin:0; }
.tdf-leon-city{ font-weight:800; }
.tdf-on-dark .tdf-leon-when{ font-size:.82rem; color:rgba(255,255,255,.72); }

/* Barre des six repères : la barre des verbes de l'accueil, avec un
   numéro à la place du pictogramme et toute la case cliquable. */
.tdf-leon-nav .wp-block-group.tdf-pillar{
  position:relative;
  flex-direction:column;
  align-items:flex-start;
  gap:.35rem;
  padding:1rem 1.1rem;
  transition:background .15s ease;
}
.tdf-leon-nav .tdf-pillar:hover{ background:var(--wp--preset--color--mist); }
.tdf-leon-nav .tdf-pillar-agir:hover{ background:var(--wp--preset--color--orange-lit); }
.tdf-pillar-num{
  margin:0;
  min-width:1.7rem;
  font-family:var(--wp--preset--font-family--display);
  font-size:1.35rem;
  line-height:1;
  color:var(--wp--preset--color--orange-ink);
}
.tdf-pillar-agir .tdf-pillar-num{ color:#fff; }
.tdf-leon-nav .tdf-pillar-t a{ color:inherit; text-decoration:none; }
.tdf-leon-nav .tdf-pillar-t a::after{ content:""; position:absolute; inset:0; }
.tdf-leon-nav .tdf-pillar:focus-within{ outline:3px solid var(--wp--preset--color--orange-lit); outline-offset:-3px; }
.tdf-leon-nav .tdf-pillar-t a:focus-visible{ outline:none; }

/* La disposition « grille » de WordPress remplit la ligne de pistes
   vides quand il y a peu d'éléments (auto-fill) : la barre et les
   grilles du dossier fixent donc leur nombre de colonnes. */
/* Double classe : les règles de disposition de WordPress sont imprimées
   après cette feuille, à spécificité égale elles passeraient devant. */
.tdf-leon-nav .wp-block-group.tdf-pillars{ grid-template-columns:repeat(5, minmax(0, 1fr)); }
.wp-block-group.tdf-leon-lieux{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
.wp-block-group.tdf-repere-box,
.wp-block-group.tdf-minitools{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
@media (max-width:1100px){
  .tdf-leon-nav .wp-block-group.tdf-pillars{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .tdf-leon-nav .tdf-pillar{ border-bottom:1px solid var(--tdf-line); }
}
@media (max-width:900px){
  .wp-block-group.tdf-leon-steps{ grid-template-columns:minmax(0, 1fr); }
  .wp-block-group.tdf-leon-lieux{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .wp-block-group.tdf-repere-box,
  .wp-block-group.tdf-minitools{ grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:560px){
  .tdf-leon-nav .wp-block-group.tdf-pillars{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .wp-block-group.tdf-leon-lieux{ grid-template-columns:minmax(0, 1fr); }
}

/* --- Une parole adressée à tous --- */
.tdf-leon-lieux{ border-top:2px solid var(--wp--preset--color--navy); }
.tdf-leon-lieu{ padding:1.4rem 1.4rem .4rem 0; border-right:1px solid var(--tdf-line); }
.tdf-leon-lieu + .tdf-leon-lieu{ padding-left:1.4rem; }
.tdf-leon-lieu:last-child{ border-right:none; }
.tdf-leon-lieu > *{ margin:0; }
.tdf-leon-lieu-n{
  font-family:var(--wp--preset--font-family--display);
  font-size:clamp(2rem, 1.6rem + 1.4vw, 2.8rem);
  line-height:1;
  color:var(--wp--preset--color--orange);
}
.tdf-leon-lieu-p{ margin-top:.5rem !important; font-weight:600; color:var(--wp--preset--color--navy); }
.tdf-leon-lieu-d{ font-size:.85rem; color:var(--wp--preset--color--slate); }

.wp-block-quote.tdf-leon-cite{
  margin:0;
  padding:.2rem 0 .2rem 1.4rem;
  border:0;
  border-left:4px solid var(--wp--preset--color--orange);
}
.tdf-leon-cite p{
  margin:0;
  font-size:clamp(1.15rem, 1rem + .6vw, 1.5rem);
  font-weight:600;
  line-height:1.42;
  color:var(--wp--preset--color--navy);
}
.tdf-leon-cite cite,
.tdf-repere-quote cite{
  display:block;
  margin-top:.7rem;
  font-size:.85rem;
  font-style:normal;
  font-weight:400;
  color:var(--wp--preset--color--slate);
}
.tdf-leon-conviction{
  margin:0;
  font-size:1.2rem;
  font-weight:600;
  line-height:1.5;
  color:var(--wp--preset--color--navy);
}

/* --- Les six repères --- */
.tdf-leon-reperes .tdf-repere{ margin-top:var(--wp--preset--spacing--50); }
.tdf-repere + .tdf-repere{
  border-top:1px solid var(--tdf-line);
  padding-top:var(--wp--preset--spacing--50);
}
.tdf-repere-cols{ align-items:stretch !important; column-gap:clamp(1.5rem, 4vw, 4rem); }
@media (min-width:782px){
  .tdf-repere-rev .tdf-repere-cols{ flex-direction:row-reverse; }
}

.tdf-repere-media{ display:flex; }
.tdf-repere-media > *{ flex:1; margin:0 !important; }
/* L'image épouse la hauteur du texte d'en face, quelle que soit sa
   proportion d'origine. */
.tdf-repere-img{ position:relative; min-height:24rem; }
.tdf-repere-img img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:16px;
  display:block;
}

/* Panneau typographique, quand il n'y a pas de photo */
.tdf-repere-panel{
  min-height:24rem;
  padding:clamp(1.6rem, 3vw, 2.6rem);
  border-radius:16px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:1.5rem;
  background-image:radial-gradient(rgba(255,255,255,.18) 1px, transparent 1.2px), linear-gradient(120deg, var(--wp--preset--color--orange) 0%, #BF4408 100%);
  background-size:22px 22px, 100% 100%;
}
.tdf-repere-panel > *{ margin:0; color:#fff; }
.tdf-repere-panel-q{
  font-family:var(--wp--preset--font-family--display);
  font-size:clamp(2rem, 1.5rem + 2vw, 3.2rem);
  line-height:1.05;
  text-transform:uppercase;
  text-wrap:balance;
}
.tdf-repere-panel-s{ font-size:.9rem; color:rgba(255,255,255,.9) !important; }

.tdf-repere-body > *{ margin-block:0; }
.tdf-repere-body > * + *{ margin-block-start:1.1rem; }
.tdf-repere-num{
  font-family:var(--wp--preset--font-family--display);
  font-size:1rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--wp--preset--color--orange-ink);
}
.tdf-repere-body .tdf-repere-title{
  margin-block-start:.3rem;
  font-size:clamp(1.6rem, 1.25rem + 1.3vw, 2.3rem);
}
.tdf-repere-label{
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--wp--preset--color--slate);
}
.tdf-repere-label-accent{ color:var(--wp--preset--color--orange-ink); }

.wp-block-quote.tdf-repere-quote{ margin-inline:0; margin-bottom:0; padding:0; border:0; }
.tdf-repere-quote p{
  margin:0;
  font-size:clamp(1.15rem, 1rem + .6vw, 1.5rem);
  font-weight:600;
  line-height:1.42;
  color:var(--wp--preset--color--navy);
}
.tdf-repere-quote-2 p{
  font-size:1.05rem;
  font-weight:500;
  line-height:1.6;
  color:var(--wp--preset--color--ink);
}

.wp-block-group.tdf-repere-box{
  background:var(--wp--preset--color--mist);
  border-radius:12px;
  padding:1.4rem 1.6rem;
  gap:1.2rem 2rem;
}
.tdf-repere-cell > *{ margin:0; }
.tdf-repere-cell > * + *{ margin-top:.45rem; }
.tdf-repere-principe{ font-weight:600; color:var(--wp--preset--color--navy); line-height:1.55; }
.tdf-repere-fait{ font-size:.95rem; line-height:1.55; }

.wp-block-group.tdf-repere-foot{ gap:.6rem 1.6rem; }
.tdf-repere-foot p{ margin:0; font-weight:700; }
.tdf-repere-more a{
  color:var(--wp--preset--color--navy);
  text-decoration:none;
  border-bottom:2px solid var(--wp--preset--color--orange);
  padding-bottom:2px;
}
.tdf-repere-more a:hover{ color:var(--wp--preset--color--orange-ink); }
.tdf-repere-video a{ color:var(--wp--preset--color--slate); font-weight:600; }

/* Encart « Rester informé » : les deux chaînes, en cartes horizontales */
.wp-block-group.tdf-minitools{ gap:1rem; }
.wp-block-group.tdf-minitool{
  gap:0 !important;
  align-items:stretch !important;
  border:1px solid var(--tdf-line);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.tdf-minitool-v{
  flex:0 0 96px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--wp--preset--color--navy);
}
.tdf-minitool-wa{ background:linear-gradient(135deg, #25D366, #128C4A); }
.tdf-minitool-img{ margin:0; }
.tdf-minitool-img img{ width:62px; height:auto; display:block; }
.tdf-minitool-round img{ width:60px; height:60px; border-radius:50%; object-fit:cover; }
.tdf-minitool-tx{ padding:1rem 1.15rem; }
.tdf-minitool-tx > *{ margin:0; }
.tdf-minitool-t{ font-weight:800; color:var(--wp--preset--color--navy); }
.tdf-minitool-d{ margin-top:.3rem !important; font-size:.86rem; line-height:1.5; color:var(--wp--preset--color--slate); }
.tdf-minitool-l{ margin-top:.5rem !important; font-size:.86rem; font-weight:700; }

/* Encart « Le Tour passe près de chez vous » */
.wp-block-group.tdf-repere-tour{
  background:var(--wp--preset--color--navy);
  border-radius:12px;
  padding:1.3rem 1.6rem;
  gap:1.2rem;
}
.wp-block-group.tdf-repere-tour-l{ gap:1rem; }
.tdf-ic-pin{
  flex:0 0 40px;
  width:40px;
  height:40px;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F47B27' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E");
}
.tdf-repere-tour-tx > *{ margin:0; }
.tdf-repere-tour-t{ font-size:1.1rem; font-weight:800; }
.tdf-on-dark .tdf-repere-tour-d{ margin-top:.2rem; font-size:.9rem; color:rgba(255,255,255,.75); }
.tdf-repere-tour .wp-block-buttons{ margin:0; }

/* Deux sections blanches qui se suivent : pas de double marge */
.tdf-leon-parole + .tdf-leon-reperes{ padding-top:var(--wp--preset--spacing--30) !important; }

/* Phrase d'ouverture des points d'attention : elle tient lieu de titre */
.tdf-leon-intro{
  max-width:46ch;
  margin:0;
  font-size:clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
  font-weight:600;
  line-height:1.4;
  color:var(--wp--preset--color--navy);
  text-wrap:pretty;
}

/* Pont vers le Tour, en fin de chaque point d'attention */
.wp-block-group.tdf-bridge{
  background:#FFF7F1;
  border-left:4px solid var(--wp--preset--color--orange);
  border-radius:0 12px 12px 0;
  padding:1.2rem 1.5rem;
}
.tdf-bridge > *{ margin:0; }
.tdf-bridge > * + *{ margin-top:.5rem; }
.tdf-bridge-text{ line-height:1.55; color:var(--wp--preset--color--ink); }
.tdf-bridge-link{ font-weight:700; }
.tdf-bridge-link a{
  color:var(--wp--preset--color--navy);
  text-decoration:none;
  border-bottom:2px solid var(--wp--preset--color--orange);
  padding-bottom:2px;
}
.tdf-bridge-link a:hover{ color:var(--wp--preset--color--orange-ink); }

/* --- Venir à une soirée du Tour --- */
.wp-block-group.tdf-leon-steps{
  grid-template-columns:repeat(3, minmax(0, 1fr));
  margin-top:var(--wp--preset--spacing--40);
}
.tdf-leon-step{
  background:#fff;
  border-radius:12px;
  padding:1.2rem 1.3rem;
}
.tdf-leon-step > *{ margin:0; }
.tdf-leon-step-n{
  font-family:var(--wp--preset--font-family--display);
  font-size:2rem;
  line-height:1;
  color:var(--wp--preset--color--orange);
}
.tdf-leon-step-t{ margin-top:.6rem !important; font-weight:800; color:var(--wp--preset--color--navy); line-height:1.3; }
.tdf-leon-step-d{ margin-top:.35rem !important; font-size:.9rem; line-height:1.5; color:var(--wp--preset--color--slate); }
.tdf-leon-free{ font-weight:600; color:var(--wp--preset--color--navy); }

.tdf-leon-next{
  background:#fff;
  border-radius:14px;
  padding:1.5rem 1.6rem;
  align-self:flex-start;
}
.tdf-leon-next-t{
  margin:0 0 .6rem;
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--wp--preset--color--orange-ink);
}

/* --- Entre deux soirées : les deux chaînes, en second rang --- */
.tdf-leon-outils-t{ margin-top:.3rem; font-size:var(--wp--preset--font-size--x-large); }

/* --- Conclusion --- */
.tdf-leon-final{ text-align:center; }
.wp-block-quote.tdf-leon-final-quote{
  margin:0 auto;
  padding:0;
  border:0;
  max-width:52rem;
}
.wp-block-quote.tdf-leon-final-quote::before{
  content:"«";
  display:block;
  height:3.6rem;
  margin-bottom:.6rem;
  font-family:var(--wp--preset--font-family--display);
  font-size:5.5rem;
  line-height:1;
  color:var(--wp--preset--color--orange);
}
.tdf-leon-final-quote p{
  margin:0;
  font-size:clamp(1.35rem, 1.05rem + 1.2vw, 2.1rem);
  font-weight:600;
  line-height:1.38;
}
.tdf-leon-final-quote cite{
  display:block;
  margin-top:1rem;
  font-size:.9rem;
  font-style:normal;
  color:rgba(255,255,255,.72);
}
.tdf-on-dark .tdf-leon-final-text{
  max-width:48rem;
  margin-inline:auto;
  margin-top:var(--wp--preset--spacing--40);
  font-size:1.12rem;
  color:rgba(255,255,255,.86);
}
.tdf-leon-final-text strong{ color:#fff; }

@media (max-width:781px){
  .tdf-repere-img{ min-height:15rem; }
  .tdf-repere-panel{ min-height:0; }
  .tdf-leon-lieu{ padding-left:0 !important; border-right:none; border-bottom:1px solid var(--tdf-line); padding-bottom:1rem; }
  .tdf-leon-lieu:last-child{ border-bottom:none; }
  .tdf-repere-tour .wp-block-buttons{ width:100%; }
}

/* =========================================================
   12. ACTUALITÉS
   Les articles de WordPress, renommés « Actualités ».
   Liste : templates/home.html. Article : templates/single.html.
   ========================================================= */
.wp-block-post-template.tdf-news-grid{ gap:var(--wp--preset--spacing--30); }
@media (max-width:1000px){
  .wp-block-post-template.tdf-news-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width:640px){
  .wp-block-post-template.tdf-news-grid{ grid-template-columns:minmax(0, 1fr) !important; }
}

.tdf-news-card{
  height:100%;
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--tdf-line);
  border-radius:14px;
  overflow:hidden;
}
.tdf-news-card > *{ margin:0 !important; }
.tdf-news-img{ margin:0; }
.tdf-news-img img{ display:block; width:100%; height:auto !important; aspect-ratio:16/9; object-fit:cover; }
.tdf-news-body{ flex:1; display:flex; flex-direction:column; padding:1.3rem 1.4rem 1.4rem; }
.tdf-news-body > *{ margin:0; }
.tdf-news-body > * + *{ margin-top:.6rem; }

.tdf-news-date{
  font-size:.76rem;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--wp--preset--color--orange-ink);
}
.tdf-on-dark .tdf-news-date{ color:var(--wp--preset--color--orange-lit); margin-bottom:.6rem; }

/* Dans une carte, le titre reste en texte courant : le lettrage
   d'affiche, en capitales, devient illisible sur trois lignes. */
.wp-block-post-title.tdf-news-title{
  font-family:var(--wp--preset--font-family--body);
  font-weight:800;
  text-transform:none;
  font-size:var(--wp--preset--font-size--x-large);
  line-height:1.25;
}
.tdf-news-title a{ color:var(--wp--preset--color--navy); text-decoration:none; }
.tdf-news-title a:hover{ color:var(--wp--preset--color--orange-ink); }
.tdf-news-excerpt{ font-size:.95rem; color:var(--wp--preset--color--slate); }
.tdf-news-excerpt p{ margin:0; }
.tdf-news-more{ margin-top:auto !important; padding-top:.6rem; font-weight:700; font-size:.95rem; }

.tdf-news-pages{ margin-top:var(--wp--preset--spacing--50); font-weight:600; }

.tdf-news-empty{
  max-width:640px;
  padding:var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
  background:var(--wp--preset--color--mist);
  border-radius:14px;
}
.tdf-news-empty > *{ margin:0; }
.tdf-news-empty > * + *{ margin-top:.8rem; }
.tdf-news-empty-t{ font-size:var(--wp--preset--font-size--x-large); font-weight:800; color:var(--wp--preset--color--navy); }
.tdf-news-empty .wp-block-buttons{ margin-top:1.4rem; }

.tdf-news-hero-img{ margin-bottom:var(--wp--preset--spacing--40); }
.tdf-news-hero-img img{ border-radius:14px; width:100%; height:auto !important; aspect-ratio:16/9; object-fit:cover; }
.tdf-news-foot{
  margin-top:var(--wp--preset--spacing--50) !important;
  padding-top:var(--wp--preset--spacing--30);
  border-top:1px solid var(--tdf-line);
  gap:1rem 2rem;
  font-weight:700;
}
.tdf-news-foot p{ margin:0; }
.tdf-news-nav{ gap:1.5rem; }
