/* Unified mobile navigation + banner sizing across the site */

/* Keep every section header compact and horizontal on phones */
@media (max-width: 900px){
  header,
  .site-header,
  .header{
    overflow:visible!important;
    position:sticky!important;
    top:0!important;
    z-index:1000!important;
  }

  header > .container.nav,
  .site-header .nav-row,
  .header .container.nav{
    min-height:68px!important;
    height:68px!important;
    padding-top:0!important;
    padding-bottom:0!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:14px!important;
  }

  .mobile-menu-btn,
  .menu-btn{
    display:inline-flex!important;
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    min-height:46px!important;
    padding:0!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 46px!important;
  }

  .mobile-collapsible,
  .site-header .nav#mainNav{
    display:none!important;
    position:fixed!important;
    top:76px!important;
    left:12px!important;
    right:12px!important;
    width:auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 92px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:5px!important;
    padding:12px!important;
    margin:0!important;
    background:rgba(251,247,239,.99)!important;
    border:1px solid rgba(18,61,52,.14)!important;
    border-radius:18px!important;
    box-shadow:0 24px 70px rgba(18,61,52,.24)!important;
    backdrop-filter:blur(18px)!important;
    z-index:10001!important;
  }

  .mobile-collapsible.open,
  .site-header .nav#mainNav.open{
    display:flex!important;
  }

  .mobile-collapsible a,
  .site-header .nav#mainNav a{
    display:block!important;
    width:100%!important;
    padding:13px 14px!important;
    margin:0!important;
    border-radius:12px!important;
    white-space:normal!important;
    text-align:left!important;
    font-size:16px!important;
    line-height:1.25!important;
    color:#123d34!important;
  }
}

/* Same full-width banner geometry on every interior page */
body[data-page="prophetes"] .hero,
body[data-page="piliers"] .hero,
body[data-page="hadiths"] .hero,
body[data-page="invocations"] .hero,
body[data-page="priere"] .hero{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  border-radius:0!important;
  min-height:clamp(360px,48vw,560px)!important;
  display:flex!important;
  align-items:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
}

/* Bannière Prophètes : afficher uniquement le titre par-dessus l'image. */
body[data-page="prophetes"] .hero > .container{
  visibility:visible!important;
  padding-top:28px!important;
  padding-bottom:28px!important;
}
body[data-page="prophetes"] .hero .eyebrow,
body[data-page="prophetes"] .hero p{
  display:none!important;
}
body[data-page="prophetes"] .hero h1{
  margin:0!important;
  color:#fff!important;
  text-shadow:0 3px 16px rgba(0,0,0,.48)!important;
  font-size:0!important;
}
body[data-page="prophetes"] .hero h1::after{
  content:"L’histoire des prophètes"!important;
  display:block!important;
  font-family:Georgia,serif!important;
  font-size:clamp(42px,7vw,78px)!important;
  line-height:1.02!important;
  letter-spacing:-.035em!important;
}

/* 99 noms: use the same edge-to-edge banner treatment */
body[data-page="noms"] main::before{
  content:""!important;
  display:block!important;
  width:100%!important;
  min-height:clamp(360px,48vw,560px)!important;
  margin:0!important;
  border-radius:0!important;
  background-image:linear-gradient(90deg,rgba(6,35,29,.16),rgba(6,35,29,.04)),url('assets/banner-99noms.webp')!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
}
body[data-page="noms"] #noms .container::before,
body[data-page="noms"] #noms .section-head > div:first-child::before{
  display:none!important;
  content:none!important;
}
body[data-page="noms"] #noms{
  padding-top:56px!important;
}

/* More consistent banner text spacing */
body[data-page="piliers"] .hero > .container,
body[data-page="hadiths"] .hero > .container,
body[data-page="invocations"] .hero > .container,
body[data-page="priere"] .hero > .container{
  padding-top:28px!important;
  padding-bottom:28px!important;
}

@media (max-width: 640px){
  body[data-page="prophetes"] .hero,
  body[data-page="piliers"] .hero,
  body[data-page="hadiths"] .hero,
  body[data-page="invocations"] .hero,
  body[data-page="priere"] .hero,
  body[data-page="noms"] main::before{
    min-height:390px!important;
    background-position:62% center!important;
  }

  body[data-page="prophetes"] .hero h1::after{
    font-size:clamp(40px,11vw,58px)!important;
  }

  body[data-page="noms"] #noms{
    padding-top:44px!important;
  }

  .brand{
    font-size:20px!important;
    line-height:1.08!important;
  }
}

/* Page Prophètes : section plus sobre, sans barre de recherche. */
body[data-page="prophetes"] .prophet-tools{
  display:none!important;
}
body[data-page="prophetes"] .section-head h2{
  font-size:0!important;
}
body[data-page="prophetes"] .section-head h2::after{
  content:"Les prophètes"!important;
  display:block!important;
  font-family:Georgia,serif!important;
  font-size:clamp(32px,5vw,50px)!important;
  line-height:1.08!important;
  color:var(--green)!important;
}
body[data-page="prophetes"] .section-head > p{
  display:none!important;
}

/* Mobile: garder le titre “Les prophètes” bien séparé de la première carte. */
@media(max-width:640px){
  body[data-page="prophetes"] .section-head{
    margin-bottom:22px!important;
  }
  body[data-page="prophetes"] .section-head > div{
    display:block!important;
    width:100%!important;
  }
  body[data-page="prophetes"] .section-head h2{
    margin:18px 0 0!important;
    position:relative!important;
    z-index:1!important;
  }
  body[data-page="prophetes"] .section-head h2::after{
    font-size:38px!important;
    line-height:1.05!important;
    margin-top:0!important;
  }
}


/* Finalisation globale v3 */
.skip-link{position:fixed;left:12px;top:12px;z-index:99999;transform:translateY(-160%);padding:12px 16px;border-radius:12px;background:#123d34;color:#fff;font-weight:800;text-decoration:none;box-shadow:0 10px 30px rgba(18,61,52,.25)}
.skip-link:focus{transform:translateY(0)}
:where(a,button,input,[role="button"]):focus-visible{outline:3px solid #b99352;outline-offset:3px}
main[id],section[id],article[id]{scroll-margin-top:96px}
.site-utility-links{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:14px;font-size:13px}
.site-utility-links a{color:inherit;text-underline-offset:3px}
.empty-state{margin:16px 0;padding:18px;border:1px dashed rgba(18,61,52,.28);border-radius:16px;background:rgba(255,255,255,.64);color:#64746f;text-align:center}
.copy-tools,.page-tools,.quick-nav,.page-pagination{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.copy-btn,.tool-btn,.quick-nav a,.page-pagination a{appearance:none;border:1px solid rgba(18,61,52,.18);border-radius:12px;background:#fff;color:#123d34;padding:10px 14px;font:800 14px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-decoration:none;cursor:pointer}
.copy-btn:hover,.tool-btn:hover,.quick-nav a:hover,.page-pagination a:hover{border-color:#b99352;background:#fbf7ef}
.page-pagination{justify-content:space-between;align-items:center;margin-top:30px}
.page-search{width:min(100%,640px);min-height:48px;padding:12px 16px;border:1px solid #e7dece;border-radius:14px;background:#fff;color:#17362f;font:700 16px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.page-search:focus{border-color:#b99352;box-shadow:0 0 0 4px rgba(185,147,82,.14);outline:0}
.religious-review-note{margin:22px 0;padding:15px 17px;border-left:4px solid #b99352;border-radius:14px;background:#f8f3e8;color:#3c5d55}
html{scrollbar-gutter:stable}
@media(max-width:640px){.site-utility-links{flex-direction:column}.page-pagination{align-items:stretch}.page-pagination a{text-align:center;flex:1}.quick-nav{overflow-x:auto;flex-wrap:nowrap;padding-bottom:5px}.quick-nav a{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media print{header,.site-header,.page-tools,.quick-nav,.page-pagination,.menu-btn,.mobile-menu-btn,.site-utility-links{display:none!important}body{background:#fff!important;color:#111!important}.card,.name-card,article{box-shadow:none!important;break-inside:avoid}}

.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* Outils pédagogiques v1 */
.favorite-btn,.progress-btn{appearance:none;border:1px solid rgba(185,147,82,.4);border-radius:999px;background:#fffaf0;color:#123d34;padding:9px 13px;font:800 13px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer}
.favorite-btn[aria-pressed="true"],.progress-btn[aria-pressed="true"],.category-filter[aria-pressed="true"]{background:#123d34;color:#fff;border-color:#123d34}
.learning-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0;padding:14px 16px;border:1px solid rgba(18,61,52,.12);border-radius:16px;background:rgba(255,255,255,.75);font-weight:800;color:#123d34}
.card[hidden],.name-card[hidden]{display:none!important}
@media(max-width:560px){.learning-status{align-items:flex-start;flex-direction:column}}

/* Responsive final 375–1920 */
html,body{max-width:100%;overflow-x:clip}
img,svg,video{max-width:100%;height:auto}
:where(.site-header,.header,body>header){position:sticky;top:0;z-index:1000;background:rgba(251,247,239,.96);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
:where(.site-header,.header,body>header) :where(a,button){min-height:44px}
:where(.hero,.info-hero){background-size:cover!important;background-repeat:no-repeat!important}
:where(.card,.name-card,.pillar,.info-card){min-width:0}
:where(p,.meaning,.trans,.meta,.source){overflow-wrap:anywhere}
.arabic,[dir="rtl"]{font-size:clamp(1.2rem,3.2vw,1.8rem);line-height:1.9;text-align:right;overflow-wrap:normal;word-break:normal}
@media(min-width:1200px){.container{width:min(1180px,calc(100% - 64px))}.hero{min-height:min(620px,72vh);display:flex;align-items:center}.hero h1{max-width:920px}}
@media(min-width:641px) and (max-width:1024px){.container{width:min(100% - 40px,920px)}.hero{background-position:center!important}.grid,.names-grid{gap:16px}}
@media(max-width:640px){.container{width:min(100% - 24px,1180px)}:where(.hero,.info-hero){background-position:60% center!important}.hero h1,.info-hero h1{font-size:clamp(36px,12vw,56px)!important}.section{padding-block:44px!important}.card,.name-card,.pillar,.info-card{border-radius:20px!important}.mobile-collapsible a,.nav a,.links a,.navlinks a{min-height:44px;display:flex;align-items:center}}
@media(max-height:520px) and (orientation:landscape){:where(.hero,.info-hero){min-height:auto!important;padding-block:36px!important;background-position:center 42%!important}.hero h1,.info-hero h1{font-size:clamp(34px,7vw,52px)!important}.section{padding-block:36px!important}}

/* Réactivation outils Prophètes */
body[data-page="prophetes"] .prophet-tools{display:flex!important}
body[data-page="prophetes"] .section-head h2{font-size:clamp(32px,5vw,50px)!important}
body[data-page="prophetes"] .section-head h2::after{content:none!important;display:none!important}
body[data-page="prophetes"] .section-head>p{display:block!important}
@media(max-width:640px){body[data-page="prophetes"] .prophet-tools{display:block!important}}

/* Contrastes WCAG AA */
.section-head>p{color:#465f57!important}
footer,footer strong,footer span,footer a,footer .mini{color:#3f5750!important}

/* Nouveau logo principal : remplace visuellement le titre texte tout en gardant le texte accessible. */
.brand{
  display:block!important;
  width:clamp(210px,23vw,310px)!important;
  height:58px!important;
  min-height:58px!important;
  flex:0 0 auto!important;
  font-size:0!important;
  line-height:0!important;
  color:transparent!important;
  background:url('assets/logo-decouvrir-islam.webp') left center / contain no-repeat!important;
}
@media(max-width:640px){
  .brand{
    width:min(255px,calc(100vw - 92px))!important;
    height:52px!important;
    min-height:52px!important;
  }
}


/* Logo responsive final — portrait, paysage, tablette et ordinateur */
.brand{
  background-image:url('1BB72BE9-C5CA-4A94-8DC1-2494A84B83DE.png')!important;
  background-position:left center!important;
  background-size:contain!important;
  background-repeat:no-repeat!important;
}
.brand-logo{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:left center!important;
}
@media(max-width:640px) and (orientation:portrait){
  .brand{
    width:min(300px,calc(100vw - 86px))!important;
    height:56px!important;
    min-height:56px!important;
  }
}
@media(max-height:520px) and (orientation:landscape){
  .site-header .nav-row,
  header > .container.nav{
    min-height:72px!important;
    height:72px!important;
  }
  .brand{
    width:clamp(320px,48vw,460px)!important;
    height:62px!important;
    min-height:62px!important;
  }
  body[data-page="home"] #accueil.hero{
    width:calc(100% - 24px)!important;
    min-height:calc(100svh - 88px)!important;
    margin-top:12px!important;
    padding:42px 0!important;
    background-position:center 44%!important;
  }
  body[data-page="home"] #accueil h1{
    font-size:clamp(38px,6vw,58px)!important;
    max-width:720px!important;
  }
  body[data-page="home"] #accueil p{
    font-size:clamp(16px,2.1vw,20px)!important;
    max-width:680px!important;
  }
  body[data-page="home"] #accueil .hero-actions{
    margin-top:22px!important;
    display:flex!important;
  }
  body[data-page="home"] #accueil .btn{
    width:auto!important;
    min-height:48px!important;
  }
}
@media(min-width:641px) and (min-height:521px) and (max-width:1100px){
  .brand{
    width:clamp(300px,36vw,390px)!important;
    height:64px!important;
    min-height:64px!important;
  }
}
@media(min-width:1101px){
  .brand{
    width:clamp(310px,22vw,390px)!important;
    height:66px!important;
    min-height:66px!important;
  }
}

/* Agrandir uniquement le lettrage du logo de 30 %, icône inchangée.
   Deux fenêtres CSS affichent les parties du même fichier, sans le modifier. */
.brand{
  --brand-art-height:58px;
  position:relative!important;
  background:none!important;
}
.brand .brand-logo{opacity:0!important}
.brand::before,.brand::after{
  content:""!important;
  position:absolute!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  height:var(--brand-art-height)!important;
  background-image:url('1BB72BE9-C5CA-4A94-8DC1-2494A84B83DE.png')!important;
  background-repeat:no-repeat!important;
  pointer-events:none!important;
}
.brand::before{
  left:0!important;
  width:calc(var(--brand-art-height) * 1.05)!important;
  background-size:calc(var(--brand-art-height) * 3) var(--brand-art-height)!important;
  background-position:left center!important;
}
.brand::after{
  left:calc(var(--brand-art-height) * 1.05)!important;
  width:calc(var(--brand-art-height) * 2.535)!important;
  background-size:calc(var(--brand-art-height) * 3.9) calc(var(--brand-art-height) * 1.3)!important;
  background-position:right center!important;
}
@media(max-width:640px){.brand{--brand-art-height:52px}}
@media(max-width:640px) and (orientation:portrait){.brand{--brand-art-height:56px}}
@media(min-width:641px) and (min-height:521px) and (max-width:1100px){.brand{--brand-art-height:64px}}
@media(min-width:1101px){.brand{--brand-art-height:66px}}
@media(max-height:520px) and (orientation:landscape){.brand{--brand-art-height:62px}}
