/* ===================================================================
   Le-Coran.com — CSS commun public
   Tokens, reset, grille, header, footer et composants transverses.
   =================================================================== */

/* -------------------------------------------------------------------
   0. Tokens
   ------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Couleurs de marque */
  --lc-green:      #94b100;
  --lc-green-d:    #7d9600;
  --lc-green-dd:   #3b413d;
  --lc-green-tint: #eef2db;
  --lc-gold:       #c69a45;
  --lc-gold-soft:  #f3ead4;

  /* Accents (cartes actions / apprendre) */
  --lc-blue:   #2f6fb0;  --lc-blue-tint:   #e7eef8;
  --lc-orange: #d98324;  --lc-orange-tint: #fbeed9;
  --lc-purple: #7c5cbf;  --lc-purple-tint: #efe9f8;
  --lc-red:    #d65745;

  /* Neutres / surfaces */
  --lc-bg:        #ffffff;
  --lc-surface:   #ffffff;
  --lc-surface-2: #e8eadd;
  --lc-ink:       #565348;
  --lc-ink-soft:  #807b6d;
  --lc-ink-faint: #a39e90;
  --lc-line:      #e1e0d4;
  --lc-line-2:    #edece3;

  /* Header / footer */
  --lc-header-bg:   #3b413d;
  --lc-footer-bg:   #3b413d;
  --lc-footer-ink:  #d4d6c9;
  --lc-footer-head: #aecb4a;

  /* Typo */
  --lc-sans:  "Cabin", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --lc-serif: "Marcellus", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --lc-arab:  "Amiri", "Scheherazade New", "Traditional Arabic", serif;

  /* Rayons / ombres / espacements */
  --lc-r:    16px;
  --lc-r-sm: 11px;
  --lc-r-xs: 8px;
  --lc-pill: 999px;
  --lc-shadow:    0 1px 2px rgba(16,40,28,.05), 0 10px 30px -16px rgba(16,40,28,.18);
  --lc-shadow-sm: 0 1px 2px rgba(16,40,28,.06);
  --lc-shadow-lg: 0 24px 60px -28px rgba(16,40,28,.32);
  --lc-maxw: 1680px;
  --lc-trans: .18s ease;
}

/* Mode nuit */
html.lc-dark {
  color-scheme: dark;
  --lc-green:      #aecb4a;
  --lc-green-d:    #94b100;
  --lc-green-dd:   #2c302d;
  --lc-green-tint: #2b321f;
  --lc-gold:       #d8b566;
  --lc-gold-soft:  #2a2417;

  --lc-blue-tint:   #16263a;
  --lc-orange-tint: #34281542;
  --lc-purple-tint: #241d39;

  --lc-bg:        #161814;
  --lc-surface:   #1e211d;
  --lc-surface-2: #24271f;
  --lc-ink:       #e8e9e0;
  --lc-ink-soft:  #a7a99b;
  --lc-ink-faint: #74766b;
  --lc-line:      #2f332c;
  --lc-line-2:    #24271f;

  --lc-header-bg: #232622;
  --lc-footer-bg: #1b1d1a;
}

/* -------------------------------------------------------------------
   1. Reset / base
   ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--lc-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--lc-ink);
  background: var(--lc-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }
img { border: 0; }

a { color: var(--lc-green); text-decoration: none; transition: color var(--lc-trans); }
a:hover { color: var(--lc-green-d); }

h1, h2, h3, h4 {
  font-family: var(--lc-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--lc-ink);
  margin: 0 0 .6em;
  letter-spacing: .2px;
}
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

blockquote {
  margin: 1rem 0;
  padding: .75rem 1.1rem;
  border-left: 3px solid var(--lc-gold);
  background: var(--lc-surface-2);
  border-radius: 0 var(--lc-r-xs) var(--lc-r-xs) 0;
  color: var(--lc-ink-soft);
  font-style: italic;
}

hr { border: 0; border-top: 1px solid var(--lc-line); margin: 1.5rem 0; }

:focus-visible { outline: 2px solid var(--lc-green); outline-offset: 2px; }

::selection { background: var(--lc-green-tint); color: var(--lc-ink); }

/* Police arabe utilitaire */
.lc-ar, .arabe, [lang="ar"] { font-family: var(--lc-arab); direction: rtl; }

/* -------------------------------------------------------------------
   2. Layout — container + grille (compat Bootstrap)
   ------------------------------------------------------------------- */
.container, .lc-container {
  width: 100%;
  max-width: var(--lc-maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 3.2vw, 44px);
}

/* Grille bootstrap-compatible en flex */
.row { display: flex; flex-wrap: wrap; margin-inline: -12px; }
.row > [class*="col-"] { padding-inline: 12px; }

[class*="col-"] { width: 100%; }
.col-md-12 { width: 100%; }
.col-md-7 { width: 100%; }
.col-md-6 { width: 100%; }
.col-md-5 { width: 100%; }
.col-md-4 { width: 100%; }
.col-md-3 { width: 100%; }
.nopadding { padding: 0; }

@media (min-width: 768px) {
  .col-md-12 { width: 100%; }
  .col-md-7  { width: 58.333%; }
  .col-md-6  { width: 50%; }
  .col-md-5  { width: 41.666%; }
  .col-md-4  { width: 33.333%; }
  .col-md-3  { width: 25%; }
  .col-md-2  { width: 16.666%; }
  .col-md-1  { width: 8.333%; }
  .col-md-8  { width: 66.666%; }
  .col-md-9  { width: 75%; }
  .col-md-10 { width: 83.333%; }
  .col-md-11 { width: 91.666%; }
  .col-lg-3  { width: 25%; }
  .col-sm-3  { width: 25%; }
}
@media (max-width: 767px) {
  .col-xs-6 { width: 50%; }
}

.hidden { display: none !important; }

/* Pills langue / mode partagées */
.lc-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 4px;
}
.choix_langue {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-pill);
  padding: .7em 1.35em;
  background: var(--lc-surface);
  color: var(--lc-ink);
  font-weight: 700;
  box-shadow: var(--lc-shadow-sm);
}
@media (hover: hover) { .choix_langue:hover { border-color: var(--lc-green); color: var(--lc-green); } }
.choix_langue.lang_active, .lang_active.choix_langue {
  background: var(--lc-green);
  border-color: var(--lc-green);
  color: #fff;
  box-shadow: 0 10px 22px -14px var(--lc-green);
}

/* -------------------------------------------------------------------
   3. Boutons
   ------------------------------------------------------------------- */
.btn, .lc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--lc-sans);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  padding: .7em 1.3em;
  border-radius: var(--lc-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background var(--lc-trans), color var(--lc-trans),
              border-color var(--lc-trans), box-shadow var(--lc-trans),
              transform var(--lc-trans);
  white-space: nowrap;
}
.btn:active, .lc-btn:active { transform: translateY(1px); }

.btn-primary, .lc-btn--primary {
  background: var(--lc-green);
  color: #fff;
  border-color: var(--lc-green);
}
.btn-primary:hover, .lc-btn--primary:hover {
  background: var(--lc-green-d);
  border-color: var(--lc-green-d);
  color: #fff;
  box-shadow: 0 10px 22px -12px var(--lc-green);
}

.lc-btn--ghost {
  background: var(--lc-surface);
  color: var(--lc-ink);
  border-color: var(--lc-line);
}
@media (hover: hover) { .lc-btn--ghost:hover { border-color: var(--lc-green); color: var(--lc-green); } }

.lc-btn--outline {
  background: transparent;
  color: var(--lc-green);
  border-color: var(--lc-green);
}
@media (hover: hover) { .lc-btn--outline:hover { background: var(--lc-green); color: #fff; } }

.lc-btn--block { display: flex; width: 100%; }

/* -------------------------------------------------------------------
   4. Formulaires
   ------------------------------------------------------------------- */
.form-control, .lc-input, select, textarea, input[type="text"],
input[type="email"], input[type="search"], input[type="password"] {
  font-family: var(--lc-sans);
  font-size: .95rem;
  color: var(--lc-ink);
  background: var(--lc-surface);
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-r-xs);
  padding: .6em .85em;
  width: 100%;
  transition: border-color var(--lc-trans), box-shadow var(--lc-trans);
}
.form-control:focus, .lc-input:focus, select:focus, textarea:focus,
input:focus {
  outline: none;
  border-color: var(--lc-green);
  box-shadow: 0 0 0 3px var(--lc-green-tint);
}
label { font-weight: 600; font-size: .9rem; color: var(--lc-ink-soft); }

/* -------------------------------------------------------------------
   5. Header / navbar (restyle du markup Bootstrap)
   ------------------------------------------------------------------- */
header { display: block; }

/* Menu mobile ouvert : la navbar (et donc son sous-menu absolu z-index:3000)
   passe au-dessus du lecteur audio (1200) et des bottom-sheets. */
.navbar:has(.navbar-collapse.in),
.navbar.lc-nav-open { z-index: 3000; }
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
  margin: 0;
  background: var(--lc-header-bg);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border: 0;
  border-bottom: 1px solid var(--lc-line);
  border-radius: 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

/* Marque / logo */
.navbar-brand, .lc-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--lc-serif);
  font-size: 1.35rem;
  color: var(--lc-ink);
  white-space: nowrap;
  padding: 0;
  margin-right: 4px;
}
.lc-brand b { font-weight: 400; }
.lc-brand .lc-brand-accent { color: var(--lc-green); }
.lc-brand img { height: 30px; width: auto; }

.navbar-header { display: flex; align-items: center; gap: 12px; }

/* Liste de nav */
.navbar-collapse { flex: 1; display: flex; align-items: center; }
.nav.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav.navbar-nav > li { position: relative; }
.nav.navbar-nav > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--lc-r-xs);
  color: var(--lc-ink);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: background var(--lc-trans), color var(--lc-trans);
}
.nav.navbar-nav > li > a:hover,
.nav.navbar-nav > li.open > a {
  background: var(--lc-green-tint);
  color: var(--lc-green-d);
}
.caret {
  display: inline-block;
  width: 0; height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top: 4px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  opacity: .65;
  transition: transform .18s ease;
}
.open > a .caret { transform: rotate(180deg); opacity: 1; }

/* Dropdown (contrat Bootstrap : .open > .dropdown-menu) */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1001;
  display: none;
  min-width: 240px;
  padding: 8px;
  margin: 0;
  list-style: none;
  background: var(--lc-surface);
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-r-sm);
  box-shadow: var(--lc-shadow-lg);
}
.dropdown-menu-right { left: auto; right: 0; }
.open > .dropdown-menu { display: block; animation: lcDrop .16s ease; }
@keyframes lcDrop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dropdown-menu > li > a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--lc-r-xs);
  color: var(--lc-ink);
  font-size: .92rem;
  font-weight: 600;
  white-space: normal;
}
@media (hover: hover) { .dropdown-menu > li > a:hover { background: var(--lc-green-tint); color: var(--lc-green-d); } }
.dropdown-menu .divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--lc-line);
}

/* Recherche dans la navbar */
.navbar-form {
  position: relative;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
}
.navbar-form .form-control.recherche, .navbar-form input.recherche {
  width: 280px;
  max-width: 38vw;
  padding-left: 38px;
  border-radius: var(--lc-pill);
  background: var(--lc-surface-2);
}
.navbar-form::before {
  content: "\f002"; /* fa search */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 14px;
  color: var(--lc-ink-faint);
  pointer-events: none;
  font-size: .9rem;
}

/* Boîte de suggestions */
.suggestionsBox {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1002;
  width: min(520px, 92vw);
  margin-top: 8px;
  background: var(--lc-surface);
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-r);
  box-shadow: var(--lc-shadow-lg);
  overflow: hidden;
}
.suggestionList { max-height: min(70vh, 620px); overflow: auto; }
.lc-suggest-panel { padding: 10px; }
.lc-suggest-section + .lc-suggest-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--lc-line);
}
.lc-suggest-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 4px 8px;
  color: var(--lc-ink-soft);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.lc-suggest-title i { color: var(--lc-green); }
.lc-suggest-item {
  display: block;
  color: var(--lc-ink);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--lc-r-sm);
  padding: 11px 12px;
  transition: background var(--lc-trans), border-color var(--lc-trans);
}
.lc-suggest-item + .lc-suggest-item { margin-top: 5px; }
.lc-suggest-item:hover {
  background: var(--lc-green-tint);
  border-color: var(--lc-line);
  color: var(--lc-ink);
}
.lc-suggest-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lc-suggest-num {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lc-green-tint);
  color: var(--lc-green-d);
  font-weight: 800;
}
.lc-suggest-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.lc-suggest-text strong,
.lc-suggest-verse-text {
  color: var(--lc-ink);
  font-weight: 800;
  line-height: 1.35;
}
.lc-suggest-text small,
.lc-suggest-verse small,
.lc-suggest-ar,
.lc-suggest-empty {
  color: var(--lc-ink-soft);
  font-size: .83rem;
  line-height: 1.45;
}
.lc-suggest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 0 42px;
}
.lc-suggest-actions a,
.lc-suggest-more {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: var(--lc-pill);
  background: var(--lc-surface-2);
  color: var(--lc-green-d);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}
.lc-suggest-actions a:hover,
.lc-suggest-more:hover {
  background: var(--lc-green);
  color: #fff;
}
.lc-suggest-verse {
  display: grid;
  gap: 5px;
}
.lc-suggest-ar {
  display: block;
  font-family: var(--lc-arab);
  font-size: 1rem;
  color: var(--lc-ink);
  line-height: 1.7;
}
.lc-suggest-empty {
  margin: 6px 4px;
}
.lc-suggest-panel mark {
  background: rgba(174,203,74,.28);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}
.lc-suggest-more {
  margin: 8px 4px 2px;
}
@media (hover: hover) { .suggestionList a:hover { background: var(--lc-green-tint); } }

/* Bouton burger mobile */
.navbar-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin: 0;
  background: var(--lc-surface-2);
  color: var(--lc-ink);
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-r-xs);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}
.navbar-toggle .icon-bar {
  display: block; width: 20px; height: 2px;
  background: currentColor; margin: 3px 0; border-radius: 2px;
}

/* Toggle mode nuit */
.lc-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--lc-pill);
  border: 1px solid var(--lc-line);
  background: var(--lc-surface-2);
  color: var(--lc-ink-soft);
  cursor: pointer;
  font-size: 1rem;
  flex: 0 0 auto;
  transition: color var(--lc-trans), border-color var(--lc-trans);
}
@media (hover: hover) { .lc-theme-toggle:hover { color: var(--lc-green); border-color: var(--lc-green); } }
.lc-theme-toggle .fa-moon { display: none; }
html.lc-dark .lc-theme-toggle .fa-sun { display: none; }
html.lc-dark .lc-theme-toggle .fa-moon { display: inline; }

/* Header commun final : fond sombre, texte clair sur toutes les pages. */
.navbar,
.navbar.navbar-inverse {
  background: #3b413d;
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.navbar .container { flex-wrap: nowrap; }
#navbar.navbar-collapse { min-width: 0; }
.lc-brand,
.lc-brand b,
.navbar-brand {
  color: #fff;
}
.lc-brand .lc-brand-accent { color: #aecb4a; }
.nav.navbar-nav > li > a {
  color: rgba(255,255,255,.9);
}
.nav.navbar-nav > li > a:hover,
.nav.navbar-nav > li.open > a {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.caret { border-top-color: rgba(255,255,255,.7); }
.navbar-form input.recherche,
.navbar-form .form-control.recherche {
  background: #fff;
  color: #1b2a22;
  border-color: transparent;
  min-width: 0;
}
.navbar-form input.recherche::placeholder { color: #8a9a90; }
.navbar-form::before { color: #8a9a90; }
html.lc-dark .navbar-form input.recherche,
html.lc-dark .navbar-form .form-control.recherche {
  background: var(--lc-surface-2);
  color: var(--lc-ink);
  border-color: var(--lc-line);
}
html.lc-dark .navbar-form input.recherche::placeholder { color: var(--lc-ink-faint); }
.lc-theme-toggle {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
  color: #fff;
  margin-left: 4px;
}
.lc-theme-toggle:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.navbar-toggle {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}
.navbar-toggle .icon-bar { background: #fff; }
html.lc-dark .navbar,
html.lc-dark .navbar.navbar-inverse {
  background: #232622;
}

@media (min-width: 992px) {
  .navbar .container { flex-wrap: nowrap !important; }
  .navbar-collapse {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    justify-content: space-between;
    gap: 18px;
  }
  .nav.navbar-nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: center;
    min-width: 0;
  }
  .navbar-form {
    flex: 0 0 auto;
    margin-left: 0;
  }
  .navbar-form .form-control.recherche,
  .navbar-form input.recherche {
    width: 360px;
    max-width: 30vw;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .navbar-collapse { gap: 12px; }
  .nav.navbar-nav > li > a {
    padding-left: 8px;
    padding-right: 8px;
    font-size: .86rem;
  }
  .navbar-form .form-control.recherche,
  .navbar-form input.recherche {
    width: 260px;
    max-width: 24vw;
  }
}

/* Icônes sociales dans la nav */
.social-nav-icons { display: none; align-items: center; gap: 8px; }
.social-nav-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--lc-pill);
  color: #fff !important; font-size: 14px; text-decoration: none;
  transition: transform var(--lc-trans), opacity var(--lc-trans);
}
@media (hover: hover) { .social-nav-icons a:hover { transform: translateY(-2px); opacity: .9; } }
.social-nav-icons .sni-ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-nav-icons .sni-tt { background: #010101; }
.social-nav-icons .sni-fb { background: #1877f2; }

.lc-burger-label { font-weight: 700; font-size: .9rem; }
.navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }

/* -------------------------------------------------------------------
   5b. Responsive header
   ------------------------------------------------------------------- */
@media (max-width: 991px) {
  .navbar-toggle { display: inline-flex; order: 3; margin-left: auto; }
  .navbar-header { flex: 1; }
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #3b413d;
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--lc-shadow-lg);
    padding: 10px 16px 18px;
    display: none;
    /* Le menu passe au-dessus de tout (lecteur audio z-index:1200, etc.) */
    z-index: 3000;
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .navbar-collapse.in { display: flex; }
  .navbar .container { flex-wrap: wrap; }
  .nav.navbar-nav { flex-direction: column; align-items: stretch; width: 100%; gap: 0; }
  .nav.navbar-nav > li > a {
    padding: 12px 8px;
    border-radius: var(--lc-r-xs);
    color: #fff;
  }
  .dropdown-menu {
    position: static;
    display: none;            /* replié par défaut ; le tap ajoute .open (Bootstrap) */
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--lc-line);
    border-radius: 0;
    margin: 0 0 6px 14px;
    padding: 0;
    min-width: 0;
    background: transparent;
  }
  .open > .dropdown-menu { display: block; }
  .dropdown-menu > li > a { color: rgba(255,255,255,.85); }
  .dropdown-menu-right { text-align: left; }
  .navbar-form { width: 100%; margin: 10px 0 0; order: 5; }
  .navbar-form .form-control.recherche, .navbar-form input.recherche { width: 100%; max-width: none; }
  .suggestionsBox {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: calc(100vh - 96px);
    margin-top: 0;
  }
  .suggestionList { max-height: calc(100vh - 96px); }
  .lc-suggest-actions { margin-left: 0; }
}
@media (min-width: 992px) {
  /* desktop : le menu doit toujours être visible même si .collapse */
  .navbar-collapse.collapse { display: flex !important; height: auto !important; }
}

/* -------------------------------------------------------------------
   6. Cartes / surfaces génériques
   ------------------------------------------------------------------- */
.lc-card {
  background: var(--lc-surface);
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-r);
  box-shadow: var(--lc-shadow-sm);
}
.lc-section { padding: clamp(28px, 5vw, 52px) 0; }
.lc-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}
.lc-section-title .fa, .lc-section-title i { color: var(--lc-green); }

/* -------------------------------------------------------------------
   7. Pubs / bannières / iframes
   ------------------------------------------------------------------- */
.bloc_img { display: inline-block; }
.bloc_img img { border-radius: var(--lc-r-xs); max-width: 100%; }
.bloc_img--wide,
.bloc_img--wide img { width: 100%; }
.lc-ad-center { text-align: center; }
.lc-pixel-hidden { display: none; }
.lc-link-yellow { color: yellow; }
.lc-text-small { font-size: 12px; }
.lc-media-fluid { max-width: 100%; }
.lc-media-390 { width: 390px; max-width: 100%; }
.lc-embed-video { border: 0; display: block; overflow: hidden; width: 100%; }
.lc-legacy-block { margin-top: 20px; width: 100%; }
.lc-legacy-alert {
  color: #fff;
  margin: 10px;
  padding: 10px;
  text-align: center;
}
.lc-legacy-alert--warm { background: #c88541; }
.lc-legacy-alert--success {
  background: green;
  border: 5px solid yellow;
}
.lc-legacy-alert--danger {
  background: darkred;
  border: 5px solid yellow;
}
.lc-legacy-campaign {
  background: #0f7a3b;
  border-radius: 10px;
  box-sizing: border-box;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  margin: auto;
  padding: 15px 20px;
  text-align: center;
  width: 100%;
}
.lc-legacy-campaign-link {
  background: linear-gradient(90deg, #ffd700, #f1c40f);
  border-radius: 8px;
  color: #0a2a13;
  display: inline-block;
  font-weight: 700;
  margin-top: 10px;
  padding: 8px 16px;
  text-decoration: none;
}
.lc-legacy-donation-link {
  background: green;
  border-radius: 20px;
  color: #fff;
  display: block;
  font-size: 15px;
  margin: 20px;
  padding: 20px;
  text-align: center;
}
[class*="r89-"] { margin: 10px auto; text-align: center; }
.c_principal { text-align: center; }
/* Logo affiché en mode iframe intégrable (?logo=) : centré et borné (sinon collé en haut à gauche) */
.cdnav { margin: 0; padding: 26px 16px 6px; text-align: center; }
#logo2 { display: inline-block; max-height: 84px; width: auto; }
/* Pages légales (mentions / politique) : titre pleine largeur, icône à côté du texte (pas au-dessus) */
#mentions_legales .zone_titre h1 { display: block; }
#mentions_legales .zone_titre h1 .lc-hero-icon { margin-right: 12px; vertical-align: -0.06em; }
/* La bande titre du header est un flex-item qui se rétrécit au texte court : forcer pleine largeur (toutes pages modernes) */
.lc-modern-variant .row > div:has(> .zone_titre) { flex: 1 1 100%; width: 100%; }
.lc-modern-variant .zone_titre:has(> h1), .lc-modern-variant .zone_titre:has(> .lc-tool-wrap) { width: 100%; }
#mentions_legales .zone_titre { width: 100%; text-align: center; }
#mentions_legales .zone_titre .lc-tool-hero, #mentions_legales .zone_titre h1 { text-align: center; }
/* h1 en display:block ci-dessus → l'icône ::before (a-propos) n'a plus le gap flex : le rétablir */
#mentions_legales .zone_titre > h1::before { margin-right: 12px; }
/* Blog (articles.php) : la bande titre du header est vide (titres rendus dans le contenu) — la masquer */
.lc-blog-page .zone_titre { display: none; }

/* -------------------------------------------------------------------
   8. Reprise de lecture / signet (#marquepage)
   ------------------------------------------------------------------- */
#marquepage.zone_titre {
  max-width: var(--lc-maxw);
  margin: 18px auto;
  padding: 18px 22px;
  background: var(--lc-green-tint);
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-r);
  color: var(--lc-ink);
}
#marquepage .btn-primary { margin-top: 8px; }

/* -------------------------------------------------------------------
   9. Footer
   ------------------------------------------------------------------- */
.footer {
  margin-top: 56px;
  background: var(--lc-footer-bg);
  color: var(--lc-footer-ink);
  padding: 52px 0 26px;
}
.footer a { color: var(--lc-footer-ink); }
.footer a:hover { color: #fff; }

.lc-footer-banniere { text-align: center; margin-bottom: 32px; }
.lc-footer-banniere img { border-radius: var(--lc-r-xs); }

.lc-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.lc-footer-brand .lc-footer-logo {
  font-size: 1.3rem;
  color: #fff;
  display: inline-flex;
  margin-bottom: 12px;
}
.lc-footer-brand .lc-footer-logo b { font-weight: 400; }
.lc-footer-brand .lc-brand-accent { color: var(--lc-footer-head); }
.lc-footer-brand p { font-size: .92rem; line-height: 1.6; color: var(--lc-footer-ink); opacity: .9; max-width: 32ch; }
.lc-footer-social { display: flex; gap: 10px; margin-top: 14px; }
.lc-footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--lc-pill);
  color: #fff !important; font-size: 15px;
  transition: transform var(--lc-trans), opacity var(--lc-trans);
}
@media (hover: hover) { .lc-footer-social a:hover { transform: translateY(-2px); } }
.lc-footer-social .sni-ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.lc-footer-social .sni-tt { background: #010101; }
.lc-footer-social .sni-fb { background: #1877f2; }

.footer .a_footer_titre {
  display: block;
  font-family: var(--lc-serif);
  font-size: .8rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--lc-footer-head);
  margin: 0 0 16px;
  pointer-events: auto;
}
.footer .a_footer {
  display: block;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--lc-footer-ink);
  margin: 0 0 10px;
  opacity: .9;
  transition: opacity var(--lc-trans), color var(--lc-trans);
}
a.a_footer:hover { opacity: 1; color: #fff; }

.lc-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 22px;
  font-size: .85rem;
  color: var(--lc-footer-ink);
  opacity: .85;
}
.lc-footer-bottom p { margin: 0; }
.lc-footer-bottom a { text-decoration: none; }
.lc-footer-bottom a:hover { text-decoration: underline; }
.lc-heart { color: #e25563; }

/* Footer legacy (pages non refondues) */
.footer #uxware {
  width: 100%;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: .92rem;
}
.footer #uxware a { color: var(--lc-footer-head); }
.footer .hr3 { width: 100%; height: 1px; background: rgba(255,255,255,.12); margin: 26px 0 0; }

@media (max-width: 900px) {
  .lc-footer-grid { grid-template-columns: 1fr 1fr; gap: 26px 20px; }
  .lc-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .lc-footer-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------
   10. Divers legacy (lisibilité des pages non encore refondues)
   ------------------------------------------------------------------- */
.zone_titre { text-align: center; }
.zone_titre h1, .zone_titre h2 { margin-bottom: .3em; }

#lapage { display: block !important; }

table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--lc-line); padding: .55em .7em; text-align: left; }
th { background: var(--lc-surface-2); }

/* Utilitaires */
.lc-muted { color: var(--lc-ink-soft); }
.lc-center { text-align: center; }
.lc-mt { margin-top: 1rem; }
.lc-mb { margin-bottom: 1rem; }
.lc-hidden { display: none !important; }
.lc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===================================================================
   18. CORRECTIFS MOBILE (accueil + global)
   =================================================================== */
/* Anti-débordement (clip n'empêche pas position:sticky) */
body { overflow-x: clip; }

/* Hamburger : 3 barres fines et resserrées */
.lc-burger-bars { display: inline-flex; flex-direction: column; justify-content: center; gap: 3px; }
.lc-burger-bars .icon-bar { display: block; width: 17px; height: 2px; margin: 0; background: #fff; border-radius: 2px; }

/* Header mobile : burger à gauche, LOGO CENTRÉ, toggle jour/nuit à droite */
@media (max-width: 991px) {
  .navbar .container { gap: 10px; }
  .navbar-toggle {
    order: -1;
    flex: 0 0 auto;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    gap: 0; padding: 0;
    margin: 0 !important;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--lc-pill);
  }
  .lc-brand { order: 0; margin-left: auto; margin-right: auto; }
  .lc-theme-toggle { order: 5; }
}

/* Dashboard : 2 colonnes (override des colonnes desktop) */
@media (max-width: 991px) {
  .lc-dashboard { grid-template-columns: 1fr 1fr !important; }
  .lc-dashboard .lc-dash-cell { border-left: 1px solid var(--lc-line); }
  .lc-dashboard .lc-dash-cell:nth-child(odd) { border-left: 0; }
  .lc-continue-top { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Cartes d'action : 2 par ligne dès le mobile */
@media (max-width: 700px) {
  .lc-actions { grid-template-columns: 1fr 1fr !important; gap: 12px; }
  .lc-action { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .lc-action-arrow { display: none; }
  .lc-action-ic { width: 40px; height: 40px; }
}

/* En-tête sourates + select : pleine largeur mobile (corrige le scroll horizontal) */
@media (max-width: 991px) {
  .lc-surah-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .lc-surah-nav { width: 100%; display: flex; }
  .lc-surah-nav .nav_rapide { min-width: 0; max-width: none; width: 100%; flex: 1; }
}

/* Apprendre / Téléchargements : 2 par ligne mobile ; infos 1 */
@media (max-width: 700px) {
  .lc-cards--5, .lc-cards--6 { grid-template-columns: 1fr 1fr !important; gap: 12px; }
  .lc-cards--3 { grid-template-columns: 1fr !important; }
}

/* Hero compact sur mobile (rapproche le listing des sourates) */
@media (max-width: 600px) {
  .page_index .zone_titre { padding-top: 16px; }
  .page_index .zone_titre h1 { font-size: 1.6rem; }
  .lc-ornament { margin-bottom: 10px; }
  .lc-ornament i { font-size: 1.4rem; }
  .lc-pills { margin: 12px 0 2px; gap: 8px; }
  .choix_langue { padding: .5em 1em; font-size: .85rem; }
  .lc-actions { margin-top: 16px; }
  .lc-dashboard { margin-top: 16px; }
  .lc-home-section { padding-top: 24px; }
  .lc-seo { padding: 22px 18px !important; }
}

/* ===================================================================
   19. QA mobile 2026-07 — cibles tactiles confortables
   =================================================================== */
@media (max-width: 991px) {
  /* Liens du footer : hauteur tactile ~40px */
  .footer .a_footer { padding: 8px 0; margin: 0 0 2px; }
  /* Liens texte du dashboard accueil */
  .lc-dash-link { padding: 6px 0; margin-top: 2px; }
  .lc-learn-link { display: inline-block; padding: 6px 4px; }
}

/* Sélecteur de langue du footer */
.lc-footer-langs { display: flex; gap: 14px; align-items: center; margin: 0; }
.lc-footer-langs .a_footer { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.lc-footer-langs .lc-lang-active { color: #fff; opacity: 1; font-weight: 700; }

/* Bandeau « reprendre la lecture » : barre fine et discrète */
.lc-resume-bar {
  display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center;
  gap: 8px 12px;
  width: auto !important; max-width: var(--lc-maxw);
  margin: 12px auto 0; padding: 9px 14px !important;
  background: var(--lc-green-tint); border: 1px solid var(--lc-line);
  border-radius: var(--lc-r-sm); box-shadow: var(--lc-shadow-sm);
  font-size: .92rem; text-align: left !important; min-height: 0 !important;
}
.lc-resume-ic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--lc-surface); color: var(--lc-green); font-size: .85rem; }
.lc-resume-txt { flex: 1 1 240px; line-height: 1.4; color: var(--lc-ink); min-width: 0; }
.lc-resume-txt b { font-weight: 700; margin-right: 6px; }
.lc-resume-meta { color: var(--lc-ink-soft); white-space: normal; }
.lc-resume-bar .btn.btn-primary { flex: 0 0 auto; padding: .45em 1.1em; font-size: .88rem; margin: 0; }
.lc-resume-close { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--lc-surface); border: 1px solid var(--lc-line); color: var(--lc-ink-faint); cursor: pointer; }
@media (hover: hover) { .lc-resume-close:hover { color: var(--lc-red); border-color: var(--lc-red); } }
@media (max-width: 600px) {
  .lc-resume-bar { margin: 10px 10px 0; font-size: .88rem; }
}
.lc-resume-del { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; color: var(--lc-ink-faint); font-size: .8rem; cursor: pointer; padding: 6px 8px; border-radius: var(--lc-r-xs); }
@media (hover: hover) { .lc-resume-del:hover { color: var(--lc-red); background: var(--lc-surface); } }
