/* ==========================================================================
   TABLE DE CORRESPONDANCE : CODES HEXADÉCIMAUX & THÈMES
   --------------------------------------------------------------------------
   Ce fichier permet de permuter aisément les thèmes via des variables CSS
   sur l'élément racine :root ou en appliquant l'attribut data-theme="...".

   1. THÈME PAR DÉFAUT : "Émeraude & Or Impérial" (data-theme="emerald-gold")
      • Fond de page (--bg-page)          : #fbf9f5 (Ivoire clair poudré)
      • Fond des cartes (--bg-card)        : #ffffff (Blanc pur)
      • Fond citation (--bg-quote)        : #f3f7f3 (Vert menthe pâle apaisant)
      • Bordure pleine (--border-outer)   : #e2ddd3 (Beige lin chaud)
      • Bordure tirets (--border-dashed)  : #486343 (Vert sauge authentique)
      • Bordure citation (--border-quote) : #486343 (Vert sauge - shape1/shape2)
      • Texte principal (--text-main)     : #1c281e (Noir forêt intense)
      • Texte secondaire (--text-muted)   : #556959 (Sauge grisé lisible)
      • Accent primaire (--primary-accent): #2d5a36 (Vert émeraude islamique)
      • Accent doré (--gold-accent)       : #b48a3c (Or antique vénitien)
      • Fond conseil d'or (--bg-gold-tip) : #fef8ee (Ambre doux)
      • Bord conseil d'or (--border-gold) : #f3dfb2 (Or délicat)
      • Cercle 1 (--circle-num-1)         : #059669 (Vert émeraude vif)
      • Cercle 2 (--circle-num-2)         : #0284c7 (Bleu céleste vif)
      • Cercle 3 (--circle-num-3)         : #d97706 (Ambre safran vif)
      • Cercle 4 (--circle-num-4)         : #10b981 (Vert menthe vif)
      • Cercle 5 (--circle-num-5)         : #8b5cf6 (Violet royal vif)

   2. THÈME : "Ivoire & Ambre d'Orient" (data-theme="warm-ivory")
      • Fond de page (--bg-page)          : #fdfaf5 (Vanille poudré)
      • Fond des cartes (--bg-card)        : #ffffff (Blanc pur)
      • Fond citation (--bg-quote)        : #fdf6e9 (Crème sablée miel)
      • Bordure pleine (--border-outer)   : #eedec5 (Sable doré)
      • Bordure tirets (--border-dashed)  : #b37d2f (Ocre chaleureux)
      • Bordure citation (--border-quote) : #b37d2f (Ambre oriental)
      • Texte principal (--text-main)     : #292524 (Brun foncé pierre)
      • Texte secondaire (--text-muted)   : #78716c (Gris pierre)
      • Accent primaire (--primary-accent): #b45309 (Ambre profond)
      • Accent doré (--gold-accent)       : #d97706 (Or vif)
      • Fond conseil d'or (--bg-gold-tip) : #fff7ed (Miel chaud)
      • Bord conseil d'or (--border-gold) : #fed7aa (Pêche dorée)
      • Cercle 1 (--circle-num-1)         : #ea580c (Orange vif cuivré)
      • Cercle 2 (--circle-num-2)         : #0284c7 (Bleu céleste vif)
      • Cercle 3 (--circle-num-3)         : #d97706 (Ambre safran vif)
      • Cercle 4 (--circle-num-4)         : #059669 (Émeraude vive)
      • Cercle 5 (--circle-num-5)         : #9333ea (Pourpre améthyste)

   3. THÈME : "Perle & Sauge Royale" (data-theme="pearl-sage")
      • Fond de page (--bg-page)          : #f8f9f7 (Perle de nacre claire)
      • Fond des cartes (--bg-card)        : #ffffff (Blanc pur)
      • Fond citation (--bg-quote)        : #f0f4f0 (Sauge douce lumineuse)
      • Bordure pleine (--border-outer)   : #dbe2da (Gris perle)
      • Bordure tirets (--border-dashed)  : #4a6741 (Vert olive naturelle)
      • Bordure citation (--border-quote) : #4a6741 (Sauge noble)
      • Texte principal (--text-main)     : #18181b (Noir graphite)
      • Texte secondaire (--text-muted)   : #64748b (Ardoise neutre)
      • Accent primaire (--primary-accent): #3d5c34 (Vert pin noble)
      • Accent doré (--gold-accent)       : #a38035 (Or bronze)
      • Fond conseil d'or (--bg-gold-tip) : #f7f9f6 (Sauge et miel très pâle)
      • Bord conseil d'or (--border-gold) : #d5e0d3 (Vert pastel)
      • Cercle 1 (--circle-num-1)         : #16a34a (Vert prairie)
      • Cercle 2 (--circle-num-2)         : #0891b2 (Bleu cyan lagon)
      • Cercle 3 (--circle-num-3)         : #ca8a04 (Or impérial)
      • Cercle 4 (--circle-num-4)         : #059669 (Émeraude)
      • Cercle 5 (--circle-num-5)         : #6366f1 (Indigo royal)

   4. THÈME : "Nuit & Or Majestueux" (data-theme="royal-navy")
      • Fond de page (--bg-page)          : #fcfbf9 (Albâtre soyeux)
      • Fond des cartes (--bg-card)        : #ffffff (Blanc pur)
      • Fond citation (--bg-quote)        : #f0f4f8 (Bleu glacier très clair)
      • Bordure pleine (--border-outer)   : #d0d9e8 (Bleu acier pâle)
      • Bordure tirets (--border-dashed)  : #1e3a8a (Bleu de Perse royal)
      • Bordure citation (--border-quote) : #1e3a8a (Bleu nuit profond)
      • Texte principal (--text-main)     : #0f172a (Bleu nuit profond)
      • Texte secondaire (--text-muted)   : #475569 (Ardoise bleutée)
      • Accent primaire (--primary-accent): #1e3a8a (Bleu royal)
      • Accent doré (--gold-accent)       : #d97706 (Or safran)
      • Fond conseil d'or (--bg-gold-tip) : #fffbeb (Ambre doux)
      • Bord conseil d'or (--border-gold) : #fde68a (Or pâle)
      • Cercle 1 (--circle-num-1)         : #0284c7 (Bleu azur)
      • Cercle 2 (--circle-num-2)         : #2563eb (Bleu roi vif)
      • Cercle 3 (--circle-num-3)         : #d97706 (Ambre safran)
      • Cercle 4 (--circle-num-4)         : #059669 (Émeraude)
      • Cercle 5 (--circle-num-5)         : #7c3aed (Violet impérial)
   ========================================================================== */

/* --------------------------------------------------------------------------
   DÉFINITION DES VARIABLES CSS (THEMING DYNAMIQUE)
   -------------------------------------------------------------------------- */
:root,
[data-theme="emerald-gold"] {
  --bg-page: #fbf9f5;
  --bg-card: #ffffff;
  --bg-quote: #f3f7f3;
  --border-outer: #e2ddd3;
  --border-dashed: #486343;
  --border-quote: #486343;
  --text-main: #1c281e;
  --text-muted: #556959;
  --primary-accent: #2d5a36;
  --gold-accent: #b48a3c;
  --bg-gold-tip: #fef8ee;
  --border-gold: #f3dfb2;
  --text-gold-tip: #854d0e;
  
  --circle-num-1: #059669;
  --circle-num-2: #0284c7;
  --circle-num-3: #d97706;
  --circle-num-4: #10b981;
  --circle-num-5: #8b5cf6;

  --card-shadow-default: 0 4px 20px -2px rgba(45, 90, 54, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 18px 36px -6px rgba(45, 90, 54, 0.14), 0 6px 12px -2px rgba(0, 0, 0, 0.06);
}

[data-theme="warm-ivory"] {
  --bg-page: #fdfaf5;
  --bg-card: #ffffff;
  --bg-quote: #fdf6e9;
  --border-outer: #eedec5;
  --border-dashed: #b37d2f;
  --border-quote: #b37d2f;
  --text-main: #292524;
  --text-muted: #78716c;
  --primary-accent: #b45309;
  --gold-accent: #d97706;
  --bg-gold-tip: #fff7ed;
  --border-gold: #fed7aa;
  --text-gold-tip: #9a3412;

  --circle-num-1: #ea580c;
  --circle-num-2: #0284c7;
  --circle-num-3: #d97706;
  --circle-num-4: #059669;
  --circle-num-5: #9333ea;

  --card-shadow-default: 0 4px 20px -2px rgba(180, 83, 9, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 18px 36px -6px rgba(180, 83, 9, 0.14), 0 6px 12px -2px rgba(0, 0, 0, 0.06);
}

[data-theme="pearl-sage"] {
  --bg-page: #f8f9f7;
  --bg-card: #ffffff;
  --bg-quote: #f0f4f0;
  --border-outer: #dbe2da;
  --border-dashed: #4a6741;
  --border-quote: #4a6741;
  --text-main: #18181b;
  --text-muted: #64748b;
  --primary-accent: #3d5c34;
  --gold-accent: #a38035;
  --bg-gold-tip: #f7f9f6;
  --border-gold: #d5e0d3;
  --text-gold-tip: #3f6212;

  --circle-num-1: #16a34a;
  --circle-num-2: #0891b2;
  --circle-num-3: #ca8a04;
  --circle-num-4: #059669;
  --circle-num-5: #6366f1;

  --card-shadow-default: 0 4px 20px -2px rgba(61, 92, 52, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 18px 36px -6px rgba(61, 92, 52, 0.14), 0 6px 12px -2px rgba(0, 0, 0, 0.06);
}

[data-theme="royal-navy"] {
  --bg-page: #fcfbf9;
  --bg-card: #ffffff;
  --bg-quote: #f0f4f8;
  --border-outer: #d0d9e8;
  --border-dashed: #1e3a8a;
  --border-quote: #1e3a8a;
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary-accent: #1e3a8a;
  --gold-accent: #d97706;
  --bg-gold-tip: #fffbeb;
  --border-gold: #fde68a;
  --text-gold-tip: #b45309;

  --circle-num-1: #0284c7;
  --circle-num-2: #2563eb;
  --circle-num-3: #d97706;
  --circle-num-4: #059669;
  --circle-num-5: #7c3aed;

  --card-shadow-default: 0 4px 20px -2px rgba(30, 58, 138, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 18px 36px -6px rgba(30, 58, 138, 0.15), 0 6px 12px -2px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   POLICES & BASES TYPOGRAPHIQUES
   -------------------------------------------------------------------------- */
body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.font-serif-playfair {font-family: 'Playfair Display', Georgia, serif;}
.font-serif-jakarta {font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;}

.font-arabic-calligraphy {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  direction: rtl;
  text-align: right;
  line-height: 2.1;
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   AFFICHE PRINCIPALE : BORDURE GÉNÉRALE UNIQUE (ESPACE MAXIMISÉ)
   -------------------------------------------------------------------------- */
.poster-master-card {
  position: relative;
  background-color: var(--bg-card);
  border: 2px solid var(--border-outer);
  border-radius: 26px;
  padding: 2.75rem 2.25rem;
  box-shadow: 0 10px 35px -10px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (max-width: 768px) {
  .poster-master-card {
    padding: 1.5rem 1rem;
    border-radius: 18px;
  }
}

/* Bordure intérieure désactivée pour agrandir le contenu */
.poster-inner-dashed-border {
  display: none !important;
}

/* --------------------------------------------------------------------------
   CADRES DES 5 RECOMMANDATIONS (BOXES AVEC SURVOL & ANIMATION)
   -------------------------------------------------------------------------- */
.recommendation-card {
  position: relative;
  background-color: #ffffff;
  border: 1.5px solid var(--border-outer);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--card-shadow-default);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              border-color 0.3s ease,
              background-color 0.3s ease,
              padding 0.3s ease;
}

@media (min-width: 768px) {
  .recommendation-card.is-collapsed {
    padding: 1.25rem 1.75rem;
    margin-bottom: 1rem;
  }
}

}

/* Effet d'animation et d'ombre au survol de la souris */
.recommendation-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-accent);
}

/* --------------------------------------------------------------------------
   BARRE STORIES MOBILE (SWIPE HORIZONTAL) & BARRE ACCORDÉON PC
   -------------------------------------------------------------------------- */
.stories-mobile-nav {
  position: sticky;
  top: 10px;
  z-index: 40;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-outer);
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.story-segment {
  flex: 1;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.story-segment.active {
  background-color: var(--primary-accent);
  height: 5px;
}

.accordion-pc-toolbar {
  /* background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-outer);
  border-radius: 14px;
  padding: 0.6rem 1rem; */
}

/* Bouton d'en-tête de chaque bloc accordéon */
.accordion-header-btn {
  cursor: pointer;
  outline: none;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.accordion-header-btn:hover {
  opacity: 0.95;
}

.accordion-chevron-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.04);
  transition: background-color 0.2s ease, transform 0.3s ease;
}

.accordion-header-btn:hover .accordion-chevron-box {
  background-color: rgba(0, 0, 0, 0.08);
}

.chevron-arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-header-btn[aria-expanded="false"] .chevron-arrow {
  transform: rotate(180deg);
}

/* Panneau de l'accordéon */
.accordion-panel-collapse {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.accordion-panel-collapse.collapsed {
  max-height: 0 !important;
  opacity: 0;
  visibility: hidden;
  padding-top: 0 !important;
}

.accordion-panel-collapse.show {
  max-height: 3500px;
  opacity: 1;
  visibility: visible;
}

/* Mode Swipe Horizontal sur Mobile (< 768px) */
@media (max-width: 767.98px) {
  .poster-cards-track {
    display: flex !important;
    flex-direction: row !important;
	align-items: flex-start !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    gap: 1.15rem !important;
    padding: 0.25rem 0 0.5rem 0 !important; /* 0.25rem 0 1.25rem 0*/
    margin: 0 !important;
    scrollbar-width: none !important;
  }

  .poster-cards-track::-webkit-scrollbar {
    display: none !important;
  }

  .recommendation-card {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
	height: auto !important; 
    align-self: flex-start !important;
  }

  /* Sur smartphone, chaque carte est toujours complète dans son écran Story 
  Sur smartphone, l'accordéon interne de la carte active est toujours déplié*/
  .accordion-panel-collapse,
  .accordion-panel-collapse.collapsed {
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
  }

  .accordion-header-btn {
    cursor: default !important;
  }
}

/* Cercle de couleur vive avec chiffre en blanc */
.vivid-number-circle {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommendation-card:hover .vivid-number-circle {
  transform: scale(1.08) rotate(3deg);
}

/* Application des couleurs vives aux cercles numérotés */
.circle-num-1 { background-color: var(--circle-num-1); box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35); }
.circle-num-2 { background-color: var(--circle-num-2); box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35); }
.circle-num-3 { background-color: var(--circle-num-3); box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35); }
.circle-num-4 { background-color: var(--circle-num-4); box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35); }
.circle-num-5 { background-color: var(--circle-num-5); box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35); }

/* Titre principal SEO H2 */
.recommendation-title {
  font-family: 'Plus Jakarta Sans', serif;
  font-weight: 600;
  font-size: 1.3rem; /*1.45*/
  color: var(--text-main);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

@media (max-width: 768px) {
  .recommendation-title {
    font-size: 1.25rem;
  }
}

.recommendation-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   ENCADRÉ DES CITATIONS DE HADITHS & VERSETS (SHAPE1 & SHAPE2 CORNERS)
   -------------------------------------------------------------------------- */
.islamic-quote-box {
  position: relative;
  background-color: var(--bg-quote);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 1.85rem 2.25rem;
  margin: 1.75rem 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .islamic-quote-box {
    padding: 1.35rem 1.25rem;
    margin: 1.25rem 0;
  }
}

/* Bordure intérieure en tirets de l'encadré */
.quote-inner-dashed {
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--border-quote);
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.35;
}

@media (max-width: 768px) {
  .quote-inner-dashed {
    inset: 6px;
  }
}

/* Guirlande coin supérieur droit (shape2.png) */
.quote-corner-top-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 95px;
  height: 140px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.88;
  color: var(--border-quote);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
  .quote-corner-top-right {
    width: 65px;
    height: 98px;
  }
}

/* Guirlande coin inférieur gauche (shape1.png) */
.quote-corner-bottom-left {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 95px;
  height: 140px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.88;
  color: var(--border-quote);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
  .quote-corner-bottom-left {
    width: 65px;
    height: 98px;
  }
}

.islamic-quote-box:hover .quote-corner-top-right {
  opacity: 1;
  transform: translate(2px, -2px);
}

.islamic-quote-box:hover .quote-corner-bottom-left {
  opacity: 1;
  transform: translate(-2px, 2px);
}

/* Badge indicateur de type de citation (Verset Coranique / Hadith / Doua) */
.quote-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--border-quote, #2d5a36);
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-quote, #2d5a36);
  border-radius: 50rem;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 4;
}

.quote-type-badge i {
  font-size: 0.85rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .quote-type-badge {
    font-size: 0.68rem;
    padding: 0.18rem 0.55rem;
    margin-bottom: 0.65rem;
  }
}

/* Texte de la citation */
.quote-text-fr {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.68;
  color: var(--text-main);
  position: relative;
  z-index: 3;
}

.quote-source {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.5rem;
  position: relative;
  z-index: 3;
}

/* --------------------------------------------------------------------------
   BULLE "CONSEIL D'OR" (RECOMMANDATION PRATIQUE)
   -------------------------------------------------------------------------- */
.golden-tip-bubble {
  background-color: var(--bg-gold-tip);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold-accent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--text-gold-tip);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 1.25rem 0 1.5rem 0;
}

.golden-tip-badge {
  font-weight: 700;
  color: var(--gold-accent);
  margin-right: 0.4rem;
}

/* --------------------------------------------------------------------------
   ESPACE MULTIMÉDIA À 2 COLONNES (SANS CADRE INTÉRIEUR NI PADDING RESTRICTIF)
   -------------------------------------------------------------------------- */
.multimedia-box {
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 1.5rem;
  box-shadow: none;
}

.multimedia-header {
  display: flex;
  align-items: center;
  justify-content: end;/*space-between*/
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.multimedia-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Colonne de gauche : Lecteur interactif */
.multimedia-player-col {
  position: relative;
  background-color: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ratio-16x9 {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.ratio-16x9 iframe,
.ratio-16x9 .audio-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Lecteur audio personnalisé */
.custom-audio-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1c281e, #2d5a36);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  text-align: center;
}

.custom-audio-panel audio {
  width: 90%;
  max-width: 400px;
  margin-top: 1rem;
}

/* Colonne de droite : Liste des médias / Playlist cliquable */
.multimedia-playlist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.media-item-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background-color: #ffffff;
  border: 1px solid var(--border-outer);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.media-item-btn:hover {
  background-color: var(--bg-quote);
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  transform: translateX(3px);
}

.media-item-btn.active {
  background-color: var(--bg-quote);
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(45, 90, 54, 0.1);
}

.media-badge {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.media-badge-video {
  background-color: #fee2e2;
  color: #b91c1c;
}

.media-badge-audio {
  background-color: #e0e7ff;
  color: #3730a3;
}

/* --------------------------------------------------------------------------
   SÉPARATEUR SHAPE8 CENTRÉ
   -------------------------------------------------------------------------- */
.shape8-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.25rem auto 1.75rem auto;
  max-width: 580px;
  color: var(--primary-accent);
  transition: color 0.3s ease;
}

.shape8-container svg {
  width: 100%;
  height: auto;
  max-height: 90px;
  overflow: visible;
}

/* Barre de partage individuel WhatsApp & Téléchargement PNG */
.card-share-bar {
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.share-whatsapp-btn {
  background-color: #25d366;
  border-color: #20ba5a;
  color: #ffffff;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.share-whatsapp-btn:hover {
  background-color: #20ba5a;
  border-color: #1b9c4c;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.copy-card-text-btn.copied {
  background-color: #e8f5e9 !important;
  color: #2e7d32 !important;
  border-color: #a5d6a7 !important;
}

/* Impression print */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background-color: #ffffff !important;
  }
  .poster-master-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .recommendation-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* ==========================================================================
   GRAND LECTEUR MULTIMÉDIA PLEINE LARGEUR (SHOWCASE DU VENDREDI)
   Inspiré du layout illustre-1.png : Full width + Encoche Navigation + Carrousel
   ========================================================================== */
.grand-media-section {
  border-top: 2px dashed var(--border-outer);
  padding-top: 2rem;
  margin-top: 3rem;
  /*
  margin-top: 1.25rem !important;
    padding-top: 0.5rem !important;
  */
}

.grand-player-wrapper {
  background-color: #090d16;
  border: 2px solid var(--border-outer);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.18);
  position: relative;
}

/* Encoche blanche de navigation au coin inférieur gauche (illustre-1.png) */
.grand-nav-notch {
  border-top-right-radius: 18px !important;
  background: #ffffff;
  padding: 8px 12px;
  box-shadow: 4px -4px 18px rgba(0, 0, 0, 0.12);
  z-index: 10;
}

.grand-nav-btn {
  width: 44px;
  height: 44px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.grand-nav-prev {
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.grand-nav-prev:hover {
  background-color: #e2e8f0;
  color: #0f172a;
  transform: translateX(-2px);
}

.grand-nav-next {
  background-color: #dc2626;
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.grand-nav-next:hover {
  background-color: #b91c1c;
  color: #ffffff;
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.45);
}

/* Écran Audio & Message Vocal WhatsApp feutré */
.grand-audio-screen {
  background: radial-gradient(circle at 50% 35%, #1e293b 0%, #090d16 100%);
  overflow: hidden;
  z-index: 2;
}

/* Pilotage déclaratif du grand lecteur selon data-active-type (zéro classList en JS) */
#grandLecteurMedia[data-active-type="youtube"] #grandVideoIframe {
  display: block;
}
#grandLecteurMedia[data-active-type="youtube"] #grandAudioScreen {
  display: none !important;
}

#grandLecteurMedia[data-active-type="audio"] #grandVideoIframe {
  display: none !important;
}
#grandLecteurMedia[data-active-type="audio"] #grandAudioScreen {
  display: flex !important;
}

/* Badge méta déclaratif (zéro manipulation de chaînes de classes en JS) */
.active-meta-badge {
  transition: all 0.25s ease;
}
.active-meta-badge[data-type="youtube"] {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}
.active-meta-badge[data-type="audio"] {
  background-color: #dcfce7 !important;
  color: #16a34a !important;
  border-color: #86efac !important;
}

.audio-backdrop-blur {
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.25);
  transform: scale(1.15);
  opacity: 0.65;
  transition: background-image 0.4s ease;
}

.audio-avatar-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  padding: 3px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.audio-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Ondes audio animées */
.audio-soundwaves-container {
  height: 32px;
}

.wave-bar {
  display: inline-block;
  width: 4px;
  background-color: #25d366;
  border-radius: 3px;
  height: 10px;
  animation: soundWave 1.2s ease-in-out infinite alternate;
}

.wave-bar:nth-child(1) { animation-delay: 0.1s; height: 12px; }
.wave-bar:nth-child(2) { animation-delay: 0.3s; height: 22px; }
.wave-bar:nth-child(3) { animation-delay: 0.15s; height: 16px; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; height: 26px; }
.wave-bar:nth-child(5) { animation-delay: 0.2s; height: 18px; }
.wave-bar:nth-child(6) { animation-delay: 0.35s; height: 24px; }
.wave-bar:nth-child(7) { animation-delay: 0.25s; height: 14px; }
.wave-bar:nth-child(8) { animation-delay: 0.05s; height: 20px; }
.wave-bar:nth-child(9) { animation-delay: 0.45s; height: 10px; }

@keyframes soundWave {
  0% { transform: scaleY(0.3); opacity: 0.6; }
  100% { transform: scaleY(1.2); opacity: 1; }
}

/* Zone Titre & Résumé (gauche) */
.grand-active-meta {
  background-color: var(--bg-quote);
  border: 1px solid var(--border-outer) !important;
  transition: all 0.3s ease;
}

/* Carrousel de médias (droite) */
.media-carousel-track {
  scrollbar-width: thin;
  scrollbar-color: var(--border-dashed) transparent;
}

.media-carousel-track::-webkit-scrollbar {
  height: 6px;
}

.media-carousel-track::-webkit-scrollbar-track {
  background: transparent;
}

.media-carousel-track::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.media-carousel-card {
  width: 195px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.media-carousel-card:hover {
  transform: translateY(-4px);
}

.media-card-thumb-box {
  width: 100%;
  aspect-ratio: 4/3; /*4/3 16/10 ou 16/9 */
  background-color: #0f172a;
  border: 2px solid transparent;
  transition: all 0.25s ease;
}

/* Carte active sélectionnée */
.media-carousel-card.is-active .media-card-thumb-box {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(45, 90, 54, 0.25), 0 8px 20px rgba(0, 0, 0, 0.12);
}

.media-carousel-card.is-active .media-card-title {
  color: var(--primary-accent) !important;
}

/* Bouton Play translucide et décentré en bas à droite (NE MASQUE PAS LE VISAGE) */
.media-card-play-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.media-card-play-btn.audio-play-style {
  border-color: rgba(37, 211, 102, 0.85);
  background: rgba(15, 60, 30, 0.6);
  color: #25d366;
  font-size: 0.95rem;
}

.media-carousel-card:hover .media-card-play-btn {
  transform: scale(1.15);
  background: rgba(220, 38, 38, 0.85);
  border-color: #ffffff;
}

.media-carousel-card:hover .media-card-play-btn.audio-play-style {
  background: rgba(37, 211, 102, 0.9);
  color: #ffffff;
}

@media (max-width: 768px) {
  .grand-nav-notch {
    padding: 6px 10px;
    border-top-right-radius: 14px !important;
  }
  .grand-nav-btn {
    width: 38px;
    height: 38px;
  }
  .media-carousel-card {
    width: 140px;
  }
}

/*----------------- MAJ version Smartphone & Tablette ! Aération et suppression de la grande bordure/principale de la page qu'on retrouve sur la version web // on augmente aussi la taille des lecteurs médias --------------------*/

/* 1. SUPPRESSION DE LA 1ÈRE GRANDE BORDURE SUR MOBILE & TABLETTE (< 992px) --*/
@media (max-width: 991.98px) {
  .poster-master-card {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: transparent !important;
    padding: 0.25rem 0 0.5rem 0 !important;
    margin: 0 !important;
  }

  main.container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1.5rem !important;
  }
}
/* ==========================================================================
   2. HAUTEURS REHAUSSÉES DES LECTEURS MULTIMÉDIAS ======= */

/* A. Lecteurs à l'intérieur des recommandations : plus hauts et aérés */
.multimedia-player-col .ratio-16x9,
.multimedia-player-col .player-wrapper {
  position: relative;
  width: 100%;
  padding-top: 64% !important; /* Ratio 16:10 plus généreux que 16:9 (56%) */
  min-height: 220px;
}

@media (min-width: 768px) {
  .multimedia-player-col .ratio-16x9,
  .multimedia-player-col .player-wrapper {
    padding-top: 60% !important;
    min-height: 235px;
  }
}

@media (max-width: 768px) {
  .grand-player-screen.ratio,
  .grand-player-screen.ratio-21x9 {
    --bs-aspect-ratio: 52% !important;	
     padding-top: 22.25% !important; 
    min-height: 200px;
  }
}
 
  .grand-player-screen.ratio,
  .grand-player-screen.ratio-21x9 {
	--bs-aspect-ratio: 56.25% !important;
    min-height: 275px !important;
  }
  
/*---------------- MAJ de la navigation en slide des accordéons sur Smartphone/Tablette -----------------*/

/* Mode Stories Mobile (< 768px) : Affichage d'une seule carte active à la fois
   Élimine DÉFINITIVEMENT et à 100% tout vide blanc ! */
@media (max-width: 767.98px) {
  .poster-cards-track {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
  }

  /* Par défaut sur smartphone : les cartes sont masquées */
  .recommendation-card {
    display: none !important;
    margin-bottom: 0 !important;
    padding: 1.35rem 1.15rem;
    border-radius: 18px;
    height: auto !important;
	/* opacity: 0; */
  }

  /* Seule la carte active est affichée avec une animation fluide */
  .recommendation-card.is-active-story {
    display: block !important;
	/* opacity: 1 !IMPORTANT; */
    animation: storySlideIn 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
  }

  @keyframes storySlideIn {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .grand-media-section {
    margin-top: 1.5rem !important;
    padding-top: 0.5rem !important;
  }
}