/* ÉCHELLE DE TAILLES UNIQUE : source unique pour tout le site (public, compte, console, pop-ups, pages légales, pages d'erreur).
   Les valeurs vivent dans les variables --t-* ci-dessous ; les règles plus bas les appliquent aux composants existants.
   Chargé en dernier (app/layout.tsx). Mesuré par `npm run audit:tailles`. Ne rien changer ailleurs sans passer par ici. */
:root{
  --t-page:30px;      /* titre de page */
  --t-section:20px;   /* titre de section */
  --t-card:18px;      /* titre de carte, de pop-up, d'état vide */
  --t-text:15px;      /* texte courant */
  --t-help:13px;      /* texte d'aide (jamais sous 12 px, jamais lisible sous 13 px) */
  --t-empty-text:14px;
  --t-empty-icon:40px;
  --t-empty-pad:24px;
  --t-err:26px;       /* titre de page d'erreur */
  --t-fiche:40px;     /* titre de la fiche évènement (voulu, ≤ 40) */
  --t-btn:44px;       /* hauteur des boutons */
  --t-btn-table:40px; /* hauteur des boutons dans les tableaux */
  --t-btn-text:15px;
  --t-modal:520px;    /* pop-up courant */
  --t-modal-wide:680px;
  --t-pad:24px;
  --t-gap-edge:16px;  /* marge du bouton « Une question ? » */
}
@media(max-width:700px){:root{--t-page:24px;--t-section:18px;--t-card:17px;--t-fiche:28px;--t-pad:20px}}

/* Titres de page */
html body:not(#_) h1,
html body:not(#_) .xp-title,html body:not(#_) .pagehead h1,html body:not(#_) .pp-doc h1,html body:not(#_) .pp-card h1,html body:not(#_) .ap-title,
html body:not(#_) .hc-hero h1,html body:not(#_) .a2-id h1,html body:not(#_) h1.t,html body:not(#_) h1.doct,html body:not(#_) h1#ttl,
html body:not(#_) .bo.pro.evm .xp-title,html body:not(#_) .xo-h h1,html body:not(#_) .w>h1,html body:not(#_) .og>h1,html body:not(#_) .hx-pi h1{
  font-size:var(--t-page)!important;line-height:1.2!important;letter-spacing:-.02em!important}
/* Fiche évènement : taille voulue, plafonnée */
html body:not(#_) .pv2-info h1,html body:not(#_) .pv2-info>h1{font-size:var(--t-fiche)!important;line-height:1.15!important}
/* Titres de section */
html body:not(#_) .pv2-sec>h2,html body:not(#_) .hx-sc>h2,html body:not(#_) .xo-card h2,html body:not(#_) .xp-card>h2,html body:not(#_) .pp-doc h2{font-size:var(--t-section)!important;line-height:1.25!important}
/* Titres de carte */
html body:not(#_) .pvcard h2,html body:not(#_) .pvcard h3,html body:not(#_) .dx-card h2,html body:not(#_) .xo-card .xo-ch h2{font-size:var(--t-card)!important;line-height:1.3!important}
/* Texte courant et d'aide */
html body:not(#_) small,html body:not(#_) .crumbs,html body:not(#_) .crumbs a,html body:not(#_) .hub-n,html body:not(#_) .hub-nx,
html body:not(#_) .xn-ct small,html body:not(#_) .xn-an small,html body:not(#_) .xn-t>span,html body:not(#_) .xn-h,html body:not(#_) .xn-nav p.xn-h,
html body:not(#_) .xp-th b,html body:not(#_) .xk-kpi em,html body:not(#_) .xa-ax span,html body:not(#_) .xa2-d,html body:not(#_) .xa2-et small,
html body:not(#_) .chip em,html body:not(#_) .ev2-t,html body:not(#_) .ev2-p1 small,html body:not(#_) .hx-bw em,html body:not(#_) .hx-bv em,
html body:not(#_) .ap2-side small,html body:not(#_) .vp-big span,html body:not(#_) .tr-th span,html body:not(#_) .xe-th span,html body:not(#_) .xe-id i,
html body:not(#_) .mvb small,html body:not(#_) .ti small,html body:not(#_) .pp-wm i,html body:not(#_) .pp-txt small,html body:not(#_) .ec-cnt,
html body:not(#_) .hub-m span,html body:not(#_) .hub-m small,html body:not(#_) .hub-b small,html body:not(#_) .on>small,html body:not(#_) .xz-th span,html body:not(#_) .xz-th{
  font-size:var(--t-help)!important}

/* Boutons : 44 px (40 dans les tableaux) */
html body:not(#_) .mvb,html body:not(#_) .xp-btn,html body:not(#_) .pp-btn,html body:not(#_) .pvbtn,html body:not(#_) .pvh-pill,html body:not(#_) .pvh-r button,
html body:not(#_) .xp-pl,html body:not(#_) .tr-f,html body:not(#_) .pv2-b,html body:not(#_) .hx-bk,html body:not(#_) .hx-bo,
html body:not(#_) .hx-p,html body:not(#_) .ev2-p1,html body:not(#_) .ev2-p2,html body:not(#_) .ev2-h,html body:not(#_) .chips .chip,html body:not(#_) .a2-act .btn,html body:not(#_) .a2-tab{
  min-height:var(--t-btn)!important;font-size:var(--t-btn-text)!important}
html body:not(#_) .pv2-b.sm{min-height:var(--t-btn)!important}
html body:not(#_) table .mvb,html body:not(#_) [role="table"] .mvb,html body:not(#_) [role="grid"] .mvb,html body:not(#_) table .xp-btn{min-height:var(--t-btn-table)!important}
html body:not(#_) .xp-pl,html body:not(#_) .tr-f{padding-top:0!important;padding-bottom:0!important;display:inline-flex;align-items:center}

html body:not(#_) .ev2-h{min-width:var(--t-btn)!important}
html body:not(#_) .xn-nav i,html body:not(#_) table th i,html body:not(#_) .og-sort i{font-size:var(--t-help)!important}
html body:not(#_) .xa-hd i,html body:not(#_) .xa-hd button i,html body:not(#_) [role="row"] button i,html body:not(#_) .pp-fld i,html body:not(#_) label i,html body:not(#_) .lbl i,html body:not(#_) .fld i{font-size:var(--t-help)!important}

/* Pop-ups : 520 px (680 pour les grands formulaires), titre 18/17, marges 20 à 24, feuille depuis le bas sur mobile */
html body:not(#_) .bo-modal .bo-mbox,html body:not(#_) .cbox,html body:not(#_) .ec-card,html body:not(#_) [role="dialog"]:not(.og-pal-box){
  max-width:min(var(--t-modal),calc(100vw - 32px))!important}
html body:not(#_) .ec-card.wide,html body:not(#_) .bo-mbox.wide,html body:not(#_) [role="dialog"].wide{max-width:min(var(--t-modal-wide),calc(100vw - 32px))!important}
html body:not(#_) .bo-modal .bo-mbox h3,html body:not(#_) .cbox h3,html body:not(#_) .ec-card h2.ec-h,html body:not(#_) [role="dialog"] h2,html body:not(#_) [role="dialog"] h3,html body:not(#_) .ad-modal h2{
  font-size:var(--t-card)!important;line-height:1.3!important}
html body:not(#_) .cbox h3,html body:not(#_) .cbox h3+p{padding-right:48px}
html body:not(#_) .cbox button[type="submit"],html body:not(#_) .cbox .btn{height:var(--t-btn)!important;min-height:var(--t-btn)!important;font-size:var(--t-btn-text)!important}
html body:not(#_) .bo-modal .bo-mbox,html body:not(#_) .cbox{padding:var(--t-pad)!important}
@media(max-width:700px){
  html body:not(#_) .bo-modal{align-items:flex-end!important;padding:0!important}
  html body:not(#_) .bo-modal .bo-mbox{max-width:100%!important;width:100%!important;border-radius:var(--r-big,12px) var(--r-big,12px) 0 0!important;max-height:92vh!important}
}

/* États vides : 18 / 14, icône 40, marges 24 */
html body:not(#_) .pvnotix,html body:not(#_) .xp-empty,html body:not(#_) .bo-empty,html body:not(#_) .tr-none{padding:var(--t-empty-pad)!important}
html body:not(#_) .pvnotix h2,html body:not(#_) .xp-empty h2,html body:not(#_) .bo-empty b,html body:not(#_) .tr-none h2,html body:not(#_) .tr-none b{font-size:var(--t-card)!important;margin:0 0 4px!important;line-height:1.3!important}
html body:not(#_) .pvnotix p,html body:not(#_) .xp-empty p,html body:not(#_) .bo-empty p,html body:not(#_) .tr-none p{font-size:var(--t-empty-text)!important;line-height:1.5!important;margin:0!important}
html body:not(#_) .pvnotix .pvt,html body:not(#_) .xp-empty .xp-ei{width:var(--t-empty-icon)!important;height:var(--t-empty-icon)!important;border-radius:var(--r-card,8px)!important}
html body:not(#_) .pvnotix .pvt svg,html body:not(#_) .xp-empty .xp-ei svg,html body:not(#_) .bo-empty svg{width:24px!important;height:24px!important}
html body:not(#_) .bo-empty>svg,html body:not(#_) .bo-empty .ic{width:var(--t-empty-icon)!important;height:var(--t-empty-icon)!important}

/* Pages d'erreur / d'état : carte centrée, jamais plein écran géant */
html body:not(#_) .pp-st{min-height:0!important;flex:1 0 auto;padding:32px 16px!important}
html body:not(#_) .pp-st-c{max-width:520px!important;padding:32px 24px!important;border-radius:var(--r-tag,6px)!important;box-shadow:0 12px 32px rgba(60,40,10,.08)!important}
html body:not(#_) .pp-st-c>img.pp-st-logo{height:44px!important;margin-bottom:16px!important}
html body:not(#_) .pp-st-ic{width:80px!important;height:80px!important;margin-bottom:16px!important}
html body:not(#_) .pp-st-ic svg{width:40px!important;height:40px!important}
html body:not(#_) .pp-st-big{font-size:56px!important;margin:0 0 4px!important}
html body:not(#_) .pp-st h1,html body:not(#_) .pp-st-c h1{font-size:var(--t-err)!important;line-height:1.2!important}
html body:not(#_) .pp-st p.pp-st-t{font-size:var(--t-text)!important;margin:10px 0 20px!important;line-height:1.55!important}
html body:not(#_) .pp-st small{font-size:var(--t-help)!important}
html body:not(#_) .pp-st-fl{width:96px!important}
html body:not(#_) .pp-st-a{flex-direction:column;gap:10px!important}
html body:not(#_) .pp-st-a .pp-btn{height:var(--t-btn)!important;min-height:var(--t-btn)!important;font-size:var(--t-btn-text)!important;border-radius:var(--r-btn,8px)!important}
html body:not(#_) .pp-st-a .pp-btn.pp-blk{background:#1C1614!important;border-color:#1C1614!important;color:#fff!important}
html body:not(#_) .pp-st-a .pp-btn:not(.pp-blk){background:#fff!important;border:1.5px solid #D9D1C7!important;color:#1C1614!important}
html body:not(#_) .pp-st-eta{font-size:var(--t-text)!important;padding:14px!important}

/* « Une question ? » : toujours entièrement visible, marge de 16 px, sans masquer le bas de page */
html body:not(#_) #chatw{right:max(var(--t-gap-edge),env(safe-area-inset-right))!important;bottom:max(var(--t-gap-edge),env(safe-area-inset-bottom))!important}
html body:not(#_) .chat-fab{height:var(--t-btn)!important;min-height:var(--t-btn)!important}
@media(max-width:800px){
  html body:not(#_) #chatw{right:max(var(--t-gap-edge),env(safe-area-inset-right))!important;bottom:calc(76px + env(safe-area-inset-bottom))!important}
  html body:not(#_) .chat-fab{width:var(--t-btn)!important;min-width:var(--t-btn)!important}
}
/* marge basse du pied de page : le bouton ne cache jamais ses liens */
html body:not(#_) .sf{padding-bottom:calc(var(--t-btn) + var(--t-gap-edge) + env(safe-area-inset-bottom))}

/* Lien organisateur (fiche évènement, billet) */
.pv2-ol{display:flex;align-items:center;gap:14px;flex:1;min-width:0;color:inherit;text-decoration:none}
.pv2-ol>div{flex:1;min-width:0}
.pv2-ol:hover b,.tkd-ol:hover{text-decoration:underline}
.tkd-ol{color:inherit;font-weight:700}
