/* Le cadre « monté comme la Bibliothèque » (Yann 2026-10-05), partagé par les
   pages carte-menu : Thème natal, Carte numérologique, Énergies du jour,
   Rapports spéciaux. Valeurs reprises de public/shared/rapport-page.css
   (.brand, .masthead, .eyebrow) et du cadre de dialogue-interieur.html.

   Tout est sous #bento (ou .mpi-cadre) et en !important : ces pages portent
   des règles globales (« .bento .panel h1, p, span… { color:#111;
   font-size… } !important », « h1,h2,h3 { font-family: Cardo } » de
   page-brand.css) qui écraseraient la marque et l'en-tête. */

/* Bureau : un cadre d'un écran de haut, qui défile en dedans.
   La hauteur --h-cadre est mesurée par cadre-biblio.js.
   Largeur et voile restent ceux de chaque page (Yann 2026-10-05 : « il ne
   fallait pas toucher la largeur et la transparence »). */
@media (min-width: 769px) {
  /* #bento doublé : les pages posent « #bento .cm-page .panel.welcome-wheel »
     (même poids) dans leur <style>, chargé après cette feuille. */
  #bento#bento .cm-page .panel.mpi-cadre {
    height: var(--h-cadre, calc(100svh - 92px)) !important;
    max-height: none !important;
    min-height: 420px;
    padding: 0 clamp(1.2rem, 4vw, 3.5rem) 3rem !important;
    border: 1.5px solid #C99A4E !important;
    overflow-y: auto !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
  }
}

.mpi-inner { width: 100%; max-width: 62rem; margin: 0 auto; }

#bento#bento .mpi-brand, .mpi-cadre .mpi-brand, .mpi-brand.mpi-brand-seule {
  display: flex !important; align-items: center; justify-content: flex-start; gap: .7rem; align-self: stretch;
  padding: 1.4rem 0 1.2rem !important; margin: 0 0 2.2rem !important;
  border-bottom: 1px solid rgba(201,154,78,.3);
  text-align: left;
}
#bento#bento .mpi-brand img, .mpi-cadre .mpi-brand img, .mpi-brand.mpi-brand-seule img { width: 2.3rem !important; height: 2.3rem !important; display: block; margin: 0 !important; }
#bento#bento .mpi-brand span, .mpi-cadre .mpi-brand span, .mpi-brand.mpi-brand-seule span {
  font-family: 'Cinzel', Georgia, serif !important; font-size: .74rem !important; font-weight: 600 !important;
  letter-spacing: .2em !important; line-height: normal !important; text-transform: uppercase;
  color: oklch(0.52 0.09 68) !important;
}

#bento#bento .mpi-masthead, .mpi-cadre .mpi-masthead {
  display: flex !important; flex-direction: column; gap: .9rem; text-align: center;
  padding: 0 0 2rem !important; margin: 0 0 1.8rem !important;
  border-bottom: 3px double #C99A4E;
}
#bento#bento .mpi-eyebrow, .mpi-cadre .mpi-eyebrow {
  font-family: 'Cinzel', Georgia, serif !important; font-size: .68rem !important; font-weight: 500 !important;
  letter-spacing: .18em !important; line-height: 1.4 !important; text-transform: uppercase;
  color: oklch(0.52 0.09 68) !important; margin: 0 !important;
}
#bento#bento .mpi-title, .mpi-cadre .mpi-title {
  font-family: 'Cormorant Garamond', Georgia, serif !important; font-size: clamp(2.4rem, 7vw, 3.5rem) !important;
  line-height: 1.04 !important; font-weight: 600 !important; font-style: normal !important;
  color: #4A3B26 !important; margin: 0 !important; text-wrap: balance;
  letter-spacing: normal !important; text-transform: none !important;
}
#bento#bento .mpi-sub, .mpi-cadre .mpi-sub {
  font-family: 'Cormorant Garamond', Georgia, serif !important; font-size: 1.3rem !important;
  line-height: 1.35 !important; font-style: italic !important; font-weight: 500 !important;
  color: #7A6448 !important; margin: 0 !important; text-wrap: balance;
}

/* La marque seule, en tête d'un bloc dont la page garde son titre (Énergies du
   jour, Puzzy, Profil, Mémoires ; Formation, hors #bento, par .fpanel) ;
   masquée dans le lecteur plein écran. */
#bento#bento .mpi-brand.mpi-brand-seule, .fpanel .mpi-brand.mpi-brand-seule { margin: -.4rem 0 1.4rem !important; padding: .2rem 0 .9rem !important; }
[data-fs-wrap].is-fs .mpi-brand:not(.mpi-cartouche) { display: none !important; }

/* Le cartouche (Yann 2026-10-18) : le titre et sa phrase montent dans la bande
   de la marque — le logo à gauche, le titre centré sur la bande ; au téléphone,
   l'un sous l'autre. En plein écran, le logo part et le titre reste (il porte
   le bouton ⤢). MpiCadre.cartouche() le rend. */
#bento#bento .mpi-brand.mpi-cartouche, .mpi-cadre .mpi-brand.mpi-cartouche, .mpi-brand.mpi-cartouche {
  display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .4rem 1.2rem;
}
.mpi-cartouche .mpi-marque { display: flex; align-items: center; gap: .7rem; }
.mpi-cartouche .mpi-cart-titre { text-align: center; }
#bento#bento .mpi-cartouche .mpi-cart-titre > :first-child, .mpi-cartouche .mpi-cart-titre > :first-child {
  font-family: 'Cormorant Garamond', Georgia, serif !important; font-size: clamp(1.7rem, 3.2vw, 2.3rem) !important;
  line-height: 1.06 !important; font-weight: 600 !important; font-style: normal !important;
  color: #4A3B26 !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
  text-align: center !important; text-wrap: balance; letter-spacing: normal !important; text-transform: none !important;
}
#bento#bento .mpi-cartouche .mpi-sub, .mpi-cartouche .mpi-sub { font-size: 1.1rem !important; margin: .2rem 0 0 !important; }
@media (max-width: 768px) {
  #bento#bento .mpi-brand.mpi-cartouche, .mpi-brand.mpi-cartouche { grid-template-columns: 1fr; justify-items: center; }
}
/* Au téléphone, debout comme couché, le titre et sa phrase plus petits
   (Yann 2026-10-18) ; le PC garde les siens. */
@media (max-width: 768px), (max-height: 500px) and (pointer: coarse) {
  #bento#bento .mpi-cartouche .mpi-cart-titre > :first-child, .mpi-cartouche .mpi-cart-titre > :first-child { font-size: 1.35rem !important; }
  #bento#bento .mpi-cartouche .mpi-sub, .mpi-cartouche .mpi-sub { font-size: .95rem !important; }
}
/* Téléphone couché : le cartouche sur une ligne, comme au PC, et le logo
   plus petit pour y tenir (Yann 2026-10-18). */
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  #bento#bento .mpi-brand.mpi-cartouche, .mpi-brand.mpi-cartouche { grid-template-columns: 1fr auto 1fr; justify-items: stretch; gap: .4rem .8rem; }
  #bento#bento .mpi-cartouche .mpi-marque img, .mpi-cartouche .mpi-marque img { width: 1.5rem !important; height: 1.5rem !important; }
  #bento#bento .mpi-cartouche .mpi-marque span, .mpi-cartouche .mpi-marque span { font-size: .56rem !important; letter-spacing: .16em !important; }
  .mpi-cartouche .mpi-marque { gap: .45rem; }
  /* Moins haut : marges du haut et du bas resserrées (Yann 2026-10-18). */
  #bento#bento .mpi-brand.mpi-cartouche, .mpi-cadre .mpi-brand.mpi-cartouche, .mpi-brand.mpi-cartouche { padding: .45rem 0 .5rem !important; margin-bottom: 1rem !important; }
  #bento#bento .mpi-cartouche .mpi-cart-titre > :first-child, .mpi-cartouche .mpi-cart-titre > :first-child { line-height: 1 !important; }
  #bento#bento .mpi-cartouche .mpi-sub, .mpi-cartouche .mpi-sub { line-height: 1.2 !important; margin-top: .1rem !important; }
}
[data-fs-wrap].is-fs .mpi-cartouche .mpi-marque { display: none !important; }
[data-fs-wrap].is-fs .mpi-brand.mpi-cartouche { grid-template-columns: 1fr; border-bottom: 0; }
