/* Tsubomi — adaptation intelligente locale et compatibilité multi-écrans */
:root{
  --adaptive-edge:clamp(10px,2.2vw,28px);
  --adaptive-gap:clamp(10px,1.4vw,18px);
  --adaptive-tap:44px;
  --adaptive-font:1;
  --adaptive-header:74px;
}
html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;font-size:calc(16px * var(--adaptive-font));overflow-x:hidden}
body{overflow-x:hidden;min-width:0;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
button,a,input,select,textarea{-ms-touch-action:manipulation;touch-action:manipulation}
button,.btn,.icon-btn,.tab,.main-nav a{min-block-size:var(--adaptive-tap)}
input,select,textarea{max-width:100%}
img,video,svg,canvas{max-inline-size:100%}
:focus-visible{outline:3px solid color-mix(in srgb,var(--accent,#f20b88) 72%,white);outline-offset:3px}
.container{max-width:100%}.card,.panel,.volume,.shelf,.room,.post,.event-card,.important-info-card{min-width:0}
.prose,.muted,.card-body,.list-item,.chapter,.admin-row{overflow-wrap:anywhere;word-break:normal}
.toolbar,.detail-actions,.modal-actions,.object-tools,.important-info-actions{-webkit-box-align:center;-ms-flex-align:center;align-items:center}
.tabs,.admin-menu{scrollbar-width:thin;overscroll-behavior-inline:contain;-webkit-scroll-snap-type:x proximity;-ms-scroll-snap-type:x proximity;scroll-snap-type:x proximity}.tab,.admin-menu button{scroll-snap-align:center}

/* Le moteur peut activer ce mode même au-delà du simple seuil CSS si la navigation manque de place. */
html.adaptive-menu .mobile-toggle{display:block!important}
html.adaptive-menu .main-nav{position:fixed!important;left:max(10px,env(safe-area-inset-left))!important;right:max(10px,env(safe-area-inset-right))!important;top:calc(var(--adaptive-header) + max(6px,env(safe-area-inset-top)))!important;z-index:110!important;background:#111118!important;border:1px solid var(--line)!important;border-radius:16px!important;padding:9px!important;display:none!important;-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important;max-height:min(72dvh,620px)!important;overflow:auto!important;-webkit-box-shadow:var(--shadow)!important;box-shadow:var(--shadow)!important}
html.adaptive-menu .main-nav.open{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}
html.adaptive-menu .main-nav a{padding:12px 14px!important}
html.adaptive-menu .header-actions .desktop-only{display:none!important}

html[data-input="touch"]{--adaptive-tap:48px}
html[data-input="touch"] .btn,html[data-input="touch"] .icon-btn,html[data-input="touch"] .tab{padding-inline:max(13px,1em)}
html[data-input="touch"] .drag-handle{min-width:48px;min-height:48px;display:grid;place-items:center}
html[data-input="keyboard"] :focus-visible{outline-width:3px}
html[data-density="relaxed"]{--adaptive-gap:clamp(12px,2vw,22px);--adaptive-tap:50px}
html[data-density="compact"]{--adaptive-gap:10px}

/* Classes de largeur réellement calculées par l'intelligence locale. */
html[data-layout="phone"]{--adaptive-header:64px;--max:100%}
html[data-layout="phone"] .container{width:calc(100% - 20px)}
html[data-layout="phone"] .grid{grid-template-columns:repeat(auto-fit,minmax(min(156px,100%),1fr));gap:10px}
html[data-layout="phone"] .detail-hero{grid-template-columns:1fr}
html[data-layout="phone"] .detail-cover{width:min(310px,82vw);margin-inline:auto}
html[data-layout="phone"] .detail-info{text-align:center}
html[data-layout="phone"] .detail-actions{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}
html[data-layout="phone"] .chapter,html[data-layout="phone"] .admin-row{-ms-flex-wrap:wrap;flex-wrap:wrap}
html[data-layout="phone"] .chapter>div:last-child,html[data-layout="phone"] .admin-row>.grow+*{max-width:100%}
html[data-layout="phone"] .profile-grid,html[data-layout="phone"] .library-layout,html[data-layout="phone"] .news-layout{grid-template-columns:1fr}
html[data-layout="phone"] .event-card{grid-template-columns:minmax(74px,88px) 1fr}
html[data-layout="phone"] .feature-strip{grid-template-columns:1fr}
html[data-layout="phone"] .hero-showcase{min-height:300px}
html[data-layout="phone"] .hero-actions>.btn,html[data-layout="phone"] .adaptive-stack>.btn,html[data-layout="phone"] .adaptive-stack>a.btn{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;text-align:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}
html[data-layout="phone"] .reader-footer{max-width:calc(100vw - 12px - env(safe-area-inset-left) - env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));overflow:auto;white-space:nowrap}
html[data-layout="phone"] .reader-top-inner{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
html[data-layout="phone"] .important-info-actions .btn{-ms-flex-preferred-size:100%;flex-basis:100%}

html[data-layout="tablet"]{--max:1180px;--adaptive-header:70px}
html[data-layout="tablet"] .grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
html[data-layout="tablet"] .library-layout{grid-template-columns:minmax(0,1fr) minmax(300px,38vw)}
html[data-layout="desktop"]{--max:1320px}
html[data-layout="wide"]{--max:1540px;--adaptive-font:1.025}
html[data-layout="wide"] .grid{grid-template-columns:repeat(5,minmax(0,1fr))}
html[data-layout="ultrawide"]{--max:1760px;--adaptive-font:1.06}
html[data-layout="ultrawide"] .grid{grid-template-columns:repeat(6,minmax(0,1fr))}
html[data-layout="ultrawide"] .rail{grid-auto-columns:minmax(220px,270px)}

html[data-orientation="landscape"][data-short="true"]{--adaptive-header:56px}
html[data-orientation="landscape"][data-short="true"] .header-inner{height:56px}
html[data-orientation="landscape"][data-short="true"] .hero-showcase{display:none}
html[data-orientation="landscape"][data-short="true"] .hero{padding-block:20px;min-height:auto}
html[data-orientation="landscape"][data-short="true"] .reader-top-inner{min-height:52px;padding-block:4px}
html[data-orientation="landscape"][data-short="true"] .reader-stage{min-height:calc(100dvh - 52px);padding:4px}

/* Quand l'utilisateur zoome fortement, le site se comporte comme un écran plus petit pour éviter les débordements. */
html[data-zoomed="true"] .header-inner{gap:10px}
html[data-zoomed="true"] .grid{grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))}
html[data-zoomed="true"] .toolbar,html[data-zoomed="true"] .detail-actions{gap:8px}

/* Mode performance : même contenu, moins d'effets lourds. */
html[data-performance="lite"] *{scroll-behavior:auto!important}
html[data-performance="lite"] .site-header,html[data-performance="lite"] .reader-top,html[data-performance="lite"] .reader-footer,html[data-performance="lite"] .important-info-layer,html[data-performance="lite"] .cortex-overlay{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-performance="lite"] .card,html[data-performance="lite"] .panel,html[data-performance="lite"] .phone-card,html[data-performance="lite"] .reader-footer{-webkit-box-shadow:none!important;box-shadow:none!important}
html[data-performance="lite"] .phone-card.three{display:none!important}
html[data-performance="lite"] *{-webkit-animation-duration:.001ms!important;animation-duration:.001ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important;-webkit-transition-duration:.001ms!important;transition-duration:.001ms!important}

/* Ajustement automatique des groupes qui débordent. */
.adaptive-stack{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}
.adaptive-stack>*{max-width:100%}
html[data-layout="phone"] .toolbar.adaptive-stack>input,html[data-layout="phone"] .toolbar.adaptive-stack>select{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;width:100%}

/* Administration locale : utilisable aussi sur petit écran et tactile. */
.admin-head{padding-top:max(12px,env(safe-area-inset-top));-ms-flex-wrap:wrap;flex-wrap:wrap}
html[data-layout="phone"] .admin-wrap{width:calc(100% - 12px);padding-top:6px}
html[data-layout="phone"] .admin-head h1{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;font-size:1rem}
html[data-layout="phone"] .admin-head .btn{-webkit-box-flex:1;-ms-flex:1 1 calc(50% - 6px);flex:1 1 calc(50% - 6px);text-align:center}
html[data-layout="phone"] .admin-grid{grid-template-columns:1fr;gap:10px}
html[data-layout="phone"] .admin-menu{position:-webkit-sticky;position:sticky;top:0;z-index:75;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:auto;gap:4px;padding:7px;border-radius:14px}
html[data-layout="phone"] .admin-menu button{width:auto;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}
html[data-layout="phone"] .form-grid{grid-template-columns:1fr}
html[data-layout="phone"] .field.full{grid-column:auto}
html[data-layout="phone"] .admin-card{padding:13px;border-radius:15px}
html[data-layout="phone"] .code-area{min-height:360px;font-size:.76rem}
html[data-layout="phone"] .check-grid{grid-template-columns:1fr!important}

/* Lecteur : choix confortable selon la place disponible. */
html[data-layout="phone"] .double-wrap .page-frame{max-width:50vw}
html[data-layout="phone"] .scroll-double-row{gap:1px;width:100%}
html[data-layout="phone"] .reader-cortex-bar,html[data-short="true"] .reader-cortex-bar{max-width:calc(100vw - 12px);overflow:auto}
html[data-input="touch"] .reader-nav-zone{width:18%}

/* Compatibilité accessibilité du système. */
@media (prefers-contrast:more){:root{--line:#555563}.card,.panel,.volume,.chapter,.btn,.icon-btn,.tab{border-width:2px}.muted{color:#c8c8d0}}
@media (forced-colors:active){*{-webkit-box-shadow:none!important;box-shadow:none!important;background-image:none!important}.btn,.icon-btn,.card,.panel,.volume,.chapter,.tab{forced-color-adjust:auto}.accent{color:LinkText}.media-placeholder{border:1px solid CanvasText}}
@media (hover:none){.btn:hover,.icon-btn:hover,.main-nav a:hover,.chapter:hover{-webkit-transform:none;-ms-transform:none;transform:none}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}.phone-card{-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.important-info-layer,.important-info-card{-webkit-animation:none!important;animation:none!important}}

/* Très petits écrans / split-screen / fenêtres étroites */
@media(max-width:380px){.container{width:calc(100% - 14px)}.grid{grid-template-columns:1fr}.rail{grid-auto-columns:82vw}.stats{grid-template-columns:1fr 1fr}.event-card{grid-template-columns:1fr}.event-date{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.hero-copy h1{font-size:clamp(2.35rem,17vw,4rem)}.brand{font-size:1.05rem}.important-info-layer{padding:6px}.important-info-card{border-radius:16px}.modal{padding:8px}.modal-card{padding:15px;border-radius:16px}}
@media(min-width:2000px){.card-body{padding:16px}.section{padding-block:46px}.main-nav a{font-size:1rem}}

/* Conteneurs : les composants peuvent s'adapter même dans une colonne étroite d'un grand écran. */
@supports (container-type:inline-size){.panel,.shelf,.volume,.card{container-type:inline-size}@container (max-width:340px){.chapter{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.chapter>div:last-child{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.card-body .meta{gap:4px}}}

@supports not (height:100dvh){.important-info-card{max-height:88vh}.reader-stage{min-height:calc(100vh - 62px)}}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){.site-header,.reader-top,.reader-footer,.important-info-layer{background:#101015!important}}

/* =========================================================
   TSUBOMI ADAPTIVE v3 — orchestration locale multi-écrans
   Le moteur JS choisit la disposition d'après la place réelle,
   les entrées disponibles, les préférences d'accessibilité et
   les panneaux ouverts, sans transmettre ces informations.
   ========================================================= */
:root{
  --visual-vh:100vh;
  --adaptive-content-w:100vw;
  --rgpd-space:0px;
  --assistant-width:0px;
  --assistant-reserve:0px;
  --adaptive-motion:180ms;
}

html,body{max-width:100%;}
body{min-height:var(--visual-vh,100vh);}
body>main,.site-header,.site-footer{min-width:0;-webkit-transition:width var(--adaptive-motion) ease,-webkit-margin-end var(--adaptive-motion) ease;transition:width var(--adaptive-motion) ease,-webkit-margin-end var(--adaptive-motion) ease;transition:margin-inline-end var(--adaptive-motion) ease,width var(--adaptive-motion) ease;transition:margin-inline-end var(--adaptive-motion) ease,width var(--adaptive-motion) ease,-webkit-margin-end var(--adaptive-motion) ease}

/* Un assistant ouvert sur un grand écran devient une colonne latérale :
   le contenu reste lisible au lieu d'être masqué. */
html[data-assistant-open="true"][data-assistant-mode="docked"] body>main,
html[data-assistant-open="true"][data-assistant-mode="docked"] .site-header,
html[data-assistant-open="true"][data-assistant-mode="docked"] .site-footer{
  -webkit-margin-end:var(--assistant-reserve);
          margin-inline-end:var(--assistant-reserve);
}
html[data-assistant-open="true"][data-assistant-mode="docked"] .container{
  --max:min(1320px,var(--adaptive-content-w));
}

/* La bannière de confidentialité et l'aide ne se chevauchent plus. */
.rgpd{right:calc(18px + var(--assistant-reserve));max-width:calc(100vw - 36px - var(--assistant-reserve));}
.tsubomi-assistant-launcher{bottom:calc(max(18px,env(safe-area-inset-bottom)) + var(--rgpd-space))!important}
.tsubomi-assistant-greeting{bottom:calc(max(80px,env(safe-area-inset-bottom) + 62px) + var(--rgpd-space))!important}

html[data-important-open="true"] .tsubomi-assistant-launcher,
html[data-important-open="true"] .tsubomi-assistant-greeting{opacity:0!important;pointer-events:none!important}

/* Modes de l'assistant décidés par la place réellement disponible. */
html[data-assistant-mode="docked"] .tsubomi-assistant-panel{
  width:var(--assistant-width)!important;
  height:auto!important;
  left:auto!important;
  right:max(16px,env(safe-area-inset-right))!important;
  top:max(16px,env(safe-area-inset-top))!important;
  bottom:calc(max(16px,env(safe-area-inset-bottom)) + var(--rgpd-space))!important;
  border-radius:22px!important;
}
html[data-assistant-mode="floating"] .tsubomi-assistant-panel{
  width:min(var(--assistant-width),calc(100vw - 24px))!important;
  height:min(720px,calc(var(--visual-vh) - 28px - var(--rgpd-space)))!important;
  left:auto!important;
  right:max(12px,env(safe-area-inset-right))!important;
  top:auto!important;
  bottom:calc(max(12px,env(safe-area-inset-bottom)) + var(--rgpd-space))!important;
}
html[data-assistant-mode="sheet"] .tsubomi-assistant-panel{
  width:auto!important;
  left:max(0px,env(safe-area-inset-left))!important;
  right:max(0px,env(safe-area-inset-right))!important;
  top:auto!important;
  bottom:var(--rgpd-space)!important;
  height:min(84dvh,calc(var(--visual-vh) - var(--rgpd-space)))!important;
  max-height:calc(var(--visual-vh) - var(--rgpd-space))!important;
  border-radius:22px 22px 0 0!important;
}
html[data-assistant-mode="side-sheet"] .tsubomi-assistant-panel{
  width:min(var(--assistant-width),62vw)!important;
  height:calc(var(--visual-vh) - var(--rgpd-space))!important;
  left:auto!important;
  right:max(0px,env(safe-area-inset-right))!important;
  top:var(--visual-offset-top,0px)!important;
  bottom:var(--rgpd-space)!important;
  border-radius:18px 0 0 18px!important;
}

/* Si le clavier virtuel réduit la fenêtre, le composeur reste atteignable. */
.tsubomi-assistant-panel{max-height:calc(var(--visual-vh) - var(--rgpd-space));}
.tsubomi-assistant-messages{min-height:0;}
.tsubomi-assistant-compose{position:relative;z-index:2;}

/* Petits contrôles : jamais trop petits pour le tactile. */
button,.btn,.icon-btn,.tab,.main-nav a,.tsubomi-assistant-chip,.drag-handle{
  min-height:var(--adaptive-tap,44px);
}
html[data-input="touch"] input,
html[data-input="touch"] select,
html[data-input="touch"] textarea{min-height:48px;font-size:max(16px,1rem)}

/* Groupes intelligents. */
.adaptive-wrap{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important;min-width:0!important}
.adaptive-wrap>*{min-width:0;max-width:100%}
.adaptive-stack{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}
.adaptive-stack>*{width:100%!important;max-width:100%!important;text-align:center}
.adaptive-scroll{overflow-x:auto!important;overflow-y:hidden!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important;max-width:100%!important;scrollbar-width:thin;overscroll-behavior-inline:contain}
.adaptive-scroll>*{-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important}
.adaptive-tight{font-size:.88em!important;letter-spacing:0!important;padding-inline:max(8px,.7em)!important}

/* Onglets : défilement lisible plutôt que texte compressé/coupé. */
.tabs,.admin-menu,.tsubomi-assistant-suggestions{max-width:100%;-webkit-overflow-scrolling:touch}
.adaptive-tabs-overflow{position:relative;-webkit-scroll-snap-type:x proximity;-ms-scroll-snap-type:x proximity;scroll-snap-type:x proximity;-webkit-padding-end:14px;padding-inline-end:14px}
.adaptive-tabs-overflow>*{scroll-snap-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}

/* Tables et contenus riches ne forcent jamais la page hors écran. */
.adaptive-table-wrap{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;border-radius:14px}
.adaptive-table-wrap table{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;max-width:none}
pre,code,.code-area{max-width:100%;overflow:auto;overflow-wrap:normal}
iframe,embed,object{max-width:100%}

/* Cartes/grilles basées sur la largeur disponible du contenu. */
html[data-adaptive-size="micro"] .grid{grid-template-columns:1fr!important}
html[data-adaptive-size="micro"] .feature-strip{grid-template-columns:1fr!important}
html[data-adaptive-size="micro"] .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-adaptive-size="micro"] .hero-copy h1{font-size:clamp(2.15rem,16vw,3.5rem)!important;line-height:.94!important}
html[data-adaptive-size="micro"] .page-hero h1{font-size:clamp(2rem,13vw,3rem)}
html[data-adaptive-size="micro"] .hero-showcase{display:none!important}
html[data-adaptive-size="micro"] .event-card{grid-template-columns:1fr!important}
html[data-adaptive-size="micro"] .event-date{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}
html[data-adaptive-size="micro"] .section-head{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}
html[data-adaptive-size="micro"] .container{width:calc(100% - 14px)!important}

html[data-adaptive-size="phone"] .hero{grid-template-columns:1fr!important;gap:18px!important}
html[data-adaptive-size="phone"] .phone-card.three{display:none!important}
html[data-adaptive-size="phone"] .section-head{gap:10px}
html[data-adaptive-size="phone"] .rail{grid-auto-columns:minmax(230px,78vw)}

html[data-adaptive-size="tablet"] .hero{grid-template-columns:1fr!important}
html[data-adaptive-size="tablet"] .hero-showcase{min-height:340px}
html[data-adaptive-size="tablet"] .feature-strip{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))!important}

/* Le lecteur se cale sur le vrai viewport, y compris barres mobiles et split-screen. */
.reader-shell{min-height:var(--visual-vh)}
.reader-stage{min-height:calc(var(--visual-vh) - var(--adaptive-header));}
.page-frame img,.page-frame video{max-height:calc(var(--visual-vh) - var(--adaptive-header) - 42px)}
html[data-layout="phone"] .reader-top-inner{gap:6px}
html[data-layout="phone"] .reader-title{-webkit-box-flex:1;-ms-flex:1 1 150px;flex:1 1 150px}
html[data-layout="phone"] .reader-top .select{max-width:min(48vw,180px)}
html[data-adaptive-size="micro"] .reader-top-inner{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}
html[data-adaptive-size="micro"] .reader-title{-ms-flex-preferred-size:100%;flex-basis:100%}
html[data-adaptive-size="micro"] .reader-top .select{max-width:none;width:100%}
html[data-adaptive-size="micro"] .reader-footer{left:6px!important;right:6px!important;-webkit-transform:none!important;-ms-transform:none!important;transform:none!important;width:auto!important}

/* Le hero décoratif s'efface progressivement quand il gênerait le contenu. */
html[data-performance="lite"] .hero-showcase{opacity:.72}
html[data-zoomed="true"] .hero-showcase{display:none!important}
html[data-assistant-open="true"][data-assistant-mode="docked"] .hero{grid-template-columns:minmax(0,1fr) minmax(260px,.72fr)}
html[data-assistant-open="true"][data-assistant-mode="docked"] .hero-copy h1{font-size:clamp(2.7rem,5.5vw,5.8rem)}

/* Bannière RGPD sur petites tailles : actions évidentes, sans masquer toute la page. */
@media (max-width:760px){
  .rgpd{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));max-width:none;padding:13px;border-radius:16px;max-height:min(46dvh,380px);overflow:auto}
  .rgpd p{font-size:.86rem;line-height:1.45}
  .rgpd .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .rgpd .actions>*{min-width:0;text-align:center}
}
@media (max-width:420px){
  .rgpd .actions{grid-template-columns:1fr}
  .tsubomi-assistant-headtext span{display:none}
  .tsubomi-assistant-head{padding:10px}
  .tsubomi-assistant-context{padding-block:7px}
  .tsubomi-assistant-messages{padding:10px}
  .tsubomi-assistant-compose{padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
}

/* Écrans très bas (téléphone paysage, fenêtre partagée). */
@media (max-height:520px) and (orientation:landscape){
  .rgpd{max-height:64dvh}
  .page-hero{padding-block:18px 8px}
  .section{padding-block:18px}
  .tsubomi-assistant-context{display:none}
  .tsubomi-assistant-headtext span{display:none}
}

/* Très grands écrans : l'interface reste centrée et ne devient pas démesurée. */
@media (min-width:2400px){
  html[data-layout="ultrawide"]{--max:1880px}
  .hero-copy h1{font-size:min(7rem,7vw)}
  .grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
}

/* Compatibilité : repli sans color-mix/backdrop-filter modernes. */
@supports not (color:color-mix(in srgb,#000 50%,#fff)){
  :focus-visible{outline-color:#f20b88}
  .tsubomi-assistant-launcher-dot{-webkit-box-shadow:0 0 0 5px rgba(242,11,136,.15);box-shadow:0 0 0 5px rgba(242,11,136,.15)}
}
@supports not (height:100dvh){
  html[data-assistant-mode="sheet"] .tsubomi-assistant-panel{height:min(84vh,calc(100vh - var(--rgpd-space)))!important}
}
@media (prefers-reduced-motion:reduce){
  :root{--adaptive-motion:0ms}
  body>main,.site-header,.site-footer{-webkit-transition:none!important;transition:none!important}
}


/* TSUBOMI iOS / iPhone XR compatibility v4 */
html[data-ios-webkit="true"],html[data-ios-webkit="true"] body{width:100%;max-width:100%;overflow-x:hidden}
html[data-ios-webkit="true"] .site-header{
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  background:#09090e!important;isolation:isolate;-ms-transform:none!important;transform:none!important;-webkit-transform:none!important;
}
html[data-ios-webkit="true"] .hero{
  min-width:0;max-width:100%;isolation:isolate;overflow:clip;-ms-transform:none!important;transform:none!important;-webkit-transform:none!important;
}
html[data-ios-webkit="true"] .hero-copy,html[data-ios-webkit="true"] .hero-showcase{
  min-width:0;max-width:100%;width:100%;-ms-transform:none!important;transform:none!important;-webkit-transform:none!important;
}
html[data-ios-webkit="true"] video.tsb-safe-video,
html[data-ios-webkit="true"] .media-box video,
html[data-ios-webkit="true"] .release-cover video,
html[data-ios-webkit="true"] .footer-social-link video{
  display:block!important;max-width:100%!important;max-height:100%;background:transparent!important;
  position:relative!important;inset:auto!important;-ms-transform:none!important;transform:none!important;-webkit-transform:none!important;
  -webkit-backface-visibility:hidden;backface-visibility:hidden;
}
html[data-ios-webkit="true"][data-ios-narrow="true"] .hero{
  display:-webkit-box!important;
  display:-ms-flexbox!important;
  display:flex!important;-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important;gap:20px!important;
  padding-top:24px!important;
}
html[data-ios-webkit="true"][data-ios-narrow="true"] .hero-copy{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;position:relative;z-index:2;overflow:visible}
html[data-ios-webkit="true"][data-ios-narrow="true"] .hero-showcase{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;position:relative!important;z-index:1;min-height:0!important;overflow:hidden;border-radius:22px}
html[data-ios-webkit="true"][data-ios-narrow="true"] .hero-copy h1{
  font-size:clamp(2.7rem,15vw,4rem)!important;line-height:.92!important;letter-spacing:-.05em!important;
  max-width:100%;overflow-wrap:normal;word-break:normal;
}
html[data-ios-webkit="true"][data-ios-narrow="true"] .header-inner{gap:8px!important;min-width:0}
html[data-ios-webkit="true"][data-ios-narrow="true"] .brand{gap:6px!important;font-size:1.08rem!important;min-width:0;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}
html[data-ios-webkit="true"][data-ios-narrow="true"] .brand-logo{width:28px!important;height:28px!important;-webkit-box-flex:0;-ms-flex:0 0 28px;flex:0 0 28px}
html[data-ios-webkit="true"][data-ios-narrow="true"] .mobile-toggle,
html[data-ios-webkit="true"][data-ios-narrow="true"] .cortex-search-button{padding-inline:12px!important;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}
html[data-ios-webkit="true"][data-ios-narrow="true"] .cortex-search-button .kbd{display:none!important}
html[data-ios-webkit="true"][data-ios-narrow="true"] .header-actions{min-width:0;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}
html[data-ios-webkit="true"][data-ios-narrow="true"] .release-window{width:100%!important;max-width:100%!important;contain:layout paint;-ms-transform:none!important;transform:none!important;-webkit-transform:none!important}
html[data-ios-webkit="true"][data-ios-narrow="true"] .release-stream{-webkit-overflow-scrolling:touch}
html[data-ios-webkit="true"][data-ios-narrow="true"] .tsubomi-assistant-launcher,
html[data-ios-webkit="true"][data-ios-narrow="true"] .tsubomi-assistant-panel,
html[data-ios-webkit="true"][data-ios-narrow="true"] .rgpd{
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
}
@supports not (overflow:clip){html[data-ios-webkit="true"] .hero{overflow:hidden}}
@media(max-width:430px){
  html[data-layout="phone"] .hero-copy h1{font-size:clamp(2.6rem,15vw,4rem);line-height:.92}
  html[data-layout="phone"] .header-inner{gap:8px}
  html[data-layout="phone"] .cortex-search-button .kbd{display:none}
}
