/*
Theme Name: Baludo
Theme URI: https://baludo.be
Description: Thème enfant de Twenty Twenty-Five appliquant l'identité Baludo : palette 6 couleurs avec valeurs mode sombre, Bricolage Grotesque et Public Sans auto-hébergées, échelle typographique et règles d'usage de la charte.
Author: Digi4you
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: baludo
*/

/* ---- Jetons de couleur : mode clair par défaut, valeurs de la charte ---- */
:root{
  --baludo-grege:#F2F1EC;
  --baludo-encre:#17211E;
  --baludo-vert:#14543C;
  --baludo-ocre:#8A5A12;
  --baludo-succes:#1B7245;
  --baludo-alerte:#B02417;
  --baludo-texte-2:#545B58;   /* Encre sapin à 72 % */
  --baludo-surface:#E8E7E0;
  --baludo-bordure:#DCDBD3;
}
/* Site clair dans tous les cas (choix de Kevin, 09/10/2026) : plus de bascule
   automatique quand l'ordinateur du visiteur est en mode sombre. Les valeurs
   sombres de la charte restent ci-dessous, inactives (aucun data-theme pose). */
:root{color-scheme:light;}
:root[data-theme="dark"]{
  --baludo-grege:#17211E;
  --baludo-encre:#F2F1EC;
  --baludo-vert:#6FBF95;
  --baludo-ocre:#D9A24A;
  --baludo-succes:#57C285;
  --baludo-alerte:#F08A7C;
  --baludo-texte-2:#B5B7B2;
  --baludo-surface:#212D29;
  --baludo-bordure:#2C3A35;
}

/* Les jetons alimentent les variables de palette WordPress */
body{
  --wp--preset--color--grege:var(--baludo-grege);
  --wp--preset--color--encre-sapin:var(--baludo-encre);
  --wp--preset--color--vert-sentier:var(--baludo-vert);
  --wp--preset--color--ocre-harnais:var(--baludo-ocre);
  --wp--preset--color--vert-valide:var(--baludo-succes);
  --wp--preset--color--rouge-brique:var(--baludo-alerte);
  --wp--preset--color--surface:var(--baludo-surface);
  --wp--preset--color--bordure:var(--baludo-bordure);
  --wp--preset--color--texte-secondaire:var(--baludo-texte-2);
  background-color:var(--baludo-grege);
  color:var(--baludo-encre);
}

/* ---- Typographie : interlettrage négatif au-delà de 32 px (charte) ---- */
h1,h2,.wp-block-post-title{letter-spacing:-0.02em;}
h1,h2,h3{text-wrap:balance;}

/* ---- Longueur de ligne : la colonne fait déjà 720 px, on n'ajoute pas de marge ---- */
.wp-block-post-content p,
.wp-block-post-content ul,
.wp-block-post-content ol{max-width:none;margin-left:0;margin-right:0;}

/* ---- Boutons : 48 px de haut, casse phrase, jamais de capitales ---- */
.wp-block-button__link{
  min-height:48px;
  display:inline-flex;align-items:center;justify-content:center;
  padding:12px 24px;border-radius:8px;
  font-family:"Public Sans",system-ui,sans-serif;font-weight:600;
  text-transform:none;letter-spacing:0;
  transition:background-color 200ms ease-out,color 200ms ease-out,border-color 200ms ease-out;
}
.wp-block-button__link:hover{filter:brightness(0.92);}
.wp-block-button__link:active{filter:brightness(0.88);transform:translateY(1px);}
.wp-block-button__link:focus-visible,
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid var(--baludo-ocre);outline-offset:2px;
}
.wp-block-button.is-style-outline>.wp-block-button__link{
  background:transparent;border:1.5px solid var(--baludo-encre);color:var(--baludo-encre);
}

/* ---- Cartes et champs ---- */
.wp-block-group.is-style-carte{
  background:var(--baludo-grege);
  border:1px solid var(--baludo-bordure);
  border-radius:12px;padding:24px;
  transition:border-color 200ms ease-out;
}
.wp-block-group.is-style-carte:hover{border-color:var(--baludo-encre);}
input[type=text],input[type=email],input[type=search],input[type=tel],input[type=url],textarea,select{
  min-height:48px;border:1.5px solid var(--baludo-bordure);border-radius:8px;
  background:var(--baludo-grege);color:var(--baludo-encre);padding:0 14px;
}
input:focus,textarea:focus,select:focus{border-color:var(--baludo-vert);}

/* ---- Images : jamais d'ombre colorée, ombre au sol douce uniquement ---- */
.wp-block-image img{border-radius:12px;}

/* ---- Mouvement : 150 ms sortie, 200 ms entrée, rien au-delà de 300 ms ---- */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;}
}

/* ---- Alignement des sections larges : tout part du même bord gauche ---- */
.wp-block-group.alignwide > p,
.wp-block-group.alignwide > h2,
.wp-block-group.alignwide > h3,
.wp-block-group.alignwide > ul{
  max-width:720px;margin-left:0;margin-right:auto;
}

/* ---- Titres de section : présence réelle sur grand écran ---- */
@media (min-width:782px){
  .wp-block-group.alignwide > h2.has-titre-1-font-size,
  .wp-block-group.alignfull > h2.has-titre-1-font-size{font-size:2.5rem;line-height:1.1;}
}

/* ---- Vignettes de même format, quelle que soit la photo source ---- */
.wp-block-columns .wp-block-image img{
  aspect-ratio:4/3;object-fit:cover;width:100%;height:auto;border-radius:12px;
}
.wp-block-columns .wp-block-image{margin-bottom:16px;}
.wp-block-columns h3 a{text-decoration:none;}
.wp-block-columns h3 a:hover{text-decoration:underline;}

/* ---- Media-text : image au même rayon que les cartes ---- */
.wp-block-media-text__media img{border-radius:12px;}

/* ---- Cartes de la rangée d'entrée : hauteurs égales ---- */
.wp-block-columns .wp-block-column.has-background{display:flex;flex-direction:column;gap:8px;}
.wp-block-columns .wp-block-column.has-background > p:last-child{margin-top:auto;}

/* ---- Bandeau vert : le lien de bouton garde son contraste ---- */
.has-vert-sentier-background-color .wp-block-button__link:hover{filter:none;background:#F2F1EC;color:#14543C;}

/* ---- Hiérarchie typographique imposée (le thème parent la ramollit) ---- */
.wp-block-post-content h2, .entry-content h2{font-size:clamp(1.5rem,1.3rem+0.8vw,1.75rem);line-height:1.18;margin-top:56px;margin-bottom:8px;}
.wp-block-post-content h3, .entry-content h3{font-size:1.25rem;line-height:1.3;margin-top:32px;margin-bottom:4px;}
.wp-block-post-content p, .entry-content p{margin-top:0;margin-bottom:16px;}
.wp-block-post-content > *:first-child{font-size:1.125rem;line-height:1.6;}

/* ---- Tableaux : lisibles, aux couleurs de la charte ---- */
.wp-block-table{margin:32px 0;}
.wp-block-table table{border-collapse:collapse;width:100%;font-size:0.9375rem;}
.wp-block-table thead th{
  background:var(--baludo-encre);color:var(--baludo-grege);
  font-family:"Public Sans",system-ui,sans-serif;font-weight:600;text-align:left;
  padding:12px 14px;border:0;
}
.wp-block-table tbody td{padding:12px 14px;border:0;border-bottom:1px solid var(--baludo-bordure);vertical-align:top;}
.wp-block-table tbody tr:last-child td{border-bottom:0;}
.wp-block-table tbody tr:nth-child(even){background:var(--baludo-surface);}
.wp-block-table figure, .wp-block-table table{border-radius:12px;overflow:hidden;}

/* ---- Citation : filet vert, pas d'italique décoratif excessif ---- */
.wp-block-quote{border-left:3px solid var(--baludo-vert);padding:4px 0 4px 20px;margin:32px 0;font-size:1.0625rem;}
.wp-block-quote p{margin-bottom:0;}

/* ---- Listes : respiration ---- */
.wp-block-post-content ul, .entry-content ul{margin:0 0 20px;padding-left:22px;}
.wp-block-post-content li, .entry-content li{margin-bottom:8px;}

/* ---- Image à la une en tête d'article ---- */
.baludo-hero-image img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:12px;}

/* ---- Ligne de contexte sous le titre ---- */
.baludo-meta{font-size:0.875rem;color:var(--baludo-texte-2);}
.baludo-meta a{color:var(--baludo-texte-2);}

/* ---- En-tête collant qui se compacte au défilement ---- */
header.wp-block-template-part{
  position:sticky;top:0;left:0;right:0;z-index:50;background:var(--baludo-grege);
  transition:padding 200ms ease-out,box-shadow 200ms ease-out,border-color 200ms ease-out;
  border-bottom:1px solid transparent;
}
header.wp-block-template-part.is-compact{
  border-bottom-color:var(--baludo-bordure);
}
header.wp-block-template-part.is-compact .wp-block-group{padding-top:8px;padding-bottom:8px;}
header.wp-block-template-part.is-compact .baludo-logo img{width:150px;transition:width 200ms ease-out;}
.baludo-logo img{transition:width 200ms ease-out;}

/* ---- Liens de navigation : soulignement animé ---- */
.wp-block-navigation .wp-block-navigation-item__content{
  position:relative;text-decoration:none;padding-bottom:2px;
}
.wp-block-navigation .wp-block-navigation-item__content::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1.5px;background:var(--baludo-vert);
  transform:scaleX(0);transform-origin:left;transition:transform 200ms ease-out;
}
.wp-block-navigation .wp-block-navigation-item__content:hover::after{transform:scaleX(1);}

/* ---- Marque dans l'en-tête : deux versions superposées ---- */
.baludo-brand{display:inline-grid;line-height:0;}
.baludo-brand img{grid-area:1/1;width:180px;height:auto;transition:opacity 200ms ease-out,width 200ms ease-out;}
.baludo-logo-light{opacity:0;}

/* ---- Accueil : en-tête transparent posé sur la photo ---- */
.home header.wp-block-template-part{position:fixed;top:0;left:0;right:0;background:transparent;border-bottom-color:transparent;}
.home header.wp-block-template-part .wp-block-navigation a{color:#F2F1EC;}
.home header.wp-block-template-part .wp-block-navigation-item__content::after{background:#E8C88A;}
.home header.wp-block-template-part .baludo-logo-dark{opacity:0;}
.home header.wp-block-template-part .baludo-logo-light{opacity:1;}
.home header.wp-block-template-part.is-compact{
  background:var(--baludo-grege);border-bottom-color:var(--baludo-bordure);
}
.home header.wp-block-template-part.is-compact .wp-block-navigation a{color:var(--baludo-encre);}
.home header.wp-block-template-part.is-compact .baludo-logo-dark{opacity:1;}
.home header.wp-block-template-part.is-compact .baludo-logo-light{opacity:0;}
.home header.wp-block-template-part.is-compact .baludo-brand img{width:150px;}

/* ---- En-tête : respiration et bouton d'action ---- */
header.wp-block-template-part .wp-block-group{align-items:center;}
header.wp-block-template-part.is-compact{backdrop-filter:saturate(1.1);}
.baludo-nav-cta{
  display:inline-flex;align-items:center;min-height:40px;padding:8px 18px;border-radius:8px;
  background:var(--baludo-vert);color:var(--baludo-grege);text-decoration:none;
  font-family:"Public Sans",system-ui,sans-serif;font-weight:600;font-size:.875rem;white-space:nowrap;
  transition:background-color 200ms ease-out,transform 200ms ease-out;
}
.baludo-nav-cta:hover{background:var(--baludo-encre);transform:translateY(-1px);}
.home header.wp-block-template-part:not(.is-compact) .baludo-nav-cta{
  background:rgba(242,241,236,.14);color:#F2F1EC;border:1px solid rgba(242,241,236,.5);
}
.home header.wp-block-template-part:not(.is-compact) .baludo-nav-cta:hover{background:rgba(242,241,236,.24);}
.baludo-header-inner{display:flex;align-items:center;justify-content:space-between;gap:24px;width:100%;}
.baludo-header-right{display:flex;align-items:center;gap:24px;}
@media (max-width:781px){.baludo-nav-cta{display:none;}}

/* ---- Pied de page sombre ---- */
footer.wp-block-template-part{background:var(--baludo-encre);color:var(--baludo-grege);}
.baludo-footer{
  max-width:1140px;margin:0 auto;padding:clamp(56px,8vw,88px) clamp(20px,5vw,64px) 32px;
  display:grid;gap:clamp(32px,5vw,64px);grid-template-columns:1.4fr 1fr 1fr 1.2fr;
}
.baludo-footer h3{
  font-family:"Public Sans",system-ui,sans-serif;font-size:.75rem;font-weight:600;
  letter-spacing:.14em;text-transform:uppercase;color:#E8C88A;margin:0 0 16px;
}
.baludo-footer ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.baludo-footer a{color:#D7DBD7;text-decoration:none;font-size:.9375rem;transition:color 200ms ease-out;}
.baludo-footer a:hover{color:#F2F1EC;text-decoration:underline;}
.baludo-footer__brand img{width:170px;height:auto;margin-bottom:16px;}
.baludo-footer__brand p{margin:0;color:#A9B0AB;font-size:.9375rem;max-width:34ch;line-height:1.6;}
.baludo-footer__note{
  max-width:1140px;margin:0 auto;padding:20px clamp(20px,5vw,64px) 40px;
  border-top:1px solid rgba(242,241,236,.14);
  display:flex;flex-wrap:wrap;gap:12px 24px;justify-content:space-between;align-items:center;
  font-size:.8125rem;color:#8F9792;
}
.baludo-footer__note a{color:#8F9792;}
.baludo-top{
  display:inline-flex;align-items:center;gap:8px;color:#D7DBD7;text-decoration:none;
  border:1px solid rgba(242,241,236,.28);border-radius:8px;padding:8px 14px;
  transition:border-color 200ms ease-out,background-color 200ms ease-out;
}
.baludo-top:hover{border-color:#F2F1EC;background:rgba(242,241,236,.08);}
@media (max-width:900px){.baludo-footer{grid-template-columns:1fr 1fr;}}
@media (max-width:560px){.baludo-footer{grid-template-columns:1fr;}}

/* ---- Bande défilante ---- */
.baludo-marquee{
  background:var(--baludo-vert);color:var(--baludo-grege);overflow:hidden;
  border-block:1px solid rgba(242,241,236,.18);
}
.baludo-marquee__track{
  display:flex;width:max-content;gap:0;
  padding-block:14px;
}
@media (prefers-reduced-motion: no-preference){
  .baludo-marquee__track{animation:baludo-defile 38s linear infinite;}
  .baludo-marquee:hover .baludo-marquee__track{animation-play-state:paused;}
}
@keyframes baludo-defile{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.baludo-marquee span{
  font-family:"Public Sans",system-ui,sans-serif;font-size:.875rem;font-weight:600;
  letter-spacing:.1em;text-transform:uppercase;white-space:nowrap;padding-inline:28px;
  display:inline-flex;align-items:center;gap:28px;
}
.baludo-marquee span::after{content:"";width:5px;height:5px;border-radius:50%;background:#E8C88A;display:block;}

/* ---- Index des guides ---- */
.baludo-archive{max-width:1140px;margin:0 auto;padding:clamp(48px,7vw,88px) clamp(20px,5vw,64px) clamp(64px,9vw,112px);}
.baludo-archive__intro{margin-bottom:clamp(32px,5vw,56px);}
.baludo-archive__intro h1{
  font-family:Bricolage Grotesque,Georgia,serif;font-weight:700;
  font-size:clamp(1.875rem,1.4rem + 2.2vw,3rem);line-height:1.04;letter-spacing:-.02em;margin:0 0 12px;
}
.baludo-archive__lede{margin:0;max-width:56ch;color:var(--baludo-texte-2);font-size:1.0625rem;}
.baludo-archive .wp-block-post-template{gap:28px 24px;}
.baludo-archive .wp-block-post{
  border:1px solid var(--baludo-bordure);border-radius:12px;overflow:hidden;background:var(--baludo-grege);
  display:flex;flex-direction:column;transition:border-color 200ms ease-out;
}
.baludo-archive .wp-block-post:hover{border-color:var(--baludo-encre);}
.baludo-archive__img{margin:0;}
.baludo-archive__img img{width:100%;height:200px;object-fit:cover;object-position:50% 38%;display:block;border-radius:0;transition:transform 300ms ease-out;}
.baludo-archive .wp-block-post:hover .baludo-archive__img img{transform:scale(1.03);}
.baludo-archive__tag{
  margin:20px 22px 0;font-size:.75rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;
}
.baludo-archive__tag a{color:var(--baludo-ocre);text-decoration:none;}
.baludo-archive .wp-block-post-title{margin:8px 22px 0;line-height:1.2;}
.baludo-archive .wp-block-post-title a{text-decoration:none;color:var(--baludo-encre);}
.baludo-archive .wp-block-post-title a:hover{text-decoration:underline;}
.baludo-archive .wp-block-post-excerpt{margin:8px 22px 24px;}
.baludo-archive .wp-block-post-excerpt__excerpt{font-size:.9375rem;line-height:1.55;}
.baludo-archive__pagination{margin-top:48px;gap:12px;}
.baludo-archive__pagination a,.baludo-archive__pagination span{
  min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--baludo-bordure);border-radius:8px;text-decoration:none;font-size:.9375rem;
}
@media (max-width:900px){.baludo-archive .wp-block-post-template{grid-template-columns:repeat(2,1fr)!important;}}
@media (max-width:600px){.baludo-archive .wp-block-post-template{grid-template-columns:1fr!important;}}

/* Mention d'affiliation en pied de page — 20/09/2026 */
.baludo-footer__affiliation{display:block;flex-basis:100%;max-width:68ch;margin:0 0 10px;font-size:.8125rem;line-height:1.5;opacity:.72;}

/* Sélecteur de langue en-tête — 26/09/2026 */
.baludo-lang{display:inline-flex;align-items:center;gap:2px;margin-right:14px;}
.baludo-lang__item{
  /* cible tactile de 44x44 minimum, sans changer la taille visuelle du texte */
  display:inline-flex;flex-direction:column;align-items:center;justify-content:center;
  min-width:44px;min-height:44px;
  font-family:"Public Sans",system-ui,sans-serif;font-size:.8125rem;font-weight:600;
  letter-spacing:.06em;padding:0 4px;border-radius:6px;text-decoration:none;
  color:var(--baludo-texte-2,#4d564e);transition:color 160ms ease-out,background-color 160ms ease-out;
}
.baludo-lang__item:hover,.baludo-lang__item:focus-visible{
  color:var(--baludo-encre);background:rgba(23,33,30,.06);
}
.baludo-lang__item.is-current{color:var(--baludo-encre);cursor:default;}
.baludo-lang__item.is-current::after{
  /* align-self:stretch, sinon le pseudo-element vide se reduit a zero
     dans le conteneur flex en colonne */
  content:"";display:block;align-self:stretch;height:2px;margin-top:3px;
  background:var(--baludo-vert,#2f5d3f);border-radius:2px;
}
@media (max-width:640px){.baludo-lang{margin-right:4px;}}

/* --- En-tete pose sur la photo du hero (accueil FR et NL) ---------------
   Meme piege que le hero : les jetons de couleur s'inversent en theme sombre,
   la photo non. Le selecteur de langue et l'icone compte utilisaient encore
   --baludo-texte-2 et --baludo-encre, donc du vert fonce sur une photo verte.
   Couleurs fixes tant que l'en-tete n'est pas compact. */
.home header.wp-block-template-part:not(.is-compact) .baludo-lang__item{
  /* pas de transparence ici : a 78 %% le NL tombait a 3,95 de contraste sur le
     pixel le plus clair de la photo. La langue courante est marquee par le
     soulignement dore, pas par une difference de couleur. */
  color:#F2F1EC;
}
.home header.wp-block-template-part:not(.is-compact) .baludo-lang__item.is-current{
  color:#F2F1EC;
}
.home header.wp-block-template-part:not(.is-compact) .baludo-lang__item.is-current::after{
  background:#E8C88A;
}
.home header.wp-block-template-part:not(.is-compact) .baludo-lang__item:hover,
.home header.wp-block-template-part:not(.is-compact) .baludo-lang__item:focus-visible{
  color:#F2F1EC;background:rgba(242,241,236,.18);
}
.home header.wp-block-template-part:not(.is-compact) .wc-block-customer-account__link{
  color:#F2F1EC;
}

/* Voile propre a l'en-tete sur l'accueil. Mesure avant : bouton 3,87 (seuil
   4,5) et icone compte 2,94 (seuil 3) sur le pixel le plus clair de la photo.
   Le voile du hero seul ne suffit pas en haut d'image, ou il ne vaut que 42 %%.
   Il s'efface vers le bas et disparait des que l'en-tete devient compact. */
.home header.wp-block-template-part:not(.is-compact){
  background:linear-gradient(to bottom,
    rgba(23,33,30,.46) 0%, rgba(23,33,30,.30) 55%, rgba(23,33,30,0) 100%);
}

/* Blocs toujours sombres en theme sombre — 09/10/2026
   Meme piege que le hero du 20/09 : pied de page, bande sombre, bandeaux de
   page, appels finaux et bande defilante prenaient leur fond dans des jetons
   qui s'inversent, alors que leurs textes ont des couleurs fixes. En theme
   sombre : pied de page creme sous des liens gris clair, encadre vert clair
   sous du texte creme. On fige les jetons a leurs valeurs claires dans ces
   blocs : ils s'affichent a l'identique dans les deux themes. */
.baludo-hero,.baludo-method,.baludo-cta,.baludo-marquee,
.bp-hero,.bp-cta,footer.wp-block-template-part,.baludo-nav-cta{
  --baludo-grege:#F2F1EC;
  --baludo-encre:#17211E;
  --baludo-vert:#14543C;
  --baludo-ocre:#8A5A12;
  --baludo-texte-2:#545B58;
  --baludo-surface:#E8E7E0;
  --baludo-bordure:#DCDBD3;
}
