/* Microsites (inc/microsites.php) : structure commune. Couleurs et visuels : css/microsites.css du thème enfant, par variables.
   --ms-fond, --ms-texte : en-tête et pied ; --ms-fonce : panneau et bouton ; --ms-trait : filet des titres ; --ms-rayon. */

.lb-ms { --ms-fond: var(--bg-inverse); --ms-texte: var(--fg-on-dark); --ms-fonce: var(--bg-inverse); --ms-trait: var(--accent); --ms-rayon: 16px; }
.lb-ms .lb-header { position: relative; background: none; }
.lb-ms .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Le tiroir, réservé au mobile sur le site, est le seul menu général d'un microsite. */
@media (min-width: 768px) {
  .lb-ms .lb-drawer:not([hidden]) { display: block; top: 0; inset-inline: 0 auto; width: 360px; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
}

/* En-tête */
.lb-ms-entete { position: relative; background: var(--ms-fond) center top / 100% auto no-repeat; color: var(--ms-texte); }
.lb-ms-entete__barre { display: flex; gap: 24px; align-items: center; min-height: 84px; }
.lb-ms-entete__marque { display: flex; gap: 14px; align-items: center; margin-inline-end: auto; }
.lb-ms-entete__marque .lb-hamburger { display: inline-flex; color: inherit; background: none; }
.lb-ms-entete__marque img { display: block; height: 52px; width: auto; }
.lb-ms-entete__visuel { height: 96px; width: auto; }
.lb-ms--illustre .lb-ms-entete { z-index: 2; aspect-ratio: var(--ms-bandeau, 1920 / 352); background-color: transparent; }
.lb-ms--illustre .lb-ms-entete__barre { position: absolute; inset: 0; min-height: 0; }
.lb-ms--illustre .lb-ms-entete__marque { position: absolute; inset-inline-start: 22%; top: 22%; padding: 10px 18px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: #fff; }
.lb-ms--illustre .lb-ms-entete__marque img { height: 34px; }
.lb-ms-entete__embleme { position: absolute; left: 50%; top: 10%; height: 62%; transform: translateX(-50%); }
.lb-ms-entete__embleme img { height: 100%; width: auto; }
.lb-ms-entete__nom { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); color: #fff; font: 900 clamp(16px, 3vw, 38px) var(--font-display); }
.lb-ms-menu { display: flex; gap: 4px; font: 700 14px var(--font-display); }
.lb-ms-menu a { padding: 6px 14px; border-radius: 999px; color: inherit; white-space: nowrap; }
.lb-ms-entete__barre .lb-ms-menu [aria-current] { background: var(--ms-trait); }
.lb-ms-entete > .lb-ms-menu { overflow-x: auto; padding-inline: max(16px, calc((100% - 1248px) / 2)); background: rgba(0, 0, 0, .25); scrollbar-width: none; }
.lb-ms-entete > .lb-ms-menu a { padding: 12px 14px; border-radius: 0; border-bottom: 3px solid transparent; }
.lb-ms-entete > .lb-ms-menu [aria-current] { border-color: var(--accent); }
.lb-ms-entete + .lb-ms-menu { justify-content: center; flex-wrap: wrap; gap: 8px; padding: 8px 16px 20px; }
.lb-ms-entete + .lb-ms-menu a { padding: 8px 16px; border: 1px solid var(--border); background: var(--bg); color: var(--ms-fonce); }
.lb-ms-entete + .lb-ms-menu [aria-current] { border-color: var(--ms-fonce); background: var(--ms-fonce); color: #fff; }

/* Cartes */
.lb-ms-carte { position: relative; display: block; overflow: hidden; border-radius: var(--ms-rayon); background: #3a3a3a; color: #fff; }
.lb-ms-carte__image { display: block; aspect-ratio: 16 / 10; }
.lb-ms-carte--grande .lb-ms-carte__image { aspect-ratio: 2 / 1; }
:is(.lb-ms-carte__image, .lb-ms-video__image) img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-ms-carte__texte { position: absolute; inset: auto 0 0 0; display: block; padding: 48px 16px 16px; background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, 0)); }
.lb-ms-carte__titre { margin: 0; color: inherit; font: 800 16px/1.35 var(--font-display); }
.lb-ms-carte--grande .lb-ms-carte__texte { padding: 72px 24px 24px; }
.lb-ms-carte--grande .lb-ms-carte__titre { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.2; }
.lb-ms-carte__titre::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 10px; background: var(--ms-trait); }
.lb-ms-carte__date { display: block; margin-top: 8px; font: 700 12px var(--font-display); }

/* Accueil */
.lb-ms-une { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; padding-bottom: 32px; }
.lb-ms-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lb-ms-une .lb-ms-grille, .lb-ms-plus { grid-column: 1 / -1; }
.lb-ms-plus { margin: 0; text-align: center; }
.lb-ms-plus .lb-btn { padding: 12px 28px; border-radius: 999px; background: var(--ms-fonce); color: #fff; }
.lb-ms-panneau { padding: 20px; border-radius: var(--ms-rayon); background: var(--ms-fonce); color: #fff; }
.lb-ms-panneau h2 { margin: 0 0 12px; color: inherit; font: 900 20px/1.2 var(--font-display); text-align: center; text-transform: uppercase; }
.lb-ms-panneau .lb-side-list { padding: 6px 14px; border-radius: 12px; background: #fff; color: #1a1a1a; }
.lb-ms-panneau__mascotte { display: block; width: 180px; height: auto; margin: 12px auto -44px; }
.lb-ms-videos { padding: 32px 0; background: var(--bg-alt); }
.lb-ms-videos h2 { margin: 0 0 20px; color: inherit; font: 800 22px var(--font-display); }
.lb-ms-videos__grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lb-ms-video { color: inherit; }
.lb-ms-video__image { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-card); background: #e9e9e9; }
.lb-ms-video__image::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; width: 52px; height: 52px; margin: auto; border-radius: 50%; background: #ffcb21; color: #1a1a1a; font-size: 20px; }
.lb-ms-video h3 { margin: 10px 0 0; color: inherit; font: 800 16px/1.35 var(--font-display); }

/* Listes */
.lb-ms-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.lb-ms-fiche__date { display: block; margin-top: 6px; color: var(--fg-muted); font-size: var(--fs-meta); }
.lb-ms-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0; }
.lb-ms-pagination .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-card); color: var(--fg); font: 700 14px var(--font-display); }
.lb-ms-pagination .dots { border: 0; }
.lb-ms-pagination .current { border-color: var(--ms-trait); background: var(--ms-trait); color: #fff; }

/* Pied */
.lb-ms-pied__bande { background: var(--ms-fond) center top / 100% auto no-repeat; color: var(--ms-texte); }
.lb-ms-pied__corps { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; min-height: 96px; }
.lb-ms-pied__corps img { display: block; height: 44px; width: auto; }
.lb-ms-pied__menu { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; font: 700 13px var(--font-display); }
.lb-ms-pied a { color: inherit; }
.lb-ms-pied__reseaux { display: flex; gap: 16px; font: 800 18px var(--font-display); direction: ltr; }
.lb-ms-pied .lb-footer__legal { margin: 0; padding: 14px 0; background: #1a1a1a; color: #ccc; text-align: center; }
.lb-ms--illustre .lb-ms-pied__bande { position: relative; aspect-ratio: var(--ms-bandeau-pied, 1920 / 352); background-color: transparent; }
.lb-ms--illustre .lb-ms-pied__corps { position: absolute; inset: 0 24%; flex-wrap: nowrap; color: #fff; }
.lb-ms-pied .lb-ms-pied__embleme { height: 60%; max-height: 110px; }

@media (max-width: 1099px) {
  .lb-ms-une, .lb-ms-colonnes { grid-template-columns: minmax(0, 1fr); }
  .lb-ms .lb-ms-une > * { grid-column: 1; grid-row: auto; }
  .lb-ms-panneau { order: 5; margin-bottom: 24px; }
  .lb-ms-grille, .lb-ms-videos__grille { grid-template-columns: 1fr 1fr; }
  .lb-ms-entete__barre:has(.lb-ms-menu) { flex-wrap: wrap; padding-block: 10px; }
  .lb-ms-entete__barre .lb-ms-menu { order: 5; width: 100%; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 767px) {
  .lb-ms-videos__grille, .lb-ms .lb-ms-une .lb-ms-grille { grid-template-columns: minmax(0, 1fr); }
  .lb-ms--illustre .lb-ms-entete { aspect-ratio: auto; min-height: 76px; background-size: auto 100%; }
  .lb-ms--illustre .lb-ms-entete .lb-ms-entete__marque { left: 50%; right: auto; inset-inline-start: 50%; top: 0; transform: translateX(-50%); padding: 8px 14px; border-radius: 0 0 18px 18px; background: rgba(0, 0, 0, .8); }
  [dir="rtl"] .lb-ms--illustre .lb-ms-entete .lb-ms-entete__marque { transform: translateX(50%); }
  .lb-ms--illustre .lb-ms-entete .lb-ms-entete__marque img { height: 26px; }
  .lb-ms-entete__embleme, .lb-ms-entete__nom, .lb-ms-entete__visuel { display: none; }
  .lb-ms-entete + .lb-ms-menu { padding-top: 14px; }
  .lb-ms--illustre .lb-ms-pied__bande { aspect-ratio: auto; min-height: 96px; background-size: auto 100%; }
  .lb-ms--illustre .lb-ms-pied__corps { position: static; width: max-content; min-height: 0; height: auto; margin: 0 auto; padding: 12px 20px; border-radius: 0 0 18px 18px; background: rgba(0, 0, 0, .8); }
  .lb-ms--illustre .lb-ms-pied__corps img { height: 28px; }
  .lb-ms-pied__embleme { display: none !important; }
  .lb-ms-carte--grande .lb-ms-carte__image { aspect-ratio: 4 / 3; }
  .lb-ms-pied__corps { padding-block: 16px; }
}
