/* Accueil premium (2026-11-16) : héros avec appels à l'action et chiffres réels, vitrines Cours / Vidéothèque / Fatwas, bande Shorts.
   Uniquement des jetons du thème (clair, sombre, thèmes personnalisés) ; RTL par propriétés logiques. */

/* ---------- Héros ---------- */
.hero-institute { grid-template-columns: minmax(340px, 1.25fr) minmax(0, 2fr) auto; grid-template-areas: "main pills emblem" "stats stats emblem"; row-gap: 1.3rem; }
.hero-institute > .hero-main { grid-area: main; }
.hero-institute > .hero-pills { grid-area: pills; }
.hero-institute > .hero-emblem { grid-area: emblem; align-self: center; }
.hero-institute > .hero-stats { grid-area: stats; }
.hero-institute > .hero-corner { position: absolute; }
.hero-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-cta .btn { white-space: nowrap; }
.hero-cta .btn { border-radius: var(--r-pill, 999px); font-weight: 600; font-size: .92rem; padding: .62rem 1.25rem; }
.hero-btn-ghost { display: inline-flex; align-items: center; gap: .5rem; color: #fff; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.06); backdrop-filter: blur(6px); }
.hero-btn-ghost:hover, .hero-btn-ghost:focus { color: var(--c-navy-deep, #0b1a2c); background: #fff; border-color: #fff; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; list-style: none; margin: 0; padding: 1rem 0 0; border-top: 1px solid rgba(255,255,255,.16); }
.hero-stats a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .7rem; align-items: center; padding: .65rem .85rem; border-radius: 14px; color: #fff; background: rgba(255,255,255,.05); border: 1px solid rgba(200,155,94,.28); transition: transform .25s ease, background .25s ease, border-color .25s ease; }
.hero-stats a:hover, .hero-stats a:focus-visible { transform: translateY(-2px); background: rgba(200,155,94,.14); border-color: var(--c-gold); }
.hero-stats .bi { grid-row: 1 / 3; font-size: 1.35rem; color: var(--c-gold); }
.hero-stats strong { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: .76rem; color: rgba(255,255,255,.72); line-height: 1.2; }

/* ---------- Vitrines (Cours / Vidéothèque / Fatwas) ---------- */
.hx-row .hx-card { padding: 1.25rem 1.3rem; }
.hx-head { display: flex; align-items: center; gap: .85rem; margin-bottom: .9rem; }
.hx-head h2 { font-size: 1.32rem; margin: 0; line-height: 1.15; }
.hx-head p { margin: .15rem 0 0; font-size: .8rem; color: var(--c-muted); }
.hx-head .link-more { margin-inline-start: auto; font-size: .84rem; white-space: nowrap; }
.hx-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px 4px 14px 4px; background: var(--c-navy, #12263f); color: var(--c-gold); border: 1px solid var(--c-gold); font-size: 1.15rem; box-shadow: 0 8px 18px -10px rgba(4,12,24,.6); }
.hx-empty { font-size: .85rem; color: var(--c-muted); margin: .5rem 0; }
.hx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.hx-item { display: flex; gap: .8rem; align-items: flex-start; padding: .6rem .55rem; border-radius: 12px; color: var(--c-ink); transition: background .2s ease; }
.hx-item:hover, .hx-item:focus-visible { background: var(--c-gold-soft); color: var(--c-ink); }
.hx-thumb { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--c-gold-soft); color: var(--c-gold-deep, #8a6326); font-size: 1.05rem; border: 1px solid var(--c-border-soft); }
.hx-thumb.q { background: var(--c-green-soft); color: var(--c-green-text); }
.hx-txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.hx-txt strong { font-size: .92rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hx-txt strong[lang="ar"] { font-family: var(--font-arabic, inherit); font-size: 1.02rem; text-align: start; }
.hx-txt small { font-size: .78rem; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-meta { display: flex; flex-wrap: wrap; gap: .25rem .7rem; font-size: .72rem; color: var(--c-muted); }
.hx-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.hx-lang { font-weight: 700; letter-spacing: .05em; color: var(--c-green-text); }

.hx-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.hx-video { display: flex; flex-direction: column; gap: .3rem; color: var(--c-ink); min-width: 0; }
.hx-poster { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--c-navy, #12263f) var(--pattern-navy); border: 1px solid var(--c-border-soft); }
.hx-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.hx-poster .bi { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(8,18,32,.6); color: #fff; font-size: 1.4rem; border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(4px); transition: background .25s ease; }
.hx-poster b { position: absolute; inset-inline-end: .4rem; bottom: .4rem; font-size: .68rem; font-weight: 600; color: #fff; background: rgba(8,18,32,.72); padding: .1rem .45rem; border-radius: 999px; }
.hx-video:hover .hx-poster img { transform: scale(1.05); }
.hx-video:hover .hx-poster .bi { background: var(--c-gold); color: var(--c-navy-deep, #0b1a2c); }
.hx-video strong { font-size: .84rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hx-video strong[lang="ar"] { font-family: var(--font-arabic, inherit); font-size: .95rem; }
.hx-video small { font-size: .74rem; color: var(--c-muted); }
.hx-row .card-foot .bi { color: var(--c-gold); }

/* ---------- Bande Shorts ---------- */
.hx-shorts { padding: 1.3rem 1.4rem 1.1rem; }
.hx-reel { list-style: none; margin: 0; padding: .2rem .1rem .6rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 172px); gap: .85rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; overscroll-behavior-x: contain; }
.hx-reel > li { scroll-snap-align: start; }
.hx-short { position: relative; display: block; aspect-ratio: 9 / 15; border-radius: 16px; overflow: hidden; background: var(--c-navy, #12263f) var(--pattern-navy); border: 1px solid rgba(200,155,94,.35); box-shadow: 0 14px 28px -18px rgba(4,12,24,.7); color: #fff; isolation: isolate; }
.hx-short img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.hx-short::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,18,32,.15) 30%, rgba(8,18,32,.92)); }
.hx-short:hover img, .hx-short:focus-visible img { transform: scale(1.06); }
.hx-short:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }
.hx-short-dur { position: absolute; top: .5rem; inset-inline-end: .5rem; font-size: .68rem; font-weight: 600; background: rgba(8,18,32,.7); padding: .1rem .45rem; border-radius: 999px; }
.hx-short-play { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.5); backdrop-filter: blur(4px); font-size: 1.5rem; transition: background .25s ease, color .25s ease; }
.hx-short:hover .hx-short-play { background: var(--c-gold); color: var(--c-navy-deep, #0b1a2c); border-color: var(--c-gold); }
.hx-short-cap { position: absolute; inset: auto 0 0; padding: .7rem .7rem .75rem; display: flex; flex-direction: column; gap: .2rem; }
.hx-short-cap strong { font-size: .8rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hx-short-cap strong[lang="ar"] { font-family: var(--font-arabic, inherit); font-size: .92rem; }
.hx-short-cap small { font-size: .68rem; color: var(--c-gold-light, #e6c48f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Adaptation ---------- */
@media (max-width: 1199.98px) {
  .hero-institute { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main emblem" "pills pills" "stats stats"; }
  .hero-pills { border-inline-start: 0; padding-inline-start: 0; }
  .hx-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .hero-institute { grid-template-columns: minmax(0, 1fr); grid-template-areas: "emblem" "main" "pills" "stats"; padding: 1.4rem 1.1rem; }
  .hero-institute .hero-emblem { transform: scale(.7); margin: -2rem auto -2.2rem; }
  .hero-cta { justify-content: center; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats a { padding: .55rem .65rem; }
  .hero-stats strong { font-size: 1.2rem; }
  .hx-head .link-more { display: none; }
  .hx-shorts .hx-head .link-more { display: inline-flex; }
  .hx-reel { grid-auto-columns: 46%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stats a, .hx-poster img, .hx-short img, .hx-item { transition: none; }
}
@media (max-width: 991.98px) {
  .hero-stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
