/* ================================================================
   QuranLight – style.css
   Architecture : Variables → Reset → Layout → Header → Sidebar →
   Bloc Accueil → Modules → Récitateurs → Citations → Nouvelles →
   Panneau Sourates → Footer → Splash → Thèmes → Responsive
   ================================================================
   NOTE : Ce fichier est l'unique source de vérité CSS.
   Chaque composant n'est défini qu'UNE SEULE FOIS.
   ================================================================ */

/* ================================================================
   1. FONTS & VARIABLES GLOBALES
   ================================================================ */
@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

:root {
  /* Couleurs principales */
  --color-gold: #b08d57;
  --color-gold-light: #d4bc96;
  --color-gold-pale: #f1d5a9;
  --color-gold-glow: rgba(176, 141, 87, 0.35);

  /* Fonds émeraude */
  --emerald-dark: #05140f;
  --emerald-mid: #0a2d20;

  /* Texte */
  --text-main: #ffffff;
  --text-muted: #bebebe;

  /* Surfaces & bordures */
  --card-bg: rgba(13, 34, 27, 0.85);
  --border-light: rgba(176, 141, 87, 0.2);
  --glass-border: 1px solid var(--border-light);

  /* Layout */
  --header-height: 70px;
  --sidebar-width: 280px;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Typographie */
  --font-ui: "Poppins", sans-serif;
  --font-arabic: "Amiri", serif;
}

/* ================================================================
   2. RESET & BASE
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-ui);
  min-height: 100vh;
  color: var(--text-main);
  line-height: 1.6;
  background:
    url("https://www.transparenttextures.com/patterns/dark-matter.png"),
    linear-gradient(to bottom, var(--emerald-mid) 0%, var(--emerald-dark) 100%);
  background-repeat: repeat, no-repeat;
  background-attachment: fixed;
  background-size: auto, cover;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s var(--ease-smooth);
}

/* ================================================================
   3. LAYOUT PRINCIPAL
   ================================================================ */
.main-container {
  padding-top: calc(var(--header-height) + 20px) !important;
  padding-left: 20px;
  padding-right: 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ================================================================
   4. HEADER GLASS
   ================================================================ */
.glass-panel {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--header-height);
  z-index: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  background: color-mix(in srgb, var(--emerald-dark) 95%, transparent);
  border-bottom: var(--glass-border);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.glass-panel.scrolled {
  background: var(--emerald-mid);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.menu-toggle,
.settings-icon {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.4rem;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  border-radius: 8px;
}

.menu-toggle:hover,
.settings-icon:hover {
  transform: scale(1.1);
  color: var(--color-gold-light);
}
.menu-toggle:active {
  transform: scale(0.9);
}

#header-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

#header-location i {
  color: var(--color-gold);
  font-size: 0.95rem;
}

/* ================================================================
   5. SIDEBAR
   ================================================================ */
.sidebar {
  position: fixed;
  inset-block: 0;
  left: calc(-1 * var(--sidebar-width));
  width: var(--sidebar-width);
  background: linear-gradient(
    180deg,
    var(--emerald-mid) 0%,
    var(--emerald-dark) 100%
  );
  z-index: 1000;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1.5px solid rgba(255, 193, 7, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}
.sidebar.open {
  left: 0;
}

#sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 999;
  display: none;
}

.sidebar-header {
  text-align: center;
  padding: 40px 15px;
  background: radial-gradient(
    circle,
    rgba(15, 79, 52, 0.6) 0%,
    transparent 100%
  );
  border-bottom: var(--glass-border);
  flex-shrink: 0;
}

.app-logo-sidebar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--color-gold);
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
  object-fit: cover;
}

.sidebar-nav {
  flex-grow: 1;
  padding: 15px 0;
}
.sidebar-footer {
  padding: 15px 0;
  border-top: var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 25px;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}

.nav-item i {
  font-size: 1.1rem;
  color: var(--color-gold);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding-left: 30px;
}
.nav-item.active {
  background: linear-gradient(
    90deg,
    rgba(15, 79, 52, 0.4) 0%,
    transparent 100%
  );
  color: var(--color-gold);
  border-left-color: var(--color-gold);
}

/* ================================================================
   6. BLOC DATE / HEURE / PRIÈRE (Accueil)
   ================================================================ */
.home-date-time-block {
  width: 95%;
  max-width: 700px;
  margin: 0 auto 30px;
  padding: 50px 35px;
  text-align: center;
  background-image:
    linear-gradient(rgba(10, 45, 32, 0.7), rgba(0, 0, 0, 0.8)),
    url("../image/fonds_vert.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 30px;
  border: 1px solid rgba(176, 141, 87, 0.3);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.gregorian-date {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.current-time {
  font-size: 4.8rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin: 15px 0;
  letter-spacing: -1px;
  text-shadow:
    0 4px 15px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(176, 141, 87, 0.4);
}

.hijri-date {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-gold-light);
  margin-bottom: 30px;
}

.next-prayer-info {
  width: 100%;
  max-width: 500px;
  padding: 25px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.next-prayer-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.next-prayer-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.next-prayer-countdown {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-top: 5px;
}

.prayer-progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-top: 20px;
  overflow: hidden;
}

.prayer-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--color-gold-light),
    var(--color-gold)
  );
  box-shadow: 0 0 15px var(--color-gold-glow);
  border-radius: 10px;
  transition: width 1s linear;
}

/* ================================================================
   7. CITATION DU JOUR
   ================================================================ */
.daily-reminder-card {
  max-width: 750px;
  margin: 40px auto;
  padding: 45px 35px;
  background:
    radial-gradient(circle at top right, rgba(176, 141, 87, 0.08), transparent),
    linear-gradient(145deg, rgba(13, 22, 18, 0.98), rgba(4, 10, 8, 1));
  backdrop-filter: blur(15px);
  border-radius: 30px;
  border: 1px solid rgba(176, 141, 87, 0.3);
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transition: transform 0.4s ease;
}

.daily-reminder-card:hover {
  transform: translateY(-5px);
}

.quote-arabic {
  font-family: var(--font-arabic);
  font-size: 2.4rem;
  color: #f8f1e5;
  line-height: 1.5;
  margin-bottom: 20px;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(176, 141, 87, 0.2);
}

.quote-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 25px auto;
}

.quote-separator::before,
.quote-separator::after {
  content: "";
  height: 1px;
  width: 60px;
}

.quote-separator::before {
  background: linear-gradient(to right, var(--color-gold), transparent);
}
.quote-separator::after {
  background: linear-gradient(to left, var(--color-gold), transparent);
}

.sep-diamond {
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  transform: rotate(45deg);
  box-shadow: 0 0 10px var(--color-gold);
}

.quote-french {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  line-height: 1.8;
  max-width: 85%;
  margin: 0 auto;
}

/* ================================================================
   8. GRILLE DES MODULES
   ================================================================ */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 45px 20px;
  padding: 40px 15px 60px;
  justify-items: center;
}

.module-card {
  background: transparent;
  border: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

/* Effet brillance au survol */
.module-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 1;
}

.module-card:hover::before {
  left: 150%;
  transition: left 0.8s var(--ease-smooth);
}
.module-card:hover {
  transform: translateY(-10px);
}
.module-card:hover .module-icon {
  border-color: var(--color-gold) !important;
}
.module-card:hover .module-label {
  color: var(--color-gold);
}

.module-icon {
  width: 90px;
  height: 90px;
  font-size: 2rem;
  margin-bottom: 18px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  border: 1px solid rgba(176, 141, 87, 0.3);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.8),
    inset 0 0 15px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.module-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 2;
  transition: color 0.3s;
}

/* Dégradés icônes */
.bg-icon-red {
  background: linear-gradient(145deg, #1a0505, #4a0000);
}
.bg-icon-purple {
  background: linear-gradient(145deg, #0f0514, #2a0a3d);
}
.bg-icon-blue {
  background: linear-gradient(145deg, #050a14, #0a1d3d);
}
.bg-icon-green {
  background: linear-gradient(145deg, #05140f, #0a2d20);
}
.bg-icon-gold {
  background: linear-gradient(145deg, #141105, #3d300a);
}
.bg-icon-gray {
  background: linear-gradient(145deg, #0a0a0a, #262626);
}

/* ================================================================
   9. RÉCITATEURS
   ================================================================ */
.reciters-section {
  padding: 40px 0 30px;
}

.section-header-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  gap: 20px;
  margin-bottom: 40px;
}

.section-title-premium {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 4px;
  background: linear-gradient(
    90deg,
    var(--color-gold),
    #fff,
    var(--color-gold)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientSlide 6s infinite linear;
  width: 100%;
}

.section-title-premium::before,
.section-title-premium::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 80px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-gold),
    transparent
  );
}

@keyframes gradientSlide {
  from {
    background-position: 0%;
  }
  to {
    background-position: 200%;
  }
}

.view-all-link {
  color: var(--color-gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 10px 28px;
  border-radius: 25px;
  border: 2px solid rgba(176, 141, 87, 0.4);
  background: rgba(176, 141, 87, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.4s var(--ease-spring);
}

.view-all-link::after {
  content: "→";
  transition: margin-left 0.3s;
}
.view-all-link:hover {
  background: var(--color-gold);
  color: var(--emerald-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--color-gold-glow);
}
.view-all-link:hover::after {
  margin-left: 4px;
}

.reciters-horizontal-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
  padding: 30px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}

.reciters-horizontal-list::-webkit-scrollbar {
  display: none;
}

@media (min-width: 900px) {
  .reciters-horizontal-list {
    justify-content: center;
  }
}

.reciter-card-circle {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.reciter-card-circle:focus-visible {
  outline: 2px solid var(--color-gold);
  border-radius: 8px;
}

.reciter-image-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(
    135deg,
    var(--color-gold),
    #5a462a,
    var(--color-gold-light)
  );
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 15px;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.reciter-image-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--emerald-dark);
  pointer-events: none;
}

.reciter-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  opacity: 0.9;
  transition: color 0.3s;
}

.reciter-card-circle:hover .reciter-image-wrapper {
  transform: translateY(-10px) scale(1.08);
  box-shadow: 0 20px 40px rgba(176, 141, 87, 0.3);
}
.reciter-card-circle:hover .reciter-label {
  color: var(--color-gold-light);
  opacity: 1;
}

/* ================================================================
   10. PANNEAU SOURATES
   ================================================================ */
#surahPanel {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #0d3a27 0%, #05140f 100%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#surahPanel[hidden] {
  display: none;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.surah-panel-header {
  background: rgba(5, 20, 15, 0.95);
  padding: 15px 20px;
  border-bottom: var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.surah-panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-gold-light);
  text-align: center;
  flex: 1;
}

.surah-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition:
    color 0.3s,
    background 0.3s;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.surah-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.surah-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: none;
}
.surah-list-container::-webkit-scrollbar {
  display: none;
}

.surah-item {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(176, 141, 87, 0.1);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.surah-item:hover {
  background: rgba(176, 141, 87, 0.12);
  border-color: var(--color-gold);
  transform: scale(1.01);
}
.surah-item:focus-visible {
  outline: 2px solid var(--color-gold);
}

.surah-item .number-box {
  width: 38px;
  height: 38px;
  background: rgba(176, 141, 87, 0.15);
  border: 1px solid rgba(176, 141, 87, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-light);
  font-weight: 800;
  font-size: 0.85rem;
  margin-right: 15px;
  flex-shrink: 0;
}

.surah-info-main {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.surah-text-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.surah-name-fr {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.surah-sub-info {
  font-size: 0.72rem;
  color: var(--color-gold-light);
  text-transform: uppercase;
  opacity: 0.8;
}
.surah-name-ar {
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  color: var(--color-gold-light);
}

/* ================================================================
   11. ACTUALITÉS
   ================================================================ */
.news-section {
  padding: 60px 0 80px;
  margin-top: 20px;
  border-top: var(--glass-border);
  position: relative;
  overflow: hidden;
}

.news-filters {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 5px 0 15px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.news-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: var(--glass-border);
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: all 0.3s ease;
  font-family: var(--font-ui);
}

.filter-btn:hover {
  border-color: var(--color-gold-light);
  color: var(--text-main);
}
.filter-btn.active {
  background: var(--color-gold);
  color: var(--emerald-dark);
  border-color: var(--color-gold);
  box-shadow: 0 4px 15px var(--color-gold-glow);
}

.news-container-fluid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px 5% 40px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.25s ease;
}

.news-container-fluid::-webkit-scrollbar {
  display: none;
}
.news-container-fluid.fade-out {
  opacity: 0;
}

.modern-news-card {
  min-width: 280px;
  max-width: 280px;
  background: var(--card-bg);
  border-radius: 24px;
  border: var(--glass-border);
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    border-color 0.3s;
}

.modern-news-card:hover {
  transform: translateY(-10px);
  border-color: var(--color-gold-light);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}
.modern-news-card:focus-visible {
  outline: 2px solid var(--color-gold);
}

.news-img-box {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}
.news-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.modern-news-card:hover .news-img-box img {
  transform: scale(1.1);
}

.category-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(5, 20, 15, 0.8);
  backdrop-filter: blur(5px);
  color: var(--color-gold-light);
  padding: 5px 14px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid var(--color-gold);
  z-index: 2;
}

.news-info-overlay {
  padding: 20px;
  background: linear-gradient(
    to top,
    var(--emerald-dark) 70%,
    transparent 100%
  );
  margin-top: -50px;
  position: relative;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}

.read-time {
  font-size: 0.75rem;
  color: var(--color-gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.news-h4 {
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text-main);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 15px;
}

.news-footer-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.news-link-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-gold);
}
.news-arrow {
  color: var(--color-gold);
  transition: transform 0.3s;
}
.modern-news-card:hover .news-arrow {
  transform: translateX(8px);
}

/* ================================================================
   12. FOOTER (DÉFINI UNE SEULE FOIS)
   ================================================================ */
.footer {
  background: linear-gradient(
    180deg,
    var(--emerald-mid) 0%,
    var(--emerald-dark) 100%
  );
  padding: clamp(40px, 8vw, 60px) clamp(20px, 4vw, 25px) 30px;
  margin-top: clamp(50px, 10vh, 70px);
  border-radius: 50px 50px 0 0;
  border-top: 2px solid rgba(255, 193, 7, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 30px rgba(16, 95, 63, 0.3),
    0 -15px 40px rgba(0, 0, 0, 0.4);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(25px, 5vw, 40px);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section h3 {
  color: var(--color-gold);
  font-size: clamp(0.82rem, 2vw, 0.92rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: clamp(18px, 4vw, 25px);
  position: relative;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 35px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 18px);
  margin-bottom: clamp(15px, 4vw, 22px);
}

.footer-logo {
  width: clamp(44px, 10vw, 52px);
  height: clamp(44px, 10vw, 52px);
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  box-shadow: 0 0 20px rgba(176, 141, 87, 0.3);
  object-fit: cover;
  transition: transform 0.4s var(--ease-spring);
}

.footer-brand:hover .footer-logo {
  transform: rotate(360deg) scale(1.08);
}

.footer-app-name {
  font-family: var(--font-arabic);
  font-size: clamp(1.4rem, 5vw, 1.65rem);
  font-weight: 800;
  background: linear-gradient(
    135deg,
    #fff 0%,
    var(--color-gold-pale) 50%,
    var(--color-gold-light) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(176, 141, 87, 0.4));
}

.footer-desc {
  font-size: clamp(0.82rem, 2vw, 0.9rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  max-width: 280px;
  border-left: 2px solid rgba(176, 141, 87, 0.4);
  padding-left: clamp(12px, 3vw, 15px);
}

.footer-links nav,
.social-links-vertical {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vw, 12px);
}

.footer-links a,
.social-links-vertical a {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.88rem, 2vw, 0.98rem);
  font-weight: 500;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  transition: all 0.3s var(--ease-smooth);
}

.footer-links a:hover {
  color: var(--color-gold);
  padding-left: 10px;
}
.social-links-vertical a:hover {
  color: var(--color-gold);
}

.footer-links a i,
.social-links-vertical a i {
  width: 18px;
  text-align: center;
  color: var(--color-gold);
}

.lang-selector-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(176, 141, 87, 0.4);
  border-radius: 20px;
  padding: 8px 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.lang-selector-wrapper:hover {
  border-color: var(--color-gold);
  box-shadow: 0 4px 20px rgba(176, 141, 87, 0.15);
}

.lang-icon-box {
  color: var(--color-gold);
  font-size: 1rem;
  display: flex;
}

.lang-select {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  outline: none;
  font-family: var(--font-ui);
}

.lang-select option {
  background: #022c22;
  color: #fff;
}

.footer-bottom {
  margin-top: clamp(40px, 10vw, 60px);
  padding: 25px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(0.82rem, 2vw, 0.92rem);
}

/* ================================================================
   13. SPLASH SCREEN
   ================================================================ */
#splash-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #0a2d20, #051d14);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
}

.splash-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-wrapper-splash {
  padding: 5px;
  background: linear-gradient(135deg, var(--color-gold), #fbbf24);
  border-radius: 50%;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(176, 141, 87, 0.3);
  opacity: 0;
  transform: scale(0.8);
  animation: premiumReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.main-logo-splash {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 3px solid #051d14;
}

.brand-name-splash {
  font-size: 2.5rem;
  font-weight: 600;
  margin: 20px 0 0;
  letter-spacing: 2px;
  background: linear-gradient(to right, #fff, #fbbf24, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineText 4s linear infinite;
}

.splash-tagline {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  margin-top: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInUp 1.2s forwards 1s;
}

.loader-container-splash {
  margin-top: 40px;
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}
.loader-bar-splash {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, var(--color-gold), #fbbf24);
  animation: loadingProgress 3.5s ease-in-out forwards;
}

.version-splash {
  position: absolute;
  bottom: 40px;
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
  text-transform: uppercase;
}

.hide-splash {
  opacity: 0 !important;
  visibility: hidden;
}

@keyframes premiumReveal {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes shineText {
  to {
    background-position: 200% center;
  }
}
@keyframes loadingProgress {
  to {
    width: 100%;
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================================
   14. CHATBOT IFRAME
   ================================================================ */
iframe[src="chatbot.html"] {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 110px;
  height: 110px;
  border: none;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    width 0.3s ease,
    height 0.3s ease;
  border-radius: 20px;
}

iframe[src="chatbot.html"].chat-opened {
  width: 380px;
  height: 550px;
}

.splash-finished iframe[src="chatbot.html"] {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================================
   15. THÈME SOMBRE (theme-dark)
   ================================================================ */
body.theme-dark {
  background:
    url("https://www.transparenttextures.com/patterns/dark-matter.png"),
    linear-gradient(to bottom, #1a1a1a, #0f0f0f) !important;
}

body.theme-dark .glass-panel {
  background: rgba(20, 20, 20, 0.9) !important;
}
body.theme-dark #sidebar {
  background: linear-gradient(180deg, #1e1e1e, #121212) !important;
}
body.theme-dark .nav-item {
  color: rgba(240, 240, 240, 0.8) !important;
}
body.theme-dark .nav-item.active {
  color: var(--color-gold-light) !important;
  border-left-color: var(--color-gold-light) !important;
}
body.theme-dark .home-date-time-block {
  background-image:
    linear-gradient(rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.95)),
    var(--home-bg-image) !important;
}
body.theme-dark .next-prayer-info {
  background: rgba(30, 30, 30, 0.6) !important;
}
body.theme-dark .daily-reminder-card {
  background: linear-gradient(145deg, #1e1e1e, #141414) !important;
  border-color: rgba(197, 160, 89, 0.2) !important;
}
body.theme-dark .footer {
  background: #161616 !important;
}
body.theme-dark .footer-section h3 {
  color: var(--color-gold-light) !important;
}
body.theme-dark .footer-links a {
  color: rgba(230, 230, 230, 0.7) !important;
}
body.theme-dark #sidebar-overlay {
  background: rgba(0, 0, 0, 0.85) !important;
}

/* ================================================================
   16. RESPONSIVE
   ================================================================ */

/* --- Tablettes (≤ 1024px) : news en grille 2 colonnes --- */
@media (min-width: 1024px) {
  .news-section .section-header-flex {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .news-filters {
    overflow: visible;
    width: auto;
  }

  .news-container-fluid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    overflow: visible;
    padding: 20px 5%;
  }

  .modern-news-card {
    min-width: 0;
    max-width: 100%;
  }
}

@media (min-width: 1400px) {
  .news-container-fluid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Smartphones larges (≤ 768px) --- */
@media (max-width: 768px) {
  .main-container {
    padding-left: 15px;
    padding-right: 15px;
  }
  :root {
    --sidebar-width: 260px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-desc {
    border-left: none;
    border-top: 1px solid rgba(176, 141, 87, 0.2);
    padding: 15px 0 0;
    max-width: 360px;
    margin: 0 auto;
  }

  .footer-links nav {
    align-items: center;
  }
  .footer-links a {
    justify-content: center;
  }

  .social-links-vertical {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 28px !important;
  }

  .social-links-vertical a span {
    display: none;
  }
  .social-links-vertical a {
    padding: 10px;
  }
  .social-links-vertical a i {
    font-size: 1.6rem !important;
  }

  .lang-selector-wrapper {
    margin: 0 auto;
  }
  .footer {
    padding: 40px 18px 35px;
    border-radius: 40px 40px 0 0;
  }
}

/* --- Smartphones standards (≤ 480px) --- */
@media (max-width: 480px) {
  .glass-panel {
    height: 60px;
    padding: 0 12px;
  }
  :root {
    --header-height: 60px;
  }

  .home-date-time-block {
    width: 100%;
    padding: 28px 16px;
    border-radius: 22px;
  }
  .current-time {
    font-size: 3.2rem !important;
  }
  .hijri-date {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .modules-grid {
    gap: 30px 14px;
    padding: 20px 0;
  }
  .module-icon {
    width: 72px !important;
    height: 72px !important;
    font-size: 1.5rem !important;
    border-radius: 22px !important;
  }
  .module-label {
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
  }

  .daily-reminder-card {
    padding: 28px 16px;
    margin: 25px 0;
  }
  .quote-arabic {
    font-size: 1.7rem !important;
  }
  .quote-french {
    font-size: 0.88rem !important;
    max-width: 100%;
  }

  .reciters-horizontal-list {
    gap: 16px;
    padding: 20px 12px;
  }
  .reciter-card-circle {
    flex: 0 0 88px;
  }
  .reciter-image-wrapper {
    width: 78px !important;
    height: 78px !important;
  }
  .reciter-label {
    font-size: 0.78rem;
  }

  .modern-news-card {
    flex: 0 0 80vw;
    max-width: 300px;
  }

  iframe[src="chatbot.html"].chat-opened {
    width: calc(100vw - 20px);
    height: 500px;
    right: 10px;
  }
}

/* --- Ultra-étroits (≤ 340px) --- */
@media (max-width: 340px) {
  .current-time {
    font-size: 2.6rem !important;
  }
  .module-icon {
    width: 64px !important;
    height: 64px !important;
  }
  .section-title-premium {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }
}
